From 627a83366681074a4c3f2ab1b5c08b46d3d98a42 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 19 Sep 2023 01:23:38 -0700 Subject: [PATCH 001/231] mnist wip --- examples/mnist.jl | 44 ++++++++++++++++++++++++++++++++++++++++++++ src/autodiff.jl | 1 + 2 files changed, 45 insertions(+) create mode 100644 examples/mnist.jl diff --git a/examples/mnist.jl b/examples/mnist.jl new file mode 100644 index 00000000..21be1b5a --- /dev/null +++ b/examples/mnist.jl @@ -0,0 +1,44 @@ +using Revise +using MLDatasets: MNIST +using Dice +using Random + +function matrix_var!(name, init) + # TODO: Add matrix primitives in autodiff + m = Matrix{Dice.ADNode}(undef, size(init)) + for i in CartesianIndices(init) + var_name = "$(name)[$(join(Tuple(i), ','))]" + m[i] = var!(var_name, init[i]) + end + m +end + +HIDDEN_LAYER_SIZE = 256 +TRAIN_ROWS = 1000 + +Random.seed!(0) +θ1_init = rand(28 * 28, HIDDEN_LAYER_SIZE) +θ2_init = rand(HIDDEN_LAYER_SIZE, 10) + +clear_vars!() +θ1 = matrix_var!("θ1", θ1_init) +θ2 = matrix_var!("θ2", θ2_init) + +Dice._variable_to_value + +x = reshape(MNIST(:train).features, (28 * 28, 60000)) |> transpose +x = x[1:TRAIN_ROWS, :] + +t1 = @elapsed x * θ1_init +# 0.008783958 +t2 = @elapsed x * θ1 +# 70.553411583 +(typeof(θ1)) +function Base.:(*)(M1::AbstractMatrix, M2::) + +* θ2 + +matrix_param("", (2, 3), 0) +M +rand(256, 28 * 28) * x +map(Dice.sigmoid, x) \ No newline at end of file diff --git a/src/autodiff.jl b/src/autodiff.jl index c11a5160..80a324d1 100644 --- a/src/autodiff.jl +++ b/src/autodiff.jl @@ -49,6 +49,7 @@ struct Constant <: ADNode value::Real end NodeType(::Type{Constant}) = Leaf() +Base.zero(::ADNode) = Constant(0) Base.show(io::IO, x::Variable) = print(io, "Variable($(x.name))") Base.show(io::IO, x::Constant) = print(io, "Constant($(x.value))") From d33207e2f5d23ba539253207095ba7c92849875f Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 21 Sep 2023 23:38:22 -0700 Subject: [PATCH 002/231] [Autodiff] Support matrix vars, sin, cos --- src/autodiff.jl | 252 ++++++++++++++++++++++++++++++++--------- src/dist/bool.jl | 3 +- src/inference/pr.jl | 2 +- src/inference/train.jl | 10 +- test/autodiff_test.jl | 41 ++++++- 5 files changed, 241 insertions(+), 67 deletions(-) diff --git a/src/autodiff.jl b/src/autodiff.jl index 80a324d1..e7b62e39 100644 --- a/src/autodiff.jl +++ b/src/autodiff.jl @@ -1,5 +1,6 @@ -export var!, clear_vars!, value, compute, differentiate, step_maximize!, - set_var!, sigmoid, add_unit_interval_var!, ADNode +export new_var!, clear_vars!, value, compute, differentiate, step_maximize!, + set_var!, sigmoid, add_unit_interval_var!, ADNode, Var, train_vars!, value, + ADMatrix, ad_map using DirectedAcyclicGraphs import DirectedAcyclicGraphs: NodeType, DAG, children @@ -7,52 +8,67 @@ using DataStructures: DefaultDict abstract type ADNode <: DAG end -struct Variable <: ADNode +ADNodeCompatible = Union{Real, AbstractMatrix{<:Real}} + +struct Var <: ADNode name::String end -NodeType(::Type{Variable}) = Leaf() -_variable_to_value = Dict{Variable, Real}() +NodeType(::Type{Var}) = Leaf() -function var!(s, init_val, get_if_exists=true) - var = Variable(s) - if get_if_exists && haskey(_variable_to_value, var) - return var - end - @assert !haskey(_variable_to_value, var) - _variable_to_value[var] = init_val - var +_variable_to_value = Dict{String, ADNodeCompatible}() + +function value(var::Var) + _variable_to_value[var.name] +end + +var_exists(s) = haskey(_variable_to_value, s) + +function set_var!(s, val) + _variable_to_value[s] = val + Var(s) +end + +function new_var!(s, init_val) + @assert !var_exists(s) + set_var!(s, init_val) end +function get_or_init_var!(s, if_not_exists=nothing) + if var_exists(s) + Var(s) + else + set_var!(s, if_not_exists) + end +end sigmoid(x) = 1 / (1 + exp(-x)) -# deriv_sigmoid(x) = sigmoid(x) * (1 - sigmoid(x)) +deriv_sigmoid(x) = sigmoid(x) * (1 - sigmoid(x)) inverse_sigmoid(x) = log(x / (1 - x)) -function add_unit_interval_var!(s, init_val=0.5, get_if_exists=true) + +function add_unit_interval_var!(s, init_val=0.5) @assert 0 < init_val < 1 - before_sigmoid = var!( - "$(s)_before_sigmoid", inverse_sigmoid(init_val), get_if_exists + before_sigmoid = get_or_init_var!( + "$(s)_before_sigmoid", inverse_sigmoid(init_val) ) sigmoid(before_sigmoid) end -function set_var_value!(var, value) - _variable_to_value[var] = value -end - function clear_vars!() empty!(_variable_to_value) end struct Constant <: ADNode - value::Real + value::ADNodeCompatible end NodeType(::Type{Constant}) = Leaf() Base.zero(::ADNode) = Constant(0) -Base.show(io::IO, x::Variable) = print(io, "Variable($(x.name))") -Base.show(io::IO, x::Constant) = print(io, "Constant($(x.value))") +Base.show(io::IO, x::Var) = + print(io, "Var($(x.name))") +Base.show(io::IO, x::Constant) = + print(io, "Constant($(x.value))") struct Add <: ADNode x::ADNode @@ -61,8 +77,8 @@ end NodeType(::Type{Add}) = Inner() children(x::Add) = [x.x, x.y] Base.:(+)(x::ADNode, y::ADNode) = Add(x, y) -Base.:(+)(x::ADNode, y::Real) = Add(x, Constant(y)) -Base.:(+)(x::Real, y::ADNode) = Add(Constant(x), y) +Base.:(+)(x::ADNode, y::ADNodeCompatible) = Add(x, Constant(y)) +Base.:(+)(x::ADNodeCompatible, y::ADNode) = Add(Constant(x), y) struct Mul <: ADNode x::ADNode @@ -71,8 +87,8 @@ end NodeType(::Type{Mul}) = Inner() children(x::Mul) = [x.x, x.y] Base.:(*)(x::ADNode, y::ADNode) = Mul(x, y) -Base.:(*)(x::ADNode, y::Real) = Mul(x, Constant(y)) -Base.:(*)(x::Real, y::ADNode) = Mul(Constant(x), y) +Base.:(*)(x::ADNode, y::ADNodeCompatible) = Mul(x, Constant(y)) +Base.:(*)(x::ADNodeCompatible, y::ADNode) = Mul(Constant(x), y) # struct Div <: ADNode # x::ADNode @@ -90,9 +106,26 @@ struct Pow <: ADNode end NodeType(::Type{Pow}) = Inner() children(x::Pow) = [x.x, x.y] + Base.:(^)(x::ADNode, y::ADNode) = Pow(x, y) -Base.:(^)(x::ADNode, y::Real) = Pow(x, Constant(y)) -Base.:(^)(x::Real, y::ADNode) = Pow(Constant(x), y) +Base.:(^)(x::ADNode, y::ADNodeCompatible) = Pow(x, Constant(y)) +Base.:(^)(x::ADNodeCompatible, y::ADNode) = Pow(Constant(x), y) + +struct Sin <: ADNode + x::ADNode +end +NodeType(::Type{Sin}) = Inner() +children(x::Sin) = [x.x] + +Base.sin(x::ADNode) = Sin(x) + +struct Cos <: ADNode + x::ADNode +end +NodeType(::Type{Cos}) = Inner() +children(x::Cos) = [x.x] + +Base.cos(x::ADNode) = Cos(x) # struct Exp <: ADNode # x::ADNode @@ -104,11 +137,12 @@ Base.:(^)(x::Real, y::ADNode) = Pow(Constant(x), y) # Desugared ops Base.:(-)(x::ADNode) = x * -1 Base.:(-)(x::ADNode, y::ADNode) = x + -y -Base.:(-)(x::ADNode, y::Real) = x + Constant(-y) -Base.:(-)(x::Real, y::ADNode) = Constant(x) - y -Base.:(/)(x::ADNode, y::ADNode) = x * Pow(y, Constant(-1.)) -Base.:(/)(x::ADNode, y::Real) = x / Constant(y) -Base.:(/)(x::Real, y::ADNode) = Constant(x) / y +Base.:(-)(x::ADNode, y::ADNodeCompatible) = x + Constant(-y) +Base.:(-)(x::ADNodeCompatible, y::ADNode) = Constant(x) - y +inv(x::ADNode) = x ^ Constant(-1.) +Base.:(/)(x::ADNode, y::ADNode) = x * inv(y) +Base.:(/)(x::ADNode, y::ADNodeCompatible) = x / Constant(y) +Base.:(/)(x::ADNodeCompatible, y::ADNode) = Constant(x) / y Base.exp(x::ADNode) = ℯ ^ x Base.abs(x::ADNode) = (x ^ 2) ^ (1/2) @@ -119,10 +153,63 @@ NodeType(::Type{Log}) = Inner() children(x::Log) = [x.x] Base.log(x::ADNode) = Log(x) +# Matrix ops + +struct ADMatrix <: ADNode + x::AbstractMatrix{ADNode} + function ADMatrix(x::AbstractMatrix{<:Union{<:Real, ADNode}}) + x isa AbstractMatrix{ADNode} && return new(x) + cast(x::ADNode) = x + cast(x::Real) = Constant(x) + new(map(cast, x)) + end +end +NodeType(::Type{ADMatrix}) = Inner() +children(x::ADMatrix) = vcat(x.x) + +Base.:(+)(::AbstractMatrix{<:ADNode}, ::Any) = error("Lift to ADMatrix for performance") +Base.:(+)(::Any, ::AbstractMatrix{<:ADNode}) = error("Lift to ADMatrix for performance") +Base.:(*)(::AbstractMatrix{<:ADNode}, ::AbstractMatrix) = error("Lift to ADMatrix for performance") +Base.:(*)(::AbstractMatrix, ::AbstractMatrix{<:ADNode}) = error("Lift to ADMatrix for performance") + +struct GetIndex <: ADNode + x::ADNode + i::CartesianIndex +end +NodeType(::Type{GetIndex}) = Inner() +children(x::GetIndex) = [x.x] + +Base.getindex(x::ADNode, i...) = GetIndex(x, CartesianIndex(i...)) + +# rtjoa: This could be more elegant (e.g. not require the user to provide the +# derivative of `f`) if we restructured autodiff.jl to be pure. +# One possible interface is: +# `lambda(parameters::Vector{Var}, result::ADNode)::ADFunction` +# `apply(f::ADFunction, arguments::Vector{ADNode})` +# `compute(f::ADFunction, arguments::Vector{RM})::RM` +# where `RM = Union{Real, AbstractMatrix}` +# `differentiate(f::ADFunction)::ADFunction` +# ...but let's save this for the next Dice rewrite! +struct Map <: ADNode + f::Function + f′::Function + x::ADNode +end +NodeType(::Type{Map}) = Inner() +children(x::Map) = x.x +ad_map(f::Function, f′::Function, x::ADNode) = Map(f, f′, x) + + +struct Transpose <: ADNode + x::ADNode +end +NodeType(::Type{Transpose}) = Inner() +children(x::Transpose) = x.x + function compute(root, vals=nothing) - isnothing(vals) && (vals = Dict{ADNode, Real}()) + isnothing(vals) && (vals = Dict{ADNode, Any}()) - fl(x::Variable) = _variable_to_value[x] + fl(x::Var) = value(x) fl(x::Constant) = x.value fi(x::Add, call) = call(x.x) + call(x.y) fi(x::Mul, call) = call(x.x) * call(x.y) @@ -130,45 +217,94 @@ function compute(root, vals=nothing) # fi(x::Div, call) = call(x.x) / call(x.y) fi(x::Log, call) = log(call(x.x)) # fi(x::Exp, call) = exp(call(x.x)) + fi(x::Sin, call) = sin(call(x.x)) + fi(x::Cos, call) = cos(call(x.x)) + fi(x::GetIndex, call) = call(x.x)[x.i] + fi(x::ADMatrix, call) = map(call, x.x) + fi(x::Map, call) = map(x.f, call(x.x)) + fi(x::Transpose, call) = transpose(call(x.x)) - foldup(root, fl, fi, Real, vals) + foldup(root, fl, fi, ADNodeCompatible, vals) end -function differentiate(root_derivs::AbstractDict{<:ADNode, <:Real}) - vals = Dict{ADNode, Real}() +function differentiate(root_derivs::AbstractDict{<:ADNode, <:ADNodeCompatible}) + vals = Dict{ADNode, ADNodeCompatible}() for root in keys(root_derivs) compute(root, vals) end - derivs = DefaultDict{ADNode, Real}(0) + derivs = Dict{ADNode, ADNodeCompatible}() merge!(derivs, root_derivs) f(::Constant) = nothing - f(::Variable) = nothing + f(::Var) = nothing + function add_deriv(n::ADNode, amount::ADNodeCompatible) + if haskey(derivs, n) + derivs[n] += amount + else + derivs[n] = amount + end + end function f(n::Add) - derivs[n.x] += derivs[n] - derivs[n.y] += derivs[n] + add_deriv(n.x, derivs[n]) + add_deriv(n.y, derivs[n]) end function f(n::Mul) - derivs[n.x] += derivs[n] * vals[n.y] - derivs[n.y] += derivs[n] * vals[n.x] + if derivs[n] isa Real + add_deriv(n.x, derivs[n] * vals[n.y]) + add_deriv(n.y, derivs[n] * vals[n.x]) + elseif derivs[n] isa AbstractMatrix{<:Real} + add_deriv(n.x, derivs[n] * transpose(vals[n.y])) + add_deriv(n.y, transpose(vals[n.x]) * derivs[n]) + else + error("bad derivs type") + end end # function f(n::Div) # derivs[n.x] += derivs[n] / vals[n.y] # derivs[n.y] -= derivs[n] * vals[n.x] / vals[n.y] ^ 2 # end function f(n::Pow) - derivs[n.x] += derivs[n] * vals[n.y] * vals[n.x] ^ (vals[n.y] - 1) + @assert derivs[n] isa Real + add_deriv(n.x, derivs[n] * vals[n.y] * vals[n.x] ^ (vals[n.y] - 1)) if !(n.y isa Constant) - derivs[n.y] += derivs[n] * log(vals[n.x]) * vals[n.x] ^ vals[n.y] + add_deriv(n.y, derivs[n] * log(vals[n.x]) * vals[n.x] ^ vals[n.y]) end end function f(n::Log) - derivs[n.x] += derivs[n] / vals[n.x] + @assert derivs[n] isa Real + add_deriv(n.x, derivs[n] / vals[n.x]) + end + function f(n::Sin) + @assert derivs[n] isa Real + add_deriv(n.x, derivs[n] * cos(vals[n.x])) end + function f(n::Cos) + @assert derivs[n] isa Real + add_deriv(n.x, derivs[n] * -sin(vals[n.x])) + end + function f(n::ADMatrix) + for i in CartesianIndices(n.x) + add_deriv(n.x[i], derivs[n][i]) + end + end + function f(n::GetIndex) + if !haskey(derivs, n.x) + derivs[n.x] = zero(vals[n.x]) + end + derivs[n.x][n.i] += derivs[n] + end + function f(n::Map) + add_deriv(n.x, derivs[n] .* n.f′.(vals[n])) + end + function f(n::Transpose) + add_deriv(n.x, transpose(derivs[n])) + end + + # function f(n::Exp) # derivs[n.x] += derivs[n] * exp(vals[n.x]) # end - foreach_down(f, keys(root_derivs)) + foreach_down(n -> if haskey(derivs, n) f(n) end, keys(root_derivs)) derivs end @@ -195,8 +331,6 @@ function foreach_down(f::Function, roots) end end -value(x::Variable) = _variable_to_value[x] - function step_maximize!(roots, learning_rate) root_derivs = Dict( root => 1 @@ -204,8 +338,18 @@ function step_maximize!(roots, learning_rate) ) derivs = differentiate(root_derivs) for (n, d) in derivs - if n isa Variable - _variable_to_value[n] += d * learning_rate + if n isa Var + _variable_to_value[n.name] += d * learning_rate end end end + +function train_vars!( + x::ADNode, + epochs::Integer=2000, + learning_rate::AbstractFloat=0.003, +) + for _ in 1:epochs + step_maximize!([x], learning_rate) + end +end diff --git a/src/dist/bool.jl b/src/dist/bool.jl index de2665e3..40c454dc 100644 --- a/src/dist/bool.jl +++ b/src/dist/bool.jl @@ -27,7 +27,8 @@ mutable struct Flip <: Dist{Bool} end function Base.show(io::IO, f::Flip) - p = round(f.prob, digits=2) + p = f.prob + p = if p isa AbstractFloat round(p, digits=2) else p end if isnothing(f.name) print(io, "$(typeof(f))($(f.global_id),$(p))") else diff --git a/src/inference/pr.jl b/src/inference/pr.jl index e02c8ddf..5020575c 100644 --- a/src/inference/pr.jl +++ b/src/inference/pr.jl @@ -23,7 +23,7 @@ function get_world_probs(w::WMC, query::JointQuery, evidence::AnyBool) evid_logp = logprob(w, evid_bdd) # get values of adnodes - vals = Dict{ADNode, Real}() + vals = Dict{ADNode, ADNodeCompatible}() # TODO should query bits be made unique to save time? states = Pair{LinkedList, Float64}[] diff --git a/src/inference/train.jl b/src/inference/train.jl index 6953ea26..6e6e71ab 100644 --- a/src/inference/train.jl +++ b/src/inference/train.jl @@ -31,7 +31,7 @@ function step_vars!( global _variable_to_value w = WMC(c) - vals = Dict{ADNode, Real}() + vals = Dict{ADNode, ADNodeCompatible}() antiloss = sum( weight * (logprob(w, bdd, vals) - logprob(w, obs_bdd, vals)) for (bdd, obs_bdd, weight) in bdds_to_max @@ -46,7 +46,7 @@ function step_vars!( add_scaled_dict!(grad, grad_here, weight) end - root_derivs = DefaultDict{ADNode, Real}(0.) + root_derivs = DefaultDict{ADNode, ADNodeCompatible}(0.) for (f, d) in grad if f.prob isa ADNode root_derivs[f.prob] += d @@ -56,8 +56,8 @@ function step_vars!( # Do update derivs = differentiate(root_derivs) for (adnode, d) in derivs - if adnode isa Variable - _variable_to_value[adnode] += d * learning_rate + if adnode isa Var + _variable_to_value[adnode.name] += d * learning_rate end end @@ -103,7 +103,7 @@ function total_logprob( c::BDDCompiler, bdds_to_max::Vector{<:Tuple{CuddNode, CuddNode, <:Real}}, ) - vals = Dict{ADNode, Real}() + vals = Dict{ADNode, ADNodeCompatible}() w = WMC(c) sum( weight * (logprob(w, bdd, vals) - logprob(w, obs_bdd, vals)) diff --git a/test/autodiff_test.jl b/test/autodiff_test.jl index 91c0a0de..d0917bab 100644 --- a/test/autodiff_test.jl +++ b/test/autodiff_test.jl @@ -2,13 +2,13 @@ using Dice using Test @testset "test autodiff" begin - x = var!("x", 5) + x = new_var!("x", 5) e = x^2 derivs = differentiate(Dict(e => π)) @test derivs[x] ≈ 10 * π clear_vars!() - x = var!("x", 5) + x = new_var!("x", 5) e = 1/x derivs = differentiate(Dict(e => π)) @test derivs[x] ≈ -1/25 * π @@ -16,7 +16,7 @@ using Test end @testset "test GD" begin - x = var!("x", 0) + x = new_var!("x", 0) e = 7 - (x-5)^2 for _ in 1:100 step_maximize!([e], 0.1) @@ -25,8 +25,8 @@ end @test compute(x) ≈ 5 clear_vars!() - x = var!("x", 7) - y = var!("y", 1) + x = new_var!("x", 7) + y = new_var!("y", 1) e = -(x*y-5)^2 for i in 1:100 step_maximize!([e], 0.01) @@ -37,7 +37,7 @@ end clear_vars!() - psp = var!("psp", 0) # pre-sigmoid probability + psp = new_var!("psp", 0) # pre-sigmoid probability p = sigmoid(psp) # maximize logpr of flip(p) & flip(p) & !flip(p) e = log(p * p * (1 - p)) @@ -48,6 +48,35 @@ end clear_vars!() end +@testset "matrices" begin + # Helper functions for matrices used as vectors + x(v) = v[1,1] + y(v) = v[2,1] + distance(u, v) = (x(u) - x(v))^2 + (y(u) - y(v))^2 + to_matrix(v::Vector) = reshape(v, :, 1) + + # Rotate [1, 2] by what angle to get closest to [-3, -3]? + θ = new_var!("θ", 0) + rotation_matrix = ADMatrix([[cos(θ) -sin(θ)]; [sin(θ) cos(θ)]]) + rotated_vec = rotation_matrix * to_matrix([1, 2]) + target_vec = to_matrix([-3, -3]) + train_vars!(-distance(rotated_vec, target_vec)) + + @test value(θ) ≈ 5/8 * 2π - atan(2) + clear_vars!() + + # Variables can also be matrices! + # Transform by [1, 2] by what matrix to get closest to [-3, -3]? + A = new_var!("A", [[1 0]; [0 1]]) + v = to_matrix([1, 2]) + v′ = A * v + target_vec = to_matrix([-3, -3]) + compute(A * v) + train_vars!(-distance(v′, target_vec)) + + @test compute(A) * v ≈ [-3, -3] + clear_vars!() +end clear_vars!() From 0657b894d34c7d6cb182e7f882ac0da0fce0c35a Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Fri, 29 Sep 2023 12:17:06 -0700 Subject: [PATCH 003/231] Add MNIST --- examples/mnist/Project.toml | 4 +++ examples/mnist/mnist.jl | 56 +++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 examples/mnist/Project.toml create mode 100644 examples/mnist/mnist.jl diff --git a/examples/mnist/Project.toml b/examples/mnist/Project.toml new file mode 100644 index 00000000..17ae51c6 --- /dev/null +++ b/examples/mnist/Project.toml @@ -0,0 +1,4 @@ +[deps] +CUDD = "345a2cc7-28d8-58b2-abdf-cff77ea7d7f1" +Dice = "94eeadfc-1ba6-40b7-9ed8-dee71557d525" +MLDatasets = "eb30cadb-4394-5ae3-aed4-317e484a6458" diff --git a/examples/mnist/mnist.jl b/examples/mnist/mnist.jl new file mode 100644 index 00000000..c68b2cf1 --- /dev/null +++ b/examples/mnist/mnist.jl @@ -0,0 +1,56 @@ +# Proof-of-concept of training a network to classify MNIST digits +# It's slow - we should use a 3rd party ML framework instead + +# Eventual goal would be to do MNIST-sum, as in +# https://arxiv.org/pdf/1805.10872.pdf + +using MLDatasets: MNIST +using Revise +using Dice +using Random + +map_sigmoid(x::ADNode) = ad_map(Dice.sigmoid, Dice.deriv_sigmoid, x) + +function discrete_weights(::Type{DistUInt{W}}, weights::Vector{<:ADNode}) where W + res = DistUInt{W}(length(weights) - 1) + acc = last(weights) + for i in reverse(1:length(weights) - 1) + acc += weights[i] + res = @dice_ite if flip(weights[i] / acc) + DistUInt{W}(i - 1) + else + res + end + end + res +end + +HIDDEN_LAYER_SIZE = 100 +TRAIN_ROWS = 20 + +Random.seed!(0) +θ1_init = rand(28 * 28, HIDDEN_LAYER_SIZE) +θ2_init = rand(HIDDEN_LAYER_SIZE, 10) + +clear_vars!() +θ1 = new_var!("θ1", θ1_init) +θ2 = new_var!("θ2", θ2_init) + +x = reshape(MNIST(:train).features, (28 * 28, 60000)) |> transpose +x = x[1:TRAIN_ROWS, :] +y = MNIST(:train).targets[1:TRAIN_ROWS] + +dw = map_sigmoid(map_sigmoid(x * θ1) * θ2) +dw = [dw[i] for i in CartesianIndices((TRAIN_ROWS, 10))] +predictions = [discrete_weights(DistUInt{4}, dw[i, :]) for i in 1:TRAIN_ROWS] +correct = [prob_equals(pred, DistUInt{4}(label)) for (pred, label) in zip(predictions, y)] + +pr_corrects = [dist[true] for dist in pr(correct...)] +expected_accuracy = sum(pr_corrects) / length(pr_corrects) +println("Expected accuracy: $(expected_accuracy)") + +train_vars!(correct; epochs=1000, learning_rate=0.003) + +pr_corrects = [dist[true] for dist in pr(correct...)] +expected_accuracy = sum(pr_corrects) / length(pr_corrects) +println("Trained expected accuracy: $(expected_accuracy)") From bb79ba7c62d4a59f2eaefc6f21d22742493f1fbf Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Fri, 29 Sep 2023 12:23:36 -0700 Subject: [PATCH 004/231] Remove old mnist --- examples/mnist.jl | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 examples/mnist.jl diff --git a/examples/mnist.jl b/examples/mnist.jl deleted file mode 100644 index 21be1b5a..00000000 --- a/examples/mnist.jl +++ /dev/null @@ -1,44 +0,0 @@ -using Revise -using MLDatasets: MNIST -using Dice -using Random - -function matrix_var!(name, init) - # TODO: Add matrix primitives in autodiff - m = Matrix{Dice.ADNode}(undef, size(init)) - for i in CartesianIndices(init) - var_name = "$(name)[$(join(Tuple(i), ','))]" - m[i] = var!(var_name, init[i]) - end - m -end - -HIDDEN_LAYER_SIZE = 256 -TRAIN_ROWS = 1000 - -Random.seed!(0) -θ1_init = rand(28 * 28, HIDDEN_LAYER_SIZE) -θ2_init = rand(HIDDEN_LAYER_SIZE, 10) - -clear_vars!() -θ1 = matrix_var!("θ1", θ1_init) -θ2 = matrix_var!("θ2", θ2_init) - -Dice._variable_to_value - -x = reshape(MNIST(:train).features, (28 * 28, 60000)) |> transpose -x = x[1:TRAIN_ROWS, :] - -t1 = @elapsed x * θ1_init -# 0.008783958 -t2 = @elapsed x * θ1 -# 70.553411583 -(typeof(θ1)) -function Base.:(*)(M1::AbstractMatrix, M2::) - -* θ2 - -matrix_param("", (2, 3), 0) -M -rand(256, 28 * 28) * x -map(Dice.sigmoid, x) \ No newline at end of file From c0226ce2e79a9c02c32706665f783b9cd128a6d8 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 14 Dec 2023 00:33:43 -0800 Subject: [PATCH 005/231] [Autodiff] Arbitrary pr-dependent loss fns --- src/Dice.jl | 3 +- src/{autodiff.jl => autodiff/core.jl} | 125 ++++++++------------------ src/autodiff/train.jl | 29 ++++++ src/inference/cudd/wmc.jl | 29 +++--- src/inference/inference.jl | 8 +- src/inference/pr.jl | 7 +- src/inference/train.jl | 122 ------------------------- src/inference/train_pr.jl | 121 +++++++++++++++++++++++++ test/autodiff_test.jl | 70 +++++++-------- test/inference/train_test.jl | 62 ++++++------- 10 files changed, 277 insertions(+), 299 deletions(-) rename src/{autodiff.jl => autodiff/core.jl} (75%) create mode 100644 src/autodiff/train.jl delete mode 100644 src/inference/train.jl create mode 100644 src/inference/train_pr.jl diff --git a/src/Dice.jl b/src/Dice.jl index 1f1aa783..db6602f8 100644 --- a/src/Dice.jl +++ b/src/Dice.jl @@ -31,7 +31,8 @@ macro dice_ite(code) end end -include("autodiff.jl") +include("autodiff/core.jl") +include("autodiff/train.jl") include("dist/dist.jl") include("inference/inference.jl") include("analysis/analysis.jl") diff --git a/src/autodiff.jl b/src/autodiff/core.jl similarity index 75% rename from src/autodiff.jl rename to src/autodiff/core.jl index e7b62e39..d2baebc7 100644 --- a/src/autodiff.jl +++ b/src/autodiff/core.jl @@ -1,6 +1,4 @@ -export new_var!, clear_vars!, value, compute, differentiate, step_maximize!, - set_var!, sigmoid, add_unit_interval_var!, ADNode, Var, train_vars!, value, - ADMatrix, ad_map +export value, compute, differentiate, sigmoid, ADNode, Var, value, ADMatrix, ad_map, Valuation, Derivs, compute_one, vars using DirectedAcyclicGraphs import DirectedAcyclicGraphs: NodeType, DAG, children @@ -11,54 +9,14 @@ abstract type ADNode <: DAG end ADNodeCompatible = Union{Real, AbstractMatrix{<:Real}} struct Var <: ADNode - name::String + id::Any end - NodeType(::Type{Var}) = Leaf() -_variable_to_value = Dict{String, ADNodeCompatible}() - -function value(var::Var) - _variable_to_value[var.name] -end - -var_exists(s) = haskey(_variable_to_value, s) - -function set_var!(s, val) - _variable_to_value[s] = val - Var(s) -end - -function new_var!(s, init_val) - @assert !var_exists(s) - set_var!(s, init_val) -end - -function get_or_init_var!(s, if_not_exists=nothing) - if var_exists(s) - Var(s) - else - set_var!(s, if_not_exists) - end -end - sigmoid(x) = 1 / (1 + exp(-x)) deriv_sigmoid(x) = sigmoid(x) * (1 - sigmoid(x)) inverse_sigmoid(x) = log(x / (1 - x)) - -function add_unit_interval_var!(s, init_val=0.5) - @assert 0 < init_val < 1 - before_sigmoid = get_or_init_var!( - "$(s)_before_sigmoid", inverse_sigmoid(init_val) - ) - sigmoid(before_sigmoid) -end - -function clear_vars!() - empty!(_variable_to_value) -end - struct Constant <: ADNode value::ADNodeCompatible end @@ -66,7 +24,7 @@ NodeType(::Type{Constant}) = Leaf() Base.zero(::ADNode) = Constant(0) Base.show(io::IO, x::Var) = - print(io, "Var($(x.name))") + print(io, "Var($(x.id))") Base.show(io::IO, x::Constant) = print(io, "Constant($(x.value))") @@ -206,35 +164,43 @@ end NodeType(::Type{Transpose}) = Inner() children(x::Transpose) = x.x -function compute(root, vals=nothing) - isnothing(vals) && (vals = Dict{ADNode, Any}()) - - fl(x::Var) = value(x) - fl(x::Constant) = x.value - fi(x::Add, call) = call(x.x) + call(x.y) - fi(x::Mul, call) = call(x.x) * call(x.y) - fi(x::Pow, call) = call(x.x) ^ call(x.y) - # fi(x::Div, call) = call(x.x) / call(x.y) - fi(x::Log, call) = log(call(x.x)) - # fi(x::Exp, call) = exp(call(x.x)) - fi(x::Sin, call) = sin(call(x.x)) - fi(x::Cos, call) = cos(call(x.x)) - fi(x::GetIndex, call) = call(x.x)[x.i] - fi(x::ADMatrix, call) = map(call, x.x) - fi(x::Map, call) = map(x.f, call(x.x)) - fi(x::Transpose, call) = transpose(call(x.x)) - - foldup(root, fl, fi, ADNodeCompatible, vals) +Valuation = Dict{Var, ADNodeCompatible} +Derivs = Dict{ADNode, ADNodeCompatible} + +# TODO: move to op definitions +compute_leaf(x::Var) = error("The value of $(x) should've been provided in `vals`!") +compute_leaf(x::Constant) = x.value +compute_inner(x::Add, call) = call(x.x) + call(x.y) +compute_inner(x::Mul, call) = call(x.x) * call(x.y) +compute_inner(x::Pow, call) = call(x.x) ^ call(x.y) +# compute_inner(x::Div, call) = call(x.x) / call(x.y) +compute_inner(x::Log, call) = log(call(x.x)) +# compute_inner(x::Exp, call) = exp(call(x.x)) +compute_inner(x::Sin, call) = sin(call(x.x)) +compute_inner(x::Cos, call) = cos(call(x.x)) +compute_inner(x::GetIndex, call) = call(x.x)[x.i] +compute_inner(x::ADMatrix, call) = map(call, x.x) +compute_inner(x::Map, call) = map(x.f, call(x.x)) +compute_inner(x::Transpose, call) = transpose(call(x.x)) + +function compute_one(root, vals::Dict{ADNode, <:ADNodeCompatible}) + foldup(root, compute_leaf, compute_inner, ADNodeCompatible, vals) end -function differentiate(root_derivs::AbstractDict{<:ADNode, <:ADNodeCompatible}) +function compute(var_vals::Valuation, roots) vals = Dict{ADNode, ADNodeCompatible}() - for root in keys(root_derivs) - compute(root, vals) + merge!(vals, var_vals) + for root in roots + compute_one(root, vals) end - + vals +end + +function differentiate(var_vals::Valuation, root_derivs::Derivs) + vals = compute(var_vals, keys(root_derivs)) derivs = Dict{ADNode, ADNodeCompatible}() merge!(derivs, root_derivs) + # TODO: move these to operator definition sites f(::Constant) = nothing f(::Var) = nothing function add_deriv(n::ADNode, amount::ADNodeCompatible) @@ -331,25 +297,6 @@ function foreach_down(f::Function, roots) end end -function step_maximize!(roots, learning_rate) - root_derivs = Dict( - root => 1 - for root in roots - ) - derivs = differentiate(root_derivs) - for (n, d) in derivs - if n isa Var - _variable_to_value[n.name] += d * learning_rate - end - end -end - -function train_vars!( - x::ADNode, - epochs::Integer=2000, - learning_rate::AbstractFloat=0.003, -) - for _ in 1:epochs - step_maximize!([x], learning_rate) - end +function vars(x::ADNode) + filter(node -> node isa Var, x) end diff --git a/src/autodiff/train.jl b/src/autodiff/train.jl new file mode 100644 index 00000000..6a918f5a --- /dev/null +++ b/src/autodiff/train.jl @@ -0,0 +1,29 @@ +export step_maximize!, add_pr_var! + +function step_maximize!(var_vals::Valuation, nodes_to_max, learning_rate) + root_derivs = Derivs(n => 1 for n in nodes_to_max) + for (n, d) in differentiate(var_vals, root_derivs) + n isa Var && (var_vals[n] += d * learning_rate) + end +end + +function add_pr_var!(var_vals::Valuation, name_and_pr) + name, pr = name_and_pr + @assert 0 < pr < 1 + var = Var("$(name)_before_sigmoid") + val = inverse_sigmoid(pr) + @assert !has_key(var_vals, var) || var_vals[var] == val + var_vals[var] = val + sigmoid(var) +end + +function train_vars!( + var_vals::Valuation, + x::ADNode, + epochs::Integer, + learning_rate::AbstractFloat, +) + for _ in 1:epochs + step_maximize!(var_vals, [x], learning_rate) + end +end \ No newline at end of file diff --git a/src/inference/cudd/wmc.jl b/src/inference/cudd/wmc.jl index 26467c06..791803ac 100644 --- a/src/inference/cudd/wmc.jl +++ b/src/inference/cudd/wmc.jl @@ -9,8 +9,9 @@ using DataStructures: LinkedList, cons, nil mutable struct WMC c::BDDCompiler cache::Dict{CuddNode, Float64} - function WMC(c) - w = new(c, Dict{CuddNode, Float64}()) + flip_pr_resolver + function WMC(c, flip_pr_resolver) + w = new(c, Dict{CuddNode, Float64}(), flip_pr_resolver) w.cache[constant(w.c.mgr, true)] = log(one(Float64)) w.cache[constant(w.c.mgr, false)] = log(zero(Float64)) w @@ -19,16 +20,16 @@ end logprob(w::WMC, x::AnyBool) = logprob(w, compile(w.c, x)) -function logprob(w::WMC, x::CuddNode, vals=nothing) +function logprob(w::WMC, x::CuddNode) get!(w.cache, x) do f = w.c.level_to_flip[level(x)] - p = if f.prob isa ADNode - compute(f.prob, vals) - else + p = if f.prob isa Real f.prob + else + w.flip_pr_resolver(f.prob) end - a = log(p) + logprob(w, high(x), vals) - b = log(1.0-p) + logprob(w, low(x), vals) + a = log(p) + logprob(w, high(x)) + b = log(1.0-p) + logprob(w, low(x)) if isinf(a) b elseif isinf(b) @@ -40,19 +41,21 @@ function logprob(w::WMC, x::CuddNode, vals=nothing) end end +grad_logprob(w::WMC, x::AnyBool) = grad_logprob(w, compile(w.c, x)) + # Calculate gradient of a BDD node w.r.t. flip probabilities (reverse mode) -function grad_logprob(w::WMC, x::CuddNode, vals=nothing)::Dict{Flip, Float64} +function grad_logprob(w::WMC, x::CuddNode)::Dict{Flip, Float64} grad = DefaultDict{Flip, Float64}(0.) deriv = DefaultDict{CuddNode, Float64}(0.) deriv[x] = 1 level_traversal(x) do node i, lo, hi = level(node), low(node), high(node) f = w.c.level_to_flip[i] - fhi, flo = logprob(w, hi, vals), logprob(w, lo, vals) - p = if f.prob isa ADNode - compute(f.prob, vals) - else + fhi, flo = logprob(w, hi), logprob(w, lo) + p = if f.prob isa Real f.prob + else + w.flip_pr_resolver(f.prob) end denom = p * exp(fhi) + (1 - p) * exp(flo) deriv[hi] += deriv[node] * p * exp(fhi) / denom diff --git a/src/inference/inference.jl b/src/inference/inference.jl index 3805c77c..4ed0c3b2 100644 --- a/src/inference/inference.jl +++ b/src/inference/inference.jl @@ -26,8 +26,10 @@ conditional errors, and a custom inference algorithm. function pr(queries::Vector{JointQuery}; evidence::AnyBool = true, errors::Vector{CondError} = CondError[], dots::Vector{Tuple{Vector{AnyBool}, String}} = Tuple{Vector{AnyBool}, String}[], - algo::InferAlgo = default_infer_algo()) - pr(algo, evidence, queries, errors, dots) + algo::InferAlgo = default_infer_algo(), + flip_pr_resolver::Union{Nothing, Function} = nothing + ) + pr(algo, evidence, queries, errors, dots, flip_pr_resolver) end function pr(queries::JointQuery...; kwargs...) @@ -170,6 +172,6 @@ include("pr.jl") # Notable exports: # - train_group_probs!(::Vector{<:AnyBool})) # - train_group_probs!(::Vector{<:Tuple{<:AnyBool, <:AnyBool}}) -include("train.jl") +include("train_pr.jl") include("sample.jl") \ No newline at end of file diff --git a/src/inference/pr.jl b/src/inference/pr.jl index 5020575c..8ebb7922 100644 --- a/src/inference/pr.jl +++ b/src/inference/pr.jl @@ -31,7 +31,7 @@ function get_world_probs(w::WMC, query::JointQuery, evidence::AnyBool) function rec(context::CuddNode, state, rembits) issat(w.c.mgr, context) || return if isempty(rembits) - p = exp(logprob(w, context, vals) - evid_logp) + p = exp(logprob(w, context) - evid_logp) push!(states, state => p) else head = rembits[1] @@ -52,14 +52,15 @@ function get_world_probs(w::WMC, query::JointQuery, evidence::AnyBool) end -function pr(cudd::Cudd, evidence, queries::Vector{JointQuery}, errors, dots) +function pr(cudd::Cudd, evidence, queries::Vector{JointQuery}, errors, dots, flip_pr_resolver) w = WMC( BDDCompiler(Iterators.flatten(( Iterators.flatten(query.bits for query in queries), (err[1] for err in errors), [evidence], Iterators.flatten(xs for (xs, filename) in dots), - ))) + ))), + flip_pr_resolver ) enable_reordering(w.c, cudd.reordering_type) diff --git a/src/inference/train.jl b/src/inference/train.jl deleted file mode 100644 index 6e6e71ab..00000000 --- a/src/inference/train.jl +++ /dev/null @@ -1,122 +0,0 @@ -export step_vars!, train_vars!, BoolToMax, total_logprob - -struct BoolToMax - bool::AnyBool - evid::AnyBool - weight::Real - BoolToMax(bool, evid, weight) = new(bool & evid, evid, weight) -end - -function BoolToMax(bool; evidence=true, weight=1) - BoolToMax(bool, evidence, weight) -end - -# Find the log-probabilities and the log-probability gradient of a BDD -function add_scaled_dict!( - x::AbstractDict{<:Any, <:Real}, - y::AbstractDict{<:Any, <:Real}, - s::Real -) - for (k, v) in y - x[k] += v * s - end -end - -# Step flip probs in direction of gradient to maximize likelihood of BDDS -function step_vars!( - c::BDDCompiler, - bdds_to_max::Vector{<:Tuple{CuddNode, CuddNode, <:Real}}, - learning_rate::AbstractFloat -) - global _variable_to_value - w = WMC(c) - - vals = Dict{ADNode, ADNodeCompatible}() - antiloss = sum( - weight * (logprob(w, bdd, vals) - logprob(w, obs_bdd, vals)) - for (bdd, obs_bdd, weight) in bdds_to_max - ) - - # Find grad of logprobability w.r.t. each flip's probability - grad = DefaultDict{Flip, Float64}(0.) - for (bdd, obs_bdd, weight) in bdds_to_max - isconstant(bdd) && continue - grad_here = grad_logprob(w, bdd, vals) - add_scaled_dict!(grad_here, grad_logprob(w, obs_bdd, vals), -1) - add_scaled_dict!(grad, grad_here, weight) - end - - root_derivs = DefaultDict{ADNode, ADNodeCompatible}(0.) - for (f, d) in grad - if f.prob isa ADNode - root_derivs[f.prob] += d - end - end - - # Do update - derivs = differentiate(root_derivs) - for (adnode, d) in derivs - if adnode isa Var - _variable_to_value[adnode.name] += d * learning_rate - end - end - - antiloss -end - -function train_vars!( - bools_to_max::Vector{<:AnyBool}; - args... -) - train_vars!( - [BoolToMax(b, true, 1) for b in bools_to_max]; - args... - ) -end - - -# Train group_to_psp to such that generate() approximates dataset's distribution -function train_vars!( - bools_to_max::Vector{BoolToMax}; - epochs::Integer=2000, - learning_rate::AbstractFloat=0.003, -) - # Compile to BDDs - c = BDDCompiler(Iterators.flatten(map(x -> [x.bool, x.evid], bools_to_max))) - bdds_to_max = [ - (compile(c, x.bool), compile(c, x.evid), x.weight) - for x in bools_to_max - ] - - antilosses = [] - for _ in 1:epochs - push!( - antilosses, - step_vars!(c, bdds_to_max, learning_rate) - ) - end - push!(antilosses, total_logprob(c, bdds_to_max)) - antilosses -end - -function total_logprob( - c::BDDCompiler, - bdds_to_max::Vector{<:Tuple{CuddNode, CuddNode, <:Real}}, -) - vals = Dict{ADNode, ADNodeCompatible}() - w = WMC(c) - sum( - weight * (logprob(w, bdd, vals) - logprob(w, obs_bdd, vals)) - for (bdd, obs_bdd, weight) in bdds_to_max - ) -end - -function total_logprob(bools_to_max::Vector{BoolToMax}) - w = WMC( - BDDCompiler(Iterators.flatten(map(x -> [x.bool, x.evid], bools_to_max))) - ) - sum( - b.weight * (logprob(w, b.bool) - logprob(w, b.evid)) - for b in bools_to_max - ) -end diff --git a/src/inference/train_pr.jl b/src/inference/train_pr.jl new file mode 100644 index 00000000..2db9f89b --- /dev/null +++ b/src/inference/train_pr.jl @@ -0,0 +1,121 @@ +# The bridge between autodiff and cudd + +export step_vars!, train_pr!, BoolToMax, total_logprob, valuation_to_flip_pr_resolver, mle_loss + +struct BoolToMax + bool::AnyBool + evid::AnyBool + weight::Real + BoolToMax(bool, evid, weight) = new(bool & evid, evid, weight) +end + +function BoolToMax(bool; evidence=true, weight=1) + BoolToMax(bool, evidence, weight) +end + +# Find the log-probabilities and the log-probability gradient of a BDD +function add_scaled_dict!( + x::AbstractDict{<:Any, <:Real}, + y::AbstractDict{<:Any, <:Real}, + s::Real +) + for (k, v) in y + x[k] += v * s + end +end + +function step_pr!( + var_vals::Valuation, + loss::ADNode, # var(distbool) represents logpr of that distbool + learning_rate::Real +) + # loss refers to logprs of bools + # error to do with var(true)? just make it a vector of anybool and don't filter + bools = Vector{Dist{Bool}}([n.id for n in vars(loss) if !(n.id isa Bool)]) + + # so, calculate these logprs + w = WMC(BDDCompiler(bools), valuation_to_flip_pr_resolver(var_vals)) + bool_logprs = Valuation(Var(bool) => logprob(w, bool) for bool in bools) + loss_val = compute(bool_logprs, [loss])[loss] # for return value only + + # so we can move the blame from to loss to those bools + derivs = differentiate(bool_logprs, Derivs(loss => 1)) + + # find grad of loss w.r.t. each flip's probability + grad = DefaultDict{Flip, Float64}(0.) + for bool in bools + add_scaled_dict!(grad, grad_logprob(w, bool), derivs[Var(bool)]) + end + + # move blame from flips probabilities to their adnode params + root_derivs = Derivs() + for (f, d) in grad + if f.prob isa ADNode + if haskey(root_derivs, f.prob) + root_derivs[f.prob] += d + else + root_derivs[f.prob] = d + end + end + end + + # move blame from adnode params to vars + derivs = differentiate(var_vals, root_derivs) + + # update vars + for (adnode, d) in derivs + if adnode isa Var + var_vals[adnode] -= d * learning_rate + end + end + loss_val +end + +function mle_loss(bools_to_max::Vector{BoolToMax}) + loss = 0 + for b in bools_to_max + if b.evid === true + loss -= b.weight * Var(b.bool) + else + loss -= b.weight * (Var(b.bool) - Var(b.evid)) + end + end + loss +end + +function mle_loss(bools_to_max::Vector{<:AnyBool}) + mle_loss([BoolToMax(b, true, 1) for b in bools_to_max]) +end + +# Train group_to_psp to such that generate() approximates dataset's distribution +function train_pr!( + var_vals::Valuation, + loss::ADNode; + epochs::Integer, + learning_rate::Real, +) + losses = [] + for _ in 1:epochs + push!(losses, step_pr!(var_vals, loss, learning_rate)) + end + push!(losses, compute_loss(var_vals, loss)) + losses +end + +function valuation_to_flip_pr_resolver(var_vals) + vals = Dict{ADNode, ADNodeCompatible}() + merge!(vals, var_vals) + function flip_pr_resolver(prob) + compute_one(prob, vals) + end +end + +function compute_loss( + var_vals::Valuation, + loss::ADNode +) + bools = Vector{Dist{Bool}}([n.id for n in vars(loss) if !(n.id isa Bool)]) + w = WMC(BDDCompiler(bools), valuation_to_flip_pr_resolver(var_vals)) + bool_logprs = Valuation(Var(bool) => logprob(w, bool) for bool in bools) + compute(bool_logprs, [loss])[loss] # for return value only +end diff --git a/test/autodiff_test.jl b/test/autodiff_test.jl index d0917bab..c83bb8e7 100644 --- a/test/autodiff_test.jl +++ b/test/autodiff_test.jl @@ -2,50 +2,47 @@ using Dice using Test @testset "test autodiff" begin - x = new_var!("x", 5) + x = Var("x") + e = x^2 - derivs = differentiate(Dict(e => π)) + derivs = differentiate(Valuation(x => 5), Derivs(e => π)) @test derivs[x] ≈ 10 * π - clear_vars!() - x = new_var!("x", 5) e = 1/x - derivs = differentiate(Dict(e => π)) + derivs = differentiate(Valuation(x => 5), Derivs(e => π)) @test derivs[x] ≈ -1/25 * π - clear_vars!() end @testset "test GD" begin - x = new_var!("x", 0) - e = 7 - (x-5)^2 + x, y = Var("x"), Var("y") + + params = Valuation(x => 0) + e = 7 - (x - 5)^2 for _ in 1:100 - step_maximize!([e], 0.1) + step_maximize!(params, [e], 0.1) end - @test compute(e) ≈ 7 - @test compute(x) ≈ 5 - clear_vars!() + vals = compute(params, [e]) + @test vals[e] ≈ 7 + @test vals[x] ≈ 5 - x = new_var!("x", 7) - y = new_var!("y", 1) + var_vals = Valuation(x => 7, y => 1) e = -(x*y-5)^2 for i in 1:100 - step_maximize!([e], 0.01) + step_maximize!(var_vals, [e], 0.01) end - vals = Dict{ADNode, Real}() - @test abs(compute(e, vals)) < 0.001 - @test compute(x, vals) * compute(y, vals) ≈ 5 - clear_vars!() - + vals = compute(var_vals, [e]) + @test abs(vals[e]) < 0.001 + @test vals[x] * vals[y] ≈ 5 - psp = new_var!("psp", 0) # pre-sigmoid probability + psp = Var("psp") # pre-sigmoid probability + var_vals = Valuation(psp => 0) p = sigmoid(psp) # maximize logpr of flip(p) & flip(p) & !flip(p) e = log(p * p * (1 - p)) for i in 1:500 - step_maximize!([e], 0.1) + step_maximize!(var_vals, [e], 0.1) end - @test compute(p) ≈ 2/3 - clear_vars!() + @test compute(var_vals, [p])[p] ≈ 2/3 end @testset "matrices" begin @@ -56,27 +53,26 @@ end to_matrix(v::Vector) = reshape(v, :, 1) # Rotate [1, 2] by what angle to get closest to [-3, -3]? - θ = new_var!("θ", 0) + θ = Var("θ") + var_vals = Valuation(θ => 0) rotation_matrix = ADMatrix([[cos(θ) -sin(θ)]; [sin(θ) cos(θ)]]) rotated_vec = rotation_matrix * to_matrix([1, 2]) target_vec = to_matrix([-3, -3]) - train_vars!(-distance(rotated_vec, target_vec)) - - @test value(θ) ≈ 5/8 * 2π - atan(2) - clear_vars!() + for _ in 1:2000 + step_maximize!(var_vals, [-distance(rotated_vec, target_vec)], 0.003) + end + @test var_vals[θ] ≈ 5/8 * 2π - atan(2) # Variables can also be matrices! # Transform by [1, 2] by what matrix to get closest to [-3, -3]? - A = new_var!("A", [[1 0]; [0 1]]) + A = Var("A") + var_vals = Valuation(A => [[1 0]; [0 1]]) v = to_matrix([1, 2]) v′ = A * v target_vec = to_matrix([-3, -3]) - compute(A * v) - train_vars!(-distance(v′, target_vec)) + for _ in 1:2000 + step_maximize!(var_vals, [-distance(v′, target_vec)], 0.003) + end - @test compute(A) * v ≈ [-3, -3] - clear_vars!() + @test var_vals[A] * v ≈ [-3, -3] end - -clear_vars!() - diff --git a/test/inference/train_test.jl b/test/inference/train_test.jl index 1238c05b..f2311724 100644 --- a/test/inference/train_test.jl +++ b/test/inference/train_test.jl @@ -2,58 +2,58 @@ using Test using Dice @testset "MLE" begin + psp = Var("psp") # pre-sigmoid probability + prob = sigmoid(psp) + # Basic test - prob = add_unit_interval_var!("?") x = flip(prob) & flip(prob) & !flip(prob) - train_vars!([x]; epochs=1000, learning_rate=0.3) - @test compute(prob) ≈ 2/3 - clear_vars!() + var_vals = Valuation(psp => 0) + train_pr!(var_vals, mle_loss([x]); epochs=1000, learning_rate=0.3) + @test compute(var_vals, prob)[prob] ≈ 2/3 # Try 1 - prob instead of negating the third flip - prob = add_unit_interval_var!("?") x = flip(prob) & flip(prob) & flip(1 - prob) - train_vars!([x]; epochs=1000, learning_rate=0.3) - @test compute(prob) ≈ 2/3 - clear_vars!() + var_vals = Valuation(psp => 0) + train_pr!(var_vals, mle_loss([x]); epochs=1000, learning_rate=0.3) + @test compute(var_vals, prob)[prob] ≈ 2/3 # Approximate a dataset - prob = add_unit_interval_var!("?") b = @dice_ite if flip(prob) true else flip(0.5) end dataset = [true, true, false] bools_to_maximize = [prob_equals(b, x) for x in dataset] - train_vars!(bools_to_maximize; epochs=1000, learning_rate=0.3) - @test compute(prob) ≈ 1/3 - clear_vars!() + var_vals = Valuation(psp => 0) + train_pr!(var_vals, mle_loss(bools_to_maximize); epochs=1000, learning_rate=0.3) + @test compute(var_vals, prob)[prob] ≈ 1/3 # Multiple params - a = add_unit_interval_var!("a") - b = add_unit_interval_var!("b") - c = add_unit_interval_var!("c") + a_psp, b_psp, c_psp = Var("a_psp"), Var("b_psp"), Var("c_psp") + a, b, c = sigmoid(a_psp), sigmoid(b_psp), sigmoid(c_psp) x = flip(a) & flip(b) & !flip(c) - train_vars!([x]; epochs=1000, learning_rate=0.3) - @test compute(a) > .99 - @test compute(b) > .99 - @test compute(c) < .01 - clear_vars!() + var_vals = Valuation(a_psp => 0, b_psp => 0, c_psp => 0) + train_pr!(var_vals, mle_loss([x]); epochs=1000, learning_rate=0.3) + vals = compute(var_vals, [a, b, c]) + @test vals[a] > .99 + @test vals[b] > .99 + @test vals[c] < .01 end @testset "MLE iterations deterministic" begin + psp = Var("psp") # pre-sigmoid probability + prob = sigmoid(psp) dataset = [true, true, false] - + # Train for 200 epochs - prob = add_unit_interval_var!("?") + var_vals = Valuation(psp => 0) b = @dice_ite if flip(prob) true else flip(prob) end - train_vars!([prob_equals(b, x) for x in dataset]; epochs=200) - p1 = pr(b)[true] - clear_vars!() - + train_pr!(var_vals, mle_loss([prob_equals(b, x) for x in dataset]); epochs=200, learning_rate=0.003) + p1 = pr(b; flip_pr_resolver=valuation_to_flip_pr_resolver(var_vals))[true] + # Train for 100 epochs, twice - prob = add_unit_interval_var!("?") b = @dice_ite if flip(prob) true else flip(prob) end - train_vars!([prob_equals(b, x) for x in dataset]; epochs=100) - train_vars!([prob_equals(b, x) for x in dataset]; epochs=100) - p2 = pr(b)[true] - clear_vars!() + var_vals = Valuation(psp => 0) + train_pr!(var_vals, mle_loss([prob_equals(b, x) for x in dataset]); epochs=100, learning_rate=0.003) + train_pr!(var_vals, mle_loss([prob_equals(b, x) for x in dataset]); epochs=100, learning_rate=0.003) + p2 = pr(b; flip_pr_resolver=valuation_to_flip_pr_resolver(var_vals))[true] @test p1 ≈ p2 end From 928520142e0a7a668ddefccdf0cc580858484e3b Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 14 Dec 2023 01:25:50 -0800 Subject: [PATCH 006/231] Add KL-divergence loss --- src/inference/train_pr.jl | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/inference/train_pr.jl b/src/inference/train_pr.jl index 2db9f89b..0842a82b 100644 --- a/src/inference/train_pr.jl +++ b/src/inference/train_pr.jl @@ -1,6 +1,6 @@ # The bridge between autodiff and cudd -export step_vars!, train_pr!, BoolToMax, total_logprob, valuation_to_flip_pr_resolver, mle_loss +export step_vars!, train_pr!, BoolToMax, total_logprob, valuation_to_flip_pr_resolver, mle_loss, kl_divergence struct BoolToMax bool::AnyBool @@ -36,6 +36,8 @@ function step_pr!( # so, calculate these logprs w = WMC(BDDCompiler(bools), valuation_to_flip_pr_resolver(var_vals)) bool_logprs = Valuation(Var(bool) => logprob(w, bool) for bool in bools) + # TODO: have differentiate return vals as well to avoid this compute + # or have it take vals loss_val = compute(bool_logprs, [loss])[loss] # for return value only # so we can move the blame from to loss to those bools @@ -87,6 +89,27 @@ function mle_loss(bools_to_max::Vector{<:AnyBool}) mle_loss([BoolToMax(b, true, 1) for b in bools_to_max]) end +# This is valid but not what we usually want: when training a dist, the reference +# distribution should be constant, and the other should be symbolic. +# reference distribution to be constant. +# function kl_divergence(p::Dist, q::Dict{<:Any, <:Real}, domain::Set{<:Pair{<:Any, <:Dist}}) +# res = 0 +# for (x, x_dist) in domain +# logpx = Var(prob_equals(p, x_dist)) # Var(b) represents the logpr of b +# res += exp(logpx) * (logpx - log(q[x])) +# end +# res +# end + +function kl_divergence(p::Dict{<:Any, <:Real}, q::Dist, domain::Set{<:Pair{<:Any, <:Dist}}) + res = 0 + for (x, x_dist) in domain + logqx = Var(prob_equals(q, x_dist)) # Var(b) represents the logpr of b + res += p[x] * (log(p[x]) - logqx) + end + res +end + # Train group_to_psp to such that generate() approximates dataset's distribution function train_pr!( var_vals::Valuation, From 4b9e7e2d2e900184bee7c6e3f16d00174f39662e Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 14 Dec 2023 01:27:56 -0800 Subject: [PATCH 007/231] Example: approximating int dists --- examples/learned_cheap_dists.jl | 81 +++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 examples/learned_cheap_dists.jl diff --git a/examples/learned_cheap_dists.jl b/examples/learned_cheap_dists.jl new file mode 100644 index 00000000..80a0e99e --- /dev/null +++ b/examples/learned_cheap_dists.jl @@ -0,0 +1,81 @@ +using Dice +using Plots +# using StatsPlots +function dist_binomial(width, p) + n = 2^width - 1 + Dict( + k => binomial(n, k) * p^k * (1 - p)^(n - k) + for k in 0:n + ) +end + +function dist_uniform(width) + n = 2^width - 1 + Dict( + k => 1 / (n + 1) + for k in 0:n + ) +end + + +for width in [3] + for (title, target_dist) in [ + ("Uniform 0 to $(2^width-1)", dist_uniform(width)) + ("Binomial ($(2^width-1)) trials, p=0.1", dist_binomial(width, 0.1)) + ] + vars = [Var("var$(i)_psp") for i in 0:width-1] + int = DistUInt{width}([flip(sigmoid(x)) for x in vars]) + + # Weighted training + wt_var_to_vals = Valuation(x => 0 for x in vars) + train_pr!( + wt_var_to_vals, + mle_loss([ + BoolToMax( + prob_equals(int, DistUInt{width}(i)), + weight=target_dist[i] + ) + for i in 0:2^width-1 + ]), + epochs=2000, + learning_rate=0.003 + ) + wt_dist = pr(int, flip_pr_resolver=valuation_to_flip_pr_resolver(wt_var_to_vals)) + + # KL divergence minimization + kl_var_to_vals = Valuation(x => 0 for x in vars) + train_pr!( + kl_var_to_vals, + kl_divergence( + target_dist, + int, + Set([i => DistUInt{width}(i) for i in 0:2^width-1]) + ), + epochs=2000, + learning_rate=0.003 + ) + kl_dist = pr(int, flip_pr_resolver=valuation_to_flip_pr_resolver(kl_var_to_vals)) + + # Counting + counting_prs = [ + sum(p for (x, p) in target_dist if x & 2^i > 0) + for i in 0:width-1 + ] + counting_int = DistUInt{width}(map(flip, counting_prs)) + counting_dist = pr(counting_int) + + columns = [ + "wt" => wt_dist + "kl" => kl_dist + "counting" => counting_dist + "target" => target_dist + ] + col_names, col_dists = zip(columns...) + println(title) + println("\t" * join(col_names, '\t')) + for k in 0:2^width-1 + println("$(k)\t" * join(getindex.(col_dists, k), '\t')) + end + println() + end +end \ No newline at end of file From 119bea48535e5d5e30eba2b31001e5731912ae7d Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 18 Dec 2023 22:41:51 -0800 Subject: [PATCH 008/231] tweak lcd --- examples/learned_cheap_dists.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/learned_cheap_dists.jl b/examples/learned_cheap_dists.jl index 80a0e99e..f878e22d 100644 --- a/examples/learned_cheap_dists.jl +++ b/examples/learned_cheap_dists.jl @@ -28,7 +28,7 @@ for width in [3] # Weighted training wt_var_to_vals = Valuation(x => 0 for x in vars) - train_pr!( + history = train_pr!( wt_var_to_vals, mle_loss([ BoolToMax( @@ -38,7 +38,7 @@ for width in [3] for i in 0:2^width-1 ]), epochs=2000, - learning_rate=0.003 + learning_rate=0.1 ) wt_dist = pr(int, flip_pr_resolver=valuation_to_flip_pr_resolver(wt_var_to_vals)) @@ -52,14 +52,14 @@ for width in [3] Set([i => DistUInt{width}(i) for i in 0:2^width-1]) ), epochs=2000, - learning_rate=0.003 + learning_rate=0.1 ) kl_dist = pr(int, flip_pr_resolver=valuation_to_flip_pr_resolver(kl_var_to_vals)) # Counting counting_prs = [ sum(p for (x, p) in target_dist if x & 2^i > 0) - for i in 0:width-1 + for i in width-1:-1:0 ] counting_int = DistUInt{width}(map(flip, counting_prs)) counting_dist = pr(counting_int) From 127d37319babdc765c7a682d0907b567f5de350e Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 18 Dec 2023 22:41:58 -0800 Subject: [PATCH 009/231] lcd test --- test/inference/learned_cheap_dists.jl | 97 +++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 test/inference/learned_cheap_dists.jl diff --git a/test/inference/learned_cheap_dists.jl b/test/inference/learned_cheap_dists.jl new file mode 100644 index 00000000..30996d07 --- /dev/null +++ b/test/inference/learned_cheap_dists.jl @@ -0,0 +1,97 @@ +using Test +using Dice +using Plots + +function dict_approx(d1::AbstractDict, d2::AbstractDict) + keys(d1) == keys(d2) && all( + d1[k] ≈ d2[k] + for k in keys(d1) + ) +end + +@testset "learned_cheap_dists" begin + function dist_binomial(width, p) + n = 2^width - 1 + Dict( + k => binomial(n, k) * p^k * (1 - p)^(n - k) + for k in 0:n + ) + end + + + width = 3 + target_dist = dist_binomial(width, 0.1) + + vars = [Var("var$(i)_psp") for i in 0:width-1] + int = DistUInt{width}([flip(sigmoid(x)) for x in vars]) + + # Weighted training + wt_var_to_vals = Valuation(x => 0 for x in vars) + history = train_pr!( + wt_var_to_vals, + mle_loss([ + BoolToMax( + prob_equals(int, DistUInt{width}(i)), + weight=target_dist[i] + ) + for i in 0:2^width-1 + ]), + epochs=300, + learning_rate=0.1 + ) + wt_dist = pr(int, flip_pr_resolver=valuation_to_flip_pr_resolver(wt_var_to_vals)) + @test dict_approx( + wt_var_to_vals, + Dict( + Var("var0_psp") => -3.2837129282982764, + Var("var1_psp") => -1.734139957995633, + Var("var2_psp") => -0.4254578347528184) + ) + @test dict_approx( + wt_dist, + Dict( + 0 => 0.4954604613881238, + 1 => 0.3237688128294564, + 2 => 0.08747452404585239, + 3 => 0.057162024036790764, + 4 => 0.018574220540662965, + 5 => 0.012137705835969861, + 6 => 0.0032793153600291173, + 7 => 0.002142935963114733 + ) + ) + + # KL divergence minimization + kl_var_to_vals = Valuation(x => 0 for x in vars) + train_pr!( + kl_var_to_vals, + kl_divergence( + target_dist, + int, + Set([i => DistUInt{width}(i) for i in 0:2^width-1]) + ), + epochs=300, + learning_rate=0.1 + ) + kl_dist = pr(int, flip_pr_resolver=valuation_to_flip_pr_resolver(kl_var_to_vals)) + @test dict_approx( + wt_var_to_vals, + Dict( + Var("var0_psp") => -3.2837129282982764, + Var("var1_psp") => -1.734139957995633, + Var("var2_psp") => -0.4254578347528184) + ) + @test dict_approx( + wt_dist, + Dict( + 0 => 0.4954604613881238, + 1 => 0.3237688128294564, + 2 => 0.08747452404585239, + 3 => 0.057162024036790764, + 4 => 0.018574220540662965, + 5 => 0.012137705835969861, + 6 => 0.0032793153600291173, + 7 => 0.002142935963114733 + ) + ) +end From 79db3e088c74d3ca05045ef0c898f50bd1236d06 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 18 Dec 2023 23:28:23 -0800 Subject: [PATCH 010/231] split adnode.jl out of core.jl --- src/Dice.jl | 1 + src/autodiff/adnode.jl | 247 ++++++++++++++++++++++++++++++++++++ src/autodiff/core.jl | 255 +------------------------------------- src/inference/train_pr.jl | 4 +- 4 files changed, 254 insertions(+), 253 deletions(-) create mode 100644 src/autodiff/adnode.jl diff --git a/src/Dice.jl b/src/Dice.jl index db6602f8..195053d2 100644 --- a/src/Dice.jl +++ b/src/Dice.jl @@ -31,6 +31,7 @@ macro dice_ite(code) end end +include("autodiff/adnode.jl") include("autodiff/core.jl") include("autodiff/train.jl") include("dist/dist.jl") diff --git a/src/autodiff/adnode.jl b/src/autodiff/adnode.jl new file mode 100644 index 00000000..0eedac45 --- /dev/null +++ b/src/autodiff/adnode.jl @@ -0,0 +1,247 @@ +export ADNode, ADMatrix, Variable, Var, ad_map, sigmoid, deriv_sigmoid, inverse_sigmoid + +import DirectedAcyclicGraphs: NodeType, DAG, children + +abstract type ADNode <: DAG end + +# We always differentiate with respect to Variables +abstract type Variable <: ADNode end + +NodeType(::Type{<:Variable}) = Leaf() +compute_leaf(x::Variable) = error("The value of $(x) should've been provided in `vals`!") +backward(::Variable, _, _) = nothing + +ADNodeCompatible = Union{Real, AbstractMatrix{<:Real}} + +function add_deriv(derivs, n::ADNode, amount::ADNodeCompatible) + if haskey(derivs, n) + derivs[n] += amount + else + derivs[n] = amount + end +end + + +struct Var <: Variable + id::Any +end +function Base.show(io::IO, x::Var) + print(io, "Var(") + show(io, x.id) + print(io, ")") +end + +struct Constant <: ADNode + value::ADNodeCompatible +end +NodeType(::Type{Constant}) = Leaf() +compute_leaf(x::Constant) = x.value +backward(::Constant, _, _) = nothing +function Base.show(io::IO, x::Constant) + print(io, "Constant(") + show(io, x.value) + print(io, ")") +end + +struct Add <: ADNode + x::ADNode + y::ADNode +end +NodeType(::Type{Add}) = Inner() +children(x::Add) = [x.x, x.y] +compute_inner(x::Add, call) = call(x.x) + call(x.y) +function backward(n::Add, vals, derivs) + add_deriv(derivs, n.x, derivs[n]) + add_deriv(derivs, n.y, derivs[n]) +end +Base.:(+)(x::ADNode, y::ADNode) = Add(x, y) +Base.:(+)(x::ADNode, y::ADNodeCompatible) = Add(x, Constant(y)) +Base.:(+)(x::ADNodeCompatible, y::ADNode) = Add(Constant(x), y) + +struct Mul <: ADNode + x::ADNode + y::ADNode +end +NodeType(::Type{Mul}) = Inner() +children(x::Mul) = [x.x, x.y] +compute_inner(x::Mul, call) = call(x.x) * call(x.y) +function backward(n::Mul, vals, derivs) + if derivs[n] isa Real + add_deriv(derivs, n.x, derivs[n] * vals[n.y]) + add_deriv(derivs, n.y, derivs[n] * vals[n.x]) + elseif derivs[n] isa AbstractMatrix{<:Real} + add_deriv(derivs, n.x, derivs[n] * transpose(vals[n.y])) + add_deriv(derivs, n.y, transpose(vals[n.x]) * derivs[n]) + else + error("bad derivs type") + end +end +Base.:(*)(x::ADNode, y::ADNode) = Mul(x, y) +Base.:(*)(x::ADNode, y::ADNodeCompatible) = Mul(x, Constant(y)) +Base.:(*)(x::ADNodeCompatible, y::ADNode) = Mul(Constant(x), y) + +# struct Div <: ADNode +# x::ADNode +# y::ADNode +# end +# NodeType(::Type{Div}) = Inner() +# children(x::Div) = [x.x, x.y] +# compute_inner(x::Div, call) = call(x.x) / call(x.y) +# function backward(n::Div, vals, derivs) +# derivs[n.x] += derivs[n] / vals[n.y] +# derivs[n.y] -= derivs[n] * vals[n.x] / vals[n.y] ^ 2 +# end +# Base.:(/)(x::ADNode, y::ADNode) = Div(x, y) +# Base.:(/)(x::ADNode, y::Real) = Div(x, Constant(y)) +# Base.:(/)(x::Real, y::ADNode) = Div(Constant(x), y) + +struct Pow <: ADNode + x::ADNode + y::ADNode +end +NodeType(::Type{Pow}) = Inner() +children(x::Pow) = [x.x, x.y] +compute_inner(x::Pow, call) = call(x.x) ^ call(x.y) +function backward(n::Pow, vals, derivs) + @assert derivs[n] isa Real + add_deriv(derivs, n.x, derivs[n] * vals[n.y] * vals[n.x] ^ (vals[n.y] - 1)) + if !(n.y isa Constant) + add_deriv(derivs, n.y, derivs[n] * log(vals[n.x]) * vals[n.x] ^ vals[n.y]) + end +end +Base.:(^)(x::ADNode, y::ADNode) = Pow(x, y) +Base.:(^)(x::ADNode, y::ADNodeCompatible) = Pow(x, Constant(y)) +Base.:(^)(x::ADNodeCompatible, y::ADNode) = Pow(Constant(x), y) + +struct Sin <: ADNode + x::ADNode +end +NodeType(::Type{Sin}) = Inner() +children(x::Sin) = [x.x] +compute_inner(x::Sin, call) = sin(call(x.x)) +function backward(n::Sin, vals, derivs) + @assert derivs[n] isa Real + add_deriv(derivs, n.x, derivs[n] * cos(vals[n.x])) +end +Base.sin(x::ADNode) = Sin(x) + +struct Cos <: ADNode + x::ADNode +end +NodeType(::Type{Cos}) = Inner() +children(x::Cos) = [x.x] +compute_inner(x::Cos, call) = cos(call(x.x)) +function backward(n::Cos, vals, derivs) + @assert derivs[n] isa Real + add_deriv(derivs, n.x, derivs[n] * -sin(vals[n.x])) +end +Base.cos(x::ADNode) = Cos(x) + +# struct Exp <: ADNode +# x::ADNode +# end +# NodeType(::Type{Exp}) = Inner() +# children(x::Exp) = [x.x] +# compute_inner(x::Exp, call) = exp(call(x.x)) +# function backward(n::Exp, vals, derivs) +# derivs[n.x] += derivs[n] * exp(vals[n.x]) +# end +# Base.exp(x::ADNode) = Exp(x) + +struct Log <: ADNode + x::ADNode +end +NodeType(::Type{Log}) = Inner() +children(x::Log) = [x.x] +compute_inner(x::Log, call) = log(call(x.x)) +function backward(n::Log, vals, derivs) + @assert derivs[n] isa Real + add_deriv(derivs, n.x, derivs[n] / vals[n.x]) +end +Base.log(x::ADNode) = Log(x) + +struct ADMatrix <: ADNode + x::AbstractMatrix{ADNode} + function ADMatrix(x::AbstractMatrix{<:Union{<:Real, ADNode}}) + x isa AbstractMatrix{ADNode} && return new(x) + cast(x::ADNode) = x + cast(x::Real) = Constant(x) + new(map(cast, x)) + end +end +NodeType(::Type{ADMatrix}) = Inner() +children(x::ADMatrix) = vcat(x.x) +compute_inner(x::ADMatrix, call) = map(call, x.x) +function backward(n::ADMatrix, vals, derivs) + for i in CartesianIndices(n.x) + add_deriv(derivs, n.x[i], derivs[n][i]) + end +end +Base.:(+)(::AbstractMatrix{<:ADNode}, ::Any) = error("Lift to ADMatrix for performance") +Base.:(+)(::Any, ::AbstractMatrix{<:ADNode}) = error("Lift to ADMatrix for performance") +Base.:(*)(::AbstractMatrix{<:ADNode}, ::AbstractMatrix) = error("Lift to ADMatrix for performance") +Base.:(*)(::AbstractMatrix, ::AbstractMatrix{<:ADNode}) = error("Lift to ADMatrix for performance") + +struct GetIndex <: ADNode + x::ADNode + i::CartesianIndex +end +NodeType(::Type{GetIndex}) = Inner() +children(x::GetIndex) = [x.x] +compute_inner(x::GetIndex, call) = call(x.x)[x.i] +function backward(n::GetIndex, vals, derivs) + if !haskey(derivs, n.x) + derivs[n.x] = zero(vals[n.x]) + end + derivs[n.x][n.i] += derivs[n] +end +Base.getindex(x::ADNode, i...) = GetIndex(x, CartesianIndex(i...)) + +# rtjoa: This could be more elegant (e.g. not require the user to provide the +# derivative of `f`) if we restructured autodiff.jl to be pure. +# One possible interface is: +# `lambda(parameters::Vector{Var}, result::ADNode)::ADFunction` +# `apply(f::ADFunction, arguments::Vector{ADNode})` +# `compute(f::ADFunction, arguments::Vector{RM})::RM` +# where `RM = Union{Real, AbstractMatrix}` +# `differentiate(f::ADFunction)::ADFunction` +# ...but let's save this for the next Dice rewrite! +struct Map <: ADNode + f::Function + f′::Function + x::ADNode +end +NodeType(::Type{Map}) = Inner() +children(x::Map) = x.x +compute_inner(x::Map, call) = map(x.f, call(x.x)) +function backward(n::Map, vals, derivs) + add_deriv(derivs, n.x, derivs[n] .* n.f′.(vals[n])) +end +ad_map(f::Function, f′::Function, x::ADNode) = Map(f, f′, x) + +struct Transpose <: ADNode + x::ADNode +end +NodeType(::Type{Transpose}) = Inner() +children(x::Transpose) = x.x +compute_inner(x::Transpose, call) = transpose(call(x.x)) +function backward(n::Transpose, vals, derivs) + add_deriv(derivs, n.x, transpose(derivs[n])) +end + +# Desugared ops +Base.zero(::ADNode) = Constant(0) +Base.:(-)(x::ADNode) = x * -1 +Base.:(-)(x::ADNode, y::ADNode) = x + -y +Base.:(-)(x::ADNode, y::ADNodeCompatible) = x + Constant(-y) +Base.:(-)(x::ADNodeCompatible, y::ADNode) = Constant(x) - y +inv(x::ADNode) = x ^ Constant(-1.) +Base.:(/)(x::ADNode, y::ADNode) = x * inv(y) +Base.:(/)(x::ADNode, y::ADNodeCompatible) = x / Constant(y) +Base.:(/)(x::ADNodeCompatible, y::ADNode) = Constant(x) / y +Base.exp(x::ADNode) = ℯ ^ x +Base.abs(x::ADNode) = (x ^ 2) ^ (1/2) + +sigmoid(x) = 1 / (1 + exp(-x)) +deriv_sigmoid(x) = sigmoid(x) * (1 - sigmoid(x)) +inverse_sigmoid(x) = log(x / (1 - x)) \ No newline at end of file diff --git a/src/autodiff/core.jl b/src/autodiff/core.jl index d2baebc7..14b56a8b 100644 --- a/src/autodiff/core.jl +++ b/src/autodiff/core.jl @@ -1,188 +1,11 @@ -export value, compute, differentiate, sigmoid, ADNode, Var, value, ADMatrix, ad_map, Valuation, Derivs, compute_one, vars +export value, compute, differentiate, value, Valuation, Derivs, compute_one, variables using DirectedAcyclicGraphs -import DirectedAcyclicGraphs: NodeType, DAG, children using DataStructures: DefaultDict -abstract type ADNode <: DAG end - -ADNodeCompatible = Union{Real, AbstractMatrix{<:Real}} - -struct Var <: ADNode - id::Any -end -NodeType(::Type{Var}) = Leaf() - -sigmoid(x) = 1 / (1 + exp(-x)) -deriv_sigmoid(x) = sigmoid(x) * (1 - sigmoid(x)) -inverse_sigmoid(x) = log(x / (1 - x)) - -struct Constant <: ADNode - value::ADNodeCompatible -end -NodeType(::Type{Constant}) = Leaf() -Base.zero(::ADNode) = Constant(0) - -Base.show(io::IO, x::Var) = - print(io, "Var($(x.id))") -Base.show(io::IO, x::Constant) = - print(io, "Constant($(x.value))") - -struct Add <: ADNode - x::ADNode - y::ADNode -end -NodeType(::Type{Add}) = Inner() -children(x::Add) = [x.x, x.y] -Base.:(+)(x::ADNode, y::ADNode) = Add(x, y) -Base.:(+)(x::ADNode, y::ADNodeCompatible) = Add(x, Constant(y)) -Base.:(+)(x::ADNodeCompatible, y::ADNode) = Add(Constant(x), y) - -struct Mul <: ADNode - x::ADNode - y::ADNode -end -NodeType(::Type{Mul}) = Inner() -children(x::Mul) = [x.x, x.y] -Base.:(*)(x::ADNode, y::ADNode) = Mul(x, y) -Base.:(*)(x::ADNode, y::ADNodeCompatible) = Mul(x, Constant(y)) -Base.:(*)(x::ADNodeCompatible, y::ADNode) = Mul(Constant(x), y) - -# struct Div <: ADNode -# x::ADNode -# y::ADNode -# end -# NodeType(::Type{Div}) = Inner() -# children(x::Div) = [x.x, x.y] -# Base.:(/)(x::ADNode, y::ADNode) = Div(x, y) -# Base.:(/)(x::ADNode, y::Real) = Div(x, Constant(y)) -# Base.:(/)(x::Real, y::ADNode) = Div(Constant(x), y) - -struct Pow <: ADNode - x::ADNode - y::ADNode -end -NodeType(::Type{Pow}) = Inner() -children(x::Pow) = [x.x, x.y] - -Base.:(^)(x::ADNode, y::ADNode) = Pow(x, y) -Base.:(^)(x::ADNode, y::ADNodeCompatible) = Pow(x, Constant(y)) -Base.:(^)(x::ADNodeCompatible, y::ADNode) = Pow(Constant(x), y) - -struct Sin <: ADNode - x::ADNode -end -NodeType(::Type{Sin}) = Inner() -children(x::Sin) = [x.x] - -Base.sin(x::ADNode) = Sin(x) - -struct Cos <: ADNode - x::ADNode -end -NodeType(::Type{Cos}) = Inner() -children(x::Cos) = [x.x] - -Base.cos(x::ADNode) = Cos(x) - -# struct Exp <: ADNode -# x::ADNode -# end -# NodeType(::Type{Exp}) = Inner() -# children(x::Exp) = [x.x] -# Base.exp(x::ADNode) = Exp(x) - -# Desugared ops -Base.:(-)(x::ADNode) = x * -1 -Base.:(-)(x::ADNode, y::ADNode) = x + -y -Base.:(-)(x::ADNode, y::ADNodeCompatible) = x + Constant(-y) -Base.:(-)(x::ADNodeCompatible, y::ADNode) = Constant(x) - y -inv(x::ADNode) = x ^ Constant(-1.) -Base.:(/)(x::ADNode, y::ADNode) = x * inv(y) -Base.:(/)(x::ADNode, y::ADNodeCompatible) = x / Constant(y) -Base.:(/)(x::ADNodeCompatible, y::ADNode) = Constant(x) / y -Base.exp(x::ADNode) = ℯ ^ x -Base.abs(x::ADNode) = (x ^ 2) ^ (1/2) - -struct Log <: ADNode - x::ADNode -end -NodeType(::Type{Log}) = Inner() -children(x::Log) = [x.x] -Base.log(x::ADNode) = Log(x) - -# Matrix ops - -struct ADMatrix <: ADNode - x::AbstractMatrix{ADNode} - function ADMatrix(x::AbstractMatrix{<:Union{<:Real, ADNode}}) - x isa AbstractMatrix{ADNode} && return new(x) - cast(x::ADNode) = x - cast(x::Real) = Constant(x) - new(map(cast, x)) - end -end -NodeType(::Type{ADMatrix}) = Inner() -children(x::ADMatrix) = vcat(x.x) - -Base.:(+)(::AbstractMatrix{<:ADNode}, ::Any) = error("Lift to ADMatrix for performance") -Base.:(+)(::Any, ::AbstractMatrix{<:ADNode}) = error("Lift to ADMatrix for performance") -Base.:(*)(::AbstractMatrix{<:ADNode}, ::AbstractMatrix) = error("Lift to ADMatrix for performance") -Base.:(*)(::AbstractMatrix, ::AbstractMatrix{<:ADNode}) = error("Lift to ADMatrix for performance") - -struct GetIndex <: ADNode - x::ADNode - i::CartesianIndex -end -NodeType(::Type{GetIndex}) = Inner() -children(x::GetIndex) = [x.x] - -Base.getindex(x::ADNode, i...) = GetIndex(x, CartesianIndex(i...)) - -# rtjoa: This could be more elegant (e.g. not require the user to provide the -# derivative of `f`) if we restructured autodiff.jl to be pure. -# One possible interface is: -# `lambda(parameters::Vector{Var}, result::ADNode)::ADFunction` -# `apply(f::ADFunction, arguments::Vector{ADNode})` -# `compute(f::ADFunction, arguments::Vector{RM})::RM` -# where `RM = Union{Real, AbstractMatrix}` -# `differentiate(f::ADFunction)::ADFunction` -# ...but let's save this for the next Dice rewrite! -struct Map <: ADNode - f::Function - f′::Function - x::ADNode -end -NodeType(::Type{Map}) = Inner() -children(x::Map) = x.x -ad_map(f::Function, f′::Function, x::ADNode) = Map(f, f′, x) - - -struct Transpose <: ADNode - x::ADNode -end -NodeType(::Type{Transpose}) = Inner() -children(x::Transpose) = x.x - Valuation = Dict{Var, ADNodeCompatible} Derivs = Dict{ADNode, ADNodeCompatible} -# TODO: move to op definitions -compute_leaf(x::Var) = error("The value of $(x) should've been provided in `vals`!") -compute_leaf(x::Constant) = x.value -compute_inner(x::Add, call) = call(x.x) + call(x.y) -compute_inner(x::Mul, call) = call(x.x) * call(x.y) -compute_inner(x::Pow, call) = call(x.x) ^ call(x.y) -# compute_inner(x::Div, call) = call(x.x) / call(x.y) -compute_inner(x::Log, call) = log(call(x.x)) -# compute_inner(x::Exp, call) = exp(call(x.x)) -compute_inner(x::Sin, call) = sin(call(x.x)) -compute_inner(x::Cos, call) = cos(call(x.x)) -compute_inner(x::GetIndex, call) = call(x.x)[x.i] -compute_inner(x::ADMatrix, call) = map(call, x.x) -compute_inner(x::Map, call) = map(x.f, call(x.x)) -compute_inner(x::Transpose, call) = transpose(call(x.x)) - function compute_one(root, vals::Dict{ADNode, <:ADNodeCompatible}) foldup(root, compute_leaf, compute_inner, ADNodeCompatible, vals) end @@ -200,77 +23,7 @@ function differentiate(var_vals::Valuation, root_derivs::Derivs) vals = compute(var_vals, keys(root_derivs)) derivs = Dict{ADNode, ADNodeCompatible}() merge!(derivs, root_derivs) - # TODO: move these to operator definition sites - f(::Constant) = nothing - f(::Var) = nothing - function add_deriv(n::ADNode, amount::ADNodeCompatible) - if haskey(derivs, n) - derivs[n] += amount - else - derivs[n] = amount - end - end - function f(n::Add) - add_deriv(n.x, derivs[n]) - add_deriv(n.y, derivs[n]) - end - function f(n::Mul) - if derivs[n] isa Real - add_deriv(n.x, derivs[n] * vals[n.y]) - add_deriv(n.y, derivs[n] * vals[n.x]) - elseif derivs[n] isa AbstractMatrix{<:Real} - add_deriv(n.x, derivs[n] * transpose(vals[n.y])) - add_deriv(n.y, transpose(vals[n.x]) * derivs[n]) - else - error("bad derivs type") - end - end - # function f(n::Div) - # derivs[n.x] += derivs[n] / vals[n.y] - # derivs[n.y] -= derivs[n] * vals[n.x] / vals[n.y] ^ 2 - # end - function f(n::Pow) - @assert derivs[n] isa Real - add_deriv(n.x, derivs[n] * vals[n.y] * vals[n.x] ^ (vals[n.y] - 1)) - if !(n.y isa Constant) - add_deriv(n.y, derivs[n] * log(vals[n.x]) * vals[n.x] ^ vals[n.y]) - end - end - function f(n::Log) - @assert derivs[n] isa Real - add_deriv(n.x, derivs[n] / vals[n.x]) - end - function f(n::Sin) - @assert derivs[n] isa Real - add_deriv(n.x, derivs[n] * cos(vals[n.x])) - end - function f(n::Cos) - @assert derivs[n] isa Real - add_deriv(n.x, derivs[n] * -sin(vals[n.x])) - end - function f(n::ADMatrix) - for i in CartesianIndices(n.x) - add_deriv(n.x[i], derivs[n][i]) - end - end - function f(n::GetIndex) - if !haskey(derivs, n.x) - derivs[n.x] = zero(vals[n.x]) - end - derivs[n.x][n.i] += derivs[n] - end - function f(n::Map) - add_deriv(n.x, derivs[n] .* n.f′.(vals[n])) - end - function f(n::Transpose) - add_deriv(n.x, transpose(derivs[n])) - end - - - # function f(n::Exp) - # derivs[n.x] += derivs[n] * exp(vals[n.x]) - # end - foreach_down(n -> if haskey(derivs, n) f(n) end, keys(root_derivs)) + foreach_down(n -> if haskey(derivs, n) backward(n, vals, derivs) end, keys(root_derivs)) derivs end @@ -297,6 +50,6 @@ function foreach_down(f::Function, roots) end end -function vars(x::ADNode) - filter(node -> node isa Var, x) +function variables(x::ADNode) + filter(node -> node isa Variable, x) end diff --git a/src/inference/train_pr.jl b/src/inference/train_pr.jl index 0842a82b..8d8c16d0 100644 --- a/src/inference/train_pr.jl +++ b/src/inference/train_pr.jl @@ -31,7 +31,7 @@ function step_pr!( ) # loss refers to logprs of bools # error to do with var(true)? just make it a vector of anybool and don't filter - bools = Vector{Dist{Bool}}([n.id for n in vars(loss) if !(n.id isa Bool)]) + bools = Vector{Dist{Bool}}([n.id for n in variables(loss) if !(n.id isa Bool)]) # so, calculate these logprs w = WMC(BDDCompiler(bools), valuation_to_flip_pr_resolver(var_vals)) @@ -137,7 +137,7 @@ function compute_loss( var_vals::Valuation, loss::ADNode ) - bools = Vector{Dist{Bool}}([n.id for n in vars(loss) if !(n.id isa Bool)]) + bools = Vector{Dist{Bool}}([n.id for n in variables(loss) if !(n.id isa Bool)]) w = WMC(BDDCompiler(bools), valuation_to_flip_pr_resolver(var_vals)) bool_logprs = Valuation(Var(bool) => logprob(w, bool) for bool in bools) compute(bool_logprs, [loss])[loss] # for return value only From 64f8991fd45f71a2f83942158b34fe70d6d8dea7 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Fri, 22 Dec 2023 13:46:52 -0800 Subject: [PATCH 011/231] add LogPr --- src/autodiff/core.jl | 2 +- src/inference/inference.jl | 1 + src/inference/train_pr.jl | 72 ++++++++------------------------ src/inference/train_pr_losses.jl | 50 ++++++++++++++++++++++ 4 files changed, 70 insertions(+), 55 deletions(-) create mode 100644 src/inference/train_pr_losses.jl diff --git a/src/autodiff/core.jl b/src/autodiff/core.jl index 14b56a8b..f8c1239a 100644 --- a/src/autodiff/core.jl +++ b/src/autodiff/core.jl @@ -3,7 +3,7 @@ export value, compute, differentiate, value, Valuation, Derivs, compute_one, var using DirectedAcyclicGraphs using DataStructures: DefaultDict -Valuation = Dict{Var, ADNodeCompatible} +Valuation = Dict{Variable, ADNodeCompatible} Derivs = Dict{ADNode, ADNodeCompatible} function compute_one(root, vals::Dict{ADNode, <:ADNodeCompatible}) diff --git a/src/inference/inference.jl b/src/inference/inference.jl index 4ed0c3b2..335dfb07 100644 --- a/src/inference/inference.jl +++ b/src/inference/inference.jl @@ -173,5 +173,6 @@ include("pr.jl") # - train_group_probs!(::Vector{<:AnyBool})) # - train_group_probs!(::Vector{<:Tuple{<:AnyBool, <:AnyBool}}) include("train_pr.jl") +include("train_pr_losses.jl") include("sample.jl") \ No newline at end of file diff --git a/src/inference/train_pr.jl b/src/inference/train_pr.jl index 8d8c16d0..b0dd6deb 100644 --- a/src/inference/train_pr.jl +++ b/src/inference/train_pr.jl @@ -1,17 +1,11 @@ # The bridge between autodiff and cudd +export step_vars!, train_pr!, total_logprob, valuation_to_flip_pr_resolver +using DataStructures: Queue -export step_vars!, train_pr!, BoolToMax, total_logprob, valuation_to_flip_pr_resolver, mle_loss, kl_divergence - -struct BoolToMax - bool::AnyBool - evid::AnyBool - weight::Real - BoolToMax(bool, evid, weight) = new(bool & evid, evid, weight) +struct LogPr <: Variable + bool::Dist{Bool} end -function BoolToMax(bool; evidence=true, weight=1) - BoolToMax(bool, evidence, weight) -end # Find the log-probabilities and the log-probability gradient of a BDD function add_scaled_dict!( @@ -24,18 +18,22 @@ function add_scaled_dict!( end end + function step_pr!( var_vals::Valuation, - loss::ADNode, # var(distbool) represents logpr of that distbool + loss::ADNode, learning_rate::Real ) # loss refers to logprs of bools - # error to do with var(true)? just make it a vector of anybool and don't filter - bools = Vector{Dist{Bool}}([n.id for n in variables(loss) if !(n.id isa Bool)]) + # error to do with LogPr(true)? just make it a vector of anybool and don't filter + bools = Vector{Dist{Bool}}([ + n.bool for n in variables(loss) + if !(n isa Var) && !(n.bool isa Bool) + ]) # so, calculate these logprs w = WMC(BDDCompiler(bools), valuation_to_flip_pr_resolver(var_vals)) - bool_logprs = Valuation(Var(bool) => logprob(w, bool) for bool in bools) + bool_logprs = Valuation(LogPr(bool) => logprob(w, bool) for bool in bools) # TODO: have differentiate return vals as well to avoid this compute # or have it take vals loss_val = compute(bool_logprs, [loss])[loss] # for return value only @@ -46,7 +44,7 @@ function step_pr!( # find grad of loss w.r.t. each flip's probability grad = DefaultDict{Flip, Float64}(0.) for bool in bools - add_scaled_dict!(grad, grad_logprob(w, bool), derivs[Var(bool)]) + add_scaled_dict!(grad, grad_logprob(w, bool), derivs[LogPr(bool)]) end # move blame from flips probabilities to their adnode params @@ -73,43 +71,6 @@ function step_pr!( loss_val end -function mle_loss(bools_to_max::Vector{BoolToMax}) - loss = 0 - for b in bools_to_max - if b.evid === true - loss -= b.weight * Var(b.bool) - else - loss -= b.weight * (Var(b.bool) - Var(b.evid)) - end - end - loss -end - -function mle_loss(bools_to_max::Vector{<:AnyBool}) - mle_loss([BoolToMax(b, true, 1) for b in bools_to_max]) -end - -# This is valid but not what we usually want: when training a dist, the reference -# distribution should be constant, and the other should be symbolic. -# reference distribution to be constant. -# function kl_divergence(p::Dist, q::Dict{<:Any, <:Real}, domain::Set{<:Pair{<:Any, <:Dist}}) -# res = 0 -# for (x, x_dist) in domain -# logpx = Var(prob_equals(p, x_dist)) # Var(b) represents the logpr of b -# res += exp(logpx) * (logpx - log(q[x])) -# end -# res -# end - -function kl_divergence(p::Dict{<:Any, <:Real}, q::Dist, domain::Set{<:Pair{<:Any, <:Dist}}) - res = 0 - for (x, x_dist) in domain - logqx = Var(prob_equals(q, x_dist)) # Var(b) represents the logpr of b - res += p[x] * (log(p[x]) - logqx) - end - res -end - # Train group_to_psp to such that generate() approximates dataset's distribution function train_pr!( var_vals::Valuation, @@ -137,8 +98,11 @@ function compute_loss( var_vals::Valuation, loss::ADNode ) - bools = Vector{Dist{Bool}}([n.id for n in variables(loss) if !(n.id isa Bool)]) + bools = Vector{Dist{Bool}}([ + n.bool for n in variables(loss) + if !(n isa Var) && !(n.bool isa Bool) + ]) w = WMC(BDDCompiler(bools), valuation_to_flip_pr_resolver(var_vals)) - bool_logprs = Valuation(Var(bool) => logprob(w, bool) for bool in bools) + bool_logprs = Valuation(LogPr(bool) => logprob(w, bool) for bool in bools) compute(bool_logprs, [loss])[loss] # for return value only end diff --git a/src/inference/train_pr_losses.jl b/src/inference/train_pr_losses.jl new file mode 100644 index 00000000..5c4377fc --- /dev/null +++ b/src/inference/train_pr_losses.jl @@ -0,0 +1,50 @@ + +export BoolToMax, mle_loss, kl_divergence + +struct BoolToMax + bool::AnyBool + evid::AnyBool + weight::Real + BoolToMax(bool, evid, weight) = new(bool & evid, evid, weight) +end + +function BoolToMax(bool; evidence=true, weight=1) + BoolToMax(bool, evidence, weight) +end + +function mle_loss(bools_to_max::Vector{BoolToMax}) + loss = 0 + for b in bools_to_max + if b.evid === true + loss -= b.weight * LogPr(b.bool) + else + loss -= b.weight * (LogPr(b.bool) - LogPr(b.evid)) + end + end + loss +end + +function mle_loss(bools_to_max::Vector{<:AnyBool}) + mle_loss([BoolToMax(b, true, 1) for b in bools_to_max]) +end + +# This is valid but not what we usually want: when training a dist, the reference +# distribution should be constant, and the other should be symbolic. +# reference distribution to be constant. +# function kl_divergence(p::Dist, q::Dict{<:Any, <:Real}, domain::Set{<:Pair{<:Any, <:Dist}}) +# res = 0 +# for (x, x_dist) in domain +# logpx = Var(prob_equals(p, x_dist)) # Var(b) represents the logpr of b +# res += exp(logpx) * (logpx - log(q[x])) +# end +# res +# end + +function kl_divergence(p::Dict{<:Any, <:Real}, q::Dist, domain::Set{<:Pair{<:Any, <:Dist}}) + res = 0 + for (x, x_dist) in domain + logqx = LogPr(prob_equals(q, x_dist)) + res += p[x] * (log(p[x]) - logqx) + end + res +end \ No newline at end of file From 421aca0efb8bee792b9222dc4a30d09bb1674b8d Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Fri, 22 Dec 2023 17:02:11 -0800 Subject: [PATCH 012/231] arbitrary interleaving --- examples/learned_cheap_dists.jl | 10 ++- src/autodiff/adnode.jl | 51 ++++++++--- src/autodiff/core.jl | 6 +- src/autodiff/train.jl | 3 +- src/inference/cudd/compile.jl | 1 + src/inference/cudd/wmc.jl | 64 +++++--------- src/inference/inference.jl | 5 +- src/inference/pr.jl | 7 +- src/inference/train_pr.jl | 120 +++++++++++++------------- test/autodiff_test.jl | 4 +- test/inference/learned_cheap_dists.jl | 16 ++-- test/inference/train_test.jl | 4 +- 12 files changed, 155 insertions(+), 136 deletions(-) diff --git a/examples/learned_cheap_dists.jl b/examples/learned_cheap_dists.jl index f878e22d..dd47289b 100644 --- a/examples/learned_cheap_dists.jl +++ b/examples/learned_cheap_dists.jl @@ -40,7 +40,10 @@ for width in [3] epochs=2000, learning_rate=0.1 ) - wt_dist = pr(int, flip_pr_resolver=valuation_to_flip_pr_resolver(wt_var_to_vals)) + wt_dist = Dict( + i => compute_mixed(wt_var_to_vals, exp(LogPr(prob_equals(int, DistUInt{width}(i))))) + for i in 0:2^width-1 + ) # KL divergence minimization kl_var_to_vals = Valuation(x => 0 for x in vars) @@ -54,7 +57,10 @@ for width in [3] epochs=2000, learning_rate=0.1 ) - kl_dist = pr(int, flip_pr_resolver=valuation_to_flip_pr_resolver(kl_var_to_vals)) + kl_dist = Dict( + i => compute_mixed(kl_var_to_vals, exp(LogPr(prob_equals(int, DistUInt{width}(i))))) + for i in 0:2^width-1 + ) # Counting counting_prs = [ diff --git a/src/autodiff/adnode.jl b/src/autodiff/adnode.jl index 0eedac45..d69dd26b 100644 --- a/src/autodiff/adnode.jl +++ b/src/autodiff/adnode.jl @@ -31,7 +31,7 @@ function Base.show(io::IO, x::Var) print(io, ")") end -struct Constant <: ADNode +mutable struct Constant <: ADNode value::ADNodeCompatible end NodeType(::Type{Constant}) = Leaf() @@ -43,7 +43,7 @@ function Base.show(io::IO, x::Constant) print(io, ")") end -struct Add <: ADNode +mutable struct Add <: ADNode x::ADNode y::ADNode end @@ -58,7 +58,7 @@ Base.:(+)(x::ADNode, y::ADNode) = Add(x, y) Base.:(+)(x::ADNode, y::ADNodeCompatible) = Add(x, Constant(y)) Base.:(+)(x::ADNodeCompatible, y::ADNode) = Add(Constant(x), y) -struct Mul <: ADNode +mutable struct Mul <: ADNode x::ADNode y::ADNode end @@ -80,7 +80,7 @@ Base.:(*)(x::ADNode, y::ADNode) = Mul(x, y) Base.:(*)(x::ADNode, y::ADNodeCompatible) = Mul(x, Constant(y)) Base.:(*)(x::ADNodeCompatible, y::ADNode) = Mul(Constant(x), y) -# struct Div <: ADNode +# mutable struct Div <: ADNode # x::ADNode # y::ADNode # end @@ -95,7 +95,7 @@ Base.:(*)(x::ADNodeCompatible, y::ADNode) = Mul(Constant(x), y) # Base.:(/)(x::ADNode, y::Real) = Div(x, Constant(y)) # Base.:(/)(x::Real, y::ADNode) = Div(Constant(x), y) -struct Pow <: ADNode +mutable struct Pow <: ADNode x::ADNode y::ADNode end @@ -113,7 +113,7 @@ Base.:(^)(x::ADNode, y::ADNode) = Pow(x, y) Base.:(^)(x::ADNode, y::ADNodeCompatible) = Pow(x, Constant(y)) Base.:(^)(x::ADNodeCompatible, y::ADNode) = Pow(Constant(x), y) -struct Sin <: ADNode +mutable struct Sin <: ADNode x::ADNode end NodeType(::Type{Sin}) = Inner() @@ -125,7 +125,7 @@ function backward(n::Sin, vals, derivs) end Base.sin(x::ADNode) = Sin(x) -struct Cos <: ADNode +mutable struct Cos <: ADNode x::ADNode end NodeType(::Type{Cos}) = Inner() @@ -137,7 +137,7 @@ function backward(n::Cos, vals, derivs) end Base.cos(x::ADNode) = Cos(x) -# struct Exp <: ADNode +# mutable struct Exp <: ADNode # x::ADNode # end # NodeType(::Type{Exp}) = Inner() @@ -148,7 +148,7 @@ Base.cos(x::ADNode) = Cos(x) # end # Base.exp(x::ADNode) = Exp(x) -struct Log <: ADNode +mutable struct Log <: ADNode x::ADNode end NodeType(::Type{Log}) = Inner() @@ -160,7 +160,7 @@ function backward(n::Log, vals, derivs) end Base.log(x::ADNode) = Log(x) -struct ADMatrix <: ADNode +mutable struct ADMatrix <: ADNode x::AbstractMatrix{ADNode} function ADMatrix(x::AbstractMatrix{<:Union{<:Real, ADNode}}) x isa AbstractMatrix{ADNode} && return new(x) @@ -182,7 +182,7 @@ Base.:(+)(::Any, ::AbstractMatrix{<:ADNode}) = error("Lift to ADMatrix for perfo Base.:(*)(::AbstractMatrix{<:ADNode}, ::AbstractMatrix) = error("Lift to ADMatrix for performance") Base.:(*)(::AbstractMatrix, ::AbstractMatrix{<:ADNode}) = error("Lift to ADMatrix for performance") -struct GetIndex <: ADNode +mutable struct GetIndex <: ADNode x::ADNode i::CartesianIndex end @@ -206,7 +206,7 @@ Base.getindex(x::ADNode, i...) = GetIndex(x, CartesianIndex(i...)) # where `RM = Union{Real, AbstractMatrix}` # `differentiate(f::ADFunction)::ADFunction` # ...but let's save this for the next Dice rewrite! -struct Map <: ADNode +mutable struct Map <: ADNode f::Function f′::Function x::ADNode @@ -219,7 +219,7 @@ function backward(n::Map, vals, derivs) end ad_map(f::Function, f′::Function, x::ADNode) = Map(f, f′, x) -struct Transpose <: ADNode +mutable struct Transpose <: ADNode x::ADNode end NodeType(::Type{Transpose}) = Inner() @@ -229,6 +229,31 @@ function backward(n::Transpose, vals, derivs) add_deriv(derivs, n.x, transpose(derivs[n])) end +# Give override for add_logprobs so logprob in wmc.jl is differentiable +# computes log(exp(x) + exp(y)) +mutable struct NodeLogPr <: ADNode + pr::ADNode + hi::ADNode + lo::ADNode +end +NodeType(::Type{NodeLogPr}) = Inner() +children(x::NodeLogPr) = [x.pr, x.hi, x.lo] +# compute by calling higher-accuracy, non-autodiff-able implementation +compute_inner(x::NodeLogPr, call) = node_logprob(call(x.pr), call(x.hi), call(x.lo)) +function backward(n::NodeLogPr, vals, derivs) + denom = vals[n.pr] * exp(vals[n.hi]) + (1 - vals[n.pr]) * exp(vals[n.lo]) + add_deriv(derivs, n.hi, derivs[n] * vals[n.pr] * exp(vals[n.hi]) / denom) + add_deriv(derivs, n.lo, derivs[n] * (1 - vals[n.pr]) * exp(vals[n.lo]) / denom) + add_deriv(derivs, n.pr, derivs[n] * (exp(vals[n.hi]) - exp(vals[n.lo])) / denom) +end +node_logprob(pr::ADNode, hi::ADNode, lo::ADNode) = NodeLogPr(pr, hi, lo) +node_logprob(pr::ADNode, hi::ADNode, lo::ADNodeCompatible) = NodeLogPr(pr, hi, Constant(lo)) +node_logprob(pr::ADNode, hi::ADNodeCompatible, lo::ADNode) = NodeLogPr(pr, Constant(hi), lo) +node_logprob(pr::ADNode, hi::ADNodeCompatible, lo::ADNodeCompatible) = NodeLogPr(pr, Constant(hi), Constant(lo)) +node_logprob(pr::ADNodeCompatible, hi::ADNode, lo::ADNode) = NodeLogPr(Constant(pr), hi, lo) +node_logprob(pr::ADNodeCompatible, hi::ADNode, lo::ADNodeCompatible) = NodeLogPr(Constant(pr), hi, Constant(lo)) +node_logprob(pr::ADNodeCompatible, hi::ADNodeCompatible, lo::ADNode) = NodeLogPr(Constant(pr), hi, Constant(lo)) + # Desugared ops Base.zero(::ADNode) = Constant(0) Base.:(-)(x::ADNode) = x * -1 diff --git a/src/autodiff/core.jl b/src/autodiff/core.jl index f8c1239a..d745aebc 100644 --- a/src/autodiff/core.jl +++ b/src/autodiff/core.jl @@ -23,8 +23,10 @@ function differentiate(var_vals::Valuation, root_derivs::Derivs) vals = compute(var_vals, keys(root_derivs)) derivs = Dict{ADNode, ADNodeCompatible}() merge!(derivs, root_derivs) - foreach_down(n -> if haskey(derivs, n) backward(n, vals, derivs) end, keys(root_derivs)) - derivs + foreach_down(keys(root_derivs)) do n + haskey(derivs, n) && backward(n, vals, derivs) + end + vals, derivs end # Extending DirectedAcyclicGraphs.jl diff --git a/src/autodiff/train.jl b/src/autodiff/train.jl index 6a918f5a..932f96a6 100644 --- a/src/autodiff/train.jl +++ b/src/autodiff/train.jl @@ -2,7 +2,8 @@ export step_maximize!, add_pr_var! function step_maximize!(var_vals::Valuation, nodes_to_max, learning_rate) root_derivs = Derivs(n => 1 for n in nodes_to_max) - for (n, d) in differentiate(var_vals, root_derivs) + _, derivs = differentiate(var_vals, root_derivs) + for (n, d) in derivs n isa Var && (var_vals[n] += d * learning_rate) end end diff --git a/src/inference/cudd/compile.jl b/src/inference/cudd/compile.jl index 80267ca1..15133330 100644 --- a/src/inference/cudd/compile.jl +++ b/src/inference/cudd/compile.jl @@ -66,6 +66,7 @@ function compile(c::BDDCompiler, root::AnyBool)::CuddNode end function compile(c::BDDCompiler, roots::Vector{<:AnyBool})::Vector{CuddNode} + # TODO: don't add here; maintain set of covered nodes, panic if not covered add_roots!(c, roots) [compile_existing(c, root) for root in roots] end diff --git a/src/inference/cudd/wmc.jl b/src/inference/cudd/wmc.jl index 791803ac..d10ca103 100644 --- a/src/inference/cudd/wmc.jl +++ b/src/inference/cudd/wmc.jl @@ -6,12 +6,13 @@ export WMC using DataStructures: LinkedList, cons, nil +ADFloat = Union{AbstractFloat, ADNode} + mutable struct WMC c::BDDCompiler - cache::Dict{CuddNode, Float64} - flip_pr_resolver - function WMC(c, flip_pr_resolver) - w = new(c, Dict{CuddNode, Float64}(), flip_pr_resolver) + cache::Dict{CuddNode, ADFloat} + function WMC(c) + w = new(c, Dict{CuddNode, ADFloat}()) w.cache[constant(w.c.mgr, true)] = log(one(Float64)) w.cache[constant(w.c.mgr, false)] = log(zero(Float64)) w @@ -20,48 +21,23 @@ end logprob(w::WMC, x::AnyBool) = logprob(w, compile(w.c, x)) -function logprob(w::WMC, x::CuddNode) - get!(w.cache, x) do - f = w.c.level_to_flip[level(x)] - p = if f.prob isa Real - f.prob - else - w.flip_pr_resolver(f.prob) - end - a = log(p) + logprob(w, high(x)) - b = log(1.0-p) + logprob(w, low(x)) - if isinf(a) - b - elseif isinf(b) - a - else - # log(exp(a) + exp(y)) - max(a,b) + log1p(exp(-abs(a-b))) - end +function node_logprob(level_pr, hi_logpr, lo_logpr) + a = log(level_pr) + hi_logpr + b = log(1.0-level_pr) + lo_logpr + # Better-accuracy version of log(exp(a) + exp(b)) + # return log(exp(a) + exp(b)) + if isinf(a) + b + elseif isinf(b) + a + else + max(a,b) + log1p(exp(-abs(a-b))) end end -grad_logprob(w::WMC, x::AnyBool) = grad_logprob(w, compile(w.c, x)) - -# Calculate gradient of a BDD node w.r.t. flip probabilities (reverse mode) -function grad_logprob(w::WMC, x::CuddNode)::Dict{Flip, Float64} - grad = DefaultDict{Flip, Float64}(0.) - deriv = DefaultDict{CuddNode, Float64}(0.) - deriv[x] = 1 - level_traversal(x) do node - i, lo, hi = level(node), low(node), high(node) - f = w.c.level_to_flip[i] - fhi, flo = logprob(w, hi), logprob(w, lo) - p = if f.prob isa Real - f.prob - else - w.flip_pr_resolver(f.prob) - end - denom = p * exp(fhi) + (1 - p) * exp(flo) - deriv[hi] += deriv[node] * p * exp(fhi) / denom - deriv[lo] += deriv[node] * (1 - p) * exp(flo) / denom - grad[f] += deriv[node] * (exp(fhi) - exp(flo)) / denom +function logprob(w::WMC, x::CuddNode) + get!(w.cache, x) do + f = w.c.level_to_flip[level(x)] + node_logprob(f.prob, logprob(w, high(x)), logprob(w, low(x))) end - grad end - diff --git a/src/inference/inference.jl b/src/inference/inference.jl index 335dfb07..2e0c8a2e 100644 --- a/src/inference/inference.jl +++ b/src/inference/inference.jl @@ -1,5 +1,5 @@ export condprobs, condprob, Cudd, CuddDebugInfo, ProbException, allobservations, JointQuery, - returnvalue, expectation, variance, kldivergence, tvdistance, entropy + returnvalue, expectation, variance, kldivergence, tvdistance, entropy, pr using DataStructures: DefaultDict, DefaultOrderedDict, OrderedDict @@ -27,9 +27,8 @@ function pr(queries::Vector{JointQuery}; evidence::AnyBool = true, errors::Vector{CondError} = CondError[], dots::Vector{Tuple{Vector{AnyBool}, String}} = Tuple{Vector{AnyBool}, String}[], algo::InferAlgo = default_infer_algo(), - flip_pr_resolver::Union{Nothing, Function} = nothing ) - pr(algo, evidence, queries, errors, dots, flip_pr_resolver) + pr_impl(algo, evidence, queries, errors, dots) end function pr(queries::JointQuery...; kwargs...) diff --git a/src/inference/pr.jl b/src/inference/pr.jl index 8ebb7922..bbb7568a 100644 --- a/src/inference/pr.jl +++ b/src/inference/pr.jl @@ -1,4 +1,4 @@ -export pr, Cudd, CuddDebugInfo +export Cudd, CuddDebugInfo using DataStructures: OrderedDict @@ -52,15 +52,14 @@ function get_world_probs(w::WMC, query::JointQuery, evidence::AnyBool) end -function pr(cudd::Cudd, evidence, queries::Vector{JointQuery}, errors, dots, flip_pr_resolver) +function pr_impl(cudd::Cudd, evidence, queries::Vector{JointQuery}, errors, dots) w = WMC( BDDCompiler(Iterators.flatten(( Iterators.flatten(query.bits for query in queries), (err[1] for err in errors), [evidence], Iterators.flatten(xs for (xs, filename) in dots), - ))), - flip_pr_resolver + ))) ) enable_reordering(w.c, cudd.reordering_type) diff --git a/src/inference/train_pr.jl b/src/inference/train_pr.jl index b0dd6deb..0d2df36d 100644 --- a/src/inference/train_pr.jl +++ b/src/inference/train_pr.jl @@ -1,10 +1,59 @@ # The bridge between autodiff and cudd -export step_vars!, train_pr!, total_logprob, valuation_to_flip_pr_resolver +export step_vars!, train_pr!, LogPr, compute_mixed using DataStructures: Queue -struct LogPr <: Variable +mutable struct LogPr <: ADNode bool::Dist{Bool} end +NodeType(::Type{LogPr}) = Leaf() +compute_leaf(::LogPr) = error("LogPr must be expanded") +backward(::LogPr, _, _) = error("LogPr must be expanded") + +mutable struct LogPrExpander + w::WMC + cache::Dict{ADNode, ADNode} + function LogPrExpander(w) + new(w, Dict{ADNode, ADNode}()) + end +end + + + +function expand_logprs(l::LogPrExpander, root::ADNode)::ADNode + fl(x::LogPr) = expand_logprs(l, logprob(l.w, x.bool)) + fl(x::Var) = x + fl(x::Constant) = x + fi(x::Add, call) = Add(call(x.x), call(x.y)) + fi(x::Mul, call) = Mul(call(x.x), call(x.y)) + fi(x::Pow, call) = Pow(call(x.x), call(x.y)) + fi(x::Sin, call) = Sin(call(x.x)) + fi(x::Cos, call) = Cos(call(x.x)) + fi(x::Log, call) = Log(call(x.x)) + fi(x::NodeLogPr, call) = NodeLogPr(call(x.pr), call(x.hi), call(x.lo)) + foldup(root, fl, fi, ADNode, l.cache) +end + +function bool_roots(root::ADNode) + # TODO: have non-root removal be done in src/inference/cudd/compile.jl + seen_adnodes = Dict{ADNode, Nothing}() + seen_bools = Dict{AnyBool, Nothing}() + non_roots = Set{AnyBool}() + to_visit = Vector{ADNode}([root]) + while !isempty(to_visit) + x = pop!(to_visit) + foreach(x, seen_adnodes) do y + if y isa LogPr + foreach(y.bool, seen_bools) do bool + union!(non_roots, children(bool)) + if bool isa Flip && bool.prob isa ADNode && !haskey(seen_adnodes, bool.prob) + push!(to_visit, bool.prob) + end + end + end + end + end + setdiff(keys(seen_bools), non_roots) +end # Find the log-probabilities and the log-probability gradient of a BDD @@ -24,43 +73,9 @@ function step_pr!( loss::ADNode, learning_rate::Real ) - # loss refers to logprs of bools - # error to do with LogPr(true)? just make it a vector of anybool and don't filter - bools = Vector{Dist{Bool}}([ - n.bool for n in variables(loss) - if !(n isa Var) && !(n.bool isa Bool) - ]) - - # so, calculate these logprs - w = WMC(BDDCompiler(bools), valuation_to_flip_pr_resolver(var_vals)) - bool_logprs = Valuation(LogPr(bool) => logprob(w, bool) for bool in bools) - # TODO: have differentiate return vals as well to avoid this compute - # or have it take vals - loss_val = compute(bool_logprs, [loss])[loss] # for return value only - - # so we can move the blame from to loss to those bools - derivs = differentiate(bool_logprs, Derivs(loss => 1)) - - # find grad of loss w.r.t. each flip's probability - grad = DefaultDict{Flip, Float64}(0.) - for bool in bools - add_scaled_dict!(grad, grad_logprob(w, bool), derivs[LogPr(bool)]) - end - - # move blame from flips probabilities to their adnode params - root_derivs = Derivs() - for (f, d) in grad - if f.prob isa ADNode - if haskey(root_derivs, f.prob) - root_derivs[f.prob] += d - else - root_derivs[f.prob] = d - end - end - end - - # move blame from adnode params to vars - derivs = differentiate(var_vals, root_derivs) + l = LogPrExpander(WMC(BDDCompiler(bool_roots(loss)))) + loss = expand_logprs(l, loss) + vals, derivs = differentiate(var_vals, Derivs(loss => 1)) # update vars for (adnode, d) in derivs @@ -68,7 +83,8 @@ function step_pr!( var_vals[adnode] -= d * learning_rate end end - loss_val + + vals[loss] end # Train group_to_psp to such that generate() approximates dataset's distribution @@ -82,27 +98,15 @@ function train_pr!( for _ in 1:epochs push!(losses, step_pr!(var_vals, loss, learning_rate)) end - push!(losses, compute_loss(var_vals, loss)) + push!(losses, compute_mixed(var_vals, loss)) losses end -function valuation_to_flip_pr_resolver(var_vals) - vals = Dict{ADNode, ADNodeCompatible}() - merge!(vals, var_vals) - function flip_pr_resolver(prob) - compute_one(prob, vals) - end -end - -function compute_loss( +function compute_mixed( var_vals::Valuation, - loss::ADNode + x::ADNode ) - bools = Vector{Dist{Bool}}([ - n.bool for n in variables(loss) - if !(n isa Var) && !(n.bool isa Bool) - ]) - w = WMC(BDDCompiler(bools), valuation_to_flip_pr_resolver(var_vals)) - bool_logprs = Valuation(LogPr(bool) => logprob(w, bool) for bool in bools) - compute(bool_logprs, [loss])[loss] # for return value only + l = LogPrExpander(WMC(BDDCompiler(bool_roots(x)))) + x = expand_logprs(l, x) + compute(var_vals, [x])[x] end diff --git a/test/autodiff_test.jl b/test/autodiff_test.jl index c83bb8e7..4f5f771c 100644 --- a/test/autodiff_test.jl +++ b/test/autodiff_test.jl @@ -5,11 +5,11 @@ using Test x = Var("x") e = x^2 - derivs = differentiate(Valuation(x => 5), Derivs(e => π)) + _, derivs = differentiate(Valuation(x => 5), Derivs(e => π)) @test derivs[x] ≈ 10 * π e = 1/x - derivs = differentiate(Valuation(x => 5), Derivs(e => π)) + _, derivs = differentiate(Valuation(x => 5), Derivs(e => π)) @test derivs[x] ≈ -1/25 * π end diff --git a/test/inference/learned_cheap_dists.jl b/test/inference/learned_cheap_dists.jl index 30996d07..a2bb5f68 100644 --- a/test/inference/learned_cheap_dists.jl +++ b/test/inference/learned_cheap_dists.jl @@ -3,7 +3,7 @@ using Dice using Plots function dict_approx(d1::AbstractDict, d2::AbstractDict) - keys(d1) == keys(d2) && all( + issetequal(keys(d1), keys(d2)) && all( d1[k] ≈ d2[k] for k in keys(d1) ) @@ -39,7 +39,10 @@ end epochs=300, learning_rate=0.1 ) - wt_dist = pr(int, flip_pr_resolver=valuation_to_flip_pr_resolver(wt_var_to_vals)) + wt_dist = Dict( + i => compute_mixed(wt_var_to_vals, exp(LogPr(prob_equals(int, DistUInt{width}(i))))) + for i in 0:2^width-1 + ) @test dict_approx( wt_var_to_vals, Dict( @@ -73,16 +76,19 @@ end epochs=300, learning_rate=0.1 ) - kl_dist = pr(int, flip_pr_resolver=valuation_to_flip_pr_resolver(kl_var_to_vals)) + kl_dist = Dict( + i => compute_mixed(kl_var_to_vals, exp(LogPr(prob_equals(int, DistUInt{width}(i))))) + for i in 0:2^width-1 + ) @test dict_approx( - wt_var_to_vals, + kl_var_to_vals, Dict( Var("var0_psp") => -3.2837129282982764, Var("var1_psp") => -1.734139957995633, Var("var2_psp") => -0.4254578347528184) ) @test dict_approx( - wt_dist, + kl_dist, Dict( 0 => 0.4954604613881238, 1 => 0.3237688128294564, diff --git a/test/inference/train_test.jl b/test/inference/train_test.jl index f2311724..a154c81a 100644 --- a/test/inference/train_test.jl +++ b/test/inference/train_test.jl @@ -46,14 +46,14 @@ end var_vals = Valuation(psp => 0) b = @dice_ite if flip(prob) true else flip(prob) end train_pr!(var_vals, mle_loss([prob_equals(b, x) for x in dataset]); epochs=200, learning_rate=0.003) - p1 = pr(b; flip_pr_resolver=valuation_to_flip_pr_resolver(var_vals))[true] + p1 = compute_mixed(var_vals, LogPr(b)) # Train for 100 epochs, twice b = @dice_ite if flip(prob) true else flip(prob) end var_vals = Valuation(psp => 0) train_pr!(var_vals, mle_loss([prob_equals(b, x) for x in dataset]); epochs=100, learning_rate=0.003) train_pr!(var_vals, mle_loss([prob_equals(b, x) for x in dataset]); epochs=100, learning_rate=0.003) - p2 = pr(b; flip_pr_resolver=valuation_to_flip_pr_resolver(var_vals))[true] + p2 = compute_mixed(var_vals, LogPr(b)) @test p1 ≈ p2 end From dc1e647053b1fe7272604eff33e3231b1727a8ba Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Fri, 22 Dec 2023 17:05:57 -0800 Subject: [PATCH 013/231] remove nodelogpr --- src/autodiff/adnode.jl | 25 ------------------------- src/inference/cudd/wmc.jl | 18 +++--------------- src/inference/train_pr.jl | 1 - 3 files changed, 3 insertions(+), 41 deletions(-) diff --git a/src/autodiff/adnode.jl b/src/autodiff/adnode.jl index d69dd26b..19c369ed 100644 --- a/src/autodiff/adnode.jl +++ b/src/autodiff/adnode.jl @@ -229,31 +229,6 @@ function backward(n::Transpose, vals, derivs) add_deriv(derivs, n.x, transpose(derivs[n])) end -# Give override for add_logprobs so logprob in wmc.jl is differentiable -# computes log(exp(x) + exp(y)) -mutable struct NodeLogPr <: ADNode - pr::ADNode - hi::ADNode - lo::ADNode -end -NodeType(::Type{NodeLogPr}) = Inner() -children(x::NodeLogPr) = [x.pr, x.hi, x.lo] -# compute by calling higher-accuracy, non-autodiff-able implementation -compute_inner(x::NodeLogPr, call) = node_logprob(call(x.pr), call(x.hi), call(x.lo)) -function backward(n::NodeLogPr, vals, derivs) - denom = vals[n.pr] * exp(vals[n.hi]) + (1 - vals[n.pr]) * exp(vals[n.lo]) - add_deriv(derivs, n.hi, derivs[n] * vals[n.pr] * exp(vals[n.hi]) / denom) - add_deriv(derivs, n.lo, derivs[n] * (1 - vals[n.pr]) * exp(vals[n.lo]) / denom) - add_deriv(derivs, n.pr, derivs[n] * (exp(vals[n.hi]) - exp(vals[n.lo])) / denom) -end -node_logprob(pr::ADNode, hi::ADNode, lo::ADNode) = NodeLogPr(pr, hi, lo) -node_logprob(pr::ADNode, hi::ADNode, lo::ADNodeCompatible) = NodeLogPr(pr, hi, Constant(lo)) -node_logprob(pr::ADNode, hi::ADNodeCompatible, lo::ADNode) = NodeLogPr(pr, Constant(hi), lo) -node_logprob(pr::ADNode, hi::ADNodeCompatible, lo::ADNodeCompatible) = NodeLogPr(pr, Constant(hi), Constant(lo)) -node_logprob(pr::ADNodeCompatible, hi::ADNode, lo::ADNode) = NodeLogPr(Constant(pr), hi, lo) -node_logprob(pr::ADNodeCompatible, hi::ADNode, lo::ADNodeCompatible) = NodeLogPr(Constant(pr), hi, Constant(lo)) -node_logprob(pr::ADNodeCompatible, hi::ADNodeCompatible, lo::ADNode) = NodeLogPr(Constant(pr), hi, Constant(lo)) - # Desugared ops Base.zero(::ADNode) = Constant(0) Base.:(-)(x::ADNode) = x * -1 diff --git a/src/inference/cudd/wmc.jl b/src/inference/cudd/wmc.jl index d10ca103..7aedb4e7 100644 --- a/src/inference/cudd/wmc.jl +++ b/src/inference/cudd/wmc.jl @@ -21,23 +21,11 @@ end logprob(w::WMC, x::AnyBool) = logprob(w, compile(w.c, x)) -function node_logprob(level_pr, hi_logpr, lo_logpr) - a = log(level_pr) + hi_logpr - b = log(1.0-level_pr) + lo_logpr - # Better-accuracy version of log(exp(a) + exp(b)) - # return log(exp(a) + exp(b)) - if isinf(a) - b - elseif isinf(b) - a - else - max(a,b) + log1p(exp(-abs(a-b))) - end -end - function logprob(w::WMC, x::CuddNode) get!(w.cache, x) do f = w.c.level_to_flip[level(x)] - node_logprob(f.prob, logprob(w, high(x)), logprob(w, low(x))) + a = log(f.prob) + logprob(w, high(x)) + b = log(1.0-f.prob) + logprob(w, low(x)) + log(exp(a) + exp(b)) end end diff --git a/src/inference/train_pr.jl b/src/inference/train_pr.jl index 0d2df36d..5ffc0c9a 100644 --- a/src/inference/train_pr.jl +++ b/src/inference/train_pr.jl @@ -29,7 +29,6 @@ function expand_logprs(l::LogPrExpander, root::ADNode)::ADNode fi(x::Sin, call) = Sin(call(x.x)) fi(x::Cos, call) = Cos(call(x.x)) fi(x::Log, call) = Log(call(x.x)) - fi(x::NodeLogPr, call) = NodeLogPr(call(x.pr), call(x.hi), call(x.lo)) foldup(root, fl, fi, ADNode, l.cache) end From c7fcb10e07b2c1a103e0816cccacaed84204cde4 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Fri, 22 Dec 2023 17:06:42 -0800 Subject: [PATCH 014/231] remove commented adnodes: div, exp --- src/autodiff/adnode.jl | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/src/autodiff/adnode.jl b/src/autodiff/adnode.jl index 19c369ed..edf5419e 100644 --- a/src/autodiff/adnode.jl +++ b/src/autodiff/adnode.jl @@ -80,21 +80,6 @@ Base.:(*)(x::ADNode, y::ADNode) = Mul(x, y) Base.:(*)(x::ADNode, y::ADNodeCompatible) = Mul(x, Constant(y)) Base.:(*)(x::ADNodeCompatible, y::ADNode) = Mul(Constant(x), y) -# mutable struct Div <: ADNode -# x::ADNode -# y::ADNode -# end -# NodeType(::Type{Div}) = Inner() -# children(x::Div) = [x.x, x.y] -# compute_inner(x::Div, call) = call(x.x) / call(x.y) -# function backward(n::Div, vals, derivs) -# derivs[n.x] += derivs[n] / vals[n.y] -# derivs[n.y] -= derivs[n] * vals[n.x] / vals[n.y] ^ 2 -# end -# Base.:(/)(x::ADNode, y::ADNode) = Div(x, y) -# Base.:(/)(x::ADNode, y::Real) = Div(x, Constant(y)) -# Base.:(/)(x::Real, y::ADNode) = Div(Constant(x), y) - mutable struct Pow <: ADNode x::ADNode y::ADNode @@ -137,17 +122,6 @@ function backward(n::Cos, vals, derivs) end Base.cos(x::ADNode) = Cos(x) -# mutable struct Exp <: ADNode -# x::ADNode -# end -# NodeType(::Type{Exp}) = Inner() -# children(x::Exp) = [x.x] -# compute_inner(x::Exp, call) = exp(call(x.x)) -# function backward(n::Exp, vals, derivs) -# derivs[n.x] += derivs[n] * exp(vals[n.x]) -# end -# Base.exp(x::ADNode) = Exp(x) - mutable struct Log <: ADNode x::ADNode end From d1dd9e3511f7f1eed60c623787b26701406224e9 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Fri, 22 Dec 2023 22:33:19 -0800 Subject: [PATCH 015/231] remove Variable --- src/Dice.jl | 1 - src/autodiff/adnode.jl | 15 ++--- src/autodiff/core.jl | 8 +-- src/autodiff/train.jl | 30 ---------- src/inference/inference.jl | 5 -- src/inference/train_pr.jl | 63 +++++++------------- src/inference/train_pr_losses.jl | 1 - test/autodiff_test.jl | 99 +++++++++++++++----------------- 8 files changed, 74 insertions(+), 148 deletions(-) delete mode 100644 src/autodiff/train.jl diff --git a/src/Dice.jl b/src/Dice.jl index 195053d2..857e9f40 100644 --- a/src/Dice.jl +++ b/src/Dice.jl @@ -33,7 +33,6 @@ end include("autodiff/adnode.jl") include("autodiff/core.jl") -include("autodiff/train.jl") include("dist/dist.jl") include("inference/inference.jl") include("analysis/analysis.jl") diff --git a/src/autodiff/adnode.jl b/src/autodiff/adnode.jl index edf5419e..6e4dc059 100644 --- a/src/autodiff/adnode.jl +++ b/src/autodiff/adnode.jl @@ -1,16 +1,9 @@ -export ADNode, ADMatrix, Variable, Var, ad_map, sigmoid, deriv_sigmoid, inverse_sigmoid +export ADNode, ADMatrix, Var, ad_map, sigmoid, deriv_sigmoid, inverse_sigmoid import DirectedAcyclicGraphs: NodeType, DAG, children abstract type ADNode <: DAG end -# We always differentiate with respect to Variables -abstract type Variable <: ADNode end - -NodeType(::Type{<:Variable}) = Leaf() -compute_leaf(x::Variable) = error("The value of $(x) should've been provided in `vals`!") -backward(::Variable, _, _) = nothing - ADNodeCompatible = Union{Real, AbstractMatrix{<:Real}} function add_deriv(derivs, n::ADNode, amount::ADNodeCompatible) @@ -21,10 +14,12 @@ function add_deriv(derivs, n::ADNode, amount::ADNodeCompatible) end end - -struct Var <: Variable +struct Var <: ADNode id::Any end +NodeType(::Type{Var}) = Leaf() +compute_leaf(x::Var) = error("The value of $(x) should've been provided in `vals`!") +backward(::Var, _, _) = nothing function Base.show(io::IO, x::Var) print(io, "Var(") show(io, x.id) diff --git a/src/autodiff/core.jl b/src/autodiff/core.jl index d745aebc..0f0aae23 100644 --- a/src/autodiff/core.jl +++ b/src/autodiff/core.jl @@ -1,9 +1,9 @@ -export value, compute, differentiate, value, Valuation, Derivs, compute_one, variables +export value, compute, differentiate, value, Valuation, Derivs, compute_one using DirectedAcyclicGraphs using DataStructures: DefaultDict -Valuation = Dict{Variable, ADNodeCompatible} +Valuation = Dict{Var, ADNodeCompatible} Derivs = Dict{ADNode, ADNodeCompatible} function compute_one(root, vals::Dict{ADNode, <:ADNodeCompatible}) @@ -51,7 +51,3 @@ function foreach_down(f::Function, roots) f(n) end end - -function variables(x::ADNode) - filter(node -> node isa Variable, x) -end diff --git a/src/autodiff/train.jl b/src/autodiff/train.jl deleted file mode 100644 index 932f96a6..00000000 --- a/src/autodiff/train.jl +++ /dev/null @@ -1,30 +0,0 @@ -export step_maximize!, add_pr_var! - -function step_maximize!(var_vals::Valuation, nodes_to_max, learning_rate) - root_derivs = Derivs(n => 1 for n in nodes_to_max) - _, derivs = differentiate(var_vals, root_derivs) - for (n, d) in derivs - n isa Var && (var_vals[n] += d * learning_rate) - end -end - -function add_pr_var!(var_vals::Valuation, name_and_pr) - name, pr = name_and_pr - @assert 0 < pr < 1 - var = Var("$(name)_before_sigmoid") - val = inverse_sigmoid(pr) - @assert !has_key(var_vals, var) || var_vals[var] == val - var_vals[var] = val - sigmoid(var) -end - -function train_vars!( - var_vals::Valuation, - x::ADNode, - epochs::Integer, - learning_rate::AbstractFloat, -) - for _ in 1:epochs - step_maximize!(var_vals, [x], learning_rate) - end -end \ No newline at end of file diff --git a/src/inference/inference.jl b/src/inference/inference.jl index 2e0c8a2e..551bfe11 100644 --- a/src/inference/inference.jl +++ b/src/inference/inference.jl @@ -166,11 +166,6 @@ include("cudd/wmc.jl") # - pr(::Dist, evidence=..., errors=...) include("pr.jl") -# Exposes functionality for changing the probabilities of flip_for's -# to maximize a list of (possibly conditional) bools -# Notable exports: -# - train_group_probs!(::Vector{<:AnyBool})) -# - train_group_probs!(::Vector{<:Tuple{<:AnyBool, <:AnyBool}}) include("train_pr.jl") include("train_pr_losses.jl") diff --git a/src/inference/train_pr.jl b/src/inference/train_pr.jl index 5ffc0c9a..c27de1e6 100644 --- a/src/inference/train_pr.jl +++ b/src/inference/train_pr.jl @@ -1,5 +1,5 @@ # The bridge between autodiff and cudd -export step_vars!, train_pr!, LogPr, compute_mixed +export LogPr, compute_mixed, train! using DataStructures: Queue mutable struct LogPr <: ADNode @@ -17,8 +17,6 @@ mutable struct LogPrExpander end end - - function expand_logprs(l::LogPrExpander, root::ADNode)::ADNode fl(x::LogPr) = expand_logprs(l, logprob(l.w, x.bool)) fl(x::Var) = x @@ -32,6 +30,7 @@ function expand_logprs(l::LogPrExpander, root::ADNode)::ADNode foldup(root, fl, fi, ADNode, l.cache) end +# Within root's LogPrs there are Dist{Bool} DAGs. Collect minimal roots all DAGs. function bool_roots(root::ADNode) # TODO: have non-root removal be done in src/inference/cudd/compile.jl seen_adnodes = Dict{ADNode, Nothing}() @@ -54,40 +53,16 @@ function bool_roots(root::ADNode) setdiff(keys(seen_bools), non_roots) end - -# Find the log-probabilities and the log-probability gradient of a BDD -function add_scaled_dict!( - x::AbstractDict{<:Any, <:Real}, - y::AbstractDict{<:Any, <:Real}, - s::Real -) - for (k, v) in y - x[k] += v * s - end -end - - -function step_pr!( +function compute_mixed( var_vals::Valuation, - loss::ADNode, - learning_rate::Real + x::ADNode ) - l = LogPrExpander(WMC(BDDCompiler(bool_roots(loss)))) - loss = expand_logprs(l, loss) - vals, derivs = differentiate(var_vals, Derivs(loss => 1)) - - # update vars - for (adnode, d) in derivs - if adnode isa Var - var_vals[adnode] -= d * learning_rate - end - end - - vals[loss] + l = LogPrExpander(WMC(BDDCompiler(bool_roots(x)))) + x = expand_logprs(l, x) + compute(var_vals, [x])[x] end -# Train group_to_psp to such that generate() approximates dataset's distribution -function train_pr!( +function train!( var_vals::Valuation, loss::ADNode; epochs::Integer, @@ -95,17 +70,19 @@ function train_pr!( ) losses = [] for _ in 1:epochs - push!(losses, step_pr!(var_vals, loss, learning_rate)) + l = LogPrExpander(WMC(BDDCompiler(bool_roots(loss)))) + loss = expand_logprs(l, loss) + vals, derivs = differentiate(var_vals, Derivs(loss => 1)) + + # update vars + for (adnode, d) in derivs + if adnode isa Var + var_vals[adnode] -= d * learning_rate + end + end + + push!(losses, vals[loss]) end push!(losses, compute_mixed(var_vals, loss)) losses end - -function compute_mixed( - var_vals::Valuation, - x::ADNode -) - l = LogPrExpander(WMC(BDDCompiler(bool_roots(x)))) - x = expand_logprs(l, x) - compute(var_vals, [x])[x] -end diff --git a/src/inference/train_pr_losses.jl b/src/inference/train_pr_losses.jl index 5c4377fc..3e3553f7 100644 --- a/src/inference/train_pr_losses.jl +++ b/src/inference/train_pr_losses.jl @@ -1,4 +1,3 @@ - export BoolToMax, mle_loss, kl_divergence struct BoolToMax diff --git a/test/autodiff_test.jl b/test/autodiff_test.jl index 4f5f771c..8e0e9026 100644 --- a/test/autodiff_test.jl +++ b/test/autodiff_test.jl @@ -16,63 +16,58 @@ end @testset "test GD" begin x, y = Var("x"), Var("y") - params = Valuation(x => 0) + var_vals = Valuation(x => 0) e = 7 - (x - 5)^2 - for _ in 1:100 - step_maximize!(params, [e], 0.1) - end - vals = compute(params, [e]) - @test vals[e] ≈ 7 - @test vals[x] ≈ 5 + train!(var_vals, -e, epochs=100, learning_rate=0.1) + @test compute_mixed(var_vals, e) ≈ 7 + @test compute_mixed(var_vals, x) ≈ 5 - var_vals = Valuation(x => 7, y => 1) - e = -(x*y-5)^2 - for i in 1:100 - step_maximize!(var_vals, [e], 0.01) - end - vals = compute(var_vals, [e]) - @test abs(vals[e]) < 0.001 - @test vals[x] * vals[y] ≈ 5 + # var_vals = Valuation(x => 7, y => 1) + # e = -(x*y-5)^2 + # train!(var_vals, e, 100, 0.01) + # vals = compute(var_vals, [e]) + # @test abs(vals[e]) < 0.001 + # @test vals[x] * vals[y] ≈ 5 - psp = Var("psp") # pre-sigmoid probability - var_vals = Valuation(psp => 0) - p = sigmoid(psp) - # maximize logpr of flip(p) & flip(p) & !flip(p) - e = log(p * p * (1 - p)) - for i in 1:500 - step_maximize!(var_vals, [e], 0.1) - end - @test compute(var_vals, [p])[p] ≈ 2/3 + # psp = Var("psp") # pre-sigmoid probability + # var_vals = Valuation(psp => 0) + # p = sigmoid(psp) + # # maximize logpr of flip(p) & flip(p) & !flip(p) + # e = log(p * p * (1 - p)) + # for i in 1:500 + # step_maximize!(var_vals, [e], 0.1) + # end + # @test compute(var_vals, [p])[p] ≈ 2/3 end -@testset "matrices" begin - # Helper functions for matrices used as vectors - x(v) = v[1,1] - y(v) = v[2,1] - distance(u, v) = (x(u) - x(v))^2 + (y(u) - y(v))^2 - to_matrix(v::Vector) = reshape(v, :, 1) +# @testset "matrices" begin +# # Helper functions for matrices used as vectors +# x(v) = v[1,1] +# y(v) = v[2,1] +# distance(u, v) = (x(u) - x(v))^2 + (y(u) - y(v))^2 +# to_matrix(v::Vector) = reshape(v, :, 1) - # Rotate [1, 2] by what angle to get closest to [-3, -3]? - θ = Var("θ") - var_vals = Valuation(θ => 0) - rotation_matrix = ADMatrix([[cos(θ) -sin(θ)]; [sin(θ) cos(θ)]]) - rotated_vec = rotation_matrix * to_matrix([1, 2]) - target_vec = to_matrix([-3, -3]) - for _ in 1:2000 - step_maximize!(var_vals, [-distance(rotated_vec, target_vec)], 0.003) - end - @test var_vals[θ] ≈ 5/8 * 2π - atan(2) +# # Rotate [1, 2] by what angle to get closest to [-3, -3]? +# θ = Var("θ") +# var_vals = Valuation(θ => 0) +# rotation_matrix = ADMatrix([[cos(θ) -sin(θ)]; [sin(θ) cos(θ)]]) +# rotated_vec = rotation_matrix * to_matrix([1, 2]) +# target_vec = to_matrix([-3, -3]) +# for _ in 1:2000 +# step_maximize!(var_vals, [-distance(rotated_vec, target_vec)], 0.003) +# end +# @test var_vals[θ] ≈ 5/8 * 2π - atan(2) - # Variables can also be matrices! - # Transform by [1, 2] by what matrix to get closest to [-3, -3]? - A = Var("A") - var_vals = Valuation(A => [[1 0]; [0 1]]) - v = to_matrix([1, 2]) - v′ = A * v - target_vec = to_matrix([-3, -3]) - for _ in 1:2000 - step_maximize!(var_vals, [-distance(v′, target_vec)], 0.003) - end +# # Variables can also be matrices! +# # Transform by [1, 2] by what matrix to get closest to [-3, -3]? +# A = Var("A") +# var_vals = Valuation(A => [[1 0]; [0 1]]) +# v = to_matrix([1, 2]) +# v′ = A * v +# target_vec = to_matrix([-3, -3]) +# for _ in 1:2000 +# step_maximize!(var_vals, [-distance(v′, target_vec)], 0.003) +# end - @test var_vals[A] * v ≈ [-3, -3] -end +# @test var_vals[A] * v ≈ [-3, -3] +# end From 2b44dd10dff51e313e418e03c6af8f567e815200 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Fri, 22 Dec 2023 22:55:50 -0800 Subject: [PATCH 016/231] shrink AD interface --- src/autodiff/core.jl | 24 +++++--- src/inference/train_pr.jl | 28 +++++---- test/autodiff_test.jl | 86 +++++++++++++-------------- test/inference/learned_cheap_dists.jl | 6 +- test/inference/train_test.jl | 20 +++---- 5 files changed, 84 insertions(+), 80 deletions(-) diff --git a/src/autodiff/core.jl b/src/autodiff/core.jl index 0f0aae23..819ebb84 100644 --- a/src/autodiff/core.jl +++ b/src/autodiff/core.jl @@ -1,4 +1,4 @@ -export value, compute, differentiate, value, Valuation, Derivs, compute_one +export value, compute, differentiate, Valuation, Derivs, ADComputer using DirectedAcyclicGraphs using DataStructures: DefaultDict @@ -6,23 +6,29 @@ using DataStructures: DefaultDict Valuation = Dict{Var, ADNodeCompatible} Derivs = Dict{ADNode, ADNodeCompatible} -function compute_one(root, vals::Dict{ADNode, <:ADNodeCompatible}) - foldup(root, compute_leaf, compute_inner, ADNodeCompatible, vals) +mutable struct ADComputer + vals::Dict{ADNode, ADNodeCompatible} + function ADComputer(var_vals::Valuation) + new(merge(Dict{ADNode, ADNodeCompatible}(), var_vals)) + end +end + +function compute(a::ADComputer, root::ADNode) + foldup(root, compute_leaf, compute_inner, ADNodeCompatible, a.vals) end +compute(var_vals::Valuation, root::ADNode) = compute(var_vals, [root])[root] function compute(var_vals::Valuation, roots) - vals = Dict{ADNode, ADNodeCompatible}() - merge!(vals, var_vals) + a = ADComputer(var_vals) for root in roots - compute_one(root, vals) + compute(a, root) end - vals + a.vals end function differentiate(var_vals::Valuation, root_derivs::Derivs) vals = compute(var_vals, keys(root_derivs)) - derivs = Dict{ADNode, ADNodeCompatible}() - merge!(derivs, root_derivs) + derivs = merge(Dict{ADNode, ADNodeCompatible}(), root_derivs) foreach_down(keys(root_derivs)) do n haskey(derivs, n) && backward(n, vals, derivs) end diff --git a/src/inference/train_pr.jl b/src/inference/train_pr.jl index c27de1e6..4e1eca59 100644 --- a/src/inference/train_pr.jl +++ b/src/inference/train_pr.jl @@ -27,16 +27,20 @@ function expand_logprs(l::LogPrExpander, root::ADNode)::ADNode fi(x::Sin, call) = Sin(call(x.x)) fi(x::Cos, call) = Cos(call(x.x)) fi(x::Log, call) = Log(call(x.x)) + fi(x::ADMatrix, call) = ADMatrix(map(call, x.x)) + fi(x::GetIndex, call) = GetIndex(call(x.x), x.i) + fi(x::Map, call) = Map(x.f, x.f′, call(x.x)) + fi(x::Transpose, call) = Transpose(call(x.x)) foldup(root, fl, fi, ADNode, l.cache) end -# Within root's LogPrs there are Dist{Bool} DAGs. Collect minimal roots all DAGs. -function bool_roots(root::ADNode) +# Within roots' LogPrs there are Dist{Bool} DAGs. Collect minimal roots all DAGs +function bool_roots(roots) # TODO: have non-root removal be done in src/inference/cudd/compile.jl seen_adnodes = Dict{ADNode, Nothing}() seen_bools = Dict{AnyBool, Nothing}() non_roots = Set{AnyBool}() - to_visit = Vector{ADNode}([root]) + to_visit = Vector{ADNode}(roots) while !isempty(to_visit) x = pop!(to_visit) foreach(x, seen_adnodes) do y @@ -53,13 +57,15 @@ function bool_roots(root::ADNode) setdiff(keys(seen_bools), non_roots) end -function compute_mixed( - var_vals::Valuation, - x::ADNode -) - l = LogPrExpander(WMC(BDDCompiler(bool_roots(x)))) - x = expand_logprs(l, x) - compute(var_vals, [x])[x] +function compute_mixed(var_vals::Valuation, root::ADNode) + compute_mixed(var_vals, [root])[root] +end + +function compute_mixed(var_vals::Valuation, roots) + l = LogPrExpander(WMC(BDDCompiler(bool_roots(roots)))) + expanded_roots = [expand_logprs(l, x) for x in roots] + vals = compute(var_vals, expanded_roots) + Dict(root => vals[l.cache[root]] for root in roots) end function train!( @@ -70,7 +76,7 @@ function train!( ) losses = [] for _ in 1:epochs - l = LogPrExpander(WMC(BDDCompiler(bool_roots(loss)))) + l = LogPrExpander(WMC(BDDCompiler(bool_roots([loss])))) loss = expand_logprs(l, loss) vals, derivs = differentiate(var_vals, Derivs(loss => 1)) diff --git a/test/autodiff_test.jl b/test/autodiff_test.jl index 8e0e9026..eab50f49 100644 --- a/test/autodiff_test.jl +++ b/test/autodiff_test.jl @@ -19,55 +19,49 @@ end var_vals = Valuation(x => 0) e = 7 - (x - 5)^2 train!(var_vals, -e, epochs=100, learning_rate=0.1) - @test compute_mixed(var_vals, e) ≈ 7 - @test compute_mixed(var_vals, x) ≈ 5 + vals = compute(var_vals, [e]) + @test vals[e] ≈ 7 + @test vals[x] ≈ 5 - # var_vals = Valuation(x => 7, y => 1) - # e = -(x*y-5)^2 - # train!(var_vals, e, 100, 0.01) - # vals = compute(var_vals, [e]) - # @test abs(vals[e]) < 0.001 - # @test vals[x] * vals[y] ≈ 5 + var_vals = Valuation(x => 7, y => 1) + e = -(x*y-5)^2 + train!(var_vals, -e, epochs=100, learning_rate=0.01) + vals = compute(var_vals, [e]) + @test abs(vals[e]) < 0.001 + @test vals[x] * vals[y] ≈ 5 - # psp = Var("psp") # pre-sigmoid probability - # var_vals = Valuation(psp => 0) - # p = sigmoid(psp) - # # maximize logpr of flip(p) & flip(p) & !flip(p) - # e = log(p * p * (1 - p)) - # for i in 1:500 - # step_maximize!(var_vals, [e], 0.1) - # end - # @test compute(var_vals, [p])[p] ≈ 2/3 + psp = Var("psp") # pre-sigmoid probability + var_vals = Valuation(psp => 0) + p = sigmoid(psp) + # maximize logpr of flip(p) & flip(p) & !flip(p) + e = log(p * p * (1 - p)) + train!(var_vals, -e, epochs=500, learning_rate=0.1) + @test compute(var_vals, p) ≈ 2/3 end -# @testset "matrices" begin -# # Helper functions for matrices used as vectors -# x(v) = v[1,1] -# y(v) = v[2,1] -# distance(u, v) = (x(u) - x(v))^2 + (y(u) - y(v))^2 -# to_matrix(v::Vector) = reshape(v, :, 1) +@testset "matrices" begin + # Helper functions for matrices used as vectors + x(v) = v[1,1] + y(v) = v[2,1] + distance(u, v) = (x(u) - x(v))^2 + (y(u) - y(v))^2 + to_matrix(v::Vector) = reshape(v, :, 1) -# # Rotate [1, 2] by what angle to get closest to [-3, -3]? -# θ = Var("θ") -# var_vals = Valuation(θ => 0) -# rotation_matrix = ADMatrix([[cos(θ) -sin(θ)]; [sin(θ) cos(θ)]]) -# rotated_vec = rotation_matrix * to_matrix([1, 2]) -# target_vec = to_matrix([-3, -3]) -# for _ in 1:2000 -# step_maximize!(var_vals, [-distance(rotated_vec, target_vec)], 0.003) -# end -# @test var_vals[θ] ≈ 5/8 * 2π - atan(2) + # Rotate [1, 2] by what angle to get closest to [-3, -3]? + θ = Var("θ") + var_vals = Valuation(θ => 0) + rotation_matrix = ADMatrix([[cos(θ) -sin(θ)]; [sin(θ) cos(θ)]]) + rotated_vec = rotation_matrix * to_matrix([1, 2]) + target_vec = to_matrix([-3, -3]) + train!(var_vals, distance(rotated_vec, target_vec), epochs=2000, learning_rate=0.003) + @test var_vals[θ] ≈ 5/8 * 2π - atan(2) -# # Variables can also be matrices! -# # Transform by [1, 2] by what matrix to get closest to [-3, -3]? -# A = Var("A") -# var_vals = Valuation(A => [[1 0]; [0 1]]) -# v = to_matrix([1, 2]) -# v′ = A * v -# target_vec = to_matrix([-3, -3]) -# for _ in 1:2000 -# step_maximize!(var_vals, [-distance(v′, target_vec)], 0.003) -# end - -# @test var_vals[A] * v ≈ [-3, -3] -# end + # Variables can also be matrices! + # Transform by [1, 2] by what matrix to get closest to [-3, -3]? + A = Var("A") + var_vals = Valuation(A => [[1 0]; [0 1]]) + v = to_matrix([1, 2]) + v′ = A * v + target_vec = to_matrix([-3, -3]) + train!(var_vals, distance(v′, target_vec), epochs=2000, learning_rate=0.003) + @test var_vals[A] * v ≈ [-3, -3] +end diff --git a/test/inference/learned_cheap_dists.jl b/test/inference/learned_cheap_dists.jl index a2bb5f68..82bda9dc 100644 --- a/test/inference/learned_cheap_dists.jl +++ b/test/inference/learned_cheap_dists.jl @@ -1,6 +1,5 @@ using Test using Dice -using Plots function dict_approx(d1::AbstractDict, d2::AbstractDict) issetequal(keys(d1), keys(d2)) && all( @@ -18,7 +17,6 @@ end ) end - width = 3 target_dist = dist_binomial(width, 0.1) @@ -27,7 +25,7 @@ end # Weighted training wt_var_to_vals = Valuation(x => 0 for x in vars) - history = train_pr!( + history = train!( wt_var_to_vals, mle_loss([ BoolToMax( @@ -66,7 +64,7 @@ end # KL divergence minimization kl_var_to_vals = Valuation(x => 0 for x in vars) - train_pr!( + train!( kl_var_to_vals, kl_divergence( target_dist, diff --git a/test/inference/train_test.jl b/test/inference/train_test.jl index a154c81a..883e085d 100644 --- a/test/inference/train_test.jl +++ b/test/inference/train_test.jl @@ -8,29 +8,29 @@ using Dice # Basic test x = flip(prob) & flip(prob) & !flip(prob) var_vals = Valuation(psp => 0) - train_pr!(var_vals, mle_loss([x]); epochs=1000, learning_rate=0.3) - @test compute(var_vals, prob)[prob] ≈ 2/3 + train!(var_vals, mle_loss([x]); epochs=1000, learning_rate=0.3) + @test compute(var_vals, prob) ≈ 2/3 # Try 1 - prob instead of negating the third flip x = flip(prob) & flip(prob) & flip(1 - prob) var_vals = Valuation(psp => 0) - train_pr!(var_vals, mle_loss([x]); epochs=1000, learning_rate=0.3) - @test compute(var_vals, prob)[prob] ≈ 2/3 + train!(var_vals, mle_loss([x]); epochs=1000, learning_rate=0.3) + @test compute(var_vals, prob) ≈ 2/3 # Approximate a dataset b = @dice_ite if flip(prob) true else flip(0.5) end dataset = [true, true, false] bools_to_maximize = [prob_equals(b, x) for x in dataset] var_vals = Valuation(psp => 0) - train_pr!(var_vals, mle_loss(bools_to_maximize); epochs=1000, learning_rate=0.3) - @test compute(var_vals, prob)[prob] ≈ 1/3 + train!(var_vals, mle_loss(bools_to_maximize); epochs=1000, learning_rate=0.3) + @test compute(var_vals, prob) ≈ 1/3 # Multiple params a_psp, b_psp, c_psp = Var("a_psp"), Var("b_psp"), Var("c_psp") a, b, c = sigmoid(a_psp), sigmoid(b_psp), sigmoid(c_psp) x = flip(a) & flip(b) & !flip(c) var_vals = Valuation(a_psp => 0, b_psp => 0, c_psp => 0) - train_pr!(var_vals, mle_loss([x]); epochs=1000, learning_rate=0.3) + train!(var_vals, mle_loss([x]); epochs=1000, learning_rate=0.3) vals = compute(var_vals, [a, b, c]) @test vals[a] > .99 @test vals[b] > .99 @@ -45,14 +45,14 @@ end # Train for 200 epochs var_vals = Valuation(psp => 0) b = @dice_ite if flip(prob) true else flip(prob) end - train_pr!(var_vals, mle_loss([prob_equals(b, x) for x in dataset]); epochs=200, learning_rate=0.003) + train!(var_vals, mle_loss([prob_equals(b, x) for x in dataset]); epochs=200, learning_rate=0.003) p1 = compute_mixed(var_vals, LogPr(b)) # Train for 100 epochs, twice b = @dice_ite if flip(prob) true else flip(prob) end var_vals = Valuation(psp => 0) - train_pr!(var_vals, mle_loss([prob_equals(b, x) for x in dataset]); epochs=100, learning_rate=0.003) - train_pr!(var_vals, mle_loss([prob_equals(b, x) for x in dataset]); epochs=100, learning_rate=0.003) + train!(var_vals, mle_loss([prob_equals(b, x) for x in dataset]); epochs=100, learning_rate=0.003) + train!(var_vals, mle_loss([prob_equals(b, x) for x in dataset]); epochs=100, learning_rate=0.003) p2 = compute_mixed(var_vals, LogPr(b)) @test p1 ≈ p2 From 0b99903fddb034d83ff7294f566cc1016e510e02 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Fri, 22 Dec 2023 22:58:38 -0800 Subject: [PATCH 017/231] remove learned_cheap_dists example --- examples/learned_cheap_dists.jl | 87 --------------------------------- 1 file changed, 87 deletions(-) delete mode 100644 examples/learned_cheap_dists.jl diff --git a/examples/learned_cheap_dists.jl b/examples/learned_cheap_dists.jl deleted file mode 100644 index dd47289b..00000000 --- a/examples/learned_cheap_dists.jl +++ /dev/null @@ -1,87 +0,0 @@ -using Dice -using Plots -# using StatsPlots -function dist_binomial(width, p) - n = 2^width - 1 - Dict( - k => binomial(n, k) * p^k * (1 - p)^(n - k) - for k in 0:n - ) -end - -function dist_uniform(width) - n = 2^width - 1 - Dict( - k => 1 / (n + 1) - for k in 0:n - ) -end - - -for width in [3] - for (title, target_dist) in [ - ("Uniform 0 to $(2^width-1)", dist_uniform(width)) - ("Binomial ($(2^width-1)) trials, p=0.1", dist_binomial(width, 0.1)) - ] - vars = [Var("var$(i)_psp") for i in 0:width-1] - int = DistUInt{width}([flip(sigmoid(x)) for x in vars]) - - # Weighted training - wt_var_to_vals = Valuation(x => 0 for x in vars) - history = train_pr!( - wt_var_to_vals, - mle_loss([ - BoolToMax( - prob_equals(int, DistUInt{width}(i)), - weight=target_dist[i] - ) - for i in 0:2^width-1 - ]), - epochs=2000, - learning_rate=0.1 - ) - wt_dist = Dict( - i => compute_mixed(wt_var_to_vals, exp(LogPr(prob_equals(int, DistUInt{width}(i))))) - for i in 0:2^width-1 - ) - - # KL divergence minimization - kl_var_to_vals = Valuation(x => 0 for x in vars) - train_pr!( - kl_var_to_vals, - kl_divergence( - target_dist, - int, - Set([i => DistUInt{width}(i) for i in 0:2^width-1]) - ), - epochs=2000, - learning_rate=0.1 - ) - kl_dist = Dict( - i => compute_mixed(kl_var_to_vals, exp(LogPr(prob_equals(int, DistUInt{width}(i))))) - for i in 0:2^width-1 - ) - - # Counting - counting_prs = [ - sum(p for (x, p) in target_dist if x & 2^i > 0) - for i in width-1:-1:0 - ] - counting_int = DistUInt{width}(map(flip, counting_prs)) - counting_dist = pr(counting_int) - - columns = [ - "wt" => wt_dist - "kl" => kl_dist - "counting" => counting_dist - "target" => target_dist - ] - col_names, col_dists = zip(columns...) - println(title) - println("\t" * join(col_names, '\t')) - for k in 0:2^width-1 - println("$(k)\t" * join(getindex.(col_dists, k), '\t')) - end - println() - end -end \ No newline at end of file From cf1fc3b8bdb8286130f7248b0e464c35e844a555 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Fri, 22 Dec 2023 22:58:51 -0800 Subject: [PATCH 018/231] remove mnist example --- examples/mnist/Project.toml | 4 --- examples/mnist/mnist.jl | 56 ------------------------------------- 2 files changed, 60 deletions(-) delete mode 100644 examples/mnist/Project.toml delete mode 100644 examples/mnist/mnist.jl diff --git a/examples/mnist/Project.toml b/examples/mnist/Project.toml deleted file mode 100644 index 17ae51c6..00000000 --- a/examples/mnist/Project.toml +++ /dev/null @@ -1,4 +0,0 @@ -[deps] -CUDD = "345a2cc7-28d8-58b2-abdf-cff77ea7d7f1" -Dice = "94eeadfc-1ba6-40b7-9ed8-dee71557d525" -MLDatasets = "eb30cadb-4394-5ae3-aed4-317e484a6458" diff --git a/examples/mnist/mnist.jl b/examples/mnist/mnist.jl deleted file mode 100644 index c68b2cf1..00000000 --- a/examples/mnist/mnist.jl +++ /dev/null @@ -1,56 +0,0 @@ -# Proof-of-concept of training a network to classify MNIST digits -# It's slow - we should use a 3rd party ML framework instead - -# Eventual goal would be to do MNIST-sum, as in -# https://arxiv.org/pdf/1805.10872.pdf - -using MLDatasets: MNIST -using Revise -using Dice -using Random - -map_sigmoid(x::ADNode) = ad_map(Dice.sigmoid, Dice.deriv_sigmoid, x) - -function discrete_weights(::Type{DistUInt{W}}, weights::Vector{<:ADNode}) where W - res = DistUInt{W}(length(weights) - 1) - acc = last(weights) - for i in reverse(1:length(weights) - 1) - acc += weights[i] - res = @dice_ite if flip(weights[i] / acc) - DistUInt{W}(i - 1) - else - res - end - end - res -end - -HIDDEN_LAYER_SIZE = 100 -TRAIN_ROWS = 20 - -Random.seed!(0) -θ1_init = rand(28 * 28, HIDDEN_LAYER_SIZE) -θ2_init = rand(HIDDEN_LAYER_SIZE, 10) - -clear_vars!() -θ1 = new_var!("θ1", θ1_init) -θ2 = new_var!("θ2", θ2_init) - -x = reshape(MNIST(:train).features, (28 * 28, 60000)) |> transpose -x = x[1:TRAIN_ROWS, :] -y = MNIST(:train).targets[1:TRAIN_ROWS] - -dw = map_sigmoid(map_sigmoid(x * θ1) * θ2) -dw = [dw[i] for i in CartesianIndices((TRAIN_ROWS, 10))] -predictions = [discrete_weights(DistUInt{4}, dw[i, :]) for i in 1:TRAIN_ROWS] -correct = [prob_equals(pred, DistUInt{4}(label)) for (pred, label) in zip(predictions, y)] - -pr_corrects = [dist[true] for dist in pr(correct...)] -expected_accuracy = sum(pr_corrects) / length(pr_corrects) -println("Expected accuracy: $(expected_accuracy)") - -train_vars!(correct; epochs=1000, learning_rate=0.003) - -pr_corrects = [dist[true] for dist in pr(correct...)] -expected_accuracy = sum(pr_corrects) / length(pr_corrects) -println("Trained expected accuracy: $(expected_accuracy)") From d9daee6684182bc844b9d5e8b5f25e4ea7db005e Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 23 Dec 2023 18:00:59 -0800 Subject: [PATCH 019/231] fix darts example --- examples/darts.jl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/examples/darts.jl b/examples/darts.jl index b2e8d659..196ee575 100644 --- a/examples/darts.jl +++ b/examples/darts.jl @@ -13,21 +13,24 @@ all(itr) = reduce(&, itr) any(itr) = reduce(|, itr) DARTS_PER_COLOR = [1, 2, 10] # number of red, green, and blue darts -weights = [var!("r", 1), var!("g", 1), var!("b", 1)] +weights = [Var("r"), Var("g"), Var("b")] +var_vals = Valuation(weight => 1 for weight in weights) all_colors_receive_own_dart = all( any(flip(weight / sum(weights)) for _ in 1:num_own_darts) for (num_own_darts, weight) in zip(DARTS_PER_COLOR, weights) ) -pr(all_colors_receive_own_dart) # 0.182 -train_vars!([all_colors_receive_own_dart]; epochs=1000, learning_rate=0.3) +pr_all_colors_receive_own_dart = exp(LogPr(all_colors_receive_own_dart)) + +compute_mixed(var_vals, pr_all_colors_receive_own_dart) # 0.182 +train!(var_vals, -LogPr(all_colors_receive_own_dart); epochs=1000, learning_rate=0.3) # We've increased the chance of success! -pr(all_colors_receive_own_dart) # 0.234 +compute_mixed(var_vals, pr_all_colors_receive_own_dart) # 0.234 # Compute what ratio we actually need to paint the target: -[compute(weight/sum(weights)) for weight in weights] +[compute(var_vals, weight/sum(weights)) for weight in weights] # 3-element Vector{Float64}: # 0.46536681058883267 # 0.3623861813855715 From ee12203f91d4eb596d5ca2833ceedfd9c59a222b Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 23 Dec 2023 22:27:44 -0800 Subject: [PATCH 020/231] fix qc --- examples/qc/stlc/lib/util.jl | 32 ++++++++++++++++++++++++++++ examples/qc/stlc/main.jl | 41 ++++++++++++++++++++++-------------- src/dist/number/uint.jl | 30 +++++++++++++++++++++++++- 3 files changed, 86 insertions(+), 17 deletions(-) diff --git a/examples/qc/stlc/lib/util.jl b/examples/qc/stlc/lib/util.jl index 6e506a9a..202c6e61 100644 --- a/examples/qc/stlc/lib/util.jl +++ b/examples/qc/stlc/lib/util.jl @@ -151,3 +151,35 @@ function println_flush(io, args...) println(io, args...) flush(io) end + +function collect_flips(bools) + flips = Vector{Dice.Flip}() + Dice.foreach_down(bools) do x + x isa Dice.Flip && push!(flips, x) + end + flips +end + +function with_concrete_flips(f, var_vals, dist) + flips = collect_flips(Dice.tobits(dist)) + flip_to_original_prob = Dict() + a = ADComputer(var_vals) + for x in flips + if x.prob isa ADNode + flip_to_original_prob[x] = x.prob + x.prob = compute(a, x.prob) + end + end + res = f() + # restore + for (x, prob) in flip_to_original_prob + x.prob = prob + end + res +end + +function pr_with_concrete_flips(var_vals, dist) + with_concrete_flips(var_vals, dist) do + pr(dist) + end +end \ No newline at end of file diff --git a/examples/qc/stlc/main.jl b/examples/qc/stlc/main.jl index 3e662209..ddd17144 100644 --- a/examples/qc/stlc/main.jl +++ b/examples/qc/stlc/main.jl @@ -14,7 +14,7 @@ include("lib/generator.jl") # Specify generator, initial & target distributions METRIC = num_apps # term_size or num_apps -INIT_SIZE = 5 # size passed to top call of gen_expr +INIT_SIZE = 3 # size passed to top call of gen_expr GEN_TYP_SIZE = 2 # size passed to all calls of gen_type LINEAR = false # by default, the desired distribution is uniform. @@ -71,9 +71,14 @@ if LOG_TO_FILE println() end +var_vals = Valuation() adnodes_of_interest = Dict{String, ADNode}() -function register_weight!(s, init=0.5) - adnodes_of_interest[s] = add_unit_interval_var!(s, init) +function register_weight!(s) + var = Var("$(s)_before_sigmoid") + var_vals[var] = 0 + weight = sigmoid(var) + adnodes_of_interest[s] = weight + weight end println_flush(io, "Building $(METRIC)(gen_expr(...)) computation graph...") @@ -96,27 +101,29 @@ println(io) ############################ println(io, "Initial adnodes_of_interest:") -vals = Dict{ADNode, Real}() -show(io, Dict(s => compute(adnode, vals) for (s, adnode) in adnodes_of_interest)) +vals = compute(var_vals, values(adnodes_of_interest)) +show(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) println(io) println_flush(io, "Inferring initial distribution...") -time_infer_init = @elapsed metric_dist = pr(metric) +time_infer_init = @elapsed metric_dist = pr_with_concrete_flips(var_vals, metric) println(io, " $(time_infer_init) seconds") save_metric_dist(joinpath(OUT_DIR, "dist_before.csv"), METRIC, metric_dist; io=io) println(io) println_flush(io, "Saving samples...") -time_sample_init = @elapsed save_samples(joinpath(OUT_DIR, "terms_before.txt"), e; io=io) +time_sample_init = @elapsed with_concrete_flips(var_vals, e) do + save_samples(joinpath(OUT_DIR, "terms_before.txt"), e; io=io) +end println(io, " $(time_sample_init) seconds") println(io) -bools_to_max = [ +loss = mle_loss([ BoolToMax(prob_equals(metric, DistUInt32(i)), weight=if LINEAR i else 1 end) for i in key_range(metric_dist) -] +]) -initial_logprob = total_logprob(bools_to_max) +initial_logprob = compute_mixed(var_vals, -loss) println(io, "Initial logprob: $(initial_logprob)") println(io) @@ -125,7 +132,7 @@ println(io) ############################ println_flush(io, "Training...") -time_train = @elapsed learning_curve = train_vars!(bools_to_max; epochs=EPOCHS) +time_train = @elapsed learning_curve = train!(var_vals, loss; epochs=EPOCHS, learning_rate=0.003) println(io, " $(time_train) seconds") println(io) @@ -139,23 +146,25 @@ end # After ############################ -final_logprob = total_logprob(bools_to_max) +final_logprob = compute_mixed(var_vals, -loss) println(io, "Final logprob: $(final_logprob)") approx_improvement = round(exp(final_logprob - initial_logprob), digits=2) println(io, "Drawing the target dataset is $(approx_improvement)x more likely") println(io) println(io, "Learned adnodes_of_interest:") -vals = Dict{ADNode, Real}() -show(io, Dict(s => compute(adnode, vals) for (s, adnode) in adnodes_of_interest)) +vals = compute(var_vals, values(adnodes_of_interest)) +show(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) println(io) println(io, "Inferring trained distribution...") -time_infer_final = @elapsed metric_dist_after = pr(metric) +time_infer_final = @elapsed metric_dist_after = pr_with_concrete_flips(var_vals, metric) save_metric_dist(joinpath(OUT_DIR, "dist_trained_" * OUT_FILE_TAG * ".csv"), METRIC, metric_dist_after; io=io) println(io) println(io, "Saving samples...") -time_sample_final = @elapsed save_samples(joinpath(OUT_DIR, "terms_trained_" * OUT_FILE_TAG * ".txt"), e; io=io) +time_sample_final = @elapsed with_concrete_flips(var_vals, e) do + save_samples(joinpath(OUT_DIR, "terms_trained_" * OUT_FILE_TAG * ".txt"), e; io=io) +end println(io, " $(time_sample_final) seconds") println(io) diff --git a/src/dist/number/uint.jl b/src/dist/number/uint.jl index e6504dc8..ac5bff6c 100644 --- a/src/dist/number/uint.jl +++ b/src/dist/number/uint.jl @@ -421,10 +421,38 @@ function unif_obs(lo::DistUInt{W}, hi::DistUInt{W}) where W x, (x >= lo) & (x <= hi) end +function collect_flips(bools) + flips = Vector{Flip}() + Dice.foreach_down(bools) do x + x isa Flip && push!(flips, x) + end + flips +end + +function with_arb_ad_flips(f, dist) + flips = collect_flips(tobits(dist)) + flip_to_original_prob = Dict() + for x in flips + if x.prob isa ADNode + flip_to_original_prob[x] = x.prob + x.prob = 0.5 + end + end + res = f() + # restore + for (x, prob) in flip_to_original_prob + x.prob = prob + end + res +end + # Uniform from 0 to hi, exclusive function unif_half(hi::DistUInt{W})::DistUInt{W} where W # note: # could use path cond too - prod = lcm([BigInt(x) for x in keys(pr(hi)) if x != 0]) + support = with_arb_ad_flips(hi) do + keys(pr(hi)) + end + prod = lcm([BigInt(x) for x in support if x != 0]) u = uniform(DistUInt{ndigits(prod, base=2)}, 0, prod) rem_trunc(u, hi) end From bce589b9941082a3720bd3cbc0de6370bcceb7f9 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 23 Dec 2023 22:57:30 -0800 Subject: [PATCH 021/231] only expand once in train_pr --- src/inference/train_pr.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/inference/train_pr.jl b/src/inference/train_pr.jl index 4e1eca59..39a9a934 100644 --- a/src/inference/train_pr.jl +++ b/src/inference/train_pr.jl @@ -75,9 +75,9 @@ function train!( learning_rate::Real, ) losses = [] + l = LogPrExpander(WMC(BDDCompiler(bool_roots([loss])))) + loss = expand_logprs(l, loss) for _ in 1:epochs - l = LogPrExpander(WMC(BDDCompiler(bool_roots([loss])))) - loss = expand_logprs(l, loss) vals, derivs = differentiate(var_vals, Derivs(loss => 1)) # update vars From b44d5c28d7608e9ee31aeb4f6e2fd58195ae270a Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 23 Dec 2023 22:58:00 -0800 Subject: [PATCH 022/231] Revert "remove nodelogpr" This reverts commit b6793331cc0b3525685b865e06d3a8c3d6a0ee92. --- src/autodiff/adnode.jl | 25 +++++++++++++++++++++++++ src/inference/cudd/wmc.jl | 18 +++++++++++++++--- src/inference/train_pr.jl | 1 + 3 files changed, 41 insertions(+), 3 deletions(-) diff --git a/src/autodiff/adnode.jl b/src/autodiff/adnode.jl index 6e4dc059..71da97c5 100644 --- a/src/autodiff/adnode.jl +++ b/src/autodiff/adnode.jl @@ -198,6 +198,31 @@ function backward(n::Transpose, vals, derivs) add_deriv(derivs, n.x, transpose(derivs[n])) end +# Give override for add_logprobs so logprob in wmc.jl is differentiable +# computes log(exp(x) + exp(y)) +mutable struct NodeLogPr <: ADNode + pr::ADNode + hi::ADNode + lo::ADNode +end +NodeType(::Type{NodeLogPr}) = Inner() +children(x::NodeLogPr) = [x.pr, x.hi, x.lo] +# compute by calling higher-accuracy, non-autodiff-able implementation +compute_inner(x::NodeLogPr, call) = node_logprob(call(x.pr), call(x.hi), call(x.lo)) +function backward(n::NodeLogPr, vals, derivs) + denom = vals[n.pr] * exp(vals[n.hi]) + (1 - vals[n.pr]) * exp(vals[n.lo]) + add_deriv(derivs, n.hi, derivs[n] * vals[n.pr] * exp(vals[n.hi]) / denom) + add_deriv(derivs, n.lo, derivs[n] * (1 - vals[n.pr]) * exp(vals[n.lo]) / denom) + add_deriv(derivs, n.pr, derivs[n] * (exp(vals[n.hi]) - exp(vals[n.lo])) / denom) +end +node_logprob(pr::ADNode, hi::ADNode, lo::ADNode) = NodeLogPr(pr, hi, lo) +node_logprob(pr::ADNode, hi::ADNode, lo::ADNodeCompatible) = NodeLogPr(pr, hi, Constant(lo)) +node_logprob(pr::ADNode, hi::ADNodeCompatible, lo::ADNode) = NodeLogPr(pr, Constant(hi), lo) +node_logprob(pr::ADNode, hi::ADNodeCompatible, lo::ADNodeCompatible) = NodeLogPr(pr, Constant(hi), Constant(lo)) +node_logprob(pr::ADNodeCompatible, hi::ADNode, lo::ADNode) = NodeLogPr(Constant(pr), hi, lo) +node_logprob(pr::ADNodeCompatible, hi::ADNode, lo::ADNodeCompatible) = NodeLogPr(Constant(pr), hi, Constant(lo)) +node_logprob(pr::ADNodeCompatible, hi::ADNodeCompatible, lo::ADNode) = NodeLogPr(Constant(pr), hi, Constant(lo)) + # Desugared ops Base.zero(::ADNode) = Constant(0) Base.:(-)(x::ADNode) = x * -1 diff --git a/src/inference/cudd/wmc.jl b/src/inference/cudd/wmc.jl index 7aedb4e7..d10ca103 100644 --- a/src/inference/cudd/wmc.jl +++ b/src/inference/cudd/wmc.jl @@ -21,11 +21,23 @@ end logprob(w::WMC, x::AnyBool) = logprob(w, compile(w.c, x)) +function node_logprob(level_pr, hi_logpr, lo_logpr) + a = log(level_pr) + hi_logpr + b = log(1.0-level_pr) + lo_logpr + # Better-accuracy version of log(exp(a) + exp(b)) + # return log(exp(a) + exp(b)) + if isinf(a) + b + elseif isinf(b) + a + else + max(a,b) + log1p(exp(-abs(a-b))) + end +end + function logprob(w::WMC, x::CuddNode) get!(w.cache, x) do f = w.c.level_to_flip[level(x)] - a = log(f.prob) + logprob(w, high(x)) - b = log(1.0-f.prob) + logprob(w, low(x)) - log(exp(a) + exp(b)) + node_logprob(f.prob, logprob(w, high(x)), logprob(w, low(x))) end end diff --git a/src/inference/train_pr.jl b/src/inference/train_pr.jl index 39a9a934..99896da8 100644 --- a/src/inference/train_pr.jl +++ b/src/inference/train_pr.jl @@ -31,6 +31,7 @@ function expand_logprs(l::LogPrExpander, root::ADNode)::ADNode fi(x::GetIndex, call) = GetIndex(call(x.x), x.i) fi(x::Map, call) = Map(x.f, x.f′, call(x.x)) fi(x::Transpose, call) = Transpose(call(x.x)) + fi(x::NodeLogPr, call) = NodeLogPr(call(x.pr), call(x.hi), call(x.lo)) foldup(root, fl, fi, ADNode, l.cache) end From ef2f8ddf745dcfc62ab1e182e8851e96a7161826 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 24 Dec 2023 11:30:18 -0800 Subject: [PATCH 023/231] update stlc version and reset init size to 5 --- examples/qc/stlc/main.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/qc/stlc/main.jl b/examples/qc/stlc/main.jl index ddd17144..d7961ef6 100644 --- a/examples/qc/stlc/main.jl +++ b/examples/qc/stlc/main.jl @@ -14,7 +14,7 @@ include("lib/generator.jl") # Specify generator, initial & target distributions METRIC = num_apps # term_size or num_apps -INIT_SIZE = 3 # size passed to top call of gen_expr +INIT_SIZE = 5 # size passed to top call of gen_expr GEN_TYP_SIZE = 2 # size passed to all calls of gen_type LINEAR = false # by default, the desired distribution is uniform. @@ -26,7 +26,7 @@ EPOCHS = 2000 # epochs to train for LOG_TO_FILE = true -TAG = "v1" +TAG = "v3_opt_meta_ad" ############################ From d5235a9bdf683db5e6e536fb09e5f8e5332f96f3 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 24 Dec 2023 14:59:02 -0800 Subject: [PATCH 024/231] add pr_mixed, support_mixed, and dir for autodiff_pr --- examples/darts.jl | 6 +-- examples/qc/stlc/lib/util.jl | 32 ------------- examples/qc/stlc/main.jl | 8 ++-- src/Dice.jl | 2 + .../losses.jl} | 0 .../train_pr.jl => autodiff_pr/train.jl} | 48 ++++++++++++++++++- src/dist/number/uint.jl | 30 +----------- src/inference/inference.jl | 3 -- .../learned_cheap_dists.jl | 0 test/{inference => autodiff_pr}/train_test.jl | 18 ++++++- 10 files changed, 71 insertions(+), 76 deletions(-) rename src/{inference/train_pr_losses.jl => autodiff_pr/losses.jl} (100%) rename src/{inference/train_pr.jl => autodiff_pr/train.jl} (72%) rename test/{inference => autodiff_pr}/learned_cheap_dists.jl (100%) rename test/{inference => autodiff_pr}/train_test.jl (79%) diff --git a/examples/darts.jl b/examples/darts.jl index 196ee575..e74a2bb0 100644 --- a/examples/darts.jl +++ b/examples/darts.jl @@ -21,13 +21,11 @@ all_colors_receive_own_dart = all( for (num_own_darts, weight) in zip(DARTS_PER_COLOR, weights) ) -pr_all_colors_receive_own_dart = exp(LogPr(all_colors_receive_own_dart)) - -compute_mixed(var_vals, pr_all_colors_receive_own_dart) # 0.182 +pr_mixed(var_vals)(all_colors_receive_own_dart) # 0.182 train!(var_vals, -LogPr(all_colors_receive_own_dart); epochs=1000, learning_rate=0.3) # We've increased the chance of success! -compute_mixed(var_vals, pr_all_colors_receive_own_dart) # 0.234 +pr_mixed(var_vals)(pr_all_colors_receive_own_dart) # 0.234 # Compute what ratio we actually need to paint the target: [compute(var_vals, weight/sum(weights)) for weight in weights] diff --git a/examples/qc/stlc/lib/util.jl b/examples/qc/stlc/lib/util.jl index 202c6e61..6e506a9a 100644 --- a/examples/qc/stlc/lib/util.jl +++ b/examples/qc/stlc/lib/util.jl @@ -151,35 +151,3 @@ function println_flush(io, args...) println(io, args...) flush(io) end - -function collect_flips(bools) - flips = Vector{Dice.Flip}() - Dice.foreach_down(bools) do x - x isa Dice.Flip && push!(flips, x) - end - flips -end - -function with_concrete_flips(f, var_vals, dist) - flips = collect_flips(Dice.tobits(dist)) - flip_to_original_prob = Dict() - a = ADComputer(var_vals) - for x in flips - if x.prob isa ADNode - flip_to_original_prob[x] = x.prob - x.prob = compute(a, x.prob) - end - end - res = f() - # restore - for (x, prob) in flip_to_original_prob - x.prob = prob - end - res -end - -function pr_with_concrete_flips(var_vals, dist) - with_concrete_flips(var_vals, dist) do - pr(dist) - end -end \ No newline at end of file diff --git a/examples/qc/stlc/main.jl b/examples/qc/stlc/main.jl index d7961ef6..1e123f8e 100644 --- a/examples/qc/stlc/main.jl +++ b/examples/qc/stlc/main.jl @@ -106,13 +106,13 @@ show(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) println(io) println_flush(io, "Inferring initial distribution...") -time_infer_init = @elapsed metric_dist = pr_with_concrete_flips(var_vals, metric) +time_infer_init = @elapsed metric_dist = pr_mixed(var_vals)(metric) println(io, " $(time_infer_init) seconds") save_metric_dist(joinpath(OUT_DIR, "dist_before.csv"), METRIC, metric_dist; io=io) println(io) println_flush(io, "Saving samples...") -time_sample_init = @elapsed with_concrete_flips(var_vals, e) do +time_sample_init = @elapsed with_concrete_ad_flips(var_vals, e) do save_samples(joinpath(OUT_DIR, "terms_before.txt"), e; io=io) end println(io, " $(time_sample_init) seconds") @@ -158,12 +158,12 @@ show(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) println(io) println(io, "Inferring trained distribution...") -time_infer_final = @elapsed metric_dist_after = pr_with_concrete_flips(var_vals, metric) +time_infer_final = @elapsed metric_dist_after = pr_mixed(var_vals)(metric) save_metric_dist(joinpath(OUT_DIR, "dist_trained_" * OUT_FILE_TAG * ".csv"), METRIC, metric_dist_after; io=io) println(io) println(io, "Saving samples...") -time_sample_final = @elapsed with_concrete_flips(var_vals, e) do +time_sample_final = @elapsed with_concrete_ad_flips(var_vals, e) do save_samples(joinpath(OUT_DIR, "terms_trained_" * OUT_FILE_TAG * ".txt"), e; io=io) end println(io, " $(time_sample_final) seconds") diff --git a/src/Dice.jl b/src/Dice.jl index 857e9f40..50e46169 100644 --- a/src/Dice.jl +++ b/src/Dice.jl @@ -35,6 +35,8 @@ include("autodiff/adnode.jl") include("autodiff/core.jl") include("dist/dist.jl") include("inference/inference.jl") +include("autodiff_pr/train.jl") +include("autodiff_pr/losses.jl") include("analysis/analysis.jl") include("dsl.jl") include("plot.jl") diff --git a/src/inference/train_pr_losses.jl b/src/autodiff_pr/losses.jl similarity index 100% rename from src/inference/train_pr_losses.jl rename to src/autodiff_pr/losses.jl diff --git a/src/inference/train_pr.jl b/src/autodiff_pr/train.jl similarity index 72% rename from src/inference/train_pr.jl rename to src/autodiff_pr/train.jl index 99896da8..f76db487 100644 --- a/src/inference/train_pr.jl +++ b/src/autodiff_pr/train.jl @@ -1,6 +1,5 @@ # The bridge between autodiff and cudd -export LogPr, compute_mixed, train! -using DataStructures: Queue +export LogPr, compute_mixed, train!, pr_mixed, support_mixed, with_concrete_ad_flips mutable struct LogPr <: ADNode bool::Dist{Bool} @@ -93,3 +92,48 @@ function train!( push!(losses, compute_mixed(var_vals, loss)) losses end + +function collect_flips(bools) + flips = Vector{Flip}() + foreach_down(bools) do x + x isa Flip && push!(flips, x) + end + flips +end + +function with_concrete_ad_flips(f, var_vals, dist) + flip_to_original_prob = Dict() + a = ADComputer(var_vals) + for x in collect_flips(tobits(dist)) + if x.prob isa ADNode + flip_to_original_prob[x] = x.prob + x.prob = compute(a, x.prob) + end + end + res = f() + for (x, prob) in flip_to_original_prob + x.prob = prob + end + res +end + +function pr_mixed(var_vals) + (args...; kwargs...) -> with_concrete_ad_flips(var_vals, args...) do + pr(args...; kwargs...) + end +end + +function support_mixed(dist) + flip_to_original_prob = Dict() + for x in collect_flips(tobits(dist)) + if x.prob isa ADNode + flip_to_original_prob[x] = x.prob + x.prob = 0.5 + end + end + res = keys(pr(dist)) + for (x, prob) in flip_to_original_prob + x.prob = prob + end + res +end diff --git a/src/dist/number/uint.jl b/src/dist/number/uint.jl index ac5bff6c..d5d0a47d 100644 --- a/src/dist/number/uint.jl +++ b/src/dist/number/uint.jl @@ -421,38 +421,10 @@ function unif_obs(lo::DistUInt{W}, hi::DistUInt{W}) where W x, (x >= lo) & (x <= hi) end -function collect_flips(bools) - flips = Vector{Flip}() - Dice.foreach_down(bools) do x - x isa Flip && push!(flips, x) - end - flips -end - -function with_arb_ad_flips(f, dist) - flips = collect_flips(tobits(dist)) - flip_to_original_prob = Dict() - for x in flips - if x.prob isa ADNode - flip_to_original_prob[x] = x.prob - x.prob = 0.5 - end - end - res = f() - # restore - for (x, prob) in flip_to_original_prob - x.prob = prob - end - res -end - # Uniform from 0 to hi, exclusive function unif_half(hi::DistUInt{W})::DistUInt{W} where W # note: # could use path cond too - support = with_arb_ad_flips(hi) do - keys(pr(hi)) - end - prod = lcm([BigInt(x) for x in support if x != 0]) + prod = lcm([BigInt(x) for x in support_mixed(hi) if x != 0]) u = uniform(DistUInt{ndigits(prod, base=2)}, 0, prod) rem_trunc(u, hi) end diff --git a/src/inference/inference.jl b/src/inference/inference.jl index 551bfe11..78c41599 100644 --- a/src/inference/inference.jl +++ b/src/inference/inference.jl @@ -166,7 +166,4 @@ include("cudd/wmc.jl") # - pr(::Dist, evidence=..., errors=...) include("pr.jl") -include("train_pr.jl") -include("train_pr_losses.jl") - include("sample.jl") \ No newline at end of file diff --git a/test/inference/learned_cheap_dists.jl b/test/autodiff_pr/learned_cheap_dists.jl similarity index 100% rename from test/inference/learned_cheap_dists.jl rename to test/autodiff_pr/learned_cheap_dists.jl diff --git a/test/inference/train_test.jl b/test/autodiff_pr/train_test.jl similarity index 79% rename from test/inference/train_test.jl rename to test/autodiff_pr/train_test.jl index 883e085d..9b2ac3bc 100644 --- a/test/inference/train_test.jl +++ b/test/autodiff_pr/train_test.jl @@ -46,14 +46,28 @@ end var_vals = Valuation(psp => 0) b = @dice_ite if flip(prob) true else flip(prob) end train!(var_vals, mle_loss([prob_equals(b, x) for x in dataset]); epochs=200, learning_rate=0.003) - p1 = compute_mixed(var_vals, LogPr(b)) + p1 = pr_mixed(var_vals)(b)[true] # Train for 100 epochs, twice b = @dice_ite if flip(prob) true else flip(prob) end var_vals = Valuation(psp => 0) train!(var_vals, mle_loss([prob_equals(b, x) for x in dataset]); epochs=100, learning_rate=0.003) train!(var_vals, mle_loss([prob_equals(b, x) for x in dataset]); epochs=100, learning_rate=0.003) - p2 = compute_mixed(var_vals, LogPr(b)) + p2 = pr_mixed(var_vals)(b)[true] @test p1 ≈ p2 end + +@testset "interleaving" begin + x = Var("x") + prob = sigmoid(x) + prob2 = exp(LogPr(flip(prob) & flip(prob))) + loss = mle_loss([flip(prob2) & flip(prob2) & !flip(prob2)]) + var_vals = Valuation(x => 0) + train!(var_vals, loss, epochs=2000, learning_rate=0.1) + + # loss is minimized if prob2 is 2/3 + # therefore, prob should be sqrt(2/3) + @test compute(var_vals, prob) ≈ sqrt(2/3) + @test compute_mixed(var_vals, loss) ≈ -log(2/3*2/3*1/3) +end From ff69329ad19a42ba12e0aa57b29d5015d5188acc Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 24 Dec 2023 15:17:15 -0800 Subject: [PATCH 025/231] have with_concrete_ad_flips support LogPr --- src/autodiff/adnode.jl | 2 +- src/autodiff_pr/train.jl | 3 ++- test/autodiff_pr/train_test.jl | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/autodiff/adnode.jl b/src/autodiff/adnode.jl index 71da97c5..8445777e 100644 --- a/src/autodiff/adnode.jl +++ b/src/autodiff/adnode.jl @@ -198,7 +198,7 @@ function backward(n::Transpose, vals, derivs) add_deriv(derivs, n.x, transpose(derivs[n])) end -# Give override for add_logprobs so logprob in wmc.jl is differentiable +# Give override for add_logprobs so logprob in wmc.jl is differentiable. # computes log(exp(x) + exp(y)) mutable struct NodeLogPr <: ADNode pr::ADNode diff --git a/src/autodiff_pr/train.jl b/src/autodiff_pr/train.jl index f76db487..c5e4183e 100644 --- a/src/autodiff_pr/train.jl +++ b/src/autodiff_pr/train.jl @@ -104,10 +104,11 @@ end function with_concrete_ad_flips(f, var_vals, dist) flip_to_original_prob = Dict() a = ADComputer(var_vals) + l = LogPrExpander(WMC(BDDCompiler())) for x in collect_flips(tobits(dist)) if x.prob isa ADNode flip_to_original_prob[x] = x.prob - x.prob = compute(a, x.prob) + x.prob = compute(a, expand_logprs(l, x.prob)) end end res = f() diff --git a/test/autodiff_pr/train_test.jl b/test/autodiff_pr/train_test.jl index 9b2ac3bc..2107a9c9 100644 --- a/test/autodiff_pr/train_test.jl +++ b/test/autodiff_pr/train_test.jl @@ -62,7 +62,8 @@ end x = Var("x") prob = sigmoid(x) prob2 = exp(LogPr(flip(prob) & flip(prob))) - loss = mle_loss([flip(prob2) & flip(prob2) & !flip(prob2)]) + bool = flip(prob2) & flip(prob2) & !flip(prob2) + loss = mle_loss([bool]) var_vals = Valuation(x => 0) train!(var_vals, loss, epochs=2000, learning_rate=0.1) @@ -70,4 +71,5 @@ end # therefore, prob should be sqrt(2/3) @test compute(var_vals, prob) ≈ sqrt(2/3) @test compute_mixed(var_vals, loss) ≈ -log(2/3*2/3*1/3) + pr_mixed(var_vals)(bool) end From 7cd05634b8a64d9fc28162d46f0554bf57961596 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 26 Dec 2023 17:07:13 -0800 Subject: [PATCH 026/231] add neg_entropy --- src/autodiff_pr/losses.jl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/autodiff_pr/losses.jl b/src/autodiff_pr/losses.jl index 3e3553f7..d2ed9391 100644 --- a/src/autodiff_pr/losses.jl +++ b/src/autodiff_pr/losses.jl @@ -1,4 +1,4 @@ -export BoolToMax, mle_loss, kl_divergence +export BoolToMax, mle_loss, kl_divergence, neg_entropy struct BoolToMax bool::AnyBool @@ -46,4 +46,10 @@ function kl_divergence(p::Dict{<:Any, <:Real}, q::Dist, domain::Set{<:Pair{<:Any res += p[x] * (log(p[x]) - logqx) end res -end \ No newline at end of file +end + +function neg_entropy(p::Dist, domain::Set{<:Dist}) + sum(domain) do x + LogPr(prob_equals(p, x)) * exp(LogPr(prob_equals(p, x))) + end +end From ae19e01c30db2f8493d4f003fc0febd8d1615573 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 26 Dec 2023 17:07:40 -0800 Subject: [PATCH 027/231] train generator w entropy --- examples/qc/stlc/entropy.jl | 170 ++ examples/qc/stlc/lib/generator.jl | 2 +- .../uniform/sz=3,tysz=2/dist_before.csv | 9 + ...t_trained_param_by_sz=true,epochs=2000.csv | 9 + ...ing_curve_param_by_sz=true,epochs=2000.csv | 2001 +++++++++++++++++ .../log_param_by_sz=true,epochs=2000.log | 39 + .../uniform/sz=3,tysz=2/terms_before.txt | 200 ++ ...s_trained_param_by_sz=true,epochs=2000.txt | 200 ++ .../uniform/sz=3,tysz=2/dist_before.csv | 9 + ...st_trained_param_by_sz=true,epochs=100.csv | 9 + ...t_trained_param_by_sz=true,epochs=2000.csv | 9 + ...ning_curve_param_by_sz=true,epochs=100.csv | 101 + ...ing_curve_param_by_sz=true,epochs=2000.csv | 2001 +++++++++++++++++ .../log_param_by_sz=true,epochs=100.log | 39 + .../log_param_by_sz=true,epochs=2000.log | 39 + .../uniform/sz=3,tysz=2/terms_before.txt | 200 ++ ...ms_trained_param_by_sz=true,epochs=100.txt | 200 ++ ...s_trained_param_by_sz=true,epochs=2000.txt | 200 ++ ...ing_curve_param_by_sz=true,epochs=2000.csv | 2001 +++++++++++++++++ .../log_param_by_sz=true,epochs=2000.log | 31 + .../entropy/sz=2,tysz=1/terms_before.txt | 200 ++ ...s_trained_param_by_sz=true,epochs=2000.txt | 200 ++ .../uniform/sz=3,tysz=2/dist_before.csv | 9 + ...st_trained_param_by_sz=true,epochs=100.csv | 9 + ...t_trained_param_by_sz=true,epochs=2000.csv | 9 + ...ning_curve_param_by_sz=true,epochs=100.csv | 101 + ...ing_curve_param_by_sz=true,epochs=2000.csv | 2001 +++++++++++++++++ .../log_param_by_sz=true,epochs=100.log | 39 + .../log_param_by_sz=true,epochs=2000.log | 39 + .../uniform/sz=3,tysz=2/terms_before.txt | 200 ++ ...ms_trained_param_by_sz=true,epochs=100.txt | 200 ++ ...s_trained_param_by_sz=true,epochs=2000.txt | 200 ++ .../log_param_by_sz=true,epochs=2000.log | 15 + src/dist/vector.jl | 9 +- 34 files changed, 10695 insertions(+), 5 deletions(-) create mode 100644 examples/qc/stlc/entropy.jl create mode 100644 examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/dist_before.csv create mode 100644 examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=2000.csv create mode 100644 examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv create mode 100644 examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log create mode 100644 examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/terms_before.txt create mode 100644 examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt create mode 100644 examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_before.csv create mode 100644 examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=100.csv create mode 100644 examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=2000.csv create mode 100644 examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=100.csv create mode 100644 examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv create mode 100644 examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=100.log create mode 100644 examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log create mode 100644 examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_before.txt create mode 100644 examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=100.txt create mode 100644 examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt create mode 100644 examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/learning_curve_param_by_sz=true,epochs=2000.csv create mode 100644 examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/log_param_by_sz=true,epochs=2000.log create mode 100644 examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/terms_before.txt create mode 100644 examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/terms_trained_param_by_sz=true,epochs=2000.txt create mode 100644 examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_before.csv create mode 100644 examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=100.csv create mode 100644 examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=2000.csv create mode 100644 examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=100.csv create mode 100644 examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv create mode 100644 examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=100.log create mode 100644 examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log create mode 100644 examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_before.txt create mode 100644 examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=100.txt create mode 100644 examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt create mode 100644 examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=5,tysz=3/log_param_by_sz=true,epochs=2000.log diff --git a/examples/qc/stlc/entropy.jl b/examples/qc/stlc/entropy.jl new file mode 100644 index 00000000..396efde8 --- /dev/null +++ b/examples/qc/stlc/entropy.jl @@ -0,0 +1,170 @@ +# Train an STLC generator to have some property (term size or num apps) match a +# specific distribution (linear or uniform). +# +# Saves the distributions and sampled terms before and after training. + +using Dice +include("lib/dist.jl") +include("lib/util.jl") +include("lib/generator.jl") + +############################ +# Config +############################ + +# Specify generator, initial & target distributions +METRIC = "entropy" +INIT_SIZE = 2 # size passed to top call of gen_expr +GEN_TYP_SIZE = 1 # size passed to all calls of gen_type + +# Hyperparams +PARAMETERIZE_FLIP_GROUPS_BY_SZ = true # whether flips at the same code location + # but different sizes can have different + # probabilities +EPOCHS = 2000 # epochs to train for + +LOG_TO_FILE = true + +TAG = "v3_opt_meta_ad" + +############################ + +# Corresponds to "problem" - generator we are trying to train & desired dist. +# Data within a directory would get plotted on the same graph +OUT_DIR = "examples/qc/stlc/output/$(TAG)/$(METRIC)/sz=$(INIT_SIZE),tysz=$(GEN_TYP_SIZE)" + +# Hyperparams +OUT_FILE_TAG = "param_by_sz=$(PARAMETERIZE_FLIP_GROUPS_BY_SZ),epochs=$(EPOCHS)" + +############################ +# Intro +############################ + +LOG_PATH = joinpath(OUT_DIR, "log_" * OUT_FILE_TAG * ".log") +LEARNING_CURVE_PATH = joinpath(OUT_DIR, "learning_curve_" * OUT_FILE_TAG * ".csv") + +mkpath(OUT_DIR) +io = if LOG_TO_FILE + open(LOG_PATH, "w") +else + stdout +end + +using Dates +t = now() +for io′ in Set([io, stdout]) + println(io′, t) + println(io′, "== Config ==") + println(io′, "INIT_SIZE: $(INIT_SIZE)") + println(io′, "GEN_TYP_SIZE: $(GEN_TYP_SIZE)") + println(io′, "PARAMETERIZE_FLIP_GROUPS_BY_SZ: $(PARAMETERIZE_FLIP_GROUPS_BY_SZ)") + println(io′, "EPOCHS: $(EPOCHS)") + println(io′, "DistNat: $(DistNat)") + println(io′, "TAG: $(TAG)") + println(io′) +end +if LOG_TO_FILE + println("Logging to $(LOG_PATH)") + println() +end + +var_vals = Valuation() +adnodes_of_interest = Dict{String, ADNode}() +function register_weight!(s) + var = Var("$(s)_before_sigmoid") + var_vals[var] = 0 + weight = sigmoid(var) + adnodes_of_interest[s] = weight + weight +end + +println_flush(io, "Building (gen_expr(...)) computation graph...") +time_build = @elapsed begin + e = gen_expr( + DistNil(DistI{Typ}), + gen_type(GEN_TYP_SIZE, PARAMETERIZE_FLIP_GROUPS_BY_SZ), + INIT_SIZE, + GEN_TYP_SIZE, + PARAMETERIZE_FLIP_GROUPS_BY_SZ + ) +end +println(io, " $(time_build) seconds") +println(io) + + +############################ +# Before +############################ + +println(io, "Initial adnodes_of_interest:") +vals = compute(var_vals, values(adnodes_of_interest)) +show(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) +println(io) + + +println_flush(io, "Saving samples...") +time_sample_init = @elapsed with_concrete_ad_flips(var_vals, e) do + save_samples(joinpath(OUT_DIR, "terms_before.txt"), e; io=io) +end +println(io, " $(time_sample_init) seconds") +println(io) + +to_id = Dict( + "Var" => DistUInt32(1), + "Boolean" => DistUInt32(2), + "App" => DistUInt32(3), + "Abs" => DistUInt32(4), +) + +function collect_terminals(e) + match(e, [ + "Var" => (i) -> DistVector([to_id["Var"]]), + "Boolean" => (b) -> DistVector([to_id["Boolean"]]), + "App" => (f, x) -> prob_append(prob_extend(collect_terminals(f), collect_terminals(x)), to_id["App"]), + "Abs" => (ty, e′) -> prob_append(collect_terminals(e′), to_id["Abs"]), + ]) +end +random_term = match(e, [ + "None" => () -> DistNone(DistUInt32), + "Some" => e -> DistSome(choice(collect_terminals(e))) +]) +loss = neg_entropy(random_term, Set([DistSome(i) for i in values(to_id)])) + +initial_entropy = compute_mixed(var_vals, -loss) +println(io, "Initial entropy: $(initial_entropy)") +println(io) + +############################ +# Train +############################ + +println_flush(io, "Training...") +time_train = @elapsed learning_curve = train!(var_vals, loss; epochs=EPOCHS, learning_rate=0.003) +println(io, " $(time_train) seconds") +println(io) + +open(LEARNING_CURVE_PATH, "w") do file + for (epoch, logpr) in zip(0:EPOCHS, learning_curve) + println(file, "$(epoch)\t$(logpr)") + end +end + +############################ +# After +############################ + +final_entropy = compute_mixed(var_vals, -loss) +println(io, "Final entropy: $(final_entropy)") +println(io) + +println(io, "Learned adnodes_of_interest:") +vals = compute(var_vals, values(adnodes_of_interest)) +show(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) +println(io) + +println(io, "Saving samples...") +time_sample_final = @elapsed with_concrete_ad_flips(var_vals, e) do + save_samples(joinpath(OUT_DIR, "terms_trained_" * OUT_FILE_TAG * ".txt"), e; io=io) +end +println(io, " $(time_sample_final) seconds") +println(io) diff --git a/examples/qc/stlc/lib/generator.jl b/examples/qc/stlc/lib/generator.jl index 09f5cfa5..cb52f80e 100644 --- a/examples/qc/stlc/lib/generator.jl +++ b/examples/qc/stlc/lib/generator.jl @@ -20,7 +20,7 @@ end function bind_opt(f, ma::DistI{Opt{T}})::DistI{<:Opt{<:Any}} where T match(ma, [ - "None" => () -> DistNone(T) + "None" => () -> DistNone(T) # TODO: should be DistNone(return type of f) "Some" => f ]) end diff --git a/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/dist_before.csv b/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/dist_before.csv new file mode 100644 index 00000000..d1440ff9 --- /dev/null +++ b/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/dist_before.csv @@ -0,0 +1,9 @@ +num_apps probability +0 0.3784722222222223 +1 0.10286458333333337 +2 0.1511501736111112 +3 0.14680989583333343 +4 0.11425781250000003 +5 0.06738281250000001 +6 0.03125 +7 0.007812500000000002 diff --git a/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=2000.csv b/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=2000.csv new file mode 100644 index 00000000..b1b81154 --- /dev/null +++ b/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=2000.csv @@ -0,0 +1,9 @@ +num_apps probability +0 0.16486577196496097 +1 0.047180881871368555 +2 0.1088898526593344 +3 0.15080968983713253 +4 0.17234621280449572 +5 0.16286665359517002 +6 0.10749048574248589 +7 0.08555045152505174 diff --git a/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv b/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv new file mode 100644 index 00000000..e0babad5 --- /dev/null +++ b/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv @@ -0,0 +1,2001 @@ +0 -20.238481981031438 +1 -20.21217230375934 +2 -20.186130303707692 +3 -20.160352655808524 +4 -20.13483608957884 +5 -20.10957738797502 +6 -20.084573386274744 +7 -20.059820970985772 +8 -20.035317078780828 +9 -20.011058695458033 +10 -19.98704285492616 +11 -19.96326663821411 +12 -19.939727172504014 +13 -19.916421630187337 +14 -19.89334722794337 +15 -19.870501225839668 +16 -19.847880926453747 +17 -19.82548367401553 +18 -19.8033068535701 +19 -19.781347890160117 +20 -19.759604248027557 +21 -19.738073429834124 +22 -19.716752975899986 +23 -19.69564046346033 +24 -19.67473350593927 +25 -19.654029752240692 +26 -19.633526886055627 +27 -19.613222625185664 +28 -19.593114720882163 +29 -19.573200957200605 +30 -19.55347915036999 +31 -19.533947148176708 +32 -19.514602829362612 +33 -19.495444103036867 +34 -19.47646890810131 +35 -19.457675212688983 +36 -19.43906101361537 +37 -19.420624335842213 +38 -19.40236323195352 +39 -19.384275781643346 +40 -19.366360091215263 +41 -19.34861429309307 +42 -19.331036545342528 +43 -19.313625031203838 +44 -19.29637795863459 +45 -19.279293559862914 +46 -19.262370090950622 +47 -19.24560583136608 +48 -19.22899908356645 +49 -19.212548172589344 +50 -19.19625144565336 +51 -19.180107271767454 +52 -19.164114041348927 +53 -19.148270165849738 +54 -19.132574077390966 +55 -19.11702422840531 +56 -19.101619091287258 +57 -19.086357158050944 +58 -19.071236939995302 +59 -19.05625696737652 +60 -19.041415789087424 +61 -19.02671197234388 +62 -19.012144102377746 +63 -18.99771078213649 +64 -18.983410631989088 +65 -18.969242289438228 +66 -18.955204408838537 +67 -18.941295661120762 +68 -18.92751473352176 +69 -18.913860329320084 +70 -18.90033116757712 +71 -18.886925982883632 +72 -18.87364352511144 +73 -18.8604825591704 +74 -18.847441864770275 +75 -18.834520236187476 +76 -18.821716482036646 +77 -18.809029425046884 +78 -18.79645790184244 +79 -18.784000762727977 +80 -18.771656871478015 +81 -18.759425105130767 +82 -18.747304353785957 +83 -18.735293520406767 +84 -18.723391520625718 +85 -18.71159728255436 +86 -18.6999097465967 +87 -18.688327865266398 +88 -18.676850603007427 +89 -18.66547693601835 +90 -18.654205852079894 +91 -18.64303635038597 +92 -18.63196744137787 +93 -18.620998146581783 +94 -18.610127498449174 +95 -18.599354540200554 +96 -18.58867832567188 +97 -18.578097919164094 +98 -18.567612395295384 +99 -18.557220838856253 +100 -18.54692234466734 +101 -18.536716017439755 +102 -18.526600971638175 +103 -18.51657633134632 +104 -18.506641230135042 +105 -18.49679481093267 +106 -18.487036225897825 +107 -18.477364636294574 +108 -18.46777921236972 +109 -18.458279133232367 +110 -18.4488635867357 +111 -18.439531769360762 +112 -18.430282886102344 +113 -18.421116150356927 +114 -18.41203078381254 +115 -18.403026016340597 +116 -18.394101085889545 +117 -18.385255238380466 +118 -18.376487727604392 +119 -18.367797815121406 +120 -18.35918477016153 +121 -18.350647869527197 +122 -18.342186397497485 +123 -18.333799645733905 +124 -18.325486913187763 +125 -18.317247506009117 +126 -18.309080737457222 +127 -18.30098592781247 +128 -18.29296240428975 +129 -18.28500950095328 +130 -18.277126558632794 +131 -18.269312924841117 +132 -18.261567953693017 +133 -18.253891005825448 +134 -18.246281448319014 +135 -18.238738654620676 +136 -18.231262004467727 +137 -18.223850883812947 +138 -18.216504684750916 +139 -18.20922280544552 +140 -18.202004650058527 +141 -18.194849628679325 +142 -18.187757157255728 +143 -18.180726657525792 +144 -18.17375755695076 +145 -18.16684928864893 +146 -18.160001291330616 +147 -18.153213009233987 +148 -18.146483892061987 +149 -18.139813394920022 +150 -18.133200978254763 +151 -18.126646107793707 +152 -18.12014825448571 +153 -18.113706894442295 +154 -18.10732150887994 +155 -18.10099158406309 +156 -18.094716611248035 +157 -18.088496086627547 +158 -18.082329511276427 +159 -18.076216391097645 +160 -18.070156236769392 +161 -18.06414856369279 +162 -18.058192891940337 +163 -18.052288746205154 +164 -18.046435655750773 +165 -18.040633154361792 +166 -18.034880780295072 +167 -18.029178076231656 +168 -18.023524589229382 +169 -18.017919870676018 +170 -18.012363476243138 +171 -18.00685496584056 +172 -18.001393903571433 +173 -17.995979857687814 +174 -17.990612400546976 +175 -17.985291108568216 +176 -17.98001556219019 +177 -17.97478534582885 +178 -17.969600047835968 +179 -17.96445926045808 +180 -17.959362579796064 +181 -17.954309605765154 +182 -17.949299942055553 +183 -17.944333196093417 +184 -17.939408979002494 +185 -17.93452690556607 +186 -17.929686594189505 +187 -17.92488766686325 +188 -17.920129749126218 +189 -17.915412470029658 +190 -17.910735462101535 +191 -17.906098361311244 +192 -17.901500807034818 +193 -17.896942442020535 +194 -17.89242291235494 +195 -17.88794186742929 +196 -17.883498959906376 +197 -17.879093845687763 +198 -17.87472618388141 +199 -17.870395636769665 +200 -17.8661018697777 +201 -17.861844551442154 +202 -17.85762335338035 +203 -17.853437950259735 +204 -17.84928801976772 +205 -17.84517324258182 +206 -17.841093302340255 +207 -17.837047885612744 +208 -17.83303668187173 +209 -17.8290593834639 +210 -17.82511568558201 +211 -17.821205286237102 +212 -17.817327886230917 +213 -17.813483189128753 +214 -17.809670901232465 +215 -17.805890731553966 +216 -17.802142391788827 +217 -17.798425596290304 +218 -17.794740062043594 +219 -17.791085508640368 +220 -17.787461658253623 +221 -17.783868235612797 +222 -17.7803049679791 +223 -17.776771585121207 +224 -17.773267819291142 +225 -17.769793405200453 +226 -17.766348079996604 +227 -17.762931583239734 +228 -17.759543656879494 +229 -17.756184045232285 +230 -17.752852494958624 +231 -17.749548755040863 +232 -17.74627257676104 +233 -17.743023713678998 +234 -17.739801921610763 +235 -17.736606958607144 +236 -17.733438584932504 +237 -17.73029656304382 +238 -17.727180657569917 +239 -17.72409063529093 +240 -17.721026265118013 +241 -17.71798731807316 +242 -17.714973567269396 +243 -17.711984787890973 +244 -17.70902075717396 +245 -17.70608125438688 +246 -17.703166060811668 +247 -17.70027495972471 +248 -17.697407736378143 +249 -17.694564177981384 +250 -17.69174407368273 +251 -17.688947214551227 +252 -17.68617339355871 +253 -17.683422405562016 +254 -17.680694047285368 +255 -17.677988117302952 +256 -17.675304416021667 +257 -17.672642745664014 +258 -17.67000291025121 +259 -17.667384715586437 +260 -17.664787969238244 +261 -17.662212480524154 +262 -17.6596580604944 +263 -17.65712452191584 +264 -17.65461167925602 +265 -17.65211934866738 +266 -17.64964734797169 +267 -17.647195496644496 +268 -17.64476361579987 +269 -17.64235152817524 +270 -17.639959058116325 +271 -17.63758603156231 +272 -17.635232276031097 +273 -17.632897620604705 +274 -17.630581895914894 +275 -17.62828493412877 +276 -17.62600656893469 +277 -17.623746635528196 +278 -17.621504970598156 +279 -17.61928141231297 +280 -17.61707580030697 +281 -17.614887975666935 +282 -17.61271778091868 +283 -17.61056506001387 +284 -17.608429658316876 +285 -17.606311422591816 +286 -17.604210200989666 +287 -17.602125843035555 +288 -17.600058199616118 +289 -17.598007122967022 +290 -17.595972466660584 +291 -17.593954085593495 +292 -17.591951835974704 +293 -17.58996557531337 +294 -17.587995162406948 +295 -17.5860404573294 +296 -17.584101321419503 +297 -17.582177617269256 +298 -17.580269208712412 +299 -17.578375960813162 +300 -17.576497739854787 +301 -17.57463441332861 +302 -17.572785849922873 +303 -17.570951919511838 +304 -17.56913249314496 +305 -17.5673274430361 +306 -17.56553664255294 +307 -17.563759966206415 +308 -17.561997289640303 +309 -17.560248489620854 +310 -17.55851344402658 +311 -17.556792031838082 +312 -17.55508413312801 +313 -17.55338962905108 +314 -17.55170840183426 +315 -17.550040334766944 +316 -17.548385312191293 +317 -17.54674321949263 +318 -17.54511394308995 +319 -17.54349737042648 +320 -17.541893389960403 +321 -17.540301891155536 +322 -17.538722764472233 +323 -17.537155901358307 +324 -17.535601194240016 +325 -17.53405853651318 +326 -17.53252782253437 +327 -17.531008947612115 +328 -17.529501807998315 +329 -17.528006300879603 +330 -17.526522324368866 +331 -17.52504977749684 +332 -17.523588560203713 +333 -17.52213857333093 +334 -17.520699718612953 +335 -17.519271898669125 +336 -17.517855016995718 +337 -17.51644897795785 +338 -17.51505368678168 +339 -17.51366904954655 +340 -17.51229497317723 +341 -17.51093136543626 +342 -17.509578134916328 +343 -17.508235191032746 +344 -17.506902444015942 +345 -17.505579804904134 +346 -17.5042671855359 +347 -17.502964498543015 +348 -17.501671657343167 +349 -17.500388576132877 +350 -17.49911516988042 +351 -17.497851354318794 +352 -17.49659704593882 +353 -17.49535216198226 +354 -17.494116620434966 +355 -17.49289034002021 +356 -17.49167324019189 +357 -17.490465241127996 +358 -17.489266263723998 +359 -17.488076229586355 +360 -17.48689506102605 +361 -17.48572268105221 +362 -17.48455901336579 +363 -17.483403982353295 +364 -17.48225751308055 +365 -17.48111953128656 +366 -17.479989963377392 +367 -17.478868736420154 +368 -17.47775577813697 +369 -17.476651016899066 +370 -17.47555438172089 +371 -17.474465802254272 +372 -17.47338520878265 +373 -17.472312532215344 +374 -17.47124770408191 +375 -17.470190656526476 +376 -17.469141322302217 +377 -17.468099634765807 +378 -17.46706552787198 +379 -17.466038936168083 +380 -17.465019794788713 +381 -17.464008039450448 +382 -17.463003606446488 +383 -17.46200643264149 +384 -17.461016455466392 +385 -17.460033612913286 +386 -17.459057843530296 +387 -17.45808908641657 +388 -17.45712728121732 +389 -17.45617236811882 +390 -17.455224287843553 +391 -17.454282981645335 +392 -17.453348391304484 +393 -17.452420459123108 +394 -17.451499127920336 +395 -17.450584341027643 +396 -17.44967604228423 +397 -17.448774176032416 +398 -17.447878687113068 +399 -17.44698952086112 +400 -17.446106623101088 +401 -17.445229940142617 +402 -17.44435941877613 +403 -17.44349500626843 +404 -17.44263665035844 +405 -17.44178429925288 +406 -17.440937901622057 +407 -17.440097406595687 +408 -17.439262763758705 +409 -17.438433923147155 +410 -17.437610835244115 +411 -17.436793450975653 +412 -17.43598172170681 +413 -17.43517559923763 +414 -17.434375035799224 +415 -17.43357998404987 +416 -17.432790397071155 +417 -17.432006228364127 +418 -17.431227431845524 +419 -17.430453961843988 +420 -17.42968577309635 +421 -17.428922820743946 +422 -17.428165060328944 +423 -17.427412447790715 +424 -17.426664939462263 +425 -17.425922492066636 +426 -17.425185062713407 +427 -17.424452608895194 +428 -17.423725088484158 +429 -17.42300245972862 +430 -17.42228468124961 +431 -17.421571712037533 +432 -17.420863511448793 +433 -17.42016003920252 +434 -17.419461255377257 +435 -17.41876712040773 +436 -17.418077595081627 +437 -17.417392640536374 +438 -17.416712218256027 +439 -17.416036290068096 +440 -17.41536481814043 +441 -17.41469776497819 +442 -17.414035093420758 +443 -17.413376766638702 +444 -17.412722748130832 +445 -17.412073001721197 +446 -17.411427491556147 +447 -17.41078618210142 +448 -17.410149038139252 +449 -17.409516024765544 +450 -17.408887107386988 +451 -17.408262251718252 +452 -17.407641423779246 +453 -17.407024589892313 +454 -17.406411716679525 +455 -17.405802771059946 +456 -17.405197720246985 +457 -17.404596531745696 +458 -17.403999173350165 +459 -17.403405613140887 +460 -17.402815819482186 +461 -17.40222976101964 +462 -17.401647406677558 +463 -17.401068725656437 +464 -17.400493687430465 +465 -17.399922261745076 +466 -17.39935441861447 +467 -17.3987901283192 +468 -17.39822936140375 +469 -17.397672088674184 +470 -17.397118281195716 +471 -17.39656791029046 +472 -17.396020947535025 +473 -17.39547736475825 +474 -17.39493713403894 +475 -17.394400227703596 +476 -17.393866618324132 +477 -17.39333627871576 +478 -17.392809181934684 +479 -17.39228530127599 +480 -17.391764610271462 +481 -17.39124708268745 +482 -17.39073269252274 +483 -17.390221414006497 +484 -17.389713221596132 +485 -17.389208089975238 +486 -17.388705994051612 +487 -17.388206908955162 +488 -17.387710810035937 +489 -17.38721767286213 +490 -17.3867274732181 +491 -17.386240187102434 +492 -17.385755790725995 +493 -17.38527426051003 +494 -17.384795573084247 +495 -17.38431970528495 +496 -17.38384663415316 +497 -17.383376336932773 +498 -17.382908791068726 +499 -17.382443974205202 +500 -17.381981864183786 +501 -17.38152243904173 +502 -17.381065677010163 +503 -17.38061155651236 +504 -17.380160056161966 +505 -17.379711154761313 +506 -17.37926483129973 +507 -17.37882106495182 +508 -17.378379835075805 +509 -17.37794112121186 +510 -17.37750490308051 +511 -17.377071160580925 +512 -17.376639873789394 +513 -17.376211022957662 +514 -17.37578458851139 +515 -17.375360551048566 +516 -17.37493889133793 +517 -17.37451959031751 +518 -17.374102629092988 +519 -17.37368798893627 +520 -17.373275651283965 +521 -17.372865597735867 +522 -17.37245781005354 +523 -17.372052270158814 +524 -17.371648960132358 +525 -17.371247862212236 +526 -17.370848958792518 +527 -17.37045223242185 +528 -17.37005766580204 +529 -17.369665241786734 +530 -17.36927494337997 +531 -17.368886753734923 +532 -17.368500656152467 +533 -17.368116634079882 +534 -17.367734671109538 +535 -17.367354750977615 +536 -17.36697685756272 +537 -17.366600974884697 +538 -17.366227087103304 +539 -17.36585517851698 +540 -17.36548523356156 +541 -17.365117236809084 +542 -17.364751172966507 +543 -17.364387026874564 +544 -17.364024783506487 +545 -17.36366442796688 +546 -17.363305945490467 +547 -17.362949321440993 +548 -17.362594541310003 +549 -17.36224159071572 +550 -17.3618904554019 +551 -17.3615411212367 +552 -17.361193574211566 +553 -17.360847800440098 +554 -17.360503786156997 +555 -17.360161517716918 +556 -17.35982098159344 +557 -17.35948216437797 +558 -17.359145052778672 +559 -17.358809633619465 +560 -17.35847589383893 +561 -17.358143820489296 +562 -17.357813400735427 +563 -17.357484621853796 +564 -17.357157471231496 +565 -17.35683193636523 +566 -17.35650800486033 +567 -17.356185664429784 +568 -17.35586490289327 +569 -17.35554570817619 +570 -17.355228068308712 +571 -17.354911971424862 +572 -17.354597405761535 +573 -17.354284359657644 +574 -17.35397282155312 +575 -17.35366277998808 +576 -17.353354223601876 +577 -17.35304714113222 +578 -17.352741521414302 +579 -17.352437353379926 +580 -17.352134626056607 +581 -17.351833328566766 +582 -17.35153345012681 +583 -17.351234980046346 +584 -17.35093790772732 +585 -17.35064222266319 +586 -17.350347914438093 +587 -17.350054972726053 +588 -17.349763387290174 +589 -17.349473147981815 +590 -17.349184244739796 +591 -17.348896667589692 +592 -17.348610406642926 +593 -17.348325452096095 +594 -17.34804179423019 +595 -17.347759423409812 +596 -17.347478330082435 +597 -17.34719850477765 +598 -17.346919938106495 +599 -17.34664262076062 +600 -17.34636654351163 +601 -17.34609169721037 +602 -17.345818072786194 +603 -17.345545661246256 +604 -17.345274453674847 +605 -17.34500444123266 +606 -17.34473561515613 +607 -17.344467966756785 +608 -17.34420148742049 +609 -17.343936168606863 +610 -17.34367200184857 +611 -17.343408978750706 +612 -17.343147090990108 +613 -17.342886330314734 +614 -17.34262668854301 +615 -17.342368157563243 +616 -17.342110729332934 +617 -17.3418543958782 +618 -17.34159914929315 +619 -17.341344981739276 +620 -17.341091885444847 +621 -17.340839852704327 +622 -17.340588875877756 +623 -17.340338947390187 +624 -17.34009005973109 +625 -17.339842205453795 +626 -17.3395953771749 +627 -17.33934956757371 +628 -17.339104769391703 +629 -17.338860975431917 +630 -17.338618178558466 +631 -17.33837637169596 +632 -17.338135547828955 +633 -17.337895700001443 +634 -17.337656821316315 +635 -17.337418904934797 +636 -17.33718194407601 +637 -17.336945932016384 +638 -17.336710862089156 +639 -17.33647672768389 +640 -17.336243522245955 +641 -17.33601123927604 +642 -17.33577987232964 +643 -17.335549415016583 +644 -17.33531986100056 +645 -17.335091203998587 +646 -17.33486343778062 +647 -17.33463655616899 +648 -17.33441055303801 +649 -17.33418542231346 +650 -17.33396115797216 +651 -17.333737754041508 +652 -17.333515204599003 +653 -17.333293503771856 +654 -17.3330726457365 +655 -17.33285262471816 +656 -17.332633434990417 +657 -17.332415070874816 +658 -17.332197526740355 +659 -17.331980797003187 +660 -17.331764876126062 +661 -17.331549758618024 +662 -17.33133543903394 +663 -17.33112191197408 +664 -17.330909172083803 +665 -17.330697214053046 +666 -17.330486032615994 +667 -17.33027562255066 +668 -17.330065978678522 +669 -17.329857095864096 +670 -17.3296489690146 +671 -17.32944159307953 +672 -17.329234963050336 +673 -17.329029073959983 +674 -17.328823920882662 +675 -17.32861949893335 +676 -17.328415803267493 +677 -17.328212829080638 +678 -17.32801057160806 +679 -17.327809026124452 +680 -17.327608187943504 +681 -17.327408052417642 +682 -17.32720861493762 +683 -17.32700987093222 +684 -17.32681181586787 +685 -17.326614445248364 +686 -17.326417754614514 +687 -17.326221739543794 +688 -17.326026395650032 +689 -17.325831718583117 +690 -17.325637704028626 +691 -17.325444347707574 +692 -17.325251645376035 +693 -17.325059592824868 +694 -17.324868185879392 +695 -17.324677420399123 +696 -17.324487292277414 +697 -17.324297797441186 +698 -17.32410893185063 +699 -17.32392069149892 +700 -17.32373307241191 +701 -17.323546070647826 +702 -17.323359682297028 +703 -17.323173903481695 +704 -17.32298873035554 +705 -17.32280415910357 +706 -17.322620185941737 +707 -17.322436807116752 +708 -17.322254018905745 +709 -17.322071817616045 +710 -17.321890199584853 +711 -17.321709161179076 +712 -17.32152869879496 +713 -17.32134880885789 +714 -17.321169487822146 +715 -17.320990732170603 +716 -17.320812538414497 +717 -17.320634903093204 +718 -17.320457822773943 +719 -17.320281294051572 +720 -17.320105313548318 +721 -17.319929877913566 +722 -17.31975498382359 +723 -17.319580627981324 +724 -17.319406807116145 +725 -17.319233517983612 +726 -17.31906075736528 +727 -17.318888522068413 +728 -17.318716808925803 +729 -17.318545614795543 +730 -17.318374936560794 +731 -17.318204771129537 +732 -17.318035115434416 +733 -17.317865966432485 +734 -17.317697321104983 +735 -17.317529176457153 +736 -17.317361529518013 +737 -17.317194377340154 +738 -17.317027716999533 +739 -17.316861545595252 +740 -17.31669586024939 +741 -17.316530658106768 +742 -17.316365936334787 +743 -17.316201692123173 +744 -17.31603792268385 +745 -17.315874625250697 +746 -17.315711797079356 +747 -17.315549435447117 +748 -17.315387537652587 +749 -17.315226101015664 +750 -17.315065122877215 +751 -17.314904600598997 +752 -17.3147445315634 +753 -17.314584913173313 +754 -17.314425742851927 +755 -17.314267018042536 +756 -17.31410873620845 +757 -17.31395089483268 +758 -17.313793491417904 +759 -17.31363652348619 +760 -17.313479988578912 +761 -17.313323884256516 +762 -17.313168208098396 +763 -17.313012957702703 +764 -17.312858130686195 +765 -17.312703724684084 +766 -17.312549737349848 +767 -17.312396166355114 +768 -17.312243009389448 +769 -17.312090264160254 +770 -17.311937928392574 +771 -17.311785999828942 +772 -17.31163447622928 +773 -17.311483355370694 +774 -17.31133263504733 +775 -17.311182313070255 +776 -17.311032387267282 +777 -17.310882855482856 +778 -17.31073371557786 +779 -17.31058496542955 +780 -17.310436602931322 +781 -17.31028862599264 +782 -17.31014103253887 +783 -17.309993820511163 +784 -17.30984698786627 +785 -17.30970053257648 +786 -17.30955445262941 +787 -17.309408746027948 +788 -17.309263410790045 +789 -17.30911844494865 +790 -17.308973846551535 +791 -17.308829613661196 +792 -17.308685744354726 +793 -17.308542236723657 +794 -17.30839908887387 +795 -17.308256298925457 +796 -17.30811386501261 +797 -17.30797178528349 +798 -17.307830057900077 +799 -17.30768868103814 +800 -17.307547652887003 +801 -17.307406971649527 +802 -17.30726663554195 +803 -17.307126642793737 +804 -17.306986991647555 +805 -17.30684768035909 +806 -17.30670870719694 +807 -17.306570070442543 +808 -17.306431768390038 +809 -17.30629379934616 +810 -17.306156161630128 +811 -17.306018853573566 +812 -17.305881873520345 +813 -17.305745219826537 +814 -17.30560889086027 +815 -17.305472885001635 +816 -17.30533720064261 +817 -17.305201836186896 +818 -17.30506679004989 +819 -17.304932060658533 +820 -17.304797646451238 +821 -17.3046635458778 +822 -17.30452975739925 +823 -17.30439627948783 +824 -17.30426311062682 +825 -17.304130249310525 +826 -17.303997694044117 +827 -17.30386544334358 +828 -17.3037334957356 +829 -17.303601849757463 +830 -17.303470503957016 +831 -17.30333945689252 +832 -17.303208707132583 +833 -17.303078253256086 +834 -17.302948093852073 +835 -17.302818227519683 +836 -17.302688652868056 +837 -17.30255936851625 +838 -17.30243037309315 +839 -17.302301665237405 +840 -17.30217324359732 +841 -17.302045106830796 +842 -17.30191725360524 +843 -17.301789682597473 +844 -17.30166239249367 +845 -17.301535381989282 +846 -17.301408649788954 +847 -17.301282194606397 +848 -17.30115601516441 +849 -17.301030110194738 +850 -17.300904478438007 +851 -17.300779118643646 +852 -17.300654029569813 +853 -17.300529209983353 +854 -17.300404658659694 +855 -17.30028037438275 +856 -17.30015635594493 +857 -17.300032602146985 +858 -17.299909111797987 +859 -17.29978588371522 +860 -17.299662916724174 +861 -17.2995402096584 +862 -17.2994177613595 +863 -17.29929557067704 +864 -17.29917363646848 +865 -17.2990519575991 +866 -17.29893053294196 +867 -17.298809361377828 +868 -17.298688441795093 +869 -17.29856777308972 +870 -17.29844735416519 +871 -17.29832718393244 +872 -17.29820726130977 +873 -17.298087585222824 +874 -17.297968154604515 +875 -17.29784896839494 +876 -17.29773002554136 +877 -17.2976113249981 +878 -17.29749286572653 +879 -17.29737464669497 +880 -17.29725666687869 +881 -17.29713892525975 +882 -17.297021420827065 +883 -17.29690415257625 +884 -17.296787119509627 +885 -17.296670320636153 +886 -17.29655375497133 +887 -17.29643742153722 +888 -17.296321319362324 +889 -17.296205447481558 +890 -17.296089804936216 +891 -17.295974390773885 +892 -17.29585920404842 +893 -17.29574424381988 +894 -17.29562950915446 +895 -17.29551499912449 +896 -17.29540071280833 +897 -17.29528664929036 +898 -17.29517280766091 +899 -17.295059187016214 +900 -17.294945786458364 +901 -17.29483260509527 +902 -17.29471964204059 +903 -17.294606896413722 +904 -17.294494367339716 +905 -17.29438205394924 +906 -17.294269955378564 +907 -17.294158070769466 +908 -17.294046399269224 +909 -17.293934940030542 +910 -17.293823692211557 +911 -17.293712654975725 +912 -17.293601827491837 +913 -17.29349120893393 +914 -17.293380798481287 +915 -17.293270595318365 +916 -17.293160598634756 +917 -17.29305080762517 +918 -17.29294122148935 +919 -17.292831839432083 +920 -17.292722660663124 +921 -17.292613684397132 +922 -17.292504909853733 +923 -17.29239633625735 +924 -17.29228796283725 +925 -17.292179788827468 +926 -17.2920718134668 +927 -17.291964035998728 +928 -17.2918564556714 +929 -17.291749071737613 +930 -17.29164188345473 +931 -17.291534890084684 +932 -17.291428090893916 +933 -17.29132148515336 +934 -17.29121507213839 +935 -17.291108851128786 +936 -17.291002821408718 +937 -17.290896982266688 +938 -17.290791332995504 +939 -17.290685872892244 +940 -17.29058060125822 +941 -17.290475517398967 +942 -17.290370620624188 +943 -17.290265910247697 +944 -17.290161385587435 +945 -17.290057045965423 +946 -17.289952890707706 +947 -17.28984891914434 +948 -17.289745130609365 +949 -17.28964152444076 +950 -17.289538099980422 +951 -17.289434856574143 +952 -17.28933179357154 +953 -17.28922891032608 +954 -17.289126206195004 +955 -17.28902368053933 +956 -17.2889213327238 +957 -17.28881916211686 +958 -17.288717168090635 +959 -17.288615350020898 +960 -17.28851370728704 +961 -17.28841223927203 +962 -17.28831094536242 +963 -17.28820982494826 +964 -17.288108877423156 +965 -17.288008102184158 +966 -17.28790749863176 +967 -17.287807066169925 +968 -17.287706804205964 +969 -17.287606712150595 +970 -17.28750678941787 +971 -17.287407035425144 +972 -17.287307449593104 +973 -17.287208031345685 +974 -17.287108780110046 +975 -17.287009695316602 +976 -17.286910776398937 +977 -17.286812022793814 +978 -17.28671343394114 +979 -17.286615009283942 +980 -17.286516748268333 +981 -17.28641865034352 +982 -17.286320714961743 +983 -17.28622294157828 +984 -17.286125329651394 +985 -17.28602787864235 +986 -17.285930588015347 +987 -17.285833457237544 +988 -17.28573648577899 +989 -17.285639673112634 +990 -17.2855430187143 +991 -17.285446522062646 +992 -17.285350182639164 +993 -17.28525399992813 +994 -17.285157973416634 +995 -17.28506210259451 +996 -17.284966386954316 +997 -17.284870825991355 +998 -17.284775419203626 +999 -17.284680166091796 +1000 -17.284585066159188 +1001 -17.284490118911776 +1002 -17.28439532385815 +1003 -17.28430068050949 +1004 -17.284206188379553 +1005 -17.284111846984683 +1006 -17.28401765584374 +1007 -17.283923614478102 +1008 -17.283829722411674 +1009 -17.28373597917082 +1010 -17.283642384284384 +1011 -17.28354893728367 +1012 -17.283455637702374 +1013 -17.283362485076644 +1014 -17.283269478944998 +1015 -17.283176618848337 +1016 -17.28308390432992 +1017 -17.282991334935335 +1018 -17.282898910212516 +1019 -17.28280662971169 +1020 -17.282714492985377 +1021 -17.28262249958836 +1022 -17.28253064907768 +1023 -17.28243894101265 +1024 -17.282347374954746 +1025 -17.282255950467693 +1026 -17.282164667117414 +1027 -17.28207352447196 +1028 -17.281982522101586 +1029 -17.281891659578662 +1030 -17.28180093647772 +1031 -17.28171035237535 +1032 -17.28161990685028 +1033 -17.281529599483306 +1034 -17.281439429857297 +1035 -17.281349397557157 +1036 -17.281259502169846 +1037 -17.281169743284323 +1038 -17.281080120491588 +1039 -17.280990633384583 +1040 -17.280901281558283 +1041 -17.280812064609588 +1042 -17.280722982137355 +1043 -17.2806340337424 +1044 -17.280545219027438 +1045 -17.280456537597086 +1046 -17.280367989057883 +1047 -17.280279573018234 +1048 -17.28019128908839 +1049 -17.280103136880502 +1050 -17.280015116008524 +1051 -17.279927226088255 +1052 -17.279839466737315 +1053 -17.2797518375751 +1054 -17.279664338222826 +1055 -17.27957696830347 +1056 -17.279489727441774 +1057 -17.279402615264253 +1058 -17.279315631399104 +1059 -17.279228775476323 +1060 -17.279142047127575 +1061 -17.279055445986252 +1062 -17.27896897168742 +1063 -17.27888262386783 +1064 -17.27879640216591 +1065 -17.278710306221726 +1066 -17.278624335677012 +1067 -17.278538490175123 +1068 -17.278452769361017 +1069 -17.278367172881314 +1070 -17.278281700384174 +1071 -17.27819635151938 +1072 -17.27811112593829 +1073 -17.27802602329382 +1074 -17.277941043240446 +1075 -17.27785618543419 +1076 -17.277771449532604 +1077 -17.27768683519478 +1078 -17.277602342081288 +1079 -17.277517969854244 +1080 -17.277433718177228 +1081 -17.27734958671532 +1082 -17.277265575135058 +1083 -17.277181683104455 +1084 -17.27709791029297 +1085 -17.277014256371505 +1086 -17.2769307210124 +1087 -17.2768473038894 +1088 -17.276764004677705 +1089 -17.27668082305388 +1090 -17.276597758695893 +1091 -17.276514811283118 +1092 -17.276431980496273 +1093 -17.276349266017473 +1094 -17.276266667530187 +1095 -17.276184184719195 +1096 -17.27610181727068 +1097 -17.276019564872097 +1098 -17.275937427212256 +1099 -17.27585540398129 +1100 -17.27577349487059 +1101 -17.27569169957289 +1102 -17.275610017782206 +1103 -17.27552844919379 +1104 -17.275446993504225 +1105 -17.275365650411302 +1106 -17.275284419614103 +1107 -17.27520330081295 +1108 -17.275122293709394 +1109 -17.275041398006206 +1110 -17.274960613407394 +1111 -17.274879939618184 +1112 -17.27479937634499 +1113 -17.27471892329544 +1114 -17.274638580178344 +1115 -17.274558346703685 +1116 -17.274478222582644 +1117 -17.274398207527547 +1118 -17.2743183012519 +1119 -17.274238503470336 +1120 -17.27415881389865 +1121 -17.274079232253786 +1122 -17.273999758253787 +1123 -17.273920391617832 +1124 -17.27384113206624 +1125 -17.273761979320394 +1126 -17.273682933102823 +1127 -17.273603993137108 +1128 -17.273525159147958 +1129 -17.27344643086114 +1130 -17.273367808003492 +1131 -17.273289290302934 +1132 -17.273210877488435 +1133 -17.273132569290034 +1134 -17.27305436543879 +1135 -17.272976265666824 +1136 -17.272898269707287 +1137 -17.27282037729435 +1138 -17.27274258816323 +1139 -17.272664902050117 +1140 -17.27258731869225 +1141 -17.27250983782784 +1142 -17.272432459196118 +1143 -17.272355182537297 +1144 -17.27227800759257 +1145 -17.272200934104106 +1146 -17.27212396181505 +1147 -17.27204709046952 +1148 -17.271970319812585 +1149 -17.271893649590268 +1150 -17.271817079549557 +1151 -17.27174060943834 +1152 -17.271664239005496 +1153 -17.2715879680008 +1154 -17.27151179617497 +1155 -17.271435723279623 +1156 -17.27135974906732 +1157 -17.271283873291505 +1158 -17.271208095706545 +1159 -17.271132416067687 +1160 -17.271056834131087 +1161 -17.270981349653777 +1162 -17.270905962393684 +1163 -17.270830672109586 +1164 -17.27075547856116 +1165 -17.27068038150894 +1166 -17.270605380714322 +1167 -17.270530475939555 +1168 -17.27045566694774 +1169 -17.270380953502833 +1170 -17.270306335369618 +1171 -17.27023181231372 +1172 -17.27015738410159 +1173 -17.27008305050054 +1174 -17.27000881127864 +1175 -17.26993466620484 +1176 -17.269860615048852 +1177 -17.26978665758124 +1178 -17.269712793573348 +1179 -17.269639022797307 +1180 -17.269565345026056 +1181 -17.269491760033336 +1182 -17.269418267593647 +1183 -17.269344867482282 +1184 -17.269271559475307 +1185 -17.269198343349565 +1186 -17.269125218882657 +1187 -17.26905218585294 +1188 -17.268979244039564 +1189 -17.26890639322238 +1190 -17.26883363318203 +1191 -17.2687609636999 +1192 -17.268688384558086 +1193 -17.268615895539448 +1194 -17.268543496427576 +1195 -17.26847118700676 +1196 -17.26839896706207 +1197 -17.268326836379252 +1198 -17.268254794744777 +1199 -17.26818284194583 +1200 -17.268110977770323 +1201 -17.268039202006847 +1202 -17.267967514444706 +1203 -17.26789591487389 +1204 -17.26782440308511 +1205 -17.26775297886974 +1206 -17.267681642019845 +1207 -17.267610392328173 +1208 -17.26753922958816 +1209 -17.267468153593907 +1210 -17.267397164140167 +1211 -17.267326261022415 +1212 -17.267255444036728 +1213 -17.267184712979883 +1214 -17.2671140676493 +1215 -17.267043507843045 +1216 -17.266973033359847 +1217 -17.266902643999064 +1218 -17.26683233956073 +1219 -17.266762119845467 +1220 -17.26669198465458 +1221 -17.266621933789985 +1222 -17.266551967054223 +1223 -17.266482084250473 +1224 -17.266412285182525 +1225 -17.266342569654793 +1226 -17.266272937472316 +1227 -17.266203388440736 +1228 -17.2661339223663 +1229 -17.266064539055865 +1230 -17.265995238316904 +1231 -17.265926019957465 +1232 -17.26585688378621 +1233 -17.265787829612393 +1234 -17.265718857245865 +1235 -17.265649966497048 +1236 -17.265581157176957 +1237 -17.265512429097193 +1238 -17.26544378206993 +1239 -17.265375215907913 +1240 -17.26530673042448 +1241 -17.26523832543352 +1242 -17.26517000074948 +1243 -17.265101756187413 +1244 -17.265033591562876 +1245 -17.26496550669204 +1246 -17.264897501391587 +1247 -17.264829575478775 +1248 -17.26476172877141 +1249 -17.264693961087843 +1250 -17.264626272246975 +1251 -17.26455866206823 +1252 -17.264491130371596 +1253 -17.264423676977586 +1254 -17.26435630170724 +1255 -17.26428900438215 +1256 -17.264221784824404 +1257 -17.26415464285666 +1258 -17.264087578302043 +1259 -17.264020590984256 +1260 -17.263953680727486 +1261 -17.263886847356446 +1262 -17.26382009069636 +1263 -17.263753410572974 +1264 -17.26368680681252 +1265 -17.263620279241756 +1266 -17.26355382768793 +1267 -17.2634874519788 +1268 -17.26342115194263 +1269 -17.263354927408155 +1270 -17.263288778204632 +1271 -17.263222704161784 +1272 -17.26315670510985 +1273 -17.263090780879537 +1274 -17.26302493130205 +1275 -17.26295915620905 +1276 -17.262893455432714 +1277 -17.262827828805673 +1278 -17.26276227616104 +1279 -17.2626967973324 +1280 -17.262631392153814 +1281 -17.262566060459815 +1282 -17.262500802085388 +1283 -17.26243561686599 +1284 -17.262370504637556 +1285 -17.26230546523645 +1286 -17.262240498499526 +1287 -17.262175604264073 +1288 -17.26211078236784 +1289 -17.262046032649035 +1290 -17.2619813549463 +1291 -17.261916749098752 +1292 -17.26185221494593 +1293 -17.261787752327812 +1294 -17.26172336108484 +1295 -17.2616590410579 +1296 -17.261594792088278 +1297 -17.26153061401773 +1298 -17.261466506688436 +1299 -17.261402469943008 +1300 -17.26133850362448 +1301 -17.261274607576336 +1302 -17.26121078164248 +1303 -17.261147025667203 +1304 -17.26108333949527 +1305 -17.261019722971845 +1306 -17.260956175942503 +1307 -17.260892698253258 +1308 -17.260829289750504 +1309 -17.26076595028109 +1310 -17.26070267969225 +1311 -17.260639477831635 +1312 -17.2605763445473 +1313 -17.26051327968772 +1314 -17.260450283101754 +1315 -17.26038735463868 +1316 -17.26032449414816 +1317 -17.26026170148029 +1318 -17.26019897648552 +1319 -17.260136319014727 +1320 -17.260073728919163 +1321 -17.26001120605049 +1322 -17.259948750260747 +1323 -17.259886361402373 +1324 -17.25982403932818 +1325 -17.25976178389139 +1326 -17.259699594945573 +1327 -17.259637472344725 +1328 -17.25957541594319 +1329 -17.259513425595706 +1330 -17.259451501157386 +1331 -17.259389642483725 +1332 -17.259327849430573 +1333 -17.259266121854186 +1334 -17.259204459611162 +1335 -17.259142862558484 +1336 -17.259081330553506 +1337 -17.259019863453936 +1338 -17.258958461117864 +1339 -17.258897123403734 +1340 -17.258835850170353 +1341 -17.258774641276894 +1342 -17.25871349658289 +1343 -17.258652415948216 +1344 -17.258591399233136 +1345 -17.25853044629824 +1346 -17.25846955700449 +1347 -17.258408731213187 +1348 -17.258347968786005 +1349 -17.258287269584933 +1350 -17.25822663347234 +1351 -17.25816606031094 +1352 -17.258105549963766 +1353 -17.258045102294222 +1354 -17.25798471716605 +1355 -17.25792439444332 +1356 -17.257864133990473 +1357 -17.257803935672243 +1358 -17.25774379935375 +1359 -17.257683724900406 +1360 -17.257623712178 +1361 -17.257563761052616 +1362 -17.2575038713907 +1363 -17.257444043059024 +1364 -17.257384275924668 +1365 -17.25732456985508 +1366 -17.257264924717994 +1367 -17.257205340381486 +1368 -17.25714581671398 +1369 -17.25708635358418 +1370 -17.257026950861153 +1371 -17.256967608414264 +1372 -17.256908326113198 +1373 -17.256849103827978 +1374 -17.25678994142892 +1375 -17.256730838786684 +1376 -17.256671795772206 +1377 -17.256612812256783 +1378 -17.256553888111984 +1379 -17.25649502320972 +1380 -17.256436217422188 +1381 -17.256377470621914 +1382 -17.256318782681728 +1383 -17.25626015347476 +1384 -17.256201582874443 +1385 -17.256143070754536 +1386 -17.256084616989078 +1387 -17.25602622145242 +1388 -17.255967884019213 +1389 -17.255909604564426 +1390 -17.255851382963293 +1391 -17.25579321909138 +1392 -17.255735112824528 +1393 -17.25567706403888 +1394 -17.255619072610877 +1395 -17.255561138417256 +1396 -17.25550326133505 +1397 -17.25544544124157 +1398 -17.255387678014426 +1399 -17.255329971531516 +1400 -17.25527232167103 +1401 -17.25521472831145 +1402 -17.25515719133154 +1403 -17.255099710610345 +1404 -17.2550422860272 +1405 -17.25498491746172 +1406 -17.254927604793806 +1407 -17.254870347903648 +1408 -17.254813146671705 +1409 -17.254756000978713 +1410 -17.25469891070571 +1411 -17.25464187573398 +1412 -17.254584895945115 +1413 -17.254527971220952 +1414 -17.254471101443634 +1415 -17.25441428649556 +1416 -17.254357526259398 +1417 -17.254300820618106 +1418 -17.254244169454896 +1419 -17.254187572653265 +1420 -17.254131030096964 +1421 -17.254074541670022 +1422 -17.25401810725674 +1423 -17.253961726741682 +1424 -17.253905400009668 +1425 -17.25384912694579 +1426 -17.25379290743542 +1427 -17.25373674136415 +1428 -17.253680628617904 +1429 -17.253624569082795 +1430 -17.253568562645235 +1431 -17.253512609191883 +1432 -17.253456708609676 +1433 -17.25340086078579 +1434 -17.253345065607657 +1435 -17.253289322962985 +1436 -17.25323363273971 +1437 -17.253177994826046 +1438 -17.253122409110446 +1439 -17.253066875481622 +1440 -17.253011393828555 +1441 -17.25295596404043 +1442 -17.25290058600674 +1443 -17.25284525961719 +1444 -17.252789984761737 +1445 -17.252734761330604 +1446 -17.252679589214253 +1447 -17.25262446830338 +1448 -17.25256939848894 +1449 -17.25251437966213 +1450 -17.252459411714398 +1451 -17.252404494537426 +1452 -17.25234962802314 +1453 -17.252294812063703 +1454 -17.252240046551528 +1455 -17.25218533137927 +1456 -17.252130666439815 +1457 -17.252076051626297 +1458 -17.25202148683207 +1459 -17.251966971950758 +1460 -17.251912506876188 +1461 -17.251858091502434 +1462 -17.251803725723814 +1463 -17.251749409434872 +1464 -17.251695142530387 +1465 -17.251640924905374 +1466 -17.25158675645508 +1467 -17.25153263707497 +1468 -17.251478566660765 +1469 -17.25142454510839 +1470 -17.25137057231402 +1471 -17.251316648174047 +1472 -17.25126277258509 +1473 -17.251208945444 +1474 -17.251155166647862 +1475 -17.251101436093972 +1476 -17.251047753679856 +1477 -17.25099411930327 +1478 -17.250940532862188 +1479 -17.250886994254817 +1480 -17.25083350337956 +1481 -17.25078006013509 +1482 -17.25072666442024 +1483 -17.25067331613412 +1484 -17.25062001517602 +1485 -17.250566761445477 +1486 -17.25051355484221 +1487 -17.250460395266217 +1488 -17.250407282617644 +1489 -17.250354216796897 +1490 -17.250301197704594 +1491 -17.250248225241545 +1492 -17.2501952993088 +1493 -17.250142419807617 +1494 -17.250089586639454 +1495 -17.250036799706002 +1496 -17.24998405890915 +1497 -17.249931364151006 +1498 -17.249878715333878 +1499 -17.249826112360292 +1500 -17.249773555132993 +1501 -17.249721043554924 +1502 -17.249668577529235 +1503 -17.24961615695928 +1504 -17.24956378174864 +1505 -17.249511451801087 +1506 -17.2494591670206 +1507 -17.249406927311366 +1508 -17.24935473257778 +1509 -17.249302582724436 +1510 -17.249250477656137 +1511 -17.24919841727789 +1512 -17.249146401494883 +1513 -17.24909443021254 +1514 -17.249042503336476 +1515 -17.24899062077249 +1516 -17.24893878242659 +1517 -17.248886988204998 +1518 -17.248835238014113 +1519 -17.24878353176056 +1520 -17.248731869351133 +1521 -17.248680250692836 +1522 -17.248628675692874 +1523 -17.248577144258647 +1524 -17.248525656297748 +1525 -17.248474211717962 +1526 -17.248422810427275 +1527 -17.24837145233387 +1528 -17.24832013734611 +1529 -17.248268865372573 +1530 -17.24821763632201 +1531 -17.248166450103373 +1532 -17.248115306625802 +1533 -17.24806420579863 +1534 -17.248013147531385 +1535 -17.247962131733786 +1536 -17.247911158315716 +1537 -17.24786022718728 +1538 -17.24780933825877 +1539 -17.247758491440642 +1540 -17.247707686643555 +1541 -17.247656923778347 +1542 -17.24760620275606 +1543 -17.247555523487904 +1544 -17.247504885885277 +1545 -17.247454289859782 +1546 -17.247403735323168 +1547 -17.247353222187407 +1548 -17.247302750364632 +1549 -17.24725231976716 +1550 -17.24720193030751 +1551 -17.24715158189835 +1552 -17.247101274452564 +1553 -17.247051007883186 +1554 -17.24700078210347 +1555 -17.246950597026803 +1556 -17.24690045256678 +1557 -17.246850348637174 +1558 -17.24680028515194 +1559 -17.24675026202519 +1560 -17.24670027917123 +1561 -17.24665033650455 +1562 -17.24660043393981 +1563 -17.246550571391833 +1564 -17.246500748775638 +1565 -17.246450966006396 +1566 -17.246401222999488 +1567 -17.246351519670444 +1568 -17.246301855934966 +1569 -17.246252231708954 +1570 -17.24620264690844 +1571 -17.246153101449668 +1572 -17.246103595249046 +1573 -17.246054128223143 +1574 -17.246004700288694 +1575 -17.24595531136263 +1576 -17.245905961362034 +1577 -17.245856650204146 +1578 -17.245807377806422 +1579 -17.24575814408644 +1580 -17.245708948961973 +1581 -17.245659792350942 +1582 -17.24561067417146 +1583 -17.245561594341797 +1584 -17.24551255278038 +1585 -17.24546354940582 +1586 -17.245414584136878 +1587 -17.245365656892503 +1588 -17.245316767591774 +1589 -17.245267916153978 +1590 -17.245219102498535 +1591 -17.245170326545043 +1592 -17.245121588213255 +1593 -17.2450728874231 +1594 -17.245024224094657 +1595 -17.24497559814818 +1596 -17.24492700950407 +1597 -17.24487845808291 +1598 -17.244829943805406 +1599 -17.244781466592492 +1600 -17.244733026365193 +1601 -17.24468462304474 +1602 -17.24463625655249 +1603 -17.24458792680999 +1604 -17.24453963373893 +1605 -17.244491377261166 +1606 -17.24444315729869 +1607 -17.244394973773694 +1608 -17.24434682660849 +1609 -17.244298715725552 +1610 -17.244250641047536 +1611 -17.24420260249723 +1612 -17.244154599997582 +1613 -17.244106633471702 +1614 -17.244058702842857 +1615 -17.24401080803445 +1616 -17.24396294897006 +1617 -17.243915125573416 +1618 -17.243867337768393 +1619 -17.243819585479017 +1620 -17.243771868629477 +1621 -17.243724187144114 +1622 -17.243676540947423 +1623 -17.24362892996403 +1624 -17.243581354118742 +1625 -17.24353381333649 +1626 -17.243486307542394 +1627 -17.243438836661667 +1628 -17.243391400619725 +1629 -17.243343999342105 +1630 -17.243296632754507 +1631 -17.24324930078277 +1632 -17.243202003352895 +1633 -17.243154740391 +1634 -17.243107511823403 +1635 -17.243060317576514 +1636 -17.24301315757692 +1637 -17.242966031751365 +1638 -17.242918940026726 +1639 -17.242871882330004 +1640 -17.24282485858838 +1641 -17.24277786872917 +1642 -17.242730912679836 +1643 -17.242683990367965 +1644 -17.242637101721325 +1645 -17.24259024666779 +1646 -17.24254342513541 +1647 -17.242496637052362 +1648 -17.242449882346964 +1649 -17.242403160947678 +1650 -17.24235647278312 +1651 -17.242309817782044 +1652 -17.242263195873328 +1653 -17.242216606986013 +1654 -17.24217005104926 +1655 -17.24212352799241 +1656 -17.242077037744902 +1657 -17.24203058023633 +1658 -17.241984155396434 +1659 -17.241937763155086 +1660 -17.241891403442295 +1661 -17.241845076188238 +1662 -17.24179878132318 +1663 -17.24175251877756 +1664 -17.24170628848195 +1665 -17.241660090367052 +1666 -17.2416139243637 +1667 -17.241567790402886 +1668 -17.241521688415716 +1669 -17.241475618333453 +1670 -17.241429580087484 +1671 -17.24138357360932 +1672 -17.241337598830633 +1673 -17.24129165568322 +1674 -17.241245744098993 +1675 -17.24119986401003 +1676 -17.241154015348542 +1677 -17.241108198046835 +1678 -17.241062412037394 +1679 -17.2410166572528 +1680 -17.2409709336258 +1681 -17.240925241089247 +1682 -17.240879579576145 +1683 -17.240833949019624 +1684 -17.240788349352947 +1685 -17.240742780509496 +1686 -17.240697242422797 +1687 -17.240651735026514 +1688 -17.240606258254417 +1689 -17.240560812040435 +1690 -17.24051539631861 +1691 -17.24047001102311 +1692 -17.240424656088248 +1693 -17.240379331448448 +1694 -17.24033403703828 +1695 -17.24028877279244 +1696 -17.24024353864573 +1697 -17.240198334533112 +1698 -17.240153160389657 +1699 -17.240108016150565 +1700 -17.240062901751166 +1701 -17.240017817126915 +1702 -17.23997276221341 +1703 -17.239927736946328 +1704 -17.23988274126154 +1705 -17.23983777509498 +1706 -17.23979283838275 +1707 -17.23974793106106 +1708 -17.239703053066243 +1709 -17.239658204334752 +1710 -17.23961338480319 +1711 -17.23956859440826 +1712 -17.23952383308679 +1713 -17.239479100775743 +1714 -17.2394343974122 +1715 -17.239389722933364 +1716 -17.239345077276553 +1717 -17.239300460379226 +1718 -17.23925587217895 +1719 -17.23921131261342 +1720 -17.239166781620444 +1721 -17.239122279137966 +1722 -17.239077805104046 +1723 -17.239033359456837 +1724 -17.238988942134668 +1725 -17.23894455307595 +1726 -17.238900192219205 +1727 -17.238855859503115 +1728 -17.238811554866448 +1729 -17.238767278248098 +1730 -17.238723029587096 +1731 -17.238678808822556 +1732 -17.23863461589375 +1733 -17.238590450740038 +1734 -17.23854631330093 +1735 -17.238502203516006 +1736 -17.238458121325017 +1737 -17.238414066667797 +1738 -17.238370039484295 +1739 -17.238326039714607 +1740 -17.238282067298915 +1741 -17.238238122177535 +1742 -17.23819420429089 +1743 -17.238150313579517 +1744 -17.238106449984087 +1745 -17.23806261344535 +1746 -17.238018803904215 +1747 -17.237975021301676 +1748 -17.23793126557884 +1749 -17.237887536676954 +1750 -17.23784383453735 +1751 -17.237800159101496 +1752 -17.237756510310966 +1753 -17.23771288810743 +1754 -17.23766929243271 +1755 -17.2376257232287 +1756 -17.237582180437435 +1757 -17.237538664001043 +1758 -17.23749517386177 +1759 -17.237451709961995 +1760 -17.23740827224418 +1761 -17.2373648606509 +1762 -17.237321475124865 +1763 -17.23727811560887 +1764 -17.23723478204584 +1765 -17.237191474378793 +1766 -17.23714819255088 +1767 -17.237104936505325 +1768 -17.237061706185514 +1769 -17.237018501534898 +1770 -17.236975322497045 +1771 -17.23693216901566 +1772 -17.236889041034523 +1773 -17.236845938497545 +1774 -17.23680286134873 +1775 -17.236759809532202 +1776 -17.23671678299219 +1777 -17.23667378167302 +1778 -17.236630805519148 +1779 -17.23658785447511 +1780 -17.236544928485575 +1781 -17.2365020274953 +1782 -17.23645915144915 +1783 -17.236416300292113 +1784 -17.236373473969273 +1785 -17.236330672425808 +1786 -17.23628789560701 +1787 -17.236245143458294 +1788 -17.236202415925156 +1789 -17.23615971295321 +1790 -17.236117034488167 +1791 -17.236074380475856 +1792 -17.23603175086218 +1793 -17.235989145593194 +1794 -17.235946564615023 +1795 -17.235904007873888 +1796 -17.235861475316142 +1797 -17.235818966888232 +1798 -17.235776482536696 +1799 -17.235734022208185 +1800 -17.235691585849445 +1801 -17.235649173407346 +1802 -17.23560678482882 +1803 -17.235564420060957 +1804 -17.2355220790509 +1805 -17.2354797617459 +1806 -17.23543746809334 +1807 -17.23539519804067 +1808 -17.23535295153548 +1809 -17.23531072852541 +1810 -17.235268528958237 +1811 -17.235226352781833 +1812 -17.235184199944158 +1813 -17.235142070393284 +1814 -17.23509996407738 +1815 -17.235057880944716 +1816 -17.235015820943648 +1817 -17.23497378402265 +1818 -17.23493177013029 +1819 -17.23488977921522 +1820 -17.234847811226206 +1821 -17.234805866112108 +1822 -17.234763943821886 +1823 -17.234722044304604 +1824 -17.2346801675094 +1825 -17.234638313385542 +1826 -17.234596481882377 +1827 -17.234554672949336 +1828 -17.234512886535974 +1829 -17.234471122591934 +1830 -17.234429381066946 +1831 -17.234387661910844 +1832 -17.234345965073555 +1833 -17.234304290505108 +1834 -17.234262638155627 +1835 -17.23422100797532 +1836 -17.234179399914506 +1837 -17.234137813923585 +1838 -17.234096249953062 +1839 -17.234054707953536 +1840 -17.234013187875696 +1841 -17.23397168967034 +1842 -17.23393021328832 +1843 -17.233888758680646 +1844 -17.233847325798354 +1845 -17.23380591459262 +1846 -17.233764525014703 +1847 -17.23372315701594 +1848 -17.23368181054778 +1849 -17.233640485561764 +1850 -17.233599182009506 +1851 -17.233557899842737 +1852 -17.23351663901326 +1853 -17.233475399472987 +1854 -17.233434181173894 +1855 -17.2333929840681 +1856 -17.23335180810777 +1857 -17.23331065324517 +1858 -17.23326951943266 +1859 -17.233228406622718 +1860 -17.23318731476785 +1861 -17.233146243820727 +1862 -17.233105193734055 +1863 -17.233064164460654 +1864 -17.23302315595343 +1865 -17.23298216816538 +1866 -17.23294120104958 +1867 -17.232900254559215 +1868 -17.232859328647553 +1869 -17.23281842326794 +1870 -17.232777538373828 +1871 -17.23273667391874 +1872 -17.232695829856297 +1873 -17.232655006140213 +1874 -17.23261420272428 +1875 -17.232573419562396 +1876 -17.232532656608516 +1877 -17.232491913816716 +1878 -17.232451191141138 +1879 -17.23241048853602 +1880 -17.232369805955685 +1881 -17.232329143354548 +1882 -17.23228850068711 +1883 -17.232247877907945 +1884 -17.232207274971728 +1885 -17.232166691833225 +1886 -17.232126128447266 +1887 -17.232085584768797 +1888 -17.232045060752828 +1889 -17.23200455635445 +1890 -17.23196407152887 +1891 -17.231923606231344 +1892 -17.231883160417244 +1893 -17.23184273404199 +1894 -17.231802327061146 +1895 -17.231761939430292 +1896 -17.23172157110514 +1897 -17.23168122204148 +1898 -17.23164089219516 +1899 -17.23160058152214 +1900 -17.23156028997845 +1901 -17.231520017520218 +1902 -17.23147976410363 +1903 -17.231439529684973 +1904 -17.23139931422062 +1905 -17.23135911766703 +1906 -17.231318939980728 +1907 -17.231278781118327 +1908 -17.23123864103653 +1909 -17.231198519692125 +1910 -17.231158417041968 +1911 -17.231118333043003 +1912 -17.23107826765226 +1913 -17.231038220826854 +1914 -17.230998192523977 +1915 -17.23095818270089 +1916 -17.230918191314956 +1917 -17.230878218323607 +1918 -17.230838263684362 +1919 -17.23079832735482 +1920 -17.230758409292644 +1921 -17.23071850945561 +1922 -17.23067862780155 +1923 -17.230638764288376 +1924 -17.230598918874087 +1925 -17.230559091516774 +1926 -17.230519282174583 +1927 -17.230479490805756 +1928 -17.23043971736861 +1929 -17.230399961821544 +1930 -17.230360224123018 +1931 -17.230320504231603 +1932 -17.230280802105927 +1933 -17.2302411177047 +1934 -17.230201450986716 +1935 -17.230161801910835 +1936 -17.23012217043601 +1937 -17.23008255652126 +1938 -17.230042960125697 +1939 -17.230003381208494 +1940 -17.2299638197289 +1941 -17.22992427564626 +1942 -17.229884748919993 +1943 -17.229845239509576 +1944 -17.229805747374574 +1945 -17.22976627247463 +1946 -17.229726814769478 +1947 -17.22968737421889 +1948 -17.229647950782766 +1949 -17.22960854442103 +1950 -17.229569155093717 +1951 -17.229529782760917 +1952 -17.229490427382824 +1953 -17.22945108891968 +1954 -17.22941176733181 +1955 -17.229372462579615 +1956 -17.229333174623576 +1957 -17.229293903424242 +1958 -17.22925464894225 +1959 -17.229215411138288 +1960 -17.22917618997314 +1961 -17.229136985407663 +1962 -17.229097797402765 +1963 -17.229058625919453 +1964 -17.229019470918807 +1965 -17.228980332361967 +1966 -17.228941210210156 +1967 -17.228902104424666 +1968 -17.228863014966866 +1969 -17.228823941798197 +1970 -17.228784884880167 +1971 -17.22874584417437 +1972 -17.228706819642465 +1973 -17.228667811246183 +1974 -17.22862881894733 +1975 -17.228589842707784 +1976 -17.22855088248948 +1977 -17.22851193825446 +1978 -17.228473009964812 +1979 -17.228434097582696 +1980 -17.22839520107035 +1981 -17.228356320390084 +1982 -17.228317455504282 +1983 -17.22827860637539 +1984 -17.22823977296594 +1985 -17.22820095523851 +1986 -17.228162153155765 +1987 -17.228123366680457 +1988 -17.228084595775382 +1989 -17.22804584040341 +1990 -17.228007100527492 +1991 -17.227968376110653 +1992 -17.227929667115966 +1993 -17.227890973506597 +1994 -17.227852295245764 +1995 -17.227813632296773 +1996 -17.227774984622982 +1997 -17.22773635218783 +1998 -17.227697734954816 +1999 -17.227659132887513 +2000 -17.22762054594957 diff --git a/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log b/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log new file mode 100644 index 00000000..db4447c0 --- /dev/null +++ b/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log @@ -0,0 +1,39 @@ +2023-12-23T22:28:34.294 +== Config == +INIT_SIZE: 3 +GEN_TYP_SIZE: 2 +PARAMETERIZE_FLIP_GROUPS_BY_SZ: true +EPOCHS: 2000 +DistNat: DistUInt32 +TAG: v1 + +Building num_apps(gen_expr(...)) computation graph... + 10.137793584 seconds + +Initial adnodes_of_interest: +Dict("tysz2_gen_type_tbool" => 0.5, "tysz1_gen_type_tbool" => 0.5, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.5, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5, "sz1_succ_app" => 0.5, "sz1_succ_abs" => 0.5, "sz3_succ_abs" => 0.5, "sz3_succ_app" => 0.5, "sz2_succ_abs" => 0.5, "sz3_succ_var" => 0.5) +Inferring initial distribution... + 0.334806833 seconds +Saved num_apps dist to examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/dist_before.csv. + +Saving samples... +Saved samples to examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/terms_before.txt. + 5.357602125 seconds + +Initial logprob: -20.238481981031438 + +Training... + 23.875804334 seconds + +Final logprob: -17.22762054594957 +Drawing the target dataset is 20.3x more likely + +Learned adnodes_of_interest: +Dict("tysz2_gen_type_tbool" => 0.3408372476438081, "tysz1_gen_type_tbool" => 0.39501557295049866, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.6151878798944757, "sz2_succ_var" => 0.43468900171159863, "sz1_succ_var" => 0.5103724794228328, "sz1_succ_app" => 0.68419917231591, "sz1_succ_abs" => 0.2149167539907951, "sz3_succ_abs" => 0.25149682656466177, "sz3_succ_app" => 0.6712638585215596, "sz2_succ_abs" => 0.4236132578800875, "sz3_succ_var" => 0.5) +Inferring trained distribution... +Saved num_apps dist to examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=2000.csv. + +Saving samples... +Saved samples to examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt. + 3.1883675 seconds + diff --git a/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/terms_before.txt b/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/terms_before.txt new file mode 100644 index 00000000..cd541c29 --- /dev/null +++ b/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/terms_before.txt @@ -0,0 +1,200 @@ +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. true)) +(λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) true false (λx:Bool. (λy:Bool. λz:Bool. true) true) +(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. true) true ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) ((λx:Bool. λy:Bool -> Bool. true) true) +(λx:Bool. λy:Bool -> Bool. true) ((λx:Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false))) +λx:Bool -> Bool. false +(λx:Bool. (λy:Bool. false) false) false +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) false ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. λy:Bool. true))) +λx:Bool -> Bool. true +(λx:Bool. λy:Bool. λz:Bool. false) ((λx:Bool. true) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true))) +true +false +λx:Bool. (λy:Bool. y) ((λy:Bool. true) false) +true +λx:Bool -> Bool. x +(λx:Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) true true true +(λx:Bool -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. true) true) (λx:Bool. (λy:Bool. λz:Bool. true) x) +(λx:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:Bool. true) true)) +λx:Bool -> Bool. (λy:Bool -> Bool. λz:Bool. false) ((λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool -> Bool. false)) +false +λx:Bool -> Bool. true +λx:Bool -> Bool. true +λx:Bool -> Bool. (λy:Bool -> Bool. λz:Bool. false) x false +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. true)) (λx:Bool. x) +(λx:Bool. (λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. true)) ((λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) (λx:Bool. x)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) false +(λx:Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. true) false ((λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false)) (λx:Bool -> Bool. x false) +(λx:Bool. λy:Bool -> Bool. x) true +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false) true ((λx:Bool -> Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false))) +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true)) +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. λa:Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool. true) true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool. λz:Bool. true) true)) +λx:Bool. x +(λx:Bool. λy:Bool -> Bool. x) true +false +λx:Bool -> Bool. true +(λx:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:Bool. true) true)) +(λx:Bool. (λy:Bool. λz:Bool -> Bool. true) false) true +true +(λx:Bool. λy:(Bool -> Bool) -> Bool. false) false (λx:Bool -> Bool. true) +(λx:Bool. x) false +true +λx:Bool -> Bool. x false +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. true) ((λx:Bool. λy:Bool. λz:Bool. true) false) (λx:Bool. (λy:Bool. λz:Bool. true) x) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool -> Bool. λy:Bool. y) +λx:Bool. λy:Bool. (λz:(Bool -> Bool) -> Bool -> Bool. false) (λz:Bool -> Bool. λw:Bool. true) +λx:Bool. λy:Bool. y +false +λx:Bool. λy:Bool. (λz:Bool -> Bool -> Bool. false) (λz:Bool. λw:Bool. false) +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool. λy:Bool. true) true false) +false +(λx:Bool. (λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true))) +(λx:Bool -> Bool -> Bool. false) (λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. false)) +λx:Bool. false +(λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. true) true true ((λx:Bool. λy:Bool. λz:Bool. false) true) +true +true +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. true) true) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) true ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false))) +λx:Bool -> Bool. false +(λx:Bool. λy:Bool -> Bool. true) true +λx:Bool. x +(λx:(Bool -> Bool) -> Bool. x (λy:Bool. false)) ((λx:Bool. λy:Bool -> Bool. true) false) +false +λx:Bool -> Bool. (λy:Bool. λz:Bool. false) true +(λx:Bool. λy:(Bool -> Bool) -> Bool. true) true ((λx:Bool. λy:Bool -> Bool. false) true) +λx:Bool -> Bool. true +(λx:Bool -> Bool. (λy:Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool. true)) (λx:Bool. (λy:Bool. true) true) +(λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false) +λx:Bool -> Bool. x +λx:Bool. (λy:Bool. λz:Bool. λw:Bool. true) x false +(λx:Bool. λy:Bool. λz:Bool. true) ((λx:Bool. false) true) true +true +(λx:Bool. λy:Bool. false) true +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) ((λy:Bool. λz:Bool -> Bool. λw:Bool. false) false) +(λx:Bool. x) false +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) false ((λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false))) +false +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true)) (λx:Bool -> Bool. x) +false +false +(λx:Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) ((λx:Bool. true) true)) +(λx:Bool. λy:Bool -> Bool. x) ((λx:Bool. λy:Bool -> Bool. false) true ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. true))) +true +true +λx:Bool. (λy:(Bool -> Bool) -> Bool. true) ((λy:Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool. false)) +(λx:Bool. x) ((λx:Bool. λy:Bool -> Bool -> Bool. true) false ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true))) +(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. false) true ((λx:Bool. true) true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:Bool. λy:Bool. λz:Bool. true) true)) +λx:Bool. (λy:Bool. true) x +λx:Bool -> Bool. x +λx:Bool -> Bool. (λy:Bool. λz:Bool. true) true ((λy:Bool. false) false) +(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool. true) false) ((λx:(Bool -> Bool) -> Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. false))) +(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. false)) (λx:Bool. λy:Bool. y) +(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. false) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) (λx:Bool. false) (λx:Bool -> Bool. x)) +false +λx:Bool. true +false +(λx:Bool -> Bool -> Bool. false) ((λx:Bool. λy:Bool. λz:Bool. true) ((λx:Bool. true) false)) +(λx:Bool. (λy:Bool. false) false) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) true (λx:Bool -> Bool. λy:Bool. false)) +true +true +(λx:(Bool -> Bool) -> Bool. (λy:Bool. true) true) (λx:Bool -> Bool. (λy:Bool. true) false) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true))) +(λx:(Bool -> Bool) -> Bool. x) (λx:Bool -> Bool. (λy:Bool -> Bool. false) (λy:Bool. false)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) +(λx:Bool -> Bool. λy:Bool -> Bool -> Bool. true) (λx:Bool. false) (λx:Bool. λy:Bool. x) +(λx:Bool -> Bool. (λy:Bool. false) false) (λx:Bool. (λy:Bool. false) false) +false +false +λx:Bool -> Bool. x +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. true) (λx:Bool -> Bool. false) true false +(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. false) (λx:Bool. λy:Bool. true) false (λx:Bool. false) +λx:Bool -> Bool. (λy:Bool. false) ((λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. false)) +(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) true (λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. false) false)) +λx:Bool. λy:Bool. true +false +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. true) false) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) false ((λx:Bool -> Bool. true) (λx:Bool. true))) +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. false) (λx:Bool -> Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. true)) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) true (λx:Bool -> Bool. λy:Bool. false)) +false +false +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) false (λx:Bool -> Bool. false) (λx:Bool. λy:Bool. x) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. false) true +(λx:(Bool -> Bool) -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool -> Bool. false) false) ((λx:Bool. x) ((λx:Bool. false) false)) +false +λx:Bool -> Bool. false +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. false) false +λx:Bool -> Bool. true +false +false +(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. true) ((λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. x)) +true +(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. false) true ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. λy:Bool. false)) true +(λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. true) (λy:Bool -> Bool. false)) ((λx:Bool. λy:Bool. true) false false) +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. λa:Bool. true) (λx:Bool -> Bool. true) ((λx:Bool. false) true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:Bool. false) true)) +(λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) false (λx:Bool. true) +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. λa:Bool. false) true ((λx:Bool. λy:Bool -> Bool. true) false) true +false +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. x) false +(λx:Bool. (λy:Bool. λz:Bool -> Bool. false) x) ((λx:Bool. true) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false))) +(λx:Bool. x) false +true +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool. false) (λy:Bool. false)) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. false)) +(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool -> Bool. x) +(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false)) (λx:Bool. λy:Bool. true) +λx:Bool -> Bool. (λy:Bool. y) ((λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. true)) +(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) x) true +(λx:(Bool -> Bool) -> Bool. (λy:Bool. true) true) (λx:Bool -> Bool. false) +λx:Bool -> Bool. λy:Bool. (λz:Bool. false) y +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. y) (λx:Bool -> Bool. (λy:Bool. λz:Bool. false) false) +true +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. false) false +λx:Bool. (λy:Bool. λz:Bool. λw:Bool. true) false true +false +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) false (λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. true))) +λx:Bool. (λy:Bool. λz:Bool. false) false +true +λx:Bool. x +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. x) (λy:Bool -> Bool. false) +(λx:Bool. λy:Bool. λz:Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) ((λx:Bool. false) true)) +λx:Bool. x +(λx:Bool. (λy:Bool. true) x) false +λx:Bool -> Bool. true +λx:Bool. (λy:Bool. λz:Bool. false) true +λx:Bool -> Bool. true +(λx:Bool. λy:Bool. λz:Bool -> Bool. true) false ((λx:Bool. false) false) ((λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. true))) +λx:Bool -> Bool. x +false +λx:Bool -> Bool. false +true +true +false +λx:Bool -> Bool. true +false +λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. false) ((λy:Bool. λz:Bool. λw:Bool. true) x) +(λx:Bool -> Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false)) true +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) true false) +false +false +λx:Bool. (λy:Bool. λz:Bool -> Bool. false) true (λy:Bool. true) +(λx:Bool. (λy:Bool. true) true) ((λx:Bool. x) false) +true +(λx:Bool -> Bool. (λy:Bool. false) false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true))) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. x) +(λx:Bool. true) ((λx:Bool. false) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true))) +λx:Bool -> Bool. x +λx:Bool. x +true +true +(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. true)) true +λx:Bool -> Bool. (λy:Bool -> Bool. λz:Bool -> Bool. true) x (λy:Bool. false) +(λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. true) false (λx:Bool. false) +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool -> Bool. false) false (λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. λz:Bool. true) true ((λx:Bool. false) true)) +(λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false)) false +(λx:Bool. λy:Bool -> Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. x)) +(λx:Bool. (λy:Bool. λz:Bool -> Bool. false) false) true +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool. false) true) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) true ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true))) +λx:Bool. (λy:Bool -> Bool. y) (λy:Bool. true) +true +λx:Bool. λy:Bool. (λz:Bool. true) x +true +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) false ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true))) +(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. true) ((λx:Bool. λy:Bool -> Bool. true) false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) +true diff --git a/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt b/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt new file mode 100644 index 00000000..efcfd6df --- /dev/null +++ b/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt @@ -0,0 +1,200 @@ +(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. true) ((λx:Bool. λy:Bool -> Bool. true) false) (λx:Bool. x) +true +true +(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. false) (λy:Bool. λz:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. x)) +λx:Bool -> Bool. x +(λx:Bool. λy:Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) false ((λx:Bool. λy:Bool. true) false) ((λx:Bool. λy:Bool. false) true ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. false))) +(λx:Bool -> Bool -> Bool. (λy:Bool. λz:Bool. true) true) ((λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) false ((λx:Bool. λy:Bool. λz:Bool. true) true)) +λx:Bool. x +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. false) false (λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool -> Bool. true) true)) +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) x) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false))) +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. true) (λy:Bool -> Bool. true) +(λx:Bool. λy:(Bool -> Bool) -> Bool. false) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true)) ((λx:Bool. λy:Bool. λz:Bool -> Bool. false) true ((λx:Bool. false) false)) +true +λx:Bool -> Bool. λy:Bool. false +λx:Bool -> Bool. x +true +(λx:Bool. λy:Bool. λz:Bool. false) ((λx:Bool. false) false) false +λx:Bool. (λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool. false) ((λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. false)) +(λx:Bool. λy:Bool -> Bool. false) ((λx:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true))) +(λx:Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true)) ((λx:Bool. true) true) +(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. true))) +(λx:Bool. λy:Bool. y) ((λx:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. false) false ((λx:Bool. λy:Bool. false) false ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false))) +λx:Bool -> Bool. (λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λy:Bool. true) (λy:Bool -> Bool. λz:Bool. false) +(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true)) (λx:Bool -> Bool. true) +(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool. λz:Bool. false)) ((λx:Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. false) true ((λx:Bool. λy:Bool. true) false)) +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. x) ((λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool. λz:Bool. true)) +(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool. true) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. false) false ((λx:Bool. λy:Bool -> Bool. true) false)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. λy:Bool. false)) (λx:Bool -> Bool. false) +(λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) false ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false)) (λx:Bool. false) +(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. false)) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) false ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true)) +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool. true) (λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. x) (λx:Bool -> Bool. x)) +false +(λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. false) (λx:Bool. false) false ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. λy:Bool. false) false) +(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. false) false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true)) +λx:Bool. x +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. false)) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. false)) +λx:Bool -> Bool. true +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) false)) +true +(λx:Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. false) ((λx:Bool. false) true) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true))) +false +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) x) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false))) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λx:Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. true))) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. false) (λx:Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false))) +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. false) true)) +(λx:Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. true) (λx:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. λy:Bool. false)) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true))) +(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool. λz:Bool. false)) ((λx:Bool -> Bool. λy:Bool -> Bool -> Bool. false) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false))) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true))) +(λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. false))) +(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. false) true ((λx:Bool. λy:Bool. λz:Bool. true) true) false +false +(λx:(Bool -> Bool) -> Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) (λx:Bool. λy:Bool. false) (λx:Bool. λy:Bool. true)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. true)) false +false +(λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool. false) (λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. false) (λx:Bool -> Bool. false)) +true +true +(λx:Bool. (λy:Bool. true) x) false +(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool. λz:Bool. false)) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. false))) +(λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false))) +(λx:Bool -> Bool. x false) (λx:Bool. (λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. true)) +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool. true) (λy:Bool. false)) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool -> Bool. true)) +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) false (λx:Bool -> Bool. λy:Bool. true) true +λx:Bool -> Bool. (λy:Bool. λz:Bool -> Bool -> Bool. true) true (λy:Bool. λz:Bool. false) +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. false)) ((λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true))) +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. false) ((λy:Bool. λz:Bool -> Bool. true) false) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. true) false +(λx:Bool -> Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. false) (λx:Bool. x) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true))) +λx:Bool -> Bool. true +(λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) false ((λx:Bool. true) false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false))) +(λx:Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true)) ((λx:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false))) +(λx:Bool -> Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool. λz:Bool. false) false) false +λx:Bool. (λy:Bool. λz:Bool. false) x ((λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. true)) +λx:Bool -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) false ((λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. true)) +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. λa:Bool. true) true (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false))) +(λx:Bool -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool. false) true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. λy:Bool. true))) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true)) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true (λx:Bool. x)) +λx:Bool -> Bool. (λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) (λy:Bool. false) ((λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool. λz:Bool. false)) +λx:Bool -> Bool. λy:Bool. y +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) true ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false)) false +λx:Bool -> Bool. x +(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true) ((λx:Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true))) +true +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool. false) true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. false))) +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool. true) (λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. true))) +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. false)) false +(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. x) (λx:Bool -> Bool. λy:Bool. false) +(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true)) (λx:Bool -> Bool. (λy:Bool. true) false) +(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) false ((λx:Bool. false) false) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) false (λx:Bool -> Bool. false)) +(λx:Bool -> Bool. (λy:Bool. true) true) (λx:Bool. x) +(λx:Bool. true) true +(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. true) (λy:Bool -> Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false))) +λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. false) false (λy:Bool -> Bool. λz:Bool. false) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false)) ((λx:Bool. λy:Bool. false) false true) +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. false) false) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. false) (λx:Bool. λy:Bool. false) (λx:Bool -> Bool. false)) +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. true) (λx:Bool -> Bool. false) true ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. true))) +(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. false) true (λx:Bool. λy:Bool. false) false +(λx:Bool -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool. false) false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool. λz:Bool. false) true)) +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. true) false)) +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) false ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. true))) +(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false)) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. true))) +(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool -> Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool -> Bool. true) true)) +λx:Bool -> Bool. false +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. true) ((λx:Bool. true) true) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false))) +(λx:Bool. λy:Bool -> Bool. y) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true)) +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. true) false ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. true))) +(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool. λw:Bool. true) true) ((λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. false) (λx:Bool. true) false) +(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. λa:Bool. false) true true ((λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false))) +(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false)) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true) (λx:Bool. λy:Bool. true)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) false +true +true +(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. true) true ((λx:Bool. λy:Bool. λz:Bool. false) false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) true)) +(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool. false) false) ((λx:Bool. true) true) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. false) (λx:Bool. x) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) true false) +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool. λy:Bool. false) (λx:Bool -> Bool. x)) +(λx:Bool. x) ((λx:(Bool -> Bool) -> Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. false))) +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool -> Bool. true) false)) +(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) false ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true)) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true))) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool. (λy:Bool. true) false) +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. false)) true +true +(λx:Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. false) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) false +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false))) +(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool. λw:Bool. false) true) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. true)) +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. true) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true)) ((λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) false)) +(λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. true) (λy:Bool -> Bool. false)) false +(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool. true) false) (λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool -> Bool. false)) +(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool. false) false)) +(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool. (λy:Bool. λz:Bool. true) x) +(λx:Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool. true) true ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) false ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false)) +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. false) (x true) +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. false) x +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. x) +λx:Bool -> Bool. (λy:Bool. true) true +(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. true) true) true +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. false)) ((λx:Bool -> Bool. λy:Bool -> Bool -> Bool. false) (λx:Bool. false) (λx:Bool. λy:Bool. false)) +true +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. true) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. false)) +false +(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) true ((λx:Bool. false) false) (λx:Bool -> Bool. x) +λx:Bool. λy:Bool. y +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true)) (λx:Bool. (λy:Bool -> Bool. λz:Bool. false) (λy:Bool. false)) +(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. true)) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) +λx:Bool -> Bool. λy:Bool. (λz:Bool -> Bool. true) x +(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λx:Bool -> Bool. false) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. false) (λx:Bool -> Bool. false) true) +(λx:Bool -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true)) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool. true)) +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. true)) (λx:Bool -> Bool. λy:Bool. y) +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. true) (λx:Bool -> Bool. true) ((λx:Bool. true) false) (λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. false)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. false) true +(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool. true) true) ((λx:Bool -> Bool. λy:Bool -> Bool. false) ((λx:Bool. λy:Bool. false) true)) +false +true +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. false) ((λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. false)) +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. true) (λy:Bool -> Bool. true) ((λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. λz:Bool. true)) +(λx:(Bool -> Bool) -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. true)) false +λx:Bool -> Bool. λy:Bool. (λz:Bool -> Bool. true) x +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) true ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true))) +(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) x) true +(λx:Bool. λy:Bool. λz:Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) false) +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool. λy:Bool. false) false ((λx:Bool. true) true)) +λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) (λy:Bool -> Bool. false) (λy:Bool -> Bool. true) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. false) false +(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool. λz:Bool. true)) false +λx:Bool. x +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false) +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. λa:Bool. false) false (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false))) +(λx:Bool. λy:Bool -> Bool. y) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false))) +(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false)) +true +(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) x) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false)) +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. false) true) (λx:Bool -> Bool. x) +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) true ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. false)) (λx:Bool -> Bool. x) +λx:Bool -> Bool. true +(λx:Bool -> Bool. x) ((λx:Bool -> Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true))) +(λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)) +(λx:(Bool -> Bool) -> Bool. (λy:Bool. false) true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true))) +(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. true)) (λx:Bool -> Bool. true) +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. true) (λx:Bool -> Bool. false) false ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. true) false)) +(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool. true) (λy:Bool. false)) ((λx:Bool -> Bool -> Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true))) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. λy:Bool. false)) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. false))) +(λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool -> Bool. false) (λx:Bool. true)) ((λx:Bool. λy:Bool -> Bool -> Bool. true) false ((λx:Bool. λy:Bool. λz:Bool. false) false)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. true) (λx:Bool. x)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. false) false true +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. true) true ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. false) true (λx:Bool -> Bool. true)) +false +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) true +(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false))) +(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. true) true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool. λy:Bool. λz:Bool. true) false)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. false)) true +λx:Bool -> Bool. true +(λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. x) +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. y) ((λx:Bool. λy:Bool. λz:Bool. λw:Bool. true) true ((λx:Bool. false) false)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. λa:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. false)) ((λx:Bool. x) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true))) +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool. λz:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false)) +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool. false) false) ((λx:Bool. λy:Bool -> Bool -> Bool. false) true ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. false))) +λx:Bool -> Bool. λy:Bool. (λz:Bool -> Bool. false) (λz:Bool. false) diff --git a/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_before.csv b/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_before.csv new file mode 100644 index 00000000..d20e6394 --- /dev/null +++ b/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_before.csv @@ -0,0 +1,9 @@ +num_apps probability +0 0.3784722222222222 +1 0.10286458333333331 +2 0.15115017361111122 +3 0.14680989583333345 +4 0.11425781250000003 +5 0.06738281250000001 +6 0.03125 +7 0.007812500000000002 diff --git a/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=100.csv b/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=100.csv new file mode 100644 index 00000000..9700f62e --- /dev/null +++ b/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=100.csv @@ -0,0 +1,9 @@ +num_apps probability +0 0.3125572704145472 +1 0.07735489491608907 +2 0.13610854147514473 +3 0.15261066940220364 +4 0.1404676330301102 +5 0.10049392046673733 +6 0.059517793091192275 +7 0.020889277203975522 diff --git a/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=2000.csv b/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=2000.csv new file mode 100644 index 00000000..40de05c6 --- /dev/null +++ b/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=2000.csv @@ -0,0 +1,9 @@ +num_apps probability +0 0.16486577196496097 +1 0.047180881871368575 +2 0.10888985265933435 +3 0.15080968983713255 +4 0.1723462128044957 +5 0.16286665359517002 +6 0.10749048574248589 +7 0.08555045152505178 diff --git a/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=100.csv b/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=100.csv new file mode 100644 index 00000000..07b81577 --- /dev/null +++ b/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=100.csv @@ -0,0 +1,101 @@ +0 20.238481981031438 +1 20.212172303759335 +2 20.186130303707692 +3 20.160352655808524 +4 20.13483608957884 +5 20.10957738797502 +6 20.084573386274748 +7 20.059820970985776 +8 20.035317078780828 +9 20.01105869545803 +10 19.98704285492616 +11 19.96326663821411 +12 19.939727172504014 +13 19.916421630187337 +14 19.893347227943366 +15 19.870501225839668 +16 19.847880926453747 +17 19.82548367401553 +18 19.8033068535701 +19 19.781347890160117 +20 19.759604248027554 +21 19.738073429834124 +22 19.716752975899983 +23 19.69564046346033 +24 19.674733505939265 +25 19.654029752240692 +26 19.633526886055623 +27 19.613222625185664 +28 19.59311472088216 +29 19.57320095720061 +30 19.55347915036999 +31 19.533947148176708 +32 19.514602829362616 +33 19.495444103036867 +34 19.47646890810131 +35 19.457675212688983 +36 19.439061013615365 +37 19.42062433584222 +38 19.402363231953522 +39 19.384275781643346 +40 19.366360091215263 +41 19.34861429309307 +42 19.331036545342528 +43 19.313625031203838 +44 19.296377958634594 +45 19.279293559862914 +46 19.262370090950622 +47 19.245605831366078 +48 19.22899908356645 +49 19.212548172589344 +50 19.19625144565336 +51 19.180107271767454 +52 19.16411404134893 +53 19.148270165849734 +54 19.13257407739097 +55 19.11702422840531 +56 19.101619091287258 +57 19.086357158050944 +58 19.07123693999531 +59 19.05625696737652 +60 19.04141578908743 +61 19.026711972343875 +62 19.012144102377746 +63 18.997710782136487 +64 18.983410631989088 +65 18.969242289438228 +66 18.955204408838533 +67 18.94129566112076 +68 18.92751473352176 +69 18.913860329320084 +70 18.90033116757713 +71 18.886925982883632 +72 18.87364352511144 +73 18.8604825591704 +74 18.84744186477028 +75 18.834520236187473 +76 18.821716482036646 +77 18.809029425046884 +78 18.796457901842444 +79 18.784000762727977 +80 18.77165687147802 +81 18.759425105130767 +82 18.74730435378595 +83 18.735293520406767 +84 18.723391520625718 +85 18.71159728255436 +86 18.6999097465967 +87 18.688327865266398 +88 18.676850603007427 +89 18.66547693601835 +90 18.654205852079894 +91 18.64303635038597 +92 18.631967441377867 +93 18.620998146581776 +94 18.61012749844918 +95 18.599354540200554 +96 18.58867832567188 +97 18.578097919164094 +98 18.567612395295384 +99 18.557220838856253 +100 18.54692234466734 diff --git a/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv b/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv new file mode 100644 index 00000000..7ea98785 --- /dev/null +++ b/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv @@ -0,0 +1,2001 @@ +0 20.238481981031438 +1 20.212172303759335 +2 20.186130303707692 +3 20.160352655808524 +4 20.13483608957884 +5 20.10957738797502 +6 20.084573386274748 +7 20.059820970985776 +8 20.035317078780828 +9 20.01105869545803 +10 19.98704285492616 +11 19.96326663821411 +12 19.939727172504014 +13 19.916421630187337 +14 19.893347227943366 +15 19.870501225839668 +16 19.847880926453747 +17 19.82548367401553 +18 19.8033068535701 +19 19.781347890160117 +20 19.759604248027554 +21 19.738073429834124 +22 19.716752975899983 +23 19.69564046346033 +24 19.674733505939265 +25 19.654029752240692 +26 19.633526886055623 +27 19.613222625185664 +28 19.59311472088216 +29 19.57320095720061 +30 19.55347915036999 +31 19.533947148176708 +32 19.514602829362616 +33 19.495444103036867 +34 19.47646890810131 +35 19.457675212688983 +36 19.439061013615365 +37 19.42062433584222 +38 19.402363231953522 +39 19.384275781643346 +40 19.366360091215263 +41 19.34861429309307 +42 19.331036545342528 +43 19.313625031203838 +44 19.296377958634594 +45 19.279293559862914 +46 19.262370090950622 +47 19.245605831366078 +48 19.22899908356645 +49 19.212548172589344 +50 19.19625144565336 +51 19.180107271767454 +52 19.16411404134893 +53 19.148270165849734 +54 19.13257407739097 +55 19.11702422840531 +56 19.101619091287258 +57 19.086357158050944 +58 19.07123693999531 +59 19.05625696737652 +60 19.04141578908743 +61 19.026711972343875 +62 19.012144102377746 +63 18.997710782136487 +64 18.983410631989088 +65 18.969242289438228 +66 18.955204408838533 +67 18.94129566112076 +68 18.92751473352176 +69 18.913860329320084 +70 18.90033116757713 +71 18.886925982883632 +72 18.87364352511144 +73 18.8604825591704 +74 18.84744186477028 +75 18.834520236187473 +76 18.821716482036646 +77 18.809029425046884 +78 18.796457901842444 +79 18.784000762727977 +80 18.77165687147802 +81 18.759425105130767 +82 18.74730435378595 +83 18.735293520406767 +84 18.723391520625718 +85 18.71159728255436 +86 18.6999097465967 +87 18.688327865266398 +88 18.676850603007427 +89 18.66547693601835 +90 18.654205852079894 +91 18.64303635038597 +92 18.631967441377867 +93 18.620998146581776 +94 18.61012749844918 +95 18.599354540200554 +96 18.58867832567188 +97 18.578097919164094 +98 18.567612395295384 +99 18.557220838856253 +100 18.54692234466734 +101 18.536716017439755 +102 18.52660097163817 +103 18.516576331346325 +104 18.506641230135045 +105 18.49679481093267 +106 18.487036225897825 +107 18.47736463629458 +108 18.46777921236972 +109 18.458279133232367 +110 18.448863586735705 +111 18.439531769360762 +112 18.43028288610234 +113 18.421116150356923 +114 18.412030783812543 +115 18.403026016340597 +116 18.394101085889545 +117 18.385255238380466 +118 18.37648772760439 +119 18.367797815121406 +120 18.359184770161527 +121 18.350647869527194 +122 18.342186397497485 +123 18.3337996457339 +124 18.325486913187763 +125 18.317247506009114 +126 18.30908073745723 +127 18.300985927812466 +128 18.292962404289746 +129 18.285009500953276 +130 18.277126558632794 +131 18.269312924841117 +132 18.261567953693017 +133 18.253891005825448 +134 18.246281448319014 +135 18.23873865462068 +136 18.231262004467727 +137 18.223850883812943 +138 18.21650468475092 +139 18.209222805445517 +140 18.202004650058527 +141 18.19484962867933 +142 18.187757157255728 +143 18.18072665752579 +144 18.17375755695076 +145 18.166849288648926 +146 18.160001291330616 +147 18.153213009233994 +148 18.146483892061987 +149 18.13981339492003 +150 18.133200978254763 +151 18.126646107793704 +152 18.120148254485713 +153 18.113706894442295 +154 18.107321508879945 +155 18.10099158406309 +156 18.094716611248028 +157 18.088496086627547 +158 18.082329511276427 +159 18.076216391097645 +160 18.070156236769392 +161 18.06414856369279 +162 18.058192891940337 +163 18.052288746205157 +164 18.04643565575077 +165 18.040633154361792 +166 18.03488078029507 +167 18.02917807623166 +168 18.023524589229385 +169 18.01791987067602 +170 18.012363476243138 +171 18.006854965840564 +172 18.00139390357144 +173 17.995979857687814 +174 17.99061240054698 +175 17.985291108568212 +176 17.980015562190186 +177 17.974785345828852 +178 17.969600047835975 +179 17.96445926045808 +180 17.959362579796064 +181 17.954309605765157 +182 17.949299942055553 +183 17.944333196093417 +184 17.939408979002494 +185 17.934526905566063 +186 17.929686594189505 +187 17.92488766686325 +188 17.920129749126218 +189 17.915412470029658 +190 17.91073546210153 +191 17.906098361311248 +192 17.901500807034818 +193 17.896942442020535 +194 17.89242291235494 +195 17.887941867429287 +196 17.883498959906373 +197 17.879093845687763 +198 17.874726183881407 +199 17.870395636769675 +200 17.866101869777705 +201 17.861844551442154 +202 17.85762335338035 +203 17.853437950259735 +204 17.84928801976772 +205 17.845173242581822 +206 17.84109330234025 +207 17.837047885612744 +208 17.83303668187173 +209 17.829059383463893 +210 17.82511568558201 +211 17.8212052862371 +212 17.817327886230924 +213 17.813483189128753 +214 17.809670901232465 +215 17.805890731553966 +216 17.802142391788827 +217 17.798425596290308 +218 17.79474006204359 +219 17.791085508640368 +220 17.787461658253626 +221 17.783868235612793 +222 17.7803049679791 +223 17.776771585121207 +224 17.77326781929114 +225 17.769793405200453 +226 17.7663480799966 +227 17.76293158323973 +228 17.759543656879494 +229 17.756184045232285 +230 17.75285249495863 +231 17.749548755040863 +232 17.746272576761037 +233 17.743023713678998 +234 17.739801921610763 +235 17.73660695860714 +236 17.733438584932504 +237 17.73029656304382 +238 17.727180657569917 +239 17.72409063529093 +240 17.721026265118006 +241 17.71798731807316 +242 17.714973567269393 +243 17.711984787890977 +244 17.709020757173963 +245 17.706081254386888 +246 17.703166060811668 +247 17.7002749597247 +248 17.69740773637814 +249 17.694564177981388 +250 17.69174407368273 +251 17.688947214551227 +252 17.686173393558708 +253 17.683422405562016 +254 17.680694047285368 +255 17.677988117302952 +256 17.67530441602166 +257 17.672642745664014 +258 17.670002910251213 +259 17.667384715586437 +260 17.664787969238244 +261 17.662212480524154 +262 17.6596580604944 +263 17.65712452191584 +264 17.654611679256018 +265 17.65211934866738 +266 17.649647347971694 +267 17.647195496644493 +268 17.644763615799874 +269 17.64235152817524 +270 17.639959058116325 +271 17.637586031562314 +272 17.635232276031093 +273 17.632897620604712 +274 17.630581895914897 +275 17.62828493412877 +276 17.626006568934688 +277 17.623746635528196 +278 17.621504970598153 +279 17.619281412312965 +280 17.617075800306974 +281 17.614887975666935 +282 17.61271778091868 +283 17.61056506001387 +284 17.608429658316872 +285 17.606311422591816 +286 17.604210200989662 +287 17.602125843035548 +288 17.600058199616118 +289 17.59800712296702 +290 17.595972466660584 +291 17.5939540855935 +292 17.591951835974704 +293 17.58996557531337 +294 17.587995162406948 +295 17.5860404573294 +296 17.584101321419503 +297 17.582177617269252 +298 17.580269208712416 +299 17.57837596081316 +300 17.576497739854787 +301 17.57463441332861 +302 17.572785849922873 +303 17.570951919511838 +304 17.569132493144963 +305 17.567327443036103 +306 17.565536642552942 +307 17.563759966206415 +308 17.561997289640303 +309 17.560248489620857 +310 17.558513444026584 +311 17.556792031838082 +312 17.55508413312801 +313 17.55338962905108 +314 17.55170840183426 +315 17.550040334766944 +316 17.548385312191293 +317 17.54674321949263 +318 17.54511394308995 +319 17.54349737042648 +320 17.5418933899604 +321 17.540301891155536 +322 17.538722764472237 +323 17.537155901358307 +324 17.535601194240016 +325 17.534058536513186 +326 17.53252782253437 +327 17.53100894761212 +328 17.529501807998315 +329 17.528006300879603 +330 17.526522324368866 +331 17.52504977749684 +332 17.523588560203713 +333 17.52213857333093 +334 17.52069971861295 +335 17.51927189866913 +336 17.517855016995718 +337 17.51644897795785 +338 17.515053686781684 +339 17.513669049546543 +340 17.512294973177227 +341 17.51093136543626 +342 17.509578134916325 +343 17.50823519103275 +344 17.506902444015946 +345 17.50557980490413 +346 17.504267185535905 +347 17.502964498543015 +348 17.501671657343167 +349 17.500388576132877 +350 17.49911516988042 +351 17.497851354318794 +352 17.496597045938824 +353 17.495352161982257 +354 17.494116620434966 +355 17.49289034002021 +356 17.491673240191894 +357 17.490465241127996 +358 17.489266263724005 +359 17.48807622958636 +360 17.486895061026054 +361 17.48572268105221 +362 17.48455901336579 +363 17.483403982353295 +364 17.48225751308055 +365 17.481119531286566 +366 17.479989963377395 +367 17.478868736420157 +368 17.477755778136974 +369 17.47665101689907 +370 17.47555438172089 +371 17.474465802254272 +372 17.47338520878265 +373 17.472312532215348 +374 17.47124770408191 +375 17.470190656526476 +376 17.469141322302214 +377 17.468099634765807 +378 17.46706552787198 +379 17.466038936168083 +380 17.465019794788716 +381 17.464008039450448 +382 17.463003606446485 +383 17.46200643264149 +384 17.461016455466396 +385 17.46003361291329 +386 17.459057843530296 +387 17.45808908641657 +388 17.457127281217318 +389 17.45617236811882 +390 17.455224287843556 +391 17.454282981645335 +392 17.45334839130448 +393 17.452420459123115 +394 17.451499127920336 +395 17.450584341027646 +396 17.44967604228423 +397 17.448774176032416 +398 17.447878687113068 +399 17.44698952086112 +400 17.446106623101084 +401 17.445229940142614 +402 17.444359418776127 +403 17.44349500626843 +404 17.44263665035844 +405 17.44178429925288 +406 17.440937901622057 +407 17.44009740659569 +408 17.439262763758705 +409 17.438433923147155 +410 17.437610835244115 +411 17.436793450975657 +412 17.435981721706806 +413 17.43517559923763 +414 17.434375035799224 +415 17.43357998404987 +416 17.43279039707115 +417 17.43200622836413 +418 17.43122743184552 +419 17.430453961843988 +420 17.429685773096345 +421 17.42892282074395 +422 17.42816506032894 +423 17.427412447790715 +424 17.426664939462263 +425 17.425922492066636 +426 17.42518506271341 +427 17.42445260889519 +428 17.423725088484158 +429 17.42300245972862 +430 17.42228468124961 +431 17.421571712037533 +432 17.42086351144879 +433 17.42016003920252 +434 17.419461255377257 +435 17.41876712040773 +436 17.41807759508162 +437 17.41739264053637 +438 17.416712218256027 +439 17.416036290068096 +440 17.41536481814043 +441 17.41469776497819 +442 17.41403509342076 +443 17.413376766638702 +444 17.412722748130832 +445 17.412073001721197 +446 17.411427491556147 +447 17.410786182101422 +448 17.41014903813926 +449 17.40951602476555 +450 17.408887107386988 +451 17.40826225171825 +452 17.407641423779246 +453 17.407024589892313 +454 17.406411716679525 +455 17.40580277105995 +456 17.405197720246985 +457 17.404596531745696 +458 17.403999173350165 +459 17.403405613140887 +460 17.402815819482186 +461 17.40222976101964 +462 17.40164740667756 +463 17.401068725656437 +464 17.400493687430462 +465 17.399922261745076 +466 17.399354418614468 +467 17.398790128319195 +468 17.39822936140375 +469 17.397672088674184 +470 17.39711828119572 +471 17.39656791029046 +472 17.396020947535025 +473 17.39547736475825 +474 17.394937134038944 +475 17.394400227703592 +476 17.393866618324136 +477 17.39333627871576 +478 17.392809181934688 +479 17.39228530127599 +480 17.391764610271466 +481 17.391247082687446 +482 17.39073269252274 +483 17.390221414006497 +484 17.389713221596132 +485 17.389208089975238 +486 17.388705994051612 +487 17.388206908955162 +488 17.387710810035937 +489 17.38721767286213 +490 17.3867274732181 +491 17.386240187102434 +492 17.38575579072599 +493 17.38527426051003 +494 17.384795573084247 +495 17.38431970528495 +496 17.38384663415316 +497 17.383376336932777 +498 17.382908791068726 +499 17.382443974205202 +500 17.381981864183782 +501 17.381522439041735 +502 17.381065677010163 +503 17.38061155651236 +504 17.380160056161962 +505 17.37971115476131 +506 17.37926483129973 +507 17.37882106495182 +508 17.378379835075805 +509 17.37794112121186 +510 17.37750490308051 +511 17.377071160580925 +512 17.37663987378939 +513 17.376211022957662 +514 17.37578458851139 +515 17.375360551048566 +516 17.37493889133793 +517 17.374519590317508 +518 17.374102629092985 +519 17.373687988936275 +520 17.37327565128397 +521 17.372865597735867 +522 17.37245781005354 +523 17.372052270158814 +524 17.371648960132354 +525 17.371247862212236 +526 17.37084895879252 +527 17.37045223242185 +528 17.37005766580204 +529 17.369665241786727 +530 17.369274943379974 +531 17.368886753734923 +532 17.368500656152463 +533 17.368116634079886 +534 17.36773467110954 +535 17.367354750977608 +536 17.36697685756272 +537 17.366600974884694 +538 17.366227087103304 +539 17.36585517851698 +540 17.365485233561564 +541 17.365117236809073 +542 17.364751172966507 +543 17.36438702687456 +544 17.36402478350649 +545 17.363664427966878 +546 17.363305945490467 +547 17.362949321440993 +548 17.362594541310003 +549 17.36224159071572 +550 17.361890455401902 +551 17.361541121236698 +552 17.361193574211566 +553 17.360847800440098 +554 17.360503786156997 +555 17.360161517716918 +556 17.359820981593437 +557 17.359482164377965 +558 17.359145052778672 +559 17.358809633619465 +560 17.35847589383893 +561 17.358143820489296 +562 17.357813400735424 +563 17.357484621853796 +564 17.3571574712315 +565 17.35683193636523 +566 17.35650800486033 +567 17.356185664429788 +568 17.35586490289327 +569 17.355545708176187 +570 17.355228068308712 +571 17.354911971424862 +572 17.35459740576153 +573 17.35428435965764 +574 17.35397282155312 +575 17.35366277998808 +576 17.353354223601876 +577 17.353047141132215 +578 17.352741521414305 +579 17.352437353379923 +580 17.352134626056607 +581 17.35183332856677 +582 17.351533450126805 +583 17.351234980046346 +584 17.35093790772732 +585 17.35064222266319 +586 17.350347914438093 +587 17.35005497272605 +588 17.349763387290178 +589 17.34947314798181 +590 17.3491842447398 +591 17.34889666758969 +592 17.348610406642923 +593 17.3483254520961 +594 17.34804179423019 +595 17.347759423409812 +596 17.347478330082435 +597 17.347198504777655 +598 17.3469199381065 +599 17.34664262076062 +600 17.34636654351163 +601 17.346091697210372 +602 17.345818072786194 +603 17.345545661246256 +604 17.345274453674847 +605 17.34500444123266 +606 17.344735615156132 +607 17.34446796675678 +608 17.344201487420484 +609 17.34393616860686 +610 17.34367200184857 +611 17.34340897875071 +612 17.343147090990108 +613 17.342886330314737 +614 17.34262668854301 +615 17.342368157563243 +616 17.342110729332934 +617 17.341854395878197 +618 17.34159914929315 +619 17.341344981739272 +620 17.34109188544485 +621 17.340839852704324 +622 17.340588875877753 +623 17.340338947390187 +624 17.340090059731093 +625 17.339842205453795 +626 17.339595377174902 +627 17.339349567573706 +628 17.339104769391696 +629 17.338860975431913 +630 17.33861817855847 +631 17.33837637169596 +632 17.338135547828955 +633 17.33789570000144 +634 17.337656821316312 +635 17.337418904934797 +636 17.33718194407601 +637 17.33694593201639 +638 17.336710862089156 +639 17.33647672768389 +640 17.336243522245958 +641 17.336011239276047 +642 17.335779872329635 +643 17.33554941501659 +644 17.335319861000556 +645 17.33509120399859 +646 17.33486343778062 +647 17.334636556168995 +648 17.334410553038005 +649 17.33418542231346 +650 17.333961157972162 +651 17.333737754041504 +652 17.333515204599003 +653 17.33329350377186 +654 17.3330726457365 +655 17.332852624718157 +656 17.33263343499042 +657 17.332415070874813 +658 17.332197526740355 +659 17.331980797003187 +660 17.331764876126062 +661 17.331549758618024 +662 17.331335439033936 +663 17.331121911974087 +664 17.3309091720838 +665 17.330697214053046 +666 17.330486032615994 +667 17.330275622550662 +668 17.330065978678526 +669 17.329857095864096 +670 17.329648969014595 +671 17.32944159307953 +672 17.329234963050336 +673 17.32902907395998 +674 17.328823920882662 +675 17.32861949893335 +676 17.32841580326749 +677 17.32821282908063 +678 17.328010571608065 +679 17.32780902612445 +680 17.327608187943504 +681 17.327408052417642 +682 17.32720861493762 +683 17.32700987093222 +684 17.326811815867863 +685 17.326614445248367 +686 17.326417754614514 +687 17.326221739543794 +688 17.326026395650032 +689 17.32583171858311 +690 17.325637704028626 +691 17.325444347707577 +692 17.325251645376035 +693 17.325059592824864 +694 17.324868185879392 +695 17.324677420399127 +696 17.32448729227741 +697 17.324297797441183 +698 17.32410893185063 +699 17.323920691498927 +700 17.323733072411905 +701 17.323546070647822 +702 17.323359682297024 +703 17.323173903481692 +704 17.322988730355547 +705 17.322804159103573 +706 17.322620185941744 +707 17.322436807116755 +708 17.322254018905745 +709 17.32207181761604 +710 17.321890199584857 +711 17.321709161179076 +712 17.321528698794953 +713 17.32134880885789 +714 17.32116948782215 +715 17.320990732170603 +716 17.320812538414497 +717 17.3206349030932 +718 17.320457822773943 +719 17.32028129405157 +720 17.320105313548318 +721 17.319929877913566 +722 17.319754983823593 +723 17.319580627981324 +724 17.319406807116135 +725 17.319233517983612 +726 17.319060757365275 +727 17.318888522068406 +728 17.318716808925803 +729 17.318545614795546 +730 17.31837493656079 +731 17.318204771129537 +732 17.318035115434416 +733 17.31786596643249 +734 17.317697321104976 +735 17.31752917645715 +736 17.317361529518017 +737 17.317194377340158 +738 17.317027716999533 +739 17.316861545595252 +740 17.31669586024939 +741 17.31653065810677 +742 17.316365936334783 +743 17.316201692123173 +744 17.31603792268385 +745 17.315874625250697 +746 17.31571179707936 +747 17.315549435447114 +748 17.315387537652587 +749 17.315226101015664 +750 17.315065122877215 +751 17.314904600599 +752 17.314744531563402 +753 17.314584913173313 +754 17.314425742851917 +755 17.314267018042536 +756 17.31410873620845 +757 17.313950894832676 +758 17.313793491417897 +759 17.31363652348619 +760 17.313479988578912 +761 17.313323884256516 +762 17.313168208098393 +763 17.313012957702703 +764 17.312858130686195 +765 17.312703724684084 +766 17.312549737349848 +767 17.312396166355114 +768 17.31224300938945 +769 17.312090264160254 +770 17.311937928392567 +771 17.311785999828942 +772 17.31163447622928 +773 17.311483355370694 +774 17.31133263504733 +775 17.311182313070255 +776 17.311032387267282 +777 17.310882855482856 +778 17.310733715577868 +779 17.31058496542955 +780 17.31043660293132 +781 17.310288625992637 +782 17.31014103253887 +783 17.30999382051116 +784 17.30984698786627 +785 17.309700532576475 +786 17.30955445262941 +787 17.309408746027945 +788 17.309263410790045 +789 17.309118444948645 +790 17.30897384655153 +791 17.3088296136612 +792 17.30868574435472 +793 17.308542236723657 +794 17.30839908887387 +795 17.308256298925457 +796 17.308113865012615 +797 17.307971785283485 +798 17.30783005790008 +799 17.30768868103814 +800 17.30754765288701 +801 17.30740697164953 +802 17.307266635541946 +803 17.307126642793737 +804 17.30698699164756 +805 17.306847680359088 +806 17.306708707196943 +807 17.306570070442547 +808 17.306431768390034 +809 17.306293799346157 +810 17.306156161630128 +811 17.306018853573562 +812 17.30588187352035 +813 17.305745219826537 +814 17.305608890860274 +815 17.30547288500164 +816 17.305337200642608 +817 17.305201836186892 +818 17.305066790049885 +819 17.304932060658533 +820 17.30479764645124 +821 17.3046635458778 +822 17.30452975739925 +823 17.304396279487825 +824 17.30426311062682 +825 17.304130249310525 +826 17.30399769404412 +827 17.303865443343582 +828 17.303733495735592 +829 17.303601849757463 +830 17.303470503957016 +831 17.303339456892516 +832 17.303208707132583 +833 17.303078253256082 +834 17.302948093852073 +835 17.30281822751968 +836 17.302688652868056 +837 17.30255936851625 +838 17.302430373093152 +839 17.3023016652374 +840 17.30217324359732 +841 17.302045106830796 +842 17.301917253605236 +843 17.30178968259747 +844 17.301662392493675 +845 17.301535381989286 +846 17.301408649788947 +847 17.301282194606394 +848 17.301156015164413 +849 17.301030110194738 +850 17.300904478438007 +851 17.300779118643643 +852 17.300654029569813 +853 17.300529209983353 +854 17.300404658659687 +855 17.30028037438275 +856 17.300156355944928 +857 17.300032602146985 +858 17.299909111797984 +859 17.299785883715224 +860 17.29966291672417 +861 17.299540209658396 +862 17.2994177613595 +863 17.299295570677046 +864 17.299173636468474 +865 17.2990519575991 +866 17.29893053294196 +867 17.298809361377828 +868 17.29868844179509 +869 17.298567773089715 +870 17.29844735416519 +871 17.298327183932436 +872 17.29820726130977 +873 17.29808758522282 +874 17.29796815460452 +875 17.29784896839494 +876 17.29773002554135 +877 17.297611324998098 +878 17.297492865726532 +879 17.297374646694973 +880 17.29725666687869 +881 17.297138925259752 +882 17.297021420827065 +883 17.296904152576246 +884 17.29678711950963 +885 17.29667032063615 +886 17.296553754971338 +887 17.29643742153722 +888 17.296321319362328 +889 17.296205447481558 +890 17.296089804936216 +891 17.29597439077389 +892 17.295859204048423 +893 17.295744243819875 +894 17.29562950915446 +895 17.295514999124485 +896 17.29540071280833 +897 17.29528664929036 +898 17.295172807660915 +899 17.295059187016218 +900 17.294945786458364 +901 17.294832605095266 +902 17.294719642040594 +903 17.29460689641372 +904 17.294494367339716 +905 17.29438205394924 +906 17.294269955378567 +907 17.294158070769463 +908 17.29404639926922 +909 17.293934940030546 +910 17.293823692211557 +911 17.293712654975725 +912 17.293601827491837 +913 17.293491208933933 +914 17.293380798481287 +915 17.293270595318365 +916 17.29316059863476 +917 17.293050807625168 +918 17.29294122148935 +919 17.292831839432083 +920 17.29272266066312 +921 17.29261368439714 +922 17.292504909853733 +923 17.292396336257355 +924 17.292287962837246 +925 17.29217978882747 +926 17.292071813466805 +927 17.291964035998728 +928 17.291856455671404 +929 17.291749071737613 +930 17.29164188345473 +931 17.291534890084684 +932 17.291428090893916 +933 17.29132148515336 +934 17.291215072138392 +935 17.291108851128786 +936 17.291002821408725 +937 17.29089698226669 +938 17.2907913329955 +939 17.29068587289224 +940 17.290580601258224 +941 17.290475517398967 +942 17.290370620624184 +943 17.290265910247697 +944 17.29016138558743 +945 17.29005704596542 +946 17.289952890707696 +947 17.28984891914434 +948 17.28974513060936 +949 17.289641524440757 +950 17.289538099980426 +951 17.289434856574143 +952 17.289331793571545 +953 17.289228910326084 +954 17.289126206195004 +955 17.28902368053933 +956 17.2889213327238 +957 17.28881916211686 +958 17.28871716809063 +959 17.2886153500209 +960 17.288513707287038 +961 17.288412239272027 +962 17.28831094536241 +963 17.288209824948265 +964 17.288108877423156 +965 17.288008102184158 +966 17.28790749863176 +967 17.287807066169925 +968 17.287706804205968 +969 17.287606712150595 +970 17.287506789417865 +971 17.287407035425144 +972 17.287307449593108 +973 17.28720803134568 +974 17.287108780110053 +975 17.287009695316602 +976 17.286910776398937 +977 17.286812022793818 +978 17.28671343394115 +979 17.28661500928394 +980 17.286516748268337 +981 17.286418650343528 +982 17.286320714961743 +983 17.28622294157828 +984 17.286125329651398 +985 17.28602787864235 +986 17.285930588015347 +987 17.285833457237544 +988 17.285736485778987 +989 17.285639673112634 +990 17.285543018714296 +991 17.28544652206265 +992 17.285350182639164 +993 17.285253999928127 +994 17.28515797341663 +995 17.28506210259451 +996 17.284966386954316 +997 17.284870825991355 +998 17.284775419203626 +999 17.28468016609179 +1000 17.284585066159185 +1001 17.28449011891178 +1002 17.28439532385815 +1003 17.28430068050949 +1004 17.284206188379557 +1005 17.284111846984686 +1006 17.284017655843737 +1007 17.283923614478102 +1008 17.283829722411674 +1009 17.28373597917082 +1010 17.28364238428438 +1011 17.28354893728367 +1012 17.283455637702374 +1013 17.283362485076648 +1014 17.283269478944998 +1015 17.283176618848334 +1016 17.283083904329917 +1017 17.282991334935335 +1018 17.282898910212516 +1019 17.28280662971169 +1020 17.28271449298538 +1021 17.282622499588363 +1022 17.28253064907769 +1023 17.28243894101265 +1024 17.282347374954742 +1025 17.282255950467693 +1026 17.28216466711741 +1027 17.28207352447196 +1028 17.281982522101583 +1029 17.281891659578662 +1030 17.281800936477712 +1031 17.28171035237535 +1032 17.281619906850274 +1033 17.281529599483306 +1034 17.281439429857297 +1035 17.281349397557157 +1036 17.281259502169846 +1037 17.28116974328433 +1038 17.281080120491584 +1039 17.280990633384583 +1040 17.280901281558283 +1041 17.280812064609588 +1042 17.280722982137355 +1043 17.280634033742402 +1044 17.28054521902744 +1045 17.280456537597086 +1046 17.280367989057886 +1047 17.28027957301823 +1048 17.28019128908839 +1049 17.280103136880506 +1050 17.28001511600852 +1051 17.279927226088255 +1052 17.27983946673731 +1053 17.2797518375751 +1054 17.27966433822283 +1055 17.279576968303466 +1056 17.279489727441778 +1057 17.279402615264242 +1058 17.2793156313991 +1059 17.279228775476323 +1060 17.279142047127575 +1061 17.279055445986252 +1062 17.278968971687412 +1063 17.278882623867826 +1064 17.278796402165906 +1065 17.27871030622173 +1066 17.278624335677012 +1067 17.278538490175123 +1068 17.27845276936102 +1069 17.278367172881314 +1070 17.278281700384174 +1071 17.278196351519377 +1072 17.278111125938285 +1073 17.278026023293823 +1074 17.277941043240446 +1075 17.27785618543418 +1076 17.2777714495326 +1077 17.277686835194775 +1078 17.277602342081288 +1079 17.27751796985424 +1080 17.27743371817723 +1081 17.277349586715324 +1082 17.27726557513506 +1083 17.277181683104455 +1084 17.277097910292966 +1085 17.277014256371505 +1086 17.2769307210124 +1087 17.276847303889404 +1088 17.276764004677705 +1089 17.276680823053876 +1090 17.276597758695896 +1091 17.276514811283118 +1092 17.276431980496273 +1093 17.27634926601747 +1094 17.27626666753018 +1095 17.276184184719195 +1096 17.276101817270682 +1097 17.276019564872097 +1098 17.27593742721226 +1099 17.275855403981286 +1100 17.27577349487059 +1101 17.275691699572892 +1102 17.275610017782203 +1103 17.27552844919379 +1104 17.275446993504225 +1105 17.2753656504113 +1106 17.275284419614106 +1107 17.275203300812954 +1108 17.27512229370939 +1109 17.275041398006195 +1110 17.274960613407398 +1111 17.274879939618184 +1112 17.274799376344987 +1113 17.274718923295442 +1114 17.274638580178344 +1115 17.274558346703685 +1116 17.274478222582648 +1117 17.274398207527554 +1118 17.2743183012519 +1119 17.274238503470336 +1120 17.274158813898655 +1121 17.27407923225379 +1122 17.273999758253787 +1123 17.273920391617835 +1124 17.273841132066238 +1125 17.273761979320394 +1126 17.27368293310282 +1127 17.273603993137108 +1128 17.27352515914796 +1129 17.273446430861135 +1130 17.273367808003492 +1131 17.273289290302934 +1132 17.273210877488438 +1133 17.273132569290034 +1134 17.273054365438785 +1135 17.272976265666827 +1136 17.272898269707287 +1137 17.27282037729436 +1138 17.272742588163226 +1139 17.272664902050117 +1140 17.272587318692246 +1141 17.27250983782784 +1142 17.272432459196118 +1143 17.272355182537297 +1144 17.27227800759257 +1145 17.2722009341041 +1146 17.27212396181505 +1147 17.27204709046952 +1148 17.27197031981258 +1149 17.271893649590268 +1150 17.271817079549557 +1151 17.27174060943834 +1152 17.2716642390055 +1153 17.2715879680008 +1154 17.27151179617497 +1155 17.271435723279623 +1156 17.271359749067322 +1157 17.27128387329151 +1158 17.271208095706548 +1159 17.27113241606769 +1160 17.271056834131087 +1161 17.27098134965378 +1162 17.270905962393684 +1163 17.270830672109582 +1164 17.27075547856116 +1165 17.27068038150894 +1166 17.270605380714322 +1167 17.27053047593955 +1168 17.27045566694774 +1169 17.27038095350283 +1170 17.270306335369618 +1171 17.270231812313725 +1172 17.270157384101598 +1173 17.270083050500535 +1174 17.270008811278636 +1175 17.269934666204833 +1176 17.269860615048852 +1177 17.26978665758124 +1178 17.269712793573348 +1179 17.269639022797307 +1180 17.26956534502606 +1181 17.269491760033336 +1182 17.269418267593647 +1183 17.269344867482285 +1184 17.269271559475307 +1185 17.269198343349565 +1186 17.269125218882646 +1187 17.26905218585294 +1188 17.26897924403956 +1189 17.26890639322238 +1190 17.268833633182034 +1191 17.2687609636999 +1192 17.268688384558086 +1193 17.26861589553945 +1194 17.26854349642757 +1195 17.268471187006764 +1196 17.268398967062073 +1197 17.26832683637925 +1198 17.268254794744774 +1199 17.268182841945833 +1200 17.268110977770327 +1201 17.268039202006847 +1202 17.267967514444706 +1203 17.267895914873893 +1204 17.26782440308511 +1205 17.26775297886974 +1206 17.26768164201984 +1207 17.267610392328173 +1208 17.26753922958816 +1209 17.2674681535939 +1210 17.26739716414017 +1211 17.26732626102242 +1212 17.267255444036728 +1213 17.267184712979883 +1214 17.2671140676493 +1215 17.267043507843045 +1216 17.266973033359843 +1217 17.266902643999064 +1218 17.266832339560725 +1219 17.266762119845467 +1220 17.26669198465458 +1221 17.266621933789978 +1222 17.26655196705422 +1223 17.26648208425047 +1224 17.266412285182525 +1225 17.26634256965479 +1226 17.26627293747232 +1227 17.266203388440733 +1228 17.2661339223663 +1229 17.26606453905587 +1230 17.2659952383169 +1231 17.265926019957462 +1232 17.26585688378621 +1233 17.265787829612393 +1234 17.265718857245865 +1235 17.265649966497044 +1236 17.265581157176953 +1237 17.265512429097193 +1238 17.26544378206993 +1239 17.265375215907916 +1240 17.26530673042448 +1241 17.26523832543352 +1242 17.26517000074948 +1243 17.265101756187413 +1244 17.26503359156288 +1245 17.264965506692032 +1246 17.26489750139158 +1247 17.264829575478775 +1248 17.264761728771408 +1249 17.264693961087847 +1250 17.26462627224697 +1251 17.264558662068232 +1252 17.2644911303716 +1253 17.26442367697759 +1254 17.264356301707245 +1255 17.264289004382153 +1256 17.2642217848244 +1257 17.264154642856653 +1258 17.26408757830205 +1259 17.264020590984252 +1260 17.263953680727482 +1261 17.263886847356446 +1262 17.263820090696363 +1263 17.263753410572974 +1264 17.26368680681252 +1265 17.263620279241753 +1266 17.26355382768793 +1267 17.2634874519788 +1268 17.263421151942627 +1269 17.263354927408155 +1270 17.263288778204625 +1271 17.263222704161787 +1272 17.26315670510985 +1273 17.26309078087954 +1274 17.263024931302045 +1275 17.262959156209046 +1276 17.26289345543271 +1277 17.262827828805673 +1278 17.262762276161034 +1279 17.262696797332403 +1280 17.262631392153818 +1281 17.262566060459815 +1282 17.262500802085388 +1283 17.262435616865993 +1284 17.262370504637556 +1285 17.26230546523645 +1286 17.262240498499526 +1287 17.262175604264073 +1288 17.26211078236784 +1289 17.26204603264903 +1290 17.261981354946304 +1291 17.26191674909875 +1292 17.26185221494592 +1293 17.261787752327812 +1294 17.261723361084844 +1295 17.261659041057897 +1296 17.261594792088275 +1297 17.26153061401773 +1298 17.261466506688432 +1299 17.261402469943004 +1300 17.26133850362448 +1301 17.26127460757634 +1302 17.26121078164248 +1303 17.261147025667206 +1304 17.261083339495272 +1305 17.261019722971845 +1306 17.260956175942503 +1307 17.260892698253254 +1308 17.260829289750507 +1309 17.260765950281094 +1310 17.26070267969225 +1311 17.260639477831635 +1312 17.2605763445473 +1313 17.26051327968772 +1314 17.26045028310175 +1315 17.260387354638677 +1316 17.26032449414816 +1317 17.260261701480285 +1318 17.260198976485523 +1319 17.26013631901473 +1320 17.260073728919163 +1321 17.260011206050493 +1322 17.259948750260747 +1323 17.259886361402376 +1324 17.25982403932818 +1325 17.259761783891385 +1326 17.259699594945577 +1327 17.25963747234472 +1328 17.259575415943186 +1329 17.259513425595703 +1330 17.259451501157386 +1331 17.25938964248372 +1332 17.259327849430573 +1333 17.259266121854186 +1334 17.259204459611166 +1335 17.259142862558484 +1336 17.259081330553506 +1337 17.25901986345394 +1338 17.258958461117864 +1339 17.258897123403734 +1340 17.258835850170353 +1341 17.258774641276894 +1342 17.258713496582885 +1343 17.258652415948216 +1344 17.258591399233136 +1345 17.25853044629824 +1346 17.25846955700449 +1347 17.25840873121319 +1348 17.258347968786005 +1349 17.258287269584933 +1350 17.25822663347234 +1351 17.258166060310934 +1352 17.258105549963766 +1353 17.258045102294222 +1354 17.257984717166046 +1355 17.257924394443325 +1356 17.25786413399047 +1357 17.25780393567225 +1358 17.257743799353744 +1359 17.25768372490041 +1360 17.257623712178 +1361 17.25756376105262 +1362 17.257503871390703 +1363 17.257444043059024 +1364 17.257384275924675 +1365 17.257324569855083 +1366 17.257264924717994 +1367 17.25720534038149 +1368 17.25714581671398 +1369 17.257086353584178 +1370 17.257026950861153 +1371 17.256967608414264 +1372 17.2569083261132 +1373 17.256849103827978 +1374 17.256789941428924 +1375 17.25673083878668 +1376 17.25667179577221 +1377 17.25661281225678 +1378 17.256553888111988 +1379 17.256495023209723 +1380 17.256436217422184 +1381 17.256377470621914 +1382 17.256318782681728 +1383 17.256260153474763 +1384 17.256201582874443 +1385 17.25614307075454 +1386 17.256084616989078 +1387 17.256026221452416 +1388 17.255967884019217 +1389 17.255909604564426 +1390 17.255851382963293 +1391 17.25579321909138 +1392 17.255735112824528 +1393 17.255677064038874 +1394 17.25561907261088 +1395 17.255561138417256 +1396 17.25550326133505 +1397 17.255445441241566 +1398 17.255387678014426 +1399 17.255329971531516 +1400 17.25527232167103 +1401 17.255214728311458 +1402 17.255157191331545 +1403 17.255099710610345 +1404 17.2550422860272 +1405 17.25498491746172 +1406 17.254927604793806 +1407 17.25487034790365 +1408 17.2548131466717 +1409 17.254756000978716 +1410 17.254698910705706 +1411 17.25464187573398 +1412 17.25458489594512 +1413 17.254527971220952 +1414 17.254471101443634 +1415 17.254414286495557 +1416 17.2543575262594 +1417 17.254300820618106 +1418 17.254244169454896 +1419 17.25418757265326 +1420 17.254131030096964 +1421 17.25407454167002 +1422 17.25401810725674 +1423 17.25396172674168 +1424 17.253905400009668 +1425 17.253849126945795 +1426 17.253792907435418 +1427 17.253736741364154 +1428 17.253680628617907 +1429 17.253624569082795 +1430 17.253568562645228 +1431 17.253512609191883 +1432 17.253456708609676 +1433 17.253400860785785 +1434 17.253345065607657 +1435 17.253289322962985 +1436 17.25323363273971 +1437 17.253177994826043 +1438 17.253122409110443 +1439 17.253066875481625 +1440 17.25301139382855 +1441 17.25295596404043 +1442 17.252900586006742 +1443 17.252845259617185 +1444 17.25278998476174 +1445 17.252734761330608 +1446 17.252679589214253 +1447 17.25262446830338 +1448 17.25256939848894 +1449 17.25251437966213 +1450 17.2524594117144 +1451 17.252404494537426 +1452 17.25234962802314 +1453 17.252294812063703 +1454 17.252240046551528 +1455 17.25218533137927 +1456 17.252130666439815 +1457 17.252076051626293 +1458 17.252021486832074 +1459 17.251966971950754 +1460 17.251912506876184 +1461 17.251858091502438 +1462 17.251803725723818 +1463 17.251749409434872 +1464 17.25169514253039 +1465 17.251640924905374 +1466 17.25158675645508 +1467 17.251532637074973 +1468 17.251478566660765 +1469 17.251424545108385 +1470 17.25137057231402 +1471 17.251316648174047 +1472 17.251262772585086 +1473 17.251208945444002 +1474 17.251155166647866 +1475 17.251101436093972 +1476 17.251047753679856 +1477 17.250994119303268 +1478 17.250940532862188 +1479 17.25088699425482 +1480 17.250833503379564 +1481 17.25078006013509 +1482 17.25072666442024 +1483 17.25067331613412 +1484 17.250620015176015 +1485 17.250566761445473 +1486 17.250513554842215 +1487 17.250460395266213 +1488 17.250407282617644 +1489 17.250354216796897 +1490 17.250301197704587 +1491 17.250248225241542 +1492 17.2501952993088 +1493 17.250142419807617 +1494 17.250089586639454 +1495 17.250036799706002 +1496 17.249984058909153 +1497 17.249931364151006 +1498 17.249878715333878 +1499 17.249826112360292 +1500 17.249773555132997 +1501 17.249721043554924 +1502 17.249668577529235 +1503 17.24961615695928 +1504 17.24956378174864 +1505 17.249511451801087 +1506 17.249459167020603 +1507 17.249406927311373 +1508 17.249354732577782 +1509 17.249302582724436 +1510 17.249250477656137 +1511 17.24919841727789 +1512 17.249146401494883 +1513 17.24909443021254 +1514 17.249042503336472 +1515 17.248990620772485 +1516 17.24893878242659 +1517 17.248886988204994 +1518 17.248835238014113 +1519 17.24878353176056 +1520 17.248731869351126 +1521 17.248680250692836 +1522 17.24862867569287 +1523 17.248577144258647 +1524 17.24852565629774 +1525 17.248474211717962 +1526 17.248422810427275 +1527 17.24837145233387 +1528 17.248320137346116 +1529 17.248268865372577 +1530 17.248217636322014 +1531 17.248166450103373 +1532 17.248115306625806 +1533 17.248064205798634 +1534 17.248013147531385 +1535 17.247962131733782 +1536 17.24791115831571 +1537 17.247860227187285 +1538 17.24780933825877 +1539 17.24775849144064 +1540 17.24770768664355 +1541 17.247656923778347 +1542 17.24760620275606 +1543 17.2475555234879 +1544 17.24750488588528 +1545 17.247454289859782 +1546 17.24740373532317 +1547 17.247353222187403 +1548 17.24730275036463 +1549 17.247252319767156 +1550 17.24720193030751 +1551 17.24715158189835 +1552 17.24710127445256 +1553 17.247051007883186 +1554 17.24700078210347 +1555 17.246950597026803 +1556 17.246900452566784 +1557 17.246850348637174 +1558 17.24680028515194 +1559 17.246750262025188 +1560 17.24670027917123 +1561 17.246650336504555 +1562 17.246600433939808 +1563 17.246550571391833 +1564 17.246500748775635 +1565 17.246450966006396 +1566 17.246401222999488 +1567 17.24635151967044 +1568 17.246301855934966 +1569 17.246252231708954 +1570 17.246202646908436 +1571 17.24615310144967 +1572 17.246103595249046 +1573 17.246054128223136 +1574 17.246004700288694 +1575 17.24595531136263 +1576 17.24590596136203 +1577 17.24585665020415 +1578 17.245807377806425 +1579 17.245758144086444 +1580 17.245708948961973 +1581 17.245659792350942 +1582 17.245610674171456 +1583 17.245561594341797 +1584 17.245512552780383 +1585 17.24546354940582 +1586 17.245414584136874 +1587 17.245365656892503 +1588 17.245316767591774 +1589 17.245267916153978 +1590 17.245219102498538 +1591 17.245170326545043 +1592 17.245121588213255 +1593 17.2450728874231 +1594 17.245024224094664 +1595 17.244975598148176 +1596 17.244927009504078 +1597 17.24487845808291 +1598 17.244829943805414 +1599 17.244781466592492 +1600 17.244733026365193 +1601 17.244684623044737 +1602 17.244636256552486 +1603 17.24458792680999 +1604 17.244539633738928 +1605 17.244491377261163 +1606 17.24444315729869 +1607 17.244394973773694 +1608 17.244346826608485 +1609 17.244298715725552 +1610 17.24425064104754 +1611 17.244202602497232 +1612 17.244154599997586 +1613 17.244106633471702 +1614 17.244058702842857 +1615 17.244010808034446 +1616 17.243962948970065 +1617 17.243915125573416 +1618 17.243867337768393 +1619 17.243819585479013 +1620 17.243771868629477 +1621 17.24372418714412 +1622 17.243676540947423 +1623 17.243628929964025 +1624 17.243581354118742 +1625 17.2435338133365 +1626 17.24348630754239 +1627 17.24343883666167 +1628 17.24339140061973 +1629 17.24334399934211 +1630 17.243296632754507 +1631 17.243249300782775 +1632 17.24320200335289 +1633 17.243154740391 +1634 17.2431075118234 +1635 17.243060317576514 +1636 17.24301315757692 +1637 17.242966031751365 +1638 17.242918940026723 +1639 17.242871882330004 +1640 17.242824858588378 +1641 17.24277786872917 +1642 17.242730912679836 +1643 17.242683990367965 +1644 17.242637101721325 +1645 17.242590246667792 +1646 17.24254342513541 +1647 17.242496637052362 +1648 17.242449882346968 +1649 17.242403160947678 +1650 17.24235647278312 +1651 17.242309817782044 +1652 17.242263195873324 +1653 17.242216606986013 +1654 17.242170051049268 +1655 17.24212352799241 +1656 17.2420770377449 +1657 17.242030580236328 +1658 17.24198415539643 +1659 17.241937763155086 +1660 17.241891403442303 +1661 17.24184507618824 +1662 17.241798781323176 +1663 17.241752518777563 +1664 17.241706288481947 +1665 17.24166009036705 +1666 17.241613924363698 +1667 17.241567790402886 +1668 17.24152168841572 +1669 17.241475618333453 +1670 17.241429580087484 +1671 17.24138357360932 +1672 17.241337598830633 +1673 17.241291655683217 +1674 17.241245744098993 +1675 17.241199864010035 +1676 17.241154015348542 +1677 17.241108198046845 +1678 17.241062412037397 +1679 17.2410166572528 +1680 17.240970933625796 +1681 17.240925241089247 +1682 17.240879579576145 +1683 17.240833949019624 +1684 17.240788349352943 +1685 17.240742780509493 +1686 17.240697242422797 +1687 17.240651735026514 +1688 17.24060625825442 +1689 17.240560812040435 +1690 17.240515396318603 +1691 17.24047001102311 +1692 17.24042465608825 +1693 17.24037933144845 +1694 17.240334037038277 +1695 17.240288772792436 +1696 17.240243538645732 +1697 17.240198334533112 +1698 17.240153160389653 +1699 17.24010801615056 +1700 17.240062901751166 +1701 17.240017817126915 +1702 17.239972762213405 +1703 17.239927736946328 +1704 17.239882741261535 +1705 17.239837775094983 +1706 17.23979283838275 +1707 17.23974793106106 +1708 17.23970305306624 +1709 17.23965820433476 +1710 17.23961338480319 +1711 17.23956859440826 +1712 17.239523833086793 +1713 17.239479100775746 +1714 17.239434397412193 +1715 17.239389722933364 +1716 17.239345077276553 +1717 17.239300460379226 +1718 17.23925587217895 +1719 17.23921131261342 +1720 17.239166781620447 +1721 17.239122279137966 +1722 17.23907780510404 +1723 17.23903335945684 +1724 17.238988942134668 +1725 17.23894455307595 +1726 17.238900192219212 +1727 17.238855859503115 +1728 17.238811554866448 +1729 17.238767278248098 +1730 17.238723029587092 +1731 17.23867880882255 +1732 17.23863461589375 +1733 17.23859045074005 +1734 17.238546313300926 +1735 17.238502203516006 +1736 17.238458121325014 +1737 17.238414066667797 +1738 17.238370039484302 +1739 17.23832603971461 +1740 17.23828206729892 +1741 17.23823812217754 +1742 17.23819420429089 +1743 17.23815031357952 +1744 17.238106449984084 +1745 17.238062613445347 +1746 17.238018803904215 +1747 17.237975021301676 +1748 17.23793126557884 +1749 17.23788753667695 +1750 17.237843834537344 +1751 17.237800159101496 +1752 17.23775651031096 +1753 17.23771288810743 +1754 17.23766929243271 +1755 17.2376257232287 +1756 17.237582180437432 +1757 17.237538664001043 +1758 17.237495173861777 +1759 17.237451709962 +1760 17.23740827224418 +1761 17.237364860650903 +1762 17.237321475124865 +1763 17.237278115608873 +1764 17.237234782045842 +1765 17.237191474378793 +1766 17.23714819255088 +1767 17.237104936505332 +1768 17.237061706185514 +1769 17.23701850153489 +1770 17.236975322497045 +1771 17.236932169015656 +1772 17.236889041034527 +1773 17.236845938497545 +1774 17.23680286134873 +1775 17.236759809532206 +1776 17.23671678299219 +1777 17.236673781673023 +1778 17.236630805519148 +1779 17.236587854475115 +1780 17.236544928485575 +1781 17.2365020274953 +1782 17.236459151449154 +1783 17.236416300292113 +1784 17.236373473969273 +1785 17.236330672425805 +1786 17.236287895607013 +1787 17.236245143458298 +1788 17.236202415925156 +1789 17.236159712953206 +1790 17.236117034488167 +1791 17.236074380475856 +1792 17.23603175086218 +1793 17.235989145593194 +1794 17.235946564615016 +1795 17.23590400787389 +1796 17.23586147531615 +1797 17.235818966888232 +1798 17.235776482536696 +1799 17.23573402220818 +1800 17.235691585849445 +1801 17.23564917340734 +1802 17.235606784828825 +1803 17.235564420060957 +1804 17.235522079050895 +1805 17.2354797617459 +1806 17.235437468093338 +1807 17.23539519804067 +1808 17.23535295153548 +1809 17.235310728525405 +1810 17.23526852895824 +1811 17.235226352781833 +1812 17.235184199944158 +1813 17.235142070393287 +1814 17.235099964077385 +1815 17.235057880944716 +1816 17.235015820943648 +1817 17.23497378402265 +1818 17.23493177013028 +1819 17.234889779215212 +1820 17.2348478112262 +1821 17.234805866112104 +1822 17.234763943821882 +1823 17.2347220443046 +1824 17.23468016750941 +1825 17.234638313385542 +1826 17.234596481882374 +1827 17.234554672949336 +1828 17.23451288653597 +1829 17.23447112259193 +1830 17.234429381066946 +1831 17.23438766191084 +1832 17.234345965073555 +1833 17.23430429050511 +1834 17.234262638155624 +1835 17.234221007975325 +1836 17.234179399914506 +1837 17.23413781392358 +1838 17.23409624995307 +1839 17.234054707953543 +1840 17.234013187875703 +1841 17.23397168967034 +1842 17.233930213288325 +1843 17.233888758680642 +1844 17.233847325798354 +1845 17.233805914592626 +1846 17.2337645250147 +1847 17.233723157015937 +1848 17.233681810547786 +1849 17.233640485561764 +1850 17.233599182009506 +1851 17.233557899842737 +1852 17.233516639013256 +1853 17.23347539947298 +1854 17.233434181173894 +1855 17.233392984068093 +1856 17.233351808107763 +1857 17.233310653245166 +1858 17.233269519432664 +1859 17.233228406622715 +1860 17.23318731476785 +1861 17.23314624382073 +1862 17.23310519373405 +1863 17.23306416446065 +1864 17.233023155953422 +1865 17.23298216816538 +1866 17.232941201049577 +1867 17.23290025455922 +1868 17.232859328647557 +1869 17.23281842326794 +1870 17.232777538373824 +1871 17.232736673918737 +1872 17.232695829856297 +1873 17.232655006140213 +1874 17.23261420272428 +1875 17.232573419562392 +1876 17.232532656608516 +1877 17.23249191381671 +1878 17.232451191141138 +1879 17.23241048853602 +1880 17.23236980595569 +1881 17.232329143354544 +1882 17.232288500687105 +1883 17.23224787790794 +1884 17.232207274971728 +1885 17.232166691833225 +1886 17.23212612844727 +1887 17.232085584768797 +1888 17.232045060752828 +1889 17.23200455635445 +1890 17.231964071528864 +1891 17.231923606231344 +1892 17.231883160417244 +1893 17.231842734041994 +1894 17.231802327061146 +1895 17.231761939430296 +1896 17.23172157110514 +1897 17.231681222041473 +1898 17.23164089219516 +1899 17.231600581522137 +1900 17.231560289978454 +1901 17.23152001752021 +1902 17.231479764103625 +1903 17.231439529684977 +1904 17.231399314220624 +1905 17.231359117667036 +1906 17.23131893998073 +1907 17.23127878111833 +1908 17.231238641036533 +1909 17.23119851969212 +1910 17.231158417041964 +1911 17.231118333043007 +1912 17.23107826765226 +1913 17.231038220826854 +1914 17.230998192523973 +1915 17.230958182700892 +1916 17.230918191314956 +1917 17.230878218323603 +1918 17.230838263684362 +1919 17.230798327354815 +1920 17.230758409292644 +1921 17.230718509455606 +1922 17.23067862780154 +1923 17.23063876428837 +1924 17.23059891887409 +1925 17.230559091516767 +1926 17.230519282174583 +1927 17.230479490805756 +1928 17.230439717368608 +1929 17.230399961821544 +1930 17.230360224123014 +1931 17.230320504231607 +1932 17.230280802105927 +1933 17.2302411177047 +1934 17.230201450986712 +1935 17.230161801910832 +1936 17.230122170436015 +1937 17.23008255652126 +1938 17.2300429601257 +1939 17.230003381208494 +1940 17.229963819728898 +1941 17.229924275646262 +1942 17.229884748919993 +1943 17.229845239509572 +1944 17.229805747374574 +1945 17.229766272474635 +1946 17.229726814769474 +1947 17.22968737421889 +1948 17.229647950782763 +1949 17.229608544421026 +1950 17.229569155093714 +1951 17.22952978276092 +1952 17.229490427382824 +1953 17.229451088919685 +1954 17.22941176733181 +1955 17.229372462579615 +1956 17.22933317462358 +1957 17.229293903424242 +1958 17.229254648942252 +1959 17.22921541113829 +1960 17.229176189973142 +1961 17.22913698540766 +1962 17.229097797402765 +1963 17.229058625919457 +1964 17.229019470918807 +1965 17.22898033236197 +1966 17.228941210210152 +1967 17.228902104424662 +1968 17.228863014966866 +1969 17.228823941798197 +1970 17.22878488488017 +1971 17.22874584417437 +1972 17.22870681964247 +1973 17.228667811246183 +1974 17.22862881894733 +1975 17.228589842707777 +1976 17.228550882489486 +1977 17.228511938254464 +1978 17.228473009964812 +1979 17.228434097582692 +1980 17.22839520107035 +1981 17.228356320390084 +1982 17.228317455504282 +1983 17.228278606375394 +1984 17.228239772965935 +1985 17.22820095523851 +1986 17.22816215315577 +1987 17.228123366680457 +1988 17.22808459577538 +1989 17.228045840403407 +1990 17.228007100527492 +1991 17.227968376110653 +1992 17.22792966711597 +1993 17.227890973506597 +1994 17.227852295245764 +1995 17.22781363229677 +1996 17.227774984622982 +1997 17.22773635218783 +1998 17.227697734954816 +1999 17.227659132887517 +2000 17.22762054594957 diff --git a/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=100.log b/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=100.log new file mode 100644 index 00000000..13b6eec5 --- /dev/null +++ b/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=100.log @@ -0,0 +1,39 @@ +2023-12-23T22:36:56.931 +== Config == +INIT_SIZE: 3 +GEN_TYP_SIZE: 2 +PARAMETERIZE_FLIP_GROUPS_BY_SZ: true +EPOCHS: 100 +DistNat: DistUInt32 +TAG: v2_meta_ad + +Building num_apps(gen_expr(...)) computation graph... + 9.576930959 seconds + +Initial adnodes_of_interest: +Dict("tysz2_gen_type_tbool" => 0.5, "tysz1_gen_type_tbool" => 0.5, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.5, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5, "sz1_succ_app" => 0.5, "sz1_succ_abs" => 0.5, "sz3_succ_abs" => 0.5, "sz3_succ_app" => 0.5, "sz2_succ_abs" => 0.5, "sz3_succ_var" => 0.5) +Inferring initial distribution... + 0.369677708 seconds +Saved num_apps dist to examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_before.csv. + +Saving samples... +Saved samples to examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_before.txt. + 5.086195125 seconds + +Initial logprob: -20.238481981031438 + +Training... + 9.154631584 seconds + +Final logprob: -18.54692234466734 +Drawing the target dataset is 5.43x more likely + +Learned adnodes_of_interest: +Dict("tysz2_gen_type_tbool" => 0.4769967684232314, "tysz1_gen_type_tbool" => 0.4962538566537244, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.561559374299581, "sz2_succ_var" => 0.49666005253839807, "sz1_succ_var" => 0.49906693556544923, "sz1_succ_app" => 0.5767350167020707, "sz1_succ_abs" => 0.41080879746746896, "sz3_succ_abs" => 0.432508934977342, "sz3_succ_app" => 0.5595926683247854, "sz2_succ_abs" => 0.4336897457382177, "sz3_succ_var" => 0.5) +Inferring trained distribution... +Saved num_apps dist to examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=100.csv. + +Saving samples... +Saved samples to examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=100.txt. + 2.880630167 seconds + diff --git a/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log b/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log new file mode 100644 index 00000000..77aa2b8f --- /dev/null +++ b/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log @@ -0,0 +1,39 @@ +2023-12-23T22:30:59.092 +== Config == +INIT_SIZE: 3 +GEN_TYP_SIZE: 2 +PARAMETERIZE_FLIP_GROUPS_BY_SZ: true +EPOCHS: 2000 +DistNat: DistUInt32 +TAG: v2_meta_ad + +Building num_apps(gen_expr(...)) computation graph... + 9.476043417 seconds + +Initial adnodes_of_interest: +Dict("tysz2_gen_type_tbool" => 0.5, "tysz1_gen_type_tbool" => 0.5, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.5, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5, "sz1_succ_app" => 0.5, "sz1_succ_abs" => 0.5, "sz3_succ_abs" => 0.5, "sz3_succ_app" => 0.5, "sz2_succ_abs" => 0.5, "sz3_succ_var" => 0.5) +Inferring initial distribution... + 0.376421083 seconds +Saved num_apps dist to examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_before.csv. + +Saving samples... +Saved samples to examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_before.txt. + 5.078510792 seconds + +Initial logprob: -20.238481981031438 + +Training... + 159.195553958 seconds + +Final logprob: -17.22762054594957 +Drawing the target dataset is 20.3x more likely + +Learned adnodes_of_interest: +Dict("tysz2_gen_type_tbool" => 0.34083724764380813, "tysz1_gen_type_tbool" => 0.3950155729504988, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.6151878798944757, "sz2_succ_var" => 0.4346890017115986, "sz1_succ_var" => 0.5103724794228329, "sz1_succ_app" => 0.6841991723159101, "sz1_succ_abs" => 0.21491675399079513, "sz3_succ_abs" => 0.2514968265646618, "sz3_succ_app" => 0.6712638585215596, "sz2_succ_abs" => 0.42361325788008747, "sz3_succ_var" => 0.5) +Inferring trained distribution... +Saved num_apps dist to examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=2000.csv. + +Saving samples... +Saved samples to examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt. + 3.0981125 seconds + diff --git a/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_before.txt b/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_before.txt new file mode 100644 index 00000000..aeb6b187 --- /dev/null +++ b/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_before.txt @@ -0,0 +1,200 @@ +false +true +(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool. λz:Bool. false)) false +(λx:Bool. false) true +false +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true)) (λx:Bool. (λy:Bool. λz:Bool. false) true) +(λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)) false +λx:Bool -> Bool. x +(λx:(Bool -> Bool) -> Bool. x) ((λx:Bool. λy:Bool -> Bool. false) true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool -> Bool. false) true)) +λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. false) +(λx:(Bool -> Bool) -> Bool. (λy:Bool. false) true) (λx:Bool -> Bool. true) +false +λx:Bool -> Bool. λy:Bool. (λz:Bool -> Bool. true) x +(λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false) +(λx:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) false false) +λx:Bool -> Bool. λy:Bool. y +(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool. λy:Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false))) +(λx:Bool. λy:Bool. λz:Bool. λw:Bool. false) true ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. x)) +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) ((λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool. λz:Bool. false)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. true) (λx:Bool -> Bool. λy:Bool. true) false true +false +(λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. true) (λy:Bool -> Bool. false)) ((λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false))) +λx:Bool. λy:Bool. x +λx:Bool -> Bool. true +true +(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. true)) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. true))) +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) x) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:Bool. λy:Bool. false) false)) +true +true +(λx:Bool. (λy:Bool. true) true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. false) false)) +(λx:Bool. λy:Bool. λz:Bool. λw:Bool. false) true ((λx:Bool. false) false) ((λx:Bool. λy:(Bool -> Bool) -> Bool. false) true ((λx:Bool. λy:Bool -> Bool. true) true)) +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool -> Bool. false) true (λx:Bool -> Bool. x) (λx:Bool. x) +true +λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. y) +true +(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. true) (λx:Bool -> Bool. true) (λx:Bool. x) (λx:Bool. (λy:Bool. λz:Bool. true) true) +λx:Bool -> Bool. false +true +true +true +λx:Bool. false +(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. true) (λx:Bool. λy:Bool. false) (λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. true)) +true +λx:Bool -> Bool. x true +true +false +(λx:Bool. λy:Bool. true) ((λx:Bool. false) true) false +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. false) (x false) +(λx:Bool. λy:Bool. λz:Bool. false) false +(λx:Bool -> Bool. (λy:Bool. λz:Bool -> Bool. false) false) (λx:Bool. x) +false +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false) (λx:Bool. x) +(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. true) x) true +(λx:Bool. λy:Bool. λz:Bool. λw:Bool. true) false false +λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) x (λy:Bool -> Bool. y) +λx:Bool. (λy:Bool. true) ((λy:Bool. true) true) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false) false) +λx:Bool -> Bool. λy:Bool. y +λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. λz:Bool. true) ((λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. true)) +true +λx:Bool -> Bool. (λy:Bool. false) ((λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. false)) +λx:Bool -> Bool. λy:Bool. y +(λx:Bool. λy:Bool. λz:Bool. false) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true)) +false +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) false ((λx:Bool -> Bool. true) (λx:Bool. false))) +false +(λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool. true) true) ((λx:Bool. λy:Bool -> Bool -> Bool. false) false ((λx:Bool. λy:Bool. λz:Bool. true) true)) +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. (λy:Bool. λz:Bool. false) false) +false +(λx:Bool. λy:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) false ((λx:Bool. true) false)) +(λx:Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. false) false false false +(λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. false) true +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. true) false) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) false ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true))) +λx:Bool -> Bool. x +λx:Bool -> Bool. x +λx:Bool. true +true +(λx:(Bool -> Bool) -> Bool. (λy:Bool. true) false) (λx:Bool -> Bool. true) +λx:Bool. true +(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool -> Bool. false) true ((λx:Bool -> Bool. true) (λx:Bool. true))) +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:Bool. false) true) (λx:Bool. (λy:Bool. false) false) +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) false ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. true)) true +λx:Bool -> Bool. true +false +false +(λx:Bool. (λy:Bool. λz:Bool. false) true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. true))) +(λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool. λz:Bool. false) (λy:Bool. true)) ((λx:Bool. λy:Bool. λz:Bool -> Bool. false) false ((λx:Bool. false) false)) +(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool. λy:Bool -> Bool. true) false) ((λx:(Bool -> Bool) -> Bool -> Bool. x) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true)) +(λx:Bool. λy:Bool. false) false true +(λx:Bool. λy:Bool. x) false +λx:Bool -> Bool. false +(λx:(Bool -> Bool) -> Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. false)) +(λx:Bool. x) ((λx:(Bool -> Bool) -> Bool. true) ((λx:Bool. λy:Bool -> Bool. true) false)) +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. x) (λy:Bool -> Bool. true) +λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. λz:Bool. true) ((λy:Bool. false) false) +λx:Bool -> Bool. x +false +λx:Bool -> Bool. x +false +true +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true))) +λx:Bool. (λy:Bool. λz:Bool. false) ((λy:Bool. false) x) +(λx:Bool. λy:Bool. false) true false +true +false +(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. false) false ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true)) true +λx:Bool -> Bool. false +(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. true) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. true)) +true +(λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true) +(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. false) (λx:Bool. λy:Bool. false) false ((λx:Bool. false) false) +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. true) ((λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool. λz:Bool. false)) +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false (λx:Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false))) +(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. false)) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. true)) +λx:Bool -> Bool. λy:Bool. x y +(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. λa:Bool. true) (λx:Bool -> Bool. false) (λx:Bool. x) ((λx:Bool. x) false) +(λx:Bool. (λy:Bool. λz:Bool -> Bool. true) x) ((λx:Bool. false) true) +true +(λx:Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) false ((λx:Bool. λy:Bool. λz:Bool. false) false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. false)) +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. true)) +false +(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. λa:Bool. true) false ((λx:Bool. true) false) ((λx:Bool. λy:Bool -> Bool. false) false) +(λx:Bool -> Bool. (λy:Bool. false) false) (λx:Bool. false) +(λx:(Bool -> Bool) -> Bool -> Bool. x) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. true)) +true +false +λx:Bool. λy:Bool. false +(λx:Bool. x) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. false))) +λx:Bool -> Bool. (λy:Bool -> Bool. false) (λy:Bool. y) +true +λx:Bool. λy:Bool. false +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. false) true (λx:Bool -> Bool. true) true +(λx:Bool. λy:Bool. true) ((λx:Bool. true) false) ((λx:Bool. false) true) +(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) true ((λx:Bool. λy:Bool. λz:Bool. true) true) ((λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) true)) +(λx:(Bool -> Bool) -> Bool -> Bool. x) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) false false) +(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λx:Bool. λy:Bool. true) (λx:Bool -> Bool. x true) +true +(λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) false true +(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) false (λx:Bool. λy:Bool. x) +true +λx:Bool -> Bool. true +(λx:Bool. λy:Bool. y) true +λx:Bool. x +(λx:Bool -> Bool -> Bool. false) (λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. false) (λy:Bool. λz:Bool. true)) +λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. true) x ((λy:Bool. λz:Bool -> Bool. false) x) +λx:Bool. x +λx:Bool. x +false +λx:Bool -> Bool. x +λx:Bool -> Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. false) ((λy:Bool -> Bool. false) x) +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. λy:Bool. false))) +(λx:Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. false) false true ((λx:Bool. true) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false))) +(λx:Bool. (λy:Bool. λz:Bool. false) true) ((λx:Bool. true) true) +λx:Bool. (λy:Bool. λz:Bool. true) true +false +λx:Bool. x +true +(λx:Bool. λy:Bool. λz:Bool. true) ((λx:Bool. x) false) +λx:Bool. x +(λx:Bool. x) ((λx:Bool. false) true) +λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. false) +(λx:(Bool -> Bool) -> Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. false) (λx:Bool -> Bool. false))) +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. true) false +false +(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool. λz:Bool. true)) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true)) +λx:Bool -> Bool. false +(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. true)) ((λx:Bool -> Bool. λy:Bool -> Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. false))) +(λx:(Bool -> Bool) -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false) (λx:Bool. λy:Bool. false)) +false +(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. true) true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. true) ((λx:Bool. false) true)) +λx:Bool -> Bool. λy:Bool. y +true +λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. false) x (λy:Bool -> Bool. λz:Bool. false) +λx:Bool. λy:Bool. (λz:Bool -> Bool -> Bool. true) (λz:Bool. λw:Bool. false) +λx:Bool -> Bool. (λy:Bool. y) false +(λx:Bool -> Bool. (λy:Bool. λz:Bool -> Bool. false) true) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. false) false ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. true))) +(λx:Bool -> Bool -> Bool. (λy:Bool. false) false) (λx:Bool. (λy:Bool. λz:Bool. false) x) +λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. false) (λy:Bool. λz:Bool. true) (λy:Bool. λz:Bool. true) +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. false) (λx:Bool -> Bool. true) ((λx:Bool. true) false) (λx:Bool. λy:Bool. true) +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) true (λx:Bool -> Bool. true) false +(λx:Bool -> Bool. λy:Bool. x) (λx:Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. true)) +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) true) +(λx:Bool. λy:Bool. true) true ((λx:Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. true) true) +true +(λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true)) ((λx:Bool. false) false) +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. false) false (λx:Bool -> Bool. false) true +true +(λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. true)) true +λx:Bool -> Bool. false +(λx:Bool. false) true +false +(λx:Bool. x) ((λx:Bool. λy:Bool. true) true true) +false +(λx:Bool. λy:Bool. false) true +(λx:Bool. λy:Bool. λz:Bool. false) true +true +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool. false) (λx:Bool -> Bool. λy:Bool. true)) +λx:Bool -> Bool. λy:Bool. y +(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. true) false) (λx:Bool -> Bool. x) +(λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. (λy:Bool. λz:Bool. true) true) diff --git a/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=100.txt b/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=100.txt new file mode 100644 index 00000000..a8db166d --- /dev/null +++ b/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=100.txt @@ -0,0 +1,200 @@ +true +(λx:Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. true) false ((λx:Bool. λy:Bool. false) true) (λx:Bool -> Bool. λy:Bool. true) +λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) ((λy:Bool. λz:Bool -> Bool. λw:Bool. false) true) +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool. false) true) (λx:Bool -> Bool. λy:Bool. false) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. false) +(λx:Bool. λy:Bool -> Bool. y) ((λx:Bool. x) false) +λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) ((λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool. true)) +λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. false) ((λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool. false)) +(λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool. false)) true +(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) false (λx:Bool. λy:Bool. true) false +λx:Bool -> Bool. λy:Bool. (λz:Bool -> Bool -> Bool. true) (λz:Bool. λw:Bool. true) +(λx:Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. false) true ((λx:Bool. λy:Bool. λz:Bool. false) false) (λx:Bool -> Bool. (λy:Bool. false) true) +λx:Bool -> Bool. x +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool. false) (λy:Bool. false)) (λx:Bool -> Bool. (λy:Bool. λz:Bool. false) true) +(λx:Bool. λy:Bool. λz:Bool. true) false false true +true +(λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true)) +(λx:Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. false) true ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false)) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false))) +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. true)) +(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) true) ((λx:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false)) +(λx:Bool -> Bool. false) (λx:Bool. x) +(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. false) true) +(λx:Bool. x) ((λx:Bool. λy:Bool. true) true ((λx:Bool. false) false)) +(λx:(Bool -> Bool) -> Bool. λy:Bool. y) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false))) +false +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. λy:Bool. true)) ((λx:Bool. λy:Bool -> Bool -> Bool. false) true (λx:Bool. λy:Bool. true)) +(λx:Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) false ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true)) true +true +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false))) +(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. λa:Bool. false) false ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false)) ((λx:Bool. λy:Bool -> Bool. false) false ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false))) +(λx:(Bool -> Bool) -> Bool. (λy:Bool. true) false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true) false) +(λx:Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool. true) (λx:Bool. λy:Bool. false) (λx:Bool. false) +(λx:Bool. (λy:Bool. true) x) true +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true)) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true))) +false +(λx:Bool -> Bool -> Bool. x) ((λx:Bool. λy:Bool. λz:Bool. false) true) false +(λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool. false) (λy:Bool. true)) ((λx:Bool. λy:Bool -> Bool. true) ((λx:Bool. true) true)) +λx:Bool. λy:Bool. x +true +λx:Bool -> Bool. x +λx:Bool -> Bool. false +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. y) +λx:Bool -> Bool. false +λx:Bool -> Bool. true +false +(λx:Bool. (λy:Bool. false) true) false +(λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool. false) (λy:Bool. true)) (λx:Bool -> Bool. true) +λx:Bool -> Bool. x true +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) +true +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. true) true) +(λx:Bool. λy:Bool. y) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. false) true) +true +(λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. x)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. false) false ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:Bool. λy:Bool. false) true)) +λx:Bool. (λy:Bool. x) ((λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. true)) +false +(λx:Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. λa:Bool. true) false ((λx:Bool. λy:Bool. true) true) false +(λx:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. λy:Bool. true))) +λx:Bool. λy:Bool. true +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. true) true (λx:Bool. λy:Bool. x) +(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. false) true (λx:Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. true) false) +(λx:Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) true ((λx:Bool. false) false) ((λx:Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. false) true) +false +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. y) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. x)) +(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) true ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false))) +λx:Bool. true +true +false +false +false +(λx:Bool. (λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false))) +(λx:Bool. λy:Bool -> Bool. y) true +(λx:Bool. λy:Bool -> Bool. false) false +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false))) +true +false +λx:Bool. λy:Bool. (λz:(Bool -> Bool) -> Bool. false) (λz:Bool -> Bool. false) +(λx:Bool. λy:Bool. λz:Bool. true) true false +false +(λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true)) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true)) +true +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false) false false +(λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. false) true (λx:Bool. (λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. false)) +(λx:Bool. λy:Bool. true) false ((λx:Bool. λy:Bool -> Bool -> Bool. true) true (λx:Bool. λy:Bool. true)) +λx:Bool. x +(λx:Bool -> Bool -> Bool. true) (λx:Bool. (λy:Bool. λz:Bool. true) true) +true +(λx:Bool. λy:Bool. λz:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false)) ((λx:Bool. false) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true))) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. false) ((λx:Bool. true) true)) +λx:Bool. (λy:Bool. λz:Bool. λw:Bool. true) x ((λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. true)) +true +true +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. true) false ((λx:Bool. λy:Bool -> Bool. true) true) (λx:Bool -> Bool. false) +(λx:Bool. λy:Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false)) ((λx:Bool -> Bool. false) (λx:Bool. x)) +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true)) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) false ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true))) +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. true) ((λy:Bool -> Bool. true) (λy:Bool. true)) +(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. λa:Bool. false) (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. false) false) (λx:Bool -> Bool. λy:Bool. false) +true +(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool. true) false) ((λx:Bool. λy:Bool. λz:Bool -> Bool. true) true ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false))) +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) true ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true))) +(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) false) false +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. true) false ((λx:Bool. λy:Bool -> Bool. true) true) ((λx:Bool. λy:Bool -> Bool. false) false (λx:Bool. x)) +false +false +λx:Bool -> Bool. x +(λx:Bool. (λy:Bool. false) false) false +(λx:Bool -> Bool -> Bool. x) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. true)) true +false +(λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false)) true +(λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool -> Bool. false)) (λx:Bool. (λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. false)) +λx:Bool. x +false +false +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) x) (λx:Bool -> Bool. x) +true +(λx:Bool. λy:Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false)) +λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. false) true +(λx:Bool. λy:Bool -> Bool. y) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true))) +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) false +(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. false)) (λx:Bool. (λy:Bool. λz:Bool. false) false) +(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) true ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. true)) ((λx:Bool. λy:Bool. λz:Bool. true) ((λx:Bool. false) true)) +(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) false (λx:Bool. λy:Bool. false) ((λx:Bool. λy:Bool. true) false ((λx:Bool. true) false)) +(λx:Bool -> Bool -> Bool. true) (λx:Bool. (λy:Bool. λz:Bool. true) true) +true +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λx:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true)) +λx:Bool. true +λx:Bool. λy:Bool. x +(λx:Bool -> Bool. (λy:Bool. λz:Bool -> Bool. true) true) ((λx:Bool. λy:Bool. λz:Bool. false) true ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false))) +(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. true) x) true +(λx:Bool -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) (λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool -> Bool. true) +false +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) ((λx:(Bool -> Bool) -> Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. true))) +λx:Bool -> Bool. x +false +(λx:Bool -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. false) (λx:Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false)) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) false ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true)) +(λx:Bool. (λy:Bool. true) x) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) true) +(λx:Bool. λy:Bool -> Bool. x) ((λx:Bool. x) false) +(λx:Bool. λy:Bool -> Bool. λz:Bool. λw:Bool -> Bool. false) true (λx:Bool. x) ((λx:Bool. false) true) +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) true (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. true)) +false +(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool. false) (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) true ((λx:Bool. false) false)) +true +true +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. true)) ((λx:Bool. λy:Bool -> Bool. true) true (λx:Bool. x)) +false +λx:Bool -> Bool. false +(λx:Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. false) true ((λx:Bool. λy:Bool. λz:Bool. false) true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. false)) +(λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. false)) +false +λx:Bool -> Bool. true +(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. false) (λx:Bool. λy:Bool. true) (λx:Bool -> Bool. x true) +(λx:Bool. x) false +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool. true) true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. λy:Bool. true)) +(λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. y) +λx:Bool. (λy:Bool. λz:Bool. λw:Bool. false) false x +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. true) false ((λx:Bool. λy:Bool -> Bool. false) true) (λx:Bool. (λy:Bool. true) x) +(λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. false)) +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. false) true)) +true +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. y) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) false ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false))) +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. true) true (λx:Bool -> Bool. x) (λx:Bool -> Bool. λy:Bool. y) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. x) ((λx:Bool. false) false) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. x) (λx:Bool -> Bool. x)) +false +(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. true)) ((λx:Bool. λy:Bool. λz:Bool. λw:Bool. true) false false) +(λx:Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. true) false ((λx:Bool. λy:Bool. false) true) true +λx:Bool -> Bool. false +λx:Bool. true +false +true +λx:Bool. λy:Bool. (λz:(Bool -> Bool) -> Bool -> Bool. true) (λz:Bool -> Bool. λw:Bool. false) +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. true) false ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool. false) true)) +(λx:Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. x)) +(λx:Bool -> Bool. λy:Bool -> Bool -> Bool. true) (λx:Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. true))) +(λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. false) ((λx:Bool. false) true)) +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool. λy:Bool. true) (λx:Bool. x) +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool. λz:Bool. false) true true) +false +λx:Bool. x +(λx:Bool -> Bool -> Bool. (λy:Bool. false) false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. true)) +λx:Bool. λy:Bool. false +(λx:Bool. x) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true)) +false +(λx:Bool. λy:Bool. λz:Bool. λw:Bool. true) true true +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. false) false) true +λx:Bool -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) false (λy:Bool -> Bool. y) +λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. x) (λy:Bool -> Bool. y) +λx:Bool -> Bool. λy:Bool. x y +false +false +λx:Bool -> Bool. true +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true) true ((λx:Bool. λy:Bool. false) true ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false))) +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) ((λx:Bool. λy:Bool -> Bool. true) true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. true)) +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. false) false (λx:Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. x false) +true +λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. false) true ((λy:Bool. λz:Bool -> Bool. λw:Bool. true) x) +(λx:Bool. λy:(Bool -> Bool) -> Bool. true) ((λx:Bool. true) true) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false))) +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false ((λx:Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. false)) ((λx:Bool. x) true) +λx:Bool. x diff --git a/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt b/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt new file mode 100644 index 00000000..7bdef4e7 --- /dev/null +++ b/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt @@ -0,0 +1,200 @@ +λx:Bool. x +(λx:Bool. (λy:Bool. false) true) true +(λx:Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. false) true ((λx:Bool. false) false) false +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. true)) (λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. true)) +λx:Bool -> Bool. (λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. true) (λy:Bool. true) (λy:Bool -> Bool. false) +(λx:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool. λz:Bool. true) false)) +(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool. true) x) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. false)) +false +λx:Bool -> Bool. λy:Bool. (λz:Bool. false) false +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. false)) +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false)) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. true)) +(λx:Bool. (λy:Bool. false) false) ((λx:Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true))) +(λx:Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. false) false ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false)) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool. true) false)) +(λx:Bool. (λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. false)) ((λx:Bool. λy:Bool. true) true ((λx:Bool -> Bool. false) (λx:Bool. true))) +(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. λy:Bool. true)) (λx:Bool -> Bool. x) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. true)) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) true ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true))) +λx:Bool -> Bool. true +(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. true) ((λx:Bool. λy:Bool -> Bool. true) true) ((λx:Bool. λy:Bool -> Bool. false) ((λx:Bool. true) true)) +(λx:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false))) +true +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool -> Bool. false)) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool. true) (λx:Bool -> Bool. λy:Bool. true)) +(λx:Bool. x) true +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. false)) (λx:Bool -> Bool. x) +λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. false) x ((λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. true)) +(λx:Bool. λy:Bool -> Bool. y) ((λx:(Bool -> Bool) -> Bool. λy:Bool. false) (λx:Bool -> Bool. false) true) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) true) ((λx:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true))) +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. true)) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true))) +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. false) true (λx:Bool -> Bool. true) (λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. true)) +(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true)) ((λx:Bool. λy:Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true))) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. true)) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) false ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. true))) +(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool -> Bool. false) false) (λx:Bool -> Bool. true) +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool. λy:Bool. false) (λx:Bool. λy:Bool. true) true +false +(λx:Bool -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. false) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. true) false) +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. false)) true +(λx:(Bool -> Bool) -> Bool. (λy:Bool. false) false) (λx:Bool -> Bool. true) +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. λz:Bool. true)) ((λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) false ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false))) +λx:Bool -> Bool. false +λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. false) x (λy:Bool -> Bool. y) +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) x) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. true))) +λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. false) ((λy:Bool. λz:Bool. λw:Bool. true) x) +(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. true) false)) +(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. false)) +λx:Bool. (λy:Bool. λz:Bool. λw:Bool. true) false ((λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) +true +(λx:(Bool -> Bool) -> Bool -> Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. x)) +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) true ((λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true)) true +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) ((λx:Bool. λy:Bool. λz:Bool -> Bool. true) false false) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false))) +(λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. true))) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. true)) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false)) +(λx:(Bool -> Bool) -> Bool. λy:Bool. y) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false)) +λx:Bool -> Bool. x +λx:Bool. λy:Bool. y +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. λa:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. false) false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. true) (λx:Bool. true)) +λx:Bool -> Bool. x +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. false)) ((λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) false ((λx:Bool. λy:Bool. λz:Bool. false) true)) +(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. λy:Bool. false) true true +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true)) (λx:Bool. λy:Bool. y) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. false)) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. true)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) true (λx:Bool -> Bool. λy:Bool. true)) +(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. false) false) ((λx:Bool. λy:Bool. λz:Bool. true) false false) +(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool. false)) (λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool. true)) +(λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. true) true true ((λx:Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. true) true (λx:Bool. true)) +λx:Bool. (λy:Bool. λz:Bool. false) ((λy:Bool. false) x) +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. false) ((λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. false)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. false) (λx:Bool -> Bool. x) +true +λx:Bool -> Bool. λy:Bool. y +λx:Bool -> Bool. λy:Bool. (λz:Bool. true) false +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. true) (λx:Bool. λy:Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool. λy:Bool -> Bool -> Bool. false) false ((λx:Bool. λy:Bool. λz:Bool. false) false)) +(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. false) (λx:Bool. x) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool. λy:Bool. false) false) +(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. true)) (λx:Bool -> Bool. false) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool. λz:Bool. false) false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. false) (λx:Bool. λy:Bool. true)) +(λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false)) true +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool -> Bool. false) x +(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true)) (λx:Bool. λy:Bool. y) +λx:Bool -> Bool. x +λx:Bool. (λy:Bool. λz:Bool. λw:Bool. false) x x +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. false)) (λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. true)) +λx:Bool -> Bool. x +λx:Bool -> Bool. λy:Bool. (λz:Bool. true) false +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool. false) true) (λx:Bool -> Bool. x) +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) false ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. false))) +λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. λz:Bool. true) ((λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. true)) +λx:Bool. λy:Bool. (λz:Bool. true) false +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) false) (λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. true)) +λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. true) ((λy:Bool. false) x) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false)) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) +false +false +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) true ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false)) (λx:Bool -> Bool. x) +(λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool -> Bool. false) (λx:Bool. true)) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) true (λx:Bool -> Bool. λy:Bool. false)) +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. y) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true))) +true +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. λy:Bool. true)) true +(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. true)) +(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. y) ((λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) false (λx:Bool. λy:Bool. false)) +(λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. false)) (λx:Bool. false) +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true))) +(λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. true)) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) (λx:Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. λy:Bool. false))) +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. true) true (λx:Bool -> Bool. true) (λx:Bool. (λy:Bool. λz:Bool. false) x) +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) false ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false) true +false +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool -> Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. λy:Bool. false))) +true +(λx:Bool. λy:Bool. λz:Bool. λw:Bool. true) false true +(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. false)) +(λx:Bool -> Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true))) +(λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. λa:Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true))) +λx:Bool -> Bool. x ((λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. true)) +(λx:(Bool -> Bool) -> Bool. x) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. true)) +(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. false) (λx:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. false)) (λx:Bool -> Bool. (λy:Bool. λz:Bool. false) false) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. false)) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false))) +λx:Bool. (λy:Bool. λz:Bool. false) ((λy:Bool -> Bool. false) (λy:Bool. false)) +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) true (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool -> Bool. true)) +λx:Bool -> Bool. (λy:Bool. y) (x true) +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. true) true (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. false) true ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. true))) +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false)) false +(λx:Bool. λy:Bool. y) false +(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. true) false) ((λx:Bool. λy:Bool -> Bool. true) false) +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false)) (λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. false) (λy:Bool. λz:Bool. false)) +(λx:Bool -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false)) (λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. false) (λy:Bool. λz:Bool. true)) +(λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. false)) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) +(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) +(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool. true) (λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. true))) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λx:Bool -> Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. λy:Bool. true) false) +(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. false)) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) true ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. true))) +(λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false)) true +(λx:Bool. λy:Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true)) +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. false) true ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. true))) +λx:Bool -> Bool. (λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) (λy:Bool. true) ((λy:Bool. λz:Bool -> Bool. false) false) +(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)) false +(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. false)) +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) true (λx:Bool -> Bool. x) true +(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. λa:Bool. true) true false ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) true ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. false))) +(λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. true)) ((λx:Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false))) +λx:Bool -> Bool. x +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) true ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true)) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true)) +λx:Bool -> Bool. λy:Bool. (λz:Bool -> Bool. true) x +(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true)) (λx:Bool -> Bool. x) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. false) true) true +λx:Bool -> Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) false ((λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. true)) +false +(λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false))) +λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. true) (λy:Bool. λz:Bool. false) ((λy:Bool. λz:Bool -> Bool. false) true) +(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true))) +λx:Bool. λy:Bool. false +(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. true) +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true)) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. λy:Bool. true) true) +(λx:Bool. (λy:Bool. false) x) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) true ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true))) +(λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. false) false ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. false)) (λx:Bool. (λy:Bool. λz:Bool. true) false) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false)) true +(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. λy:Bool. false))) +(λx:Bool. (λy:Bool. λz:Bool. true) false) true +(λx:(Bool -> Bool) -> Bool -> Bool. x) (λx:Bool -> Bool. (λy:Bool. λz:Bool. true) true) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. false))) +λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. true) x ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. true)) +(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. false) x) (λx:Bool. (λy:Bool. λz:Bool. true) x) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. true) false)) +(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. true) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false)) ((λx:Bool. λy:Bool. λz:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false))) +(λx:Bool. λy:Bool. λz:Bool. false) ((λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. true))) +true +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false))) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. false) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. true)) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. false)) +(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. false) false ((λx:Bool. true) true) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false))) +(λx:Bool. true) ((λx:Bool. λy:Bool -> Bool. false) true ((λx:Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. false))) +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. false) (λx:Bool -> Bool. true) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false)) (λx:Bool. λy:Bool. x) +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false))) +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. true) (λx:Bool -> Bool. true) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false)) true +(λx:Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false))) +λx:Bool. x +(λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool. false) (λy:Bool. false)) (λx:Bool -> Bool. x true) +λx:Bool. λy:Bool. x +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. true) true) (λx:Bool -> Bool. x) +(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. true) true ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. true))) +(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. true)) (λx:Bool. λy:Bool. true) +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. true) true) +false +(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. true) true) (λx:Bool -> Bool. (λy:Bool. false) true) +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. false)) (λx:Bool -> Bool. λy:Bool. false) +true +(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. true) (λx:Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. true) true) ((λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. false) (λx:Bool. true) false) +(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. false))) +λx:Bool -> Bool. true +(λx:Bool. (λy:Bool. λz:Bool -> Bool. true) true) false +true +false +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true)) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) true (λx:Bool -> Bool. λy:Bool. false)) +(λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. false)) (λx:Bool. (λy:Bool. true) x) +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) false ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false)) ((λx:Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool. false) true)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) +λx:Bool. (λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) (λy:Bool. λz:Bool. false) (λy:Bool -> Bool. true) +(λx:Bool -> Bool. x) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. false))) +λx:Bool. (λy:Bool. λz:Bool. false) x x +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) true +(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. λa:Bool. false) false true ((λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) false (λx:Bool. λy:Bool. true)) +(λx:Bool. λy:Bool. λz:Bool. λw:Bool. true) ((λx:Bool. false) true) false +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false) (λx:Bool -> Bool. x) +(λx:Bool. (λy:Bool. λz:Bool -> Bool. true) x) false diff --git a/examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/learning_curve_param_by_sz=true,epochs=2000.csv b/examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/learning_curve_param_by_sz=true,epochs=2000.csv new file mode 100644 index 00000000..dd679118 --- /dev/null +++ b/examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/learning_curve_param_by_sz=true,epochs=2000.csv @@ -0,0 +1,2001 @@ +0 -1.164324889768336817765395270065151324652229424763360009858320885423779852711331 +1 -1.16435315855459338388880019438879519823883932190485293203554011659504399213695 +2 -1.164381416145504659583955050833936601756553798163324239840178504643262851050994 +3 -1.164409662546408511420830270385698581963419557959295594296542410500039888985174 +4 -1.164437897762640645005882376732040720882002422204246144732595397120997756545897 +5 -1.164466121799534563245347000780473581315890274616318186010631129297287578249032 +6 -1.164494334662421566532420018914200231101788851130087304023776415301821950704831 +7 -1.164522536356630752935538442160920346697930120622668991464851026346628376935555 +8 -1.164550726887489018387759562853614728966424086206883057814625216170364158392419 +9 -1.164578906260321056877236865836479837467940753708690780115510141008145205065513 +10 -1.164607074480449360638791211745445632054753530091551697088118094834938555134516 +11 -1.164635231553194220346575800371379485383811847223192530176000323531299480561858 +12 -1.164663377483873725307833422595148085103111631821737424292515083834658969078845 +13 -1.164691512277803763657744509867171972405598627656077480988090899004179387330825 +14 -1.164719635940298022555364490689957561512475376689614920454757856976960858758269 +15 -1.164747748476667988380648964050323054181681563676556976394412774171788351449329 +16 -1.164775849892222946932565200238641510917663983088718209456602200514802972339017 +17 -1.164803940192269983628288479985400377224337073780699082622990858459642625435649 +18 -1.164832019382113983703481783340715904710283377517910354477667544100593076717956 +19 -1.164860087467057632413657340220137073534659656270088228215459215898107764399599 +20 -1.164888144452401415236618555040120739697799690377069301568927538404007832787456 +21 -1.164916190343443618075980818368951727886789339939147079378624738509157068678744 +22 -1.1649442251454803274657697190236124025865806587425377457326147398089473303458 +23 -1.164972248863805430776095170550169816331056702200326239057267613995887232934867 +24 -1.165000261503710616419899966534638798449321612162508152224563606262047595621133 +25 -1.165028263070485374060781279702990259415286680993413222884757940732624281942047 +26 -1.16505625356941699482188362028299949870716688120095103212485963378186741811805 +27 -1.165084233005790571495861769616963376537872157390675651427328472098059652598246 +28 -1.16511220138488899875591220553295180539109623222851763728780189349792108290255 +29 -1.165140158711992973367871536503192104325536104765765703000955363480731395015798 +30 -1.165168104992380994403380462141408310713334557112008831740618185534282103405061 +31 -1.165196040231329363454111778116445538585625109743585962799586192671678297824441 +32 -1.165223964434112184847060944087295893116901509725176410884288985674444400449691 +33 -1.165251877606001365860897733794701284978450280980530140337644091951808349326171 +34 -1.165279779752266616943377486976833729272363575568844348604203204688677131238892 +35 -1.165307670878175451929810483311139359436945739212876096626626732204149738910422 +36 -1.165335550988993188262587959121272439795676422078679851388951616248307258770811 +37 -1.165363420089982947211763288127134129214643394971017804300170191953991650264886 +38 -1.165391278186405654096686848057361645568617977223803003069184210061452752626208 +39 -1.165419125283520038508693095487180824362951250364540918279356046140083866060092 +40 -1.165446961386582634534838371810332877940868473344733116970713478571610912155797 +41 -1.165474786500847780982687963801808472317796039218333295374955837916527158117946 +42 -1.165502600631567621606150942778363080007070127194801380446506538825972027468004 +43 -1.165530403783992105332361306916240977518525365381386537756950890440912589069159 +44 -1.165558195963368986489603951840195278925556467633719559911295476622795990338376 +45 -1.165585977174943825036283995154752080544409051379584108344256242074725927440375 +46 -1.165613747423959986790937981147722190039219075906682331981165924391111074292328 +47 -1.165641506715658643663285492457208085011338759682916604542084794586339380433801 +48 -1.165669255055278773886319696056780755387174335520282281596725213954314700238555 +49 -1.165696992448057162249435351479104999917844619253019778063348647644391772506565 +50 -1.165724718899228400332592809766066644291963443318883145442685225596197728464748 +51 -1.165752434414024886741516532203395106413449252472310060670158118940414027585776 +52 -1.16578013899767682734392665846987383822666278690833880612946838808097982466614 +53 -1.165807832655412235506802154405483513257289875978390719730232271293905144335606 +54 -1.165835515392456932334674070179222500229026687594206442102641978210978662775044 +55 -1.165863187214034546908947440215890266452055125496192860359362272142797980895865 +56 -1.165890848125366516528250356821795996202238430159143929881266142114589770980308 +57 -1.165918498131672086949808750032161000381516679903500751284833400306837865398472 +58 -1.165946137238168312631845406787913551065445524976035753026346050620087943357889 +59 -1.16597376545007005697700176313662272014697676502685579080396772147323280696189 +60 -1.166001382772589992576781003741477762583355799015784994402041900294856353502285 +61 -1.166028989210938601457011003573485694530092442756638956796074535528668129143622 +62 -1.166056584770324175324325647255426113079310791713932449445718480912454995484328 +63 -1.166084169455952815813663062121563130993088464923854769003846789457106322803403 +64 -1.166111743273028434736779301654663705740437026406534497930620082646722157246481 +65 -1.166139306226752754331776016561503781749519331800443379961522544193507629887067 +66 -1.166166858322325307513640651349752697964309328941092693773961139563819703619416 +67 -1.166194399564943438125797704872906404900672393579688411485129654819653434744749 +68 -1.166221929959802301192669593915785357262068941015954146500631035903409018211247 +69 -1.166249449512094863173245659501017676122824351432284162423038066661456579468884 +70 -1.16627695822701190221565785620688649054590688990649305832459362748561658111014 +71 -1.166304456109742008412761665398926459620662517519896630252590186878955281501688 +72 -1.166331943165471584058720773891702535165480887572134776594982854380914751601629 +73 -1.166359419399384843906594060173288251169354960811016923192045125192011660588059 +74 -1.166386884816663815426923430943075422433726504734390729389615947439483743830044 +75 -1.16641433942248833906732105133368631138491808507437655975097522067492781858112 +76 -1.166441783222036068513054512809917293808381404245420217022259431456198138508865 +77 -1.166469216220482470948628483361814042060362042463882874788753721511923651022351 +78 -1.166496638423000827320361385235156474505986170340892675728590356383774454324654 +79 -1.166524049834762232599955646070811424508205672947780821613604667702716118177369 +80 -1.166551450460935596049060069954586398883026373597376049862265042876116210025987 +81 -1.166578840306687641484822875511383167630135023809284616067967367855436845146761 +82 -1.166606219377182907546433948811599502898189729737314519003615941341712459543108 +83 -1.166633587677583747962654859493855420183932780994193261447142015411877059607955 +84 -1.16666094521305033182033518914622102901959129107021938028240264044502418680262 +85 -1.16668829198874064383391372162819083990456947581388459487416366637758964291495 +86 -1.166715628009810484615903045657678370733878899628001594294928646970693415809967 +87 -1.166742953281413470948356120631289426946249425392683558756276146659140696130334 +88 -1.166770267808701036055313357292066778281593132353258646789302496397837443612406 +89 -1.166797571596822429876228765506777410378142879898578229472250493171473732952742 +90 -1.166824864650924719340373722064630386199755564679349876886315056662913686773802 +91 -1.166852146976152788642216912061062910989400372336129906406091506981636587933192 +92 -1.166879418577649339517778998083908761414089761363315954665673126203425265531116 +93 -1.166906679460554891521960572074861126922488845856451117030420264551876950371723 +94 -1.166933929630007782306841945396655437018991533518623577394252958635082710402592 +95 -1.166961169091144167900953333295821235935854866679728128142482903284594877520738 +96 -1.166988397849098022989513990612179945667521582428565672118811529299669481644141 +97 -1.167015615909001141195638856249491764980725335790753350682938857338320418670717 +98 -1.16704282327598313536251126458677432715708286425089547781937217921834128344962 +99 -1.167070019955171437836520282676822430064633335686204868385195246819527795937961 +100 -1.167097205951691300751361232747346511782149449188245984376708264725633792728671 +101 -1.167124381270665796313097960190911932405550124767606353859358086270765665020873 +102 -1.167151545917215817086185407902495902751031234430158047259988580142877360721203 +103 -1.167178699896460076280451058497978444258813368209359839375148344585428543258075 +104 -1.167205843213515108039033806623242448252868165162018269490355754621824931046808 +105 -1.167232975873495267727278824241770109529105343919107632651914464007756664394123 +106 -1.167260097881512732222586982468683127687307164341405703607164322636241969934667 +107 -1.167287209242677500205217394201076494318342778773053106111380862850261240381431 +108 -1.167314309962097392450041642478234815714483183481833504785820406449496264901173 +109 -1.167341400044878052119248260190890365783456806426510491336981293681289464784375 +110 -1.167368479496122945055996027446077834913584784123805044901665898117730157373187 +111 -1.167395548320933360079014653583356456267025480913168356729829948406815760471975 +112 -1.167422606524408409278151411529200276002548220855820298480788875463276501325857 +113 -1.167449654111645028310862292869196218913415600118101392904850294868919925783216 +114 -1.167476691087737976699646252712331722619006510294127391502953760244883595532723 +115 -1.167503717457779838130421114118093514534563388321794159690085952711317015855131 +116 -1.167530733226861020751839702555331035190939934023235851431968111847202146594147 +117 -1.167557738400069757475544781561856523990227568005086426073072265032580360475766 +118 -1.167584732982492106277361361475553340154562614190591388497985372704226333546001 +119 -1.167611716979211950499424953811339159541669060687806705476045826785327434000017 +120 -1.167638690395310999153244344563675740355958766350382845726070634133907683100678 +121 -1.167665653235868787223697460421426466889468911028391333028793326336644138459602 +122 -1.167692605505962675973958902590731345720880214871763964979543641968063804316857 +123 -1.167719547210667853251357723632191034858860493448819635337333412427556689006521 +124 -1.167746478355057333794164023431021330860775534085020963945067512974803167560147 +125 -1.167773398944201959539302941132951825869333137363960109788510844277833792350915 +126 -1.167800308983170399930994620594491685834953694419849033719885658419223023874737 +127 -1.167827208477029152230318727613766209154425305397463565796251971413964832423585 +128 -1.167854097430842541825702097927434523967134931908468908105465287219540274130149 +129 -1.167880975849672722544328095680226001015574773008526550138462924007859742020025 +130 -1.167907843738579676964466262796375232109492616706951815135801885742844416223452 +131 -1.167934701102621216728720840406687292860998539742005880353591592794917403221596 +132 -1.167961547946852982858196744211121019734070685938381977570010066083309499220472 +133 -1.16798838427632844606758157638463273906344294396443129630509613941442221523359 +134 -1.168015210096098907081142257363570849275684360803305928044325655537661865751224 +135 -1.168042025411213496949634861581147443073203548076002062091248152159634774094148 +136 -1.168068830226719177368126241953431336065885405108149083192460283680691989806765 +137 -1.168095624547660740994726028651902020772338214019555335260734273808521745507405 +138 -1.16812240837908081177022758843487077486091608447376465392845835947825584059241 +139 -1.168149181726019845238656531548008011046794480029502320857399913605915498746934 +140 -1.168175944593516128868725353943809560590766550003945355044243811869250242177048 +141 -1.168202696986605782376192803311083536550675249553738288847145577855983597603495 +142 -1.168229438910322758047126558148438336826131641590002785720135011361909929743305 +143 -1.16825617036969884106206780986029583694483285045328514233136547909498136617038 +144 -1.168282891369763649821096338600136511131325496444867373819252033783745030237964 +145 -1.168309601915544636269794674333499736485535149422146119593881860609001711980356 +146 -1.168336302012067086226109935342707514438569294950162794593300551033466100849074 +147 -1.168362991664354119708111937146347927766168811658593670680562075366673091140244 +148 -1.168389670877426691262646165559240488412335666299391690328557124847072838407496 +149 -1.1684163396563035902948802083729037756697179148620817307301290297937486458972 +150 -1.168442998006001441398742240892451076726224605236079589865639831136373321931459 +151 -1.168469645931534704688250161323346789458580258064154678419134772185204721822395 +152 -1.168496283437915676129729972760559804273373741573319713789608061479680423908555 +153 -1.168522910530154487874922009293344627813749294189801001164005546740610514898629 +154 -1.168549527213259108594973604501161332931304752876581605631223966428643620987466 +155 -1.16857613349223534381531680138010620935901418963603563233486192907616314185951 +156 -1.168602729372086836251429703504660947335958280157681991849011945408838217790166 +157 -1.168629314857815066145480067996574017792946219560008403885944165317226658551151 +158 -1.168655889954419351603849741641258329822920103138175287296671201679885801860421 +159 -1.168682454666896848935538542262218967700819256215601297959181784663983853701263 +160 -1.168709009000242552991446188235708560817808571914867853365781065173584335392697 +161 -1.168735552959449297504530879801040352159515313306444401710925305214155416128724 +162 -1.168762086549507755430843136596765042471424367585676989672050138012270456769704 +163 -1.168788609775406439291433496629231742587784453186729780698301876550905028157258 +164 -1.168815122642131701515132682657900616618331680904756396857312923402181441739716 +165 -1.168841625154667734782202842761149801356400275597756094494669975255279729449099 +166 -1.168868117317996572368858472627216706467945465963889998536624180645635984766329 +167 -1.168894599137098088492655627897328606335116928602638055910477290145395147155794 +168 -1.168921070616949998658748035672004304975042748530774967289666052347078117721455 +169 -1.168947531762527860007008715076942373879586618587141286196954924560811520776178 +170 -1.16897398257880507166001571757184681910770017684577904085744129169723393691199 +171 -1.169000423070752875071900598473972825235804837099572367429780568852843971198754 +172 -1.16902685324334035437805823195809825311208135102961473374622755369168483430794 +173 -1.16905327310153443674571658258603564560468017053773701537619561286456916001777 +174 -1.169079682650299892725365047211689437083973019474498836630009250953139078824917 +175 -1.169106081894599336603039981902028691209330972901253156980323934521442377152396 +176 -1.169132470839393226753466029310181837254547627435350299834949625369281041469039 +177 -1.169158849489639865994051862734161373841327697853924452165816145381863289738402 +178 -1.169185217850295401939738963893488203287625526214332935143405656240142113234441 +179 -1.169211575926313827358702052256201999145978371027864791303688124361042873083318 +180 -1.169237923722646980528899784550410649840297269244171233102352613832662133282047 +181 -1.169264261244244545595474343897643225153271826337011848724708293718884284196508 +182 -1.169290588496054052928998538809821948833860529757569583839127465043325565192655 +183 -1.169316905483020879484569033097654205572662282232738400304630703296540226329011 +184 -1.169343212210088249161744328545660546450081527038862426461320598307605345449647 +185 -1.169369508682197233165326123017893872752486563612305934267579326858205963540158 +186 -1.169395794904286750366982667468663369472130907765252564743476303106076364654238 +187 -1.169422070881293567667712746144249229203390723554153991683761383896619394796247 +188 -1.169448336618152300361148905074675663521640467448721512379000796587045120268657 +189 -1.16947459211979541249769855476909505794342881100202909271646497234358452050859 +190 -1.169500837391153217249521573844220310545836214321574646691246858729384460405834 +191 -1.169527072437153877276343041132520332269881623396126769244560936902145673368507 +192 -1.16955329726272340509209972463556031452686352293209766836748419071802313588534 +193 -1.169579511872785663432418956507918629330954521715895831996927330485470685225254 +194 -1.169605716272262365622928524078541067849408961441351369207510882435603322271657 +195 -1.169631910466073075948396207739195500742015471965824707538964027651032191023906 +196 -1.16965809445913521002269759735386092040356626302824996869887410667567703673814 +197 -1.169684268256364035159610819668419170383285370251556439339230778769150181729238 +198 -1.169710431862672670744436810026910456701512635886048600371967928861571541723483 +199 -1.169736585282972088606443762528859952102030119457257310913460623595784570708134 +200 -1.169762728522171113392134393591777436776543666542594208978990166265510042442053 +201 -1.169788861585176422939334654713869963812341604093019115241744893525196805202097 +202 -1.169814984476892548652102531064283997314680186264351169330607316222314994759559 +203 -1.169841097202221875876455563361803355350101789604609974489463067602567142441714 +204 -1.169867199766064644276915731337867614797394661705503210186959346425868838878566 +205 -1.169893292173318948213870337916037423879655183006118123370364373548200428723976 +206 -1.169919374428880737121747534077613450338026683799760782764303818356859424583683 +207 -1.169945446537643815888005125222009505407952349211690150103463241898063402865004 +208 -1.169971508504499845232931300670682769248576235140844758470697035448342870628951 +209 -1.169997560334338342090255928804930052300092923779421319625317604600662922425525 +210 -1.170023602032046679988571061170663716020481889372679598732761661507720819985795 +211 -1.170049633602510089433559289727379309178282249626397699251888578171665761631509 +212 -1.170075655050611658291028602263914222730698851116882991758709649070706018278809 +213 -1.170101666381232332170752381850267804462577064912194234605488792551224024631907 +214 -1.170127667599250914811113197042703487959794803064327240878694003626737816852719 +215 -1.17015365870954406846454903040857766989504894366232439333634356699452252597494 +216 -1.170179639716986314283800593787833412570500100338143172938758896111729676129862 +217 -1.170205610626450032708958379559854659551348463349573967308231112324672364287284 +218 -1.170231571442805463855308098037393642208014934878419234288789125816567316754616 +219 -1.170257522170920707901973151963555642047204226165907046890552163099174426959746 +220 -1.170283462815661725481352799943346382657154503416775754491126535214935514725344 +221 -1.170309393381892338069354661498053187545899017055317232627358279782450664349426 +222 -1.170335313874474228376420217288736794566264063737624325623649651964002835388017 +223 -1.170361224298266940739341958914351509281430450161999979367106498902682542729628 +224 -1.170387124658127881513870843550482360649030313033603937228641722213271718384579 +225 -1.170413014958912319468112709556384251747807771203615443286018232353807004618253 +226 -1.1704388952054733861767123100409249417397113249606245735641025605053715072856 +227 -1.170464765402662076415823622242166225499697430677858001205032537473971711624523 +228 -1.170490625555327248558865091440661073854082481855787203120468679785684541218039 +229 -1.170516475668315624973058468993093946499159443734358940181201731993659774249291 +230 -1.170542315746471792416749904940642184636536318630156084102224446786252195234205 +231 -1.170568145794638202437511956515383531233877478124615493413092683762768308547042 +232 -1.170593965817655171771025174738213620538801173393749692659207389002626725368645 +233 -1.170619775820360882740737932173062938848331113095410357499812697624731066684945 +234 -1.170645575807591383658303155774710506248163013310575674810937745152680135005223 +235 -1.170671365784180589224790629641176591643170775036395858657525377031121647479909 +236 -1.170697145754960280932673533356534385341024033154090650319459415627116717680299 +237 -1.170722915724760107468587882486005956045816657608490912467774927066876908432825 +238 -1.170748675698407585116863538662396260576191618791755524203222532039625413235952 +239 -1.170774425680728098163825457581265710040564229450245298740835425290139247962119 +240 -1.170800165676544899302863844101742087571927958334039284038228849620795630824863 +241 -1.170825895690679110040271884530521728934089104537099529276461087009848974210841 +242 -1.170851615727949721101849727048403094147381059055822360211100275091183058280399 +243 -1.170877325793173592840273382121628458435086051848688447015389713941819481796608 +244 -1.170903025891165455643227215624376723857911799453262523752244720809545499075027 +245 -1.17092871602673791034229870828394759548776398325374291041040179723223376472864 +246 -1.170954396204701428622634155946499881290391225764598989865802965238827860878005 +247 -1.170980066429864353433353986048649773370688368853493526411246395414131674245172 +248 -1.171005726707032899398726366568793967133598907557264181858704509724984620640933 +249 -1.171031377041011153230097784621692698397202779127198187288401047713008472149236 +250 -1.171057017436601074138579272750624557655510429378306762005502933554946555944199 +251 -1.171082647898602494248486961863303613545497224941724421107486334538626463615512 +252 -1.171108268431813119011535640650725289073470724939869279605269937804808834815442 +253 -1.171133879041028527621784002222175936178752364505916591194447499402265825715109 +254 -1.17115947973104217343133025958479750557057192843462205299768481245097473257927 +255 -1.17118507050664538436675681249233847521617340009324019739801750651428098216849 +256 -1.171210651372627363346322649085040655072528030511847525798506136804879783425003 +257 -1.171236222333775188697902166641004007270269531051873665342690903148671119252919 +258 -1.171261783394873814577669096658833596549849429793076113135625949537688353019246 +259 -1.171287334560706071389524220391899608835977729689580501307189639686773579747837 +260 -1.171312875836052666205265561856128446885176375777312740601805601497841545373956 +261 -1.171338407225692183185499746235885638371501139758966240044593727472947162198738 +262 -1.171363928734401084001293212516205087958932740820497050569528924450596685116461 +263 -1.171389440366953708256561970074359492172508591354297200599543460713628327951545 +264 -1.171414942128122273911198589869548942508157894554657222336971030022307283301519 +265 -1.171440434022676877704935121776304303456982259611046803326299644257918152339421 +266 -1.171465916055385495581940630515054310168370177713850763874617938141553563590342 +267 -1.171491388231013983116152043542185934506230709782751616344117193328853843289365 +268 -1.1715168505543260759373370051718318743975181732440137589399273283340435484604 +269 -1.171542303030083390157887432112542492733092689683759274616239997583538462750217 +270 -1.171567745663045422800342466513937638727936284738240897243708705553878421017411 +271 -1.171593178457969552225639523531382003621868473055406225056260198843794761567259 +272 -1.171618601419611038562092131330681477916929221965553749100427812886289465348737 +273 -1.171644014552723024135093262369752879991699556492360833680474694128673894503766 +274 -1.17166941786205653389754285571017091387029940938725080286595804970299900524426 +275 -1.171694811352360475860998231028439792096674469840829707397474412136420048362448 +276 -1.171720195028381641527546095914768139994435297378211550816841569905910859587383 +277 -1.171745568894864706322394848966040098981209745953741109055237653954301670442835 +278 -1.171770932956552230027185882099568494938876999577089614227682065753906555090582 +279 -1.171796287218184657214022586435083065785690206942095190342323391993814964771275 +280 -1.171821631684500317680215767014243590206964551613863925875988892789182768990507 +281 -1.171846966360235426883744172549769873818161913224748479210164337320503751784381 +282 -1.17187229125012408637942884732004348368628162890248719275561735295745650960885 +283 -1.171897606358898284255820013249755437940184792559005084648860309984643119563749 +284 -1.171922911691287895572795191142845321966075435672349756924796276178581596091637 +285 -1.171948207252020682799867270960596091210801283323828279314769315525935944992723 +286 -1.171973493045822296255201241965310714695773755351595153819611289962529201292691 +287 -1.171998769077416274545338294478497401765003624243876579796605398099395865950688 +288 -1.172024035351524045005626005931925033133952318826496796824488070342223656865481 +289 -1.172049291872864924141353324820275188749676117562074702112332206054144919693998 +290 -1.172074538646156118069589067095407439092270869638712210507409352417444784242568 +291 -1.172099775676112722961722640474465960116151493933390332526993107482550748401808 +292 -1.172125002967447725486705713067183668819439308533164406789885393615257083176848 +293 -1.172150220524872003254993543661780587212737807161760498995230645745526223970097 +294 -1.172175428353094325263184691943801665007577253643021745237371401008652978642113 +295 -1.172200626456821352339357827858091470433975661679904376159023352116976664720323 +296 -1.172225814840757637589104360260854646002269231210611812421015462293133824684784 +297 -1.172250993509605626842255605946397480525878375917863324054337724029141369060507 +298 -1.172276162468065659100303221071683036101825614208985197717663762182979746950055 +299 -1.172301321720835966984511617941255661791619712013296219010861129159703969233532 +300 -1.172326471272612677184721091055396104248339361027123461503682158297583875420232 +301 -1.17235161112808981090884037726555147629346407655266064635721327689637464939015 +302 -1.172376741291959284333027375823140761262086239429079794468500572531465223473725 +303 -1.172401861768910909052556755050762014616733705255796842531430965948893693662954 +304 -1.172426972563632392533373173308617682693955066253409031078248917140158995482488 +305 -1.172452073680809338564328842873625206316947333952151705329474673205043097562244 +306 -1.172477165125125247710104166294187036212115987633849560294402254092292233157043 +307 -1.172502246901261517764810175729953086545527090271864772979133191734319103302994 +308 -1.172527319013897444206271506733115228292677675004269838304689702856397804675738 +309 -1.172552381467710220650988638875823418425992161516884885029858268331535180641977 +310 -1.172577434267374939309778136577202223911430435077115373321864667329638261569844 +311 -1.172602477417564591444089624433170588119554301343192122921094991170348534606062 +312 -1.172627510922950067822998232302822465356939517545522585188714308660806188332269 +313 -1.172652534788200159180871246356507187699210826579146887053375877394974824056512 +314 -1.172677549017981556675707703242951905054187941640787608923660647897473293580659 +315 -1.17270255361695885234814966548578993930831952734546217560865924787734183039149 +316 -1.172727548589794539581163917173694208426044945469420287448953520585081507758374 +317 -1.172752533941149013560392819962959805402802402318999282376494920233357444781677 +318 -1.172777509675680571735173070366830165949359665139388822424145066554621847571801 +319 -1.17280247579804541428022110026211284064749666747084684664984924658867614248486 +320 -1.17282743231289764455798386350067952201238602694109473616557548741183363432507 +321 -1.172852379224889269581653752471286491380675375553367573073022440963443057669259 +322 -1.172877316538670200478846389415781878778182824598751163888558784432230672054227 +323 -1.172902244258888252955940038263180911877396499611368133558242650283851280618762 +324 -1.172927162390189147763075383705285515809603923093265107510609502949217272556058 +325 -1.17295207093721651115981442519849606893291937019366238285126872866611053339767 +326 -1.172976969904611875381457234538206682665220394175308316427619150714784108221309 +327 -1.173001859297014679106015326614686925165117369883291072939233974476373826973118 +328 -1.173026739119062267921840393922628324984704439687707633020231184588966444334267 +329 -1.173051609375389894795907156360569154829653485081243268942212071809447360403418 +330 -1.173076470070630720542749078821201797253850460936481894946089120086774916144322 +331 -1.173101321209415814294045710039109330499218298353618858267175795060846979490978 +332 -1.173126162796374153968860397128767747781303784821799051803194340525635146344354 +333 -1.173150994836132626744527131212683348134322404641348378148256282046967681720828 +334 -1.173175817333316029528185280507307229483643222322962533303372039537916789479108 +335 -1.173200630292547069428960968202876399927680072056599758821538281447723912648835 +336 -1.173225433718446364230793853442569733303103973101149413793520677467231770833518 +337 -1.17325022761563244286590807467633276899438878417422617997045987533568568458544 +338 -1.173275011988721745888926115635414139646183299731062054804465115195736240147401 +339 -1.173299786842328625951624355145064156957256313398814427449763761951318039642453 +340 -1.173324552181065348278329062964968755086392384450368873283091492671293499057061 +341 -1.173349308009542091141951604819825550387478756782782466510292765099232594270631 +342 -1.173374054332366946340661620756009199211214632469573267582246501654313727233974 +343 -1.173398791154145919675196941934516503355692363335865222935933951173817243671136 +344 -1.173423518479482931426809011945323813400973986956415921148990015082678581537672 +345 -1.173448236312979816835842579703926208598162706880312381537349993999413982140141 +346 -1.173472944659236326580948431967155690165669148923977460257669223743717909966107 +347 -1.173497643522850127258927934482390221727414783164627989482882588987131373714131 +348 -1.173522332908416801865208151761962902150101832955447883017483253997956839402301 +349 -1.173547012820529850274946316452956885126149197393545946753659581482802678572268 +350 -1.173571683263780689724762420251622896417142147288878128114205285685946072493833 +351 -1.173596344242758655295098699291378380615005490843582318530645953817494927176243 +352 -1.173620995762051000393204787913736478472213384659701949596736568220702493867207 +353 -1.173645637826242897236747315712565244156731552673564126787372516756972873335159 +354 -1.173670270439917437338042723723788817040080648991707751368617701003008627104174 +355 -1.17369489360765563198891207661500872964398840296293139619561146587615695013487 +356 -1.173719507334036412746156648712541233945200054393216673435712374827803792507098 +357 -1.173744111623636631917653062687031541136823995976925025866462941919327809418341 +358 -1.173768706481031063049066760703114280909281564237645386023039098193126745706991 +359 -1.173793291910792401411182588823537388057600160981159030594330216119051481645845 +360 -1.173817867917491264487851276443750116427830672085045233358527539789958367907537 +361 -1.173842434505696192464550593519171069535829033829514098455837718713201254310824 +362 -1.173866991679973648717559969334195137245535484118798150299920304221712797915444 +363 -1.17389153944488802030374735754946515926549085272822540009068834539088014135643 +364 -1.173916077805001618450967133252021126459439275995488585426155322849987264798269 +365 -1.173940606764874679049067808721642914579010739914779704404190336588348357935763 +366 -1.173965126329065363141508355616018063483113163569426771847545220624085567005985 +367 -1.173989636502129757417581922267290116637338039725927501427568489651422001672197 +368 -1.174014137288621874705245735773071676071156095736259684745139724207134797315041 +369 -1.174038628693093654464555979556135769349019916189026398802185678504716980956365 +370 -1.174063110720094963281706438058725536774142322781717562908600955417745153117572 +371 -1.174087583374173595363669701229741805231531560019434951950990301535486607670627 +372 -1.174112046659875273033439722455977002979092556657848767829486721909609397849126 +373 -1.174136500581743647225874524582058277447879463376183736758309907170652875730042 +374 -1.174160945144320297984137849657838802794854726688961881349630421045311121447855 +375 -1.174185380352144734956738549046630309585942752822893593572621058770734922864664 +376 -1.174209806209754397895166511522898046536029160913616220501960563697904287297528 +377 -1.174234222721684657152123927983837911596061819060574769169352225464792927269896 +378 -1.17425862989246881418035069239562059169152930033329470265536230423336330157807 +379 -1.174283027726638102032042739592015458850842696815433181712847533736633841743339 +380 -1.174307416228721685858862121540593924017343403258113558751684621796342978786247 +381 -1.174331795403246663412537624689754194144640964918979891406501295671861612229408 +382 -1.174356165254738065546054732008403165788306584295384644768173233443457826813884 +383 -1.174380525787718856715433734329272778808545177270512731761202292356153808130538 +384 -1.174404877006709935482094796606533813391292180214230002864887935371292240374222 +385 -1.174429218916230135015808785698596115701799353733673646722647016560920614925332 +386 -1.174453551520796223598232667287746862344948184577325178689446711152641076324851 +387 -1.17447787482492290512702828054957400857475937807589455436056912739415465211804 +388 -1.174502188833122819620563300186946803938604551108501929064319761784969787954805 +389 -1.17452649354990654372319319644567550273596271900498461995393718187900736281167 +390 -1.174550788979782591211123004731844453200886357164140883748493449419207176188027 +391 -1.174575075127257413498847717454202933469959886983288629080178397861208954817859 +392 -1.174599351996835400146170111718902735863779547993034973821442354661255926279743 +393 -1.17462361959301887936579482750828691237958168631959306608385967404574766641307 +394 -1.17464787792030811853149751198035661905205317884348731062687293182745854088915 +395 -1.174672126983201324686867846530968977369074794425753126392191190999518371961627 +396 -1.174696366786194645054625274266744656501006467698877482916996060282384729334911 +397 -1.17472059733378216754650624654308582687653775708951275588228180090466262728842 +398 -1.174744818630455921273721808228619606661323637027582546109261096648139154978593 +399 -1.174769030680705877057984342364785487896842035728869178243628229475652116354418 +400 -1.17479323348901994794310229589717386524556315277746360584843001079950746705493 +401 -1.174817427059883989707141709163593081151353606303400787921593691140548308107024 +402 -1.174841611397781801375153372832690737322231981437271198930636514489346044906018 +403 -1.17486578650719512573246443699627780120885387196993991074396084250356361495847 +404 -1.174889952392603649838533298128297661887727572803661964327750479042686214509145 +405 -1.174914109058485005541366590633643173630057963986836306870324383080011250749643 +406 -1.174938256509314769992497110720749285474820601619030131894071892863641837944412 +407 -1.174962394749566466162521501343073516217315867707942678626781435874875712159489 +408 -1.174986523783711563357196527966217728117730325726007659747115176965403567240124 +409 -1.175010643616219477734092775929538817927299372432676925831618481654883871712749 +410 -1.175034754251557572819804601183639525972052483530417056846669546464009321800899 +411 -1.175058855694191160027715167198120015322600352407878930138685364780891829150192 +412 -1.175082947948583499176315401847402652653845240525224855520055606920534997754156 +413 -1.175107031019195799008075709096312996242613973829976571176999837458977855963897 +414 -1.175131104910487217708869271321405837483467833105163178430036222062682153986013 +415 -1.175155169626914863427945779118762729977227499560661005256534078231203888540081 +416 -1.175179225172933794798454426464153261148145435647406465608820196374163060234486 +417 -1.175203271552997021458515010107042868787143449275067111825024446498992692884637 +418 -1.175227308771555504572835973095941779037674970174101852678061250000147377769428 +419 -1.175251336833058157354878233349019150096378274958357098338605586162473418812982 +420 -1.175275355741951845589563639200750261069443296612006644620334495788389417452193 +421 -1.17529936550268138815652689487261910859868902822697426193043619614859618260002 +422 -1.1753233661196895575539097998335605924509743356530602754132268926723210749082 +423 -1.175347357597417080422696647033892119460597001565580602922934343479194419659743 +424 -1.17537133994030263807158962601495047404078086768087815355724535486618747976761 +425 -1.175395313152782867002423077915512740751873370564348391112074177143721583763057 +426 -1.17541927723929235943611545041533647474227771353101627226631994034659123789919 +427 -1.17544323220426366383915780167580076066882049871320677003265947857186759124146 +428 -1.175467178052127285450637703357662848151625188051619715649464197003068503541033 +429 -1.175491114787311686809797393816361276906471182061354616906587973976729405368514 +430 -1.17551504241424328828412503359609238918972371678040705515340390469091226309894 +431 -1.175538960937346468597977916365059459631042478117202758250576285181575793249848 +432 -1.175562870361043565361736489455838948236534733438092211995261128733314986233844 +433 -1.175586770689754875601488039196723203410933424867380954253205814740464880930911 +434 -1.175610661927898656289238897242179917130959912516215898079592294340758660220848 +435 -1.175634544079891124873654025133212379526827534798988822942467207733872753527184 +436 -1.175658417150146459811322835341407717478987641196671610324565281632330818304215 +437 -1.175682281143076801098550108073819460553635514144424388649509811351962287611888 +438 -1.175706136063092250803670864139542593577076837159038587325954474974116720754362 +439 -1.175729981914600873599888055202900371028841892353280547602387381811035985395671 +440 -1.175753818702008697298631933772569233604737858592344814102310479122826209352767 +441 -1.175777646429719713383439966300717837893555763991207787259206685054220626329687 +442 -1.175801465102135877544356153791325148992089018038899614803603788310952848779186 +443 -1.175825274723657110212848625342267422653219599066208500298215295366777504202217 +444 -1.175849075298681297097244371071521394551429148882220102193494898572107731196818 +445 -1.175872866831604289718679981903917782515159428418170277545685590368102273500426 +446 -1.175896649326819905947567264721291982893563603901142174646482846041339843044636 +447 -1.175920422788719930540572602405614301091536313447623323250887674319251185072677 +448 -1.175944187221694115678108929331736901930215143969398656118057507101500518739272 +449 -1.175967942630130181502339193893765607788617315704210033641611963725996046673689 +450 -1.175991689018413816655690180676748428079308687209992640361181933619768147577637 +451 -1.176015426390928678819875565913365995831865964909194216901930742245944062558792 +452 -1.176039154752056395255427080893608646024391013279320936782964499968911957797753 +453 -1.176062874106176563341732659024027432530448166315566106658713850756001005846745 +454 -1.176086584457666751117580443262048689540295406588072308833110225819637189484965 +455 -1.176110285810902497822207531680040549159532503529843977307992478861153386271075 +456 -1.176133978170257314436852339943311886354022393070447900294829483075744706603224 +457 -1.176157661540102684226809460516006238942001492116990111212630465993794406438226 +458 -1.17618133592480806328398589943892211404937238969411295300088998065289335596532 +459 -1.176205001328740881069957572553643520126515996119522212532161604865380181218781 +460 -1.176228657756266540959524944077997338722059701794587521172661463889875414597373 +461 -1.176252305211748420784766691468764062827291138427739690162149596857711497531519 +462 -1.176275943699547873379590281538752275505263274669350131773702210441673118083677 +463 -1.176299573224024227124778343826801827112219783667726777784666010141007237028908 +464 -1.176323193789534786493529728251002801762679726473856095144522907670686486530725 +465 -1.176346805400434832597494135107403860481613596693326248640047581106559556693562 +466 -1.176370408061077623733299206508731233062790084173456817137528652681256243967119 +467 -1.17639400177581439592956896939014533297919970609351408567943773065184634364678 +468 -1.176417586548994363494432521241822526365064137590391893264134990127761662604105 +469 -1.176441162384964719563521850761161840328383075383699442232363013676999355826964 +470 -1.176464729288070636648457686650677197496262346059127415550188300530058298922819 +471 -1.176488287262655267185822268821141969194816007614620233460397817961417315021924 +472 -1.176511836313059744086617937293301112083484540945307724078600786180583501448069 +473 -1.176535376443623181286210435125453762067653715965137633761913506025455490060815 +474 -1.176558907658682674294755822728432781171631411961583143368614795297903199227992 +475 -1.176582429962573300748109901963964270630498293324097239961313931619046915544745 +476 -1.176605943359628120959219049457076366209621527603645036800838025717216172790361 +477 -1.176629447854178178469991359588139615726944850676093281140777821665402371789377 +478 -1.176652943450552500603646998665257806559801387631613623961490050106828549896777 +479 -1.176676430153078099017546672813085171766512664929246746521904400960865567657896 +480 -1.176699907966079970256497113149720373117605052837244974584737830523187972795141 +481 -1.176723376893881096306532482859116460154107793497788050322446817981356387259756 +482 -1.176746836940802445149170611802446065276192713167081849610428633166610861633056 +483 -1.176770288111162971316142965348069351277772898472519422242497657151959135929773 +484 -1.176793730409279616444597255136165621698491983286058169976946028042425377105085 +485 -1.176817163839467309832771600530704984429379182637189719885493416088082647833066 +486 -1.176840588406038968996139150548250980291724914694038814683647206608226019099181 +487 -1.176864004113305500224022077090095612458830185602667904152592370698884818167312 +488 -1.17688741096557579913667385134143170778967887964813598105841460650241092446186 +489 -1.17691080896715675124282871623866098210395375512016480303442112625514101926202 +490 -1.176934198122353232497717268943516549385125151108840571958460817215814056555969 +491 -1.176957578435468109861547068300442897607894949442428250113056033400138977081408 +492 -1.176980949910802241858447183291621545617780532156737281111382526248298346452765 +493 -1.177004312552654479135875599542153697023200360919565035104184474018296135541295 +494 -1.177027666365321665024488401966209225677632958523581281555275618558732308307244 +495 -1.177051011353098636098469652683421276814247207062123509115106283290747041016263 +496 -1.177074347520278222736320884373444668525224278930748155381062549900298298798525 +497 -1.177097674871151249682109130275401156819543422365664883413965486497288140618063 +498 -1.177120993410006536607172413077902517197308830748855745115735731703251798534595 +499 -1.177144303141130898672281615984470336275986427767555129789460890437241331257421 +500 -1.177167604068809147090257660278456444698542738535419472020820445398577909045533 +501 -1.177190896197324089689042914751007110018773935228300559495705578700333755297813 +502 -1.177214179530956531475225763395204504632284653884109023905588860927831745975565 +503 -1.17723745407398527519801725880925763469853739922178780282689627221380509130603 +504 -1.177260719830687121913678789791498933429601053387778155065769924976482380938947 +505 -1.177283976805336871550399692649969164602494797088841534359924102755816951502438 +506 -1.177307225002207323473623736789539234625319066976501989996455091614214271309302 +507 -1.177330464425569277051823416179820065331589075818327839231227864439685438310352 +508 -1.177353695079691532222720979347547932703936375414203673640975846452191213493094 +509 -1.177376916968840890059955131577699733176659606625863487832766218183905731725268 +510 -1.17740013009728215334019234404828760969769773427676340909158744304488641409858 +511 -1.177423334469278127110681705664602371422561736660459397670381591583707791778874 +512 -1.177446530089089619257252254399617297255266627208019768602977446972382841520266 +513 -1.177469716960975441072751725988325354340285061584731178286891183167128001327127 +514 -1.177492895089192407825925658864960724341846681300311613342504386719846279297889 +515 -1.177516064477995339330735795273346955614949517095960750769589562556861038195827 +516 -1.17753922513163706051611671952201619725884220536552407152586103921023458095559 +517 -1.177562377054368401996169675397253977015897951727297082337884389644159470323909 +518 -1.177585520250438200640792505788839020883558221978877571390890623071446361629596 +519 -1.177608654724093300146744658624964846365187820605399481308032913117806087819735 +520 -1.177631780479578551609146204254646468086616794997430236199956668668553167956123 +521 -1.177654897521136814093409810457828715001312776940145783237770873165372905480537 +522 -1.177678005853008955207604622305419559908628392890302841505782535254188588021792 +523 -1.177701105479433851675250995133569698178652436608769267574627831941769624763442 +524 -1.177724196404648389908545029938705583422764489230585221400862719770885605049767 +525 -1.177747278632887466582011861542094439721094562654055453821494755819067276368547 +526 -1.177770352168383989206586650915073635602377104634590303639234415930723128472385 +527 -1.177793417015368876704122234098510443283883848900168464618027695708091923274707 +528 -1.177816473178071059982322381192568843059450807104248908248412211494254321264008 +529 -1.177839520660717482510099619935444898831241267215669713957169600787581757539381 +530 -1.177862559467533100893356579432388564588310766924363875176117555968925338302983 +531 -1.177885589602740885451189810639054827422499983204765080589852209914428673717021 +532 -1.177908611070561820792515041246018101022032100132735683254676274877410160998731 +533 -1.177931623875214906393112823654138011374268738002455980322647935994120647997879 +534 -1.177954628020917157173093535773379426811050907525931712264124931620772336764669 +535 -1.17797762351188360407478069542066204699775389413638854597358284443044366381503 +536 -1.178000610352327294641011550135342355734940834049603652121919078837122048579728 +537 -1.178023588546459293593853905274010542517426902511393284106734649145253083245635 +538 -1.178046558098488683413738154289414395955868840010343536381946421537811498366223 +539 -1.178069519012622564919003476141498462949241353778047676888912435489010318869475 +540 -1.178092471293066057845857165831767251697948396878230511341908205967339788983977 +541 -1.178115414944022301428746065095443241312915450960908306534740923113141198163564 +542 -1.178138349969692454981139061329191259197002036206141248610782360280480087423024 +543 -1.17816127637427569847671962387551771908197728247965452909736889905016994088833 +544 -1.17818419416196923313098734782832360336117024415206592957575477273978176269121 +545 -1.178207103336968281983267476567491255156527727064727085629169904638626405071666 +546 -1.178230003903466090479127375273814356612884293800569212830760392142796816692667 +547 -1.178252895865653927053198928719035254651547562862726204328606323425448827718959 +548 -1.178275779227721083712405837669231404479831790232848551868113814018592485105151 +549 -1.178298653993854876619594789283290491387306441850507131721071185295230039357391 +550 -1.178321520168240646677569477931729125806128965643286281950834955605902062361962 +551 -1.178344377755061760113526453904640254507371267946418564991774547635579330072824 +552 -1.178367226758499609063891778521096967569898863202142218595501908171008904025896 +553 -1.178390067182733612159557465195892587996079076056919223290400020843946811115459 +554 -1.178412899031941215111516687063056196337198126340388162259507853906566626849483 +555 -1.178435722310297891296896732799146460377692680682296063279519583569967324616772 +556 -1.178458537021977142345388693332892209920849804570096499677449104261090845040495 +557 -1.178481343171150498726072863171313025286197491570981197204234385795898573514434 +558 -1.178504140761987520334638841116014607688110525075954132210883396932892715848599 +559 -1.178526929798655797080999316186909288778932335038991405584846604684787279738367 +560 -1.178549710285320949477296525614159140009921030474347313318430061064770376921806 +561 -1.178572482226146629226300372802675190924326646255186208317326187685016713906263 +562 -1.178595245625294519810197194217028696010627664066106378548954342612540128480653 +563 -1.178618000486924337079768165178136645393057194958729034841042888517215384804665 +564 -1.178640746815193829843956335606571244618565180494197645023928748912734300214776 +565 -1.178663484614258780459821287790809348420630712904800785765785920419805284786369 +566 -1.178686213888273005422880409302180284009922430932023757657078331579808561741045 +567 -1.17870893464138835595783577522168660866540375811116749342153661238531951454359 +568 -1.178731646877754718609685634887259587773323115252634183510039092253965829000107 +569 -1.178754350601520015835219499413367032666261816701580528466402400014238253936296 +570 -1.178777045816830206594895827278213088408966279335242498130633120585492087815558 +571 -1.178799732527829286945101306317055101893146640704547656236391116814136485489899 +572 -1.178822410738659290630790731503409328136858059773249427696794300848474976301407 +573 -1.1788450804534602896785064789431224514924052005607595260623615500371248821515 +574 -1.178867741676370394989776577549447218560495840938930804932690139055327645811516 +575 -1.178890394411525756934890380910375417045661341390060282518411935592269320935317 +576 -1.178913038663060565947050842902547511668081677206532617332961417495082350383624 +577 -1.178935674435107053116902401649072992704290767838906015985929101489826328640707 +578 -1.178958301731795490787433477461556438927031969830292798977476120362534909420022 +579 -1.178980920557254193149252591449528984838638927901559841676851481877904320793786 +580 -1.179003530915609516836237112523330858344963419388688203865448346681456317917184 +581 -1.179026132810985861521553641559275471610410844673234445291347385581498584881142 +582 -1.179048726247505670514049042538646762985284370194495509502529135110707007698126 +583 -1.179071311229289431355011131514736665818171324127392318733790222964837880115651 +584 -1.179093887760455676415298035304716290863617346042141132338076268083634697610967 +585 -1.179116455845120983492835232845650229058911503880346246008744654576338621894091 +586 -1.179139015487399976410479293196405892842227643709693979539266191746756421522618 +587 -1.179161566691405325614247325209576605058786172264196448773426922654866124755523 +588 -1.179184109461247748771911154939825808959314299948552611863826107174541929650727 +589 -1.179206643801036011371955247897267910902795969213065032693106276893599175391574 +590 -1.179229169714876927322897394296626485153576814359969406013973261221391739339156 +591 -1.179251687206875359552971176494950479578583476157909577377238768157360028366043 +592 -1.179274196281134220610169238852621280011616798444462606304753077737819639893095 +593 -1.179296696941754473262646381294245643400518565533140943664557151239410305788924 +594 -1.179319189192835131099481498887799225359482328910690252033391419326753912772453 +595 -1.179341673038473259131797390802060342104328253204807131545612676981780141526272 +596 -1.179364148482763974394237463043951361559684245554030046187854469747410995969543 +597 -1.179386615529800446546798350418883361208832050954197879827735665243713648330044 +598 -1.179409074183673898477017484198576074426805436804387847219320662534410639899963 +599 -1.179431524448473606902514633022097331908243195332290785435340612698334252499803 +600 -1.179453966328286902973886445597031855575885542478153876184381633146990530797409 +601 -1.179476399827199172877953024808746050118690739914110882891847858417831792297302 +602 -1.179498824949293858441355563886661039021952253506397951980194280828781385651683 +603 -1.179521241698652457734504076317278290447031171840439437190527118703039052580633 +604 -1.179543650079354525675874252234418462290315246624153643469287578388225918175158 +605 -1.179566050095477674636652475057732259751625166379879503123012538946801498338646 +606 -1.179588441751097575045728033191019843173774214779211208036751515690251991192372 +607 -1.179610825050287955995031562632250355023511311250325864918614207523629322940424 +608 -1.179633199997120605845218757387403164753175873631102191279287123539951243965265 +609 -1.179655566595665372831698385620355176826443444425555396506813623557688427705044 +610 -1.179677924849990165671003650511011734149220155537733073007996366661659874973639 +611 -1.179700274764160954167505935833720006074476587155752167162661399302436083871907 +612 -1.179722616342241769820469977307711012415210471391579379644025927839566480084468 +613 -1.179744949588294706431449501810887343675025863517222793038798731183727859590307 +614 -1.179767274506379920712022377587705939961289266102807521439886262784569188214581 +615 -1.179789591100555632891864319621196739543202835491799195259674515876384131487105 +616 -1.179811899374878127327160195378306361303015567914515058501707389038115604306235 +617 -1.179834199333401753109351977176759007727828930042067250758809908432891320555167 +618 -1.179856490980178924674222388460482236698545437392101619628165962430999960602595 +619 -1.179878774319260122411313292309350927012987168359341400214411085978223450296555 +620 -1.179901049354693893273677871547556435952006430125554512379773261776731524965778 +621 -1.179923316090526851387965650853307404632217187814804631360116142541536669930277 +622 -1.179945574530803678664839412310811701503607623657098591259955653857183875441621 +623 -1.179967824679567125409723056883573405000032833527303372688174655393168268707566 +624 -1.179990066540858010933879465325962317622520589786555842571181947280470051409773 +625 -1.180012300118715224165817413087774085941679153607169749058495017715907462927452 +626 -1.180034525417175724263026594804094390176963311334092968141557899891851794412925 +627 -1.18005674244027454122403981500020868488960016904569137072989966449803084899582 +628 -1.18007895119204477650082140267855744636015294202044044642042523283121611107676 +629 -1.180101151676517603611480908491823645556948764705647818361934274133948116096251 +630 -1.180123343897722268753311144243152057075534532730299536935082303174744040963282 +631 -1.180145527859686091416149625491236878564536686545276211969270390607792347847271 +632 -1.180167703566434464996062479074572822150612716061591007040198449814260117177272 +633 -1.180189871021990857409349878405543205106932719614310109489877084944414045437062 +634 -1.180212030230376811706872070421214473012932894369034492336958252770038015711914 +635 -1.180234181195611946688695059113717902123084904827448965891787470208159389485763 +636 -1.180256323921713957519055011598923821445550835171637242186993302064506550954308 +637 -1.180278458412698616341640453717749447618788893569387738713964416295756767997231 +638 -1.180300584672579772895191323199886221194141176196010763137993065345025357705137 +639 -1.180322702705369355129413949454984261144854611627057175391241858827852636634121 +640 -1.18034481251507736982121103009138811071074478730290672740797858418146054076987 +641 -1.180366914105711903191225675297377233054110057564461808393342598666437313611051 +642 -1.180389007481279121520698592254524636258462045467238460797761583826355579045555 +643 -1.180411092645783271768637482787245476162901325461643341617740689236576688870038 +644 -1.180433169603226682189297728486862420204290473269830503540955456446424834049577 +645 -1.180455238357609762949973438582563879239717464473019534627460038441862857565911 +646 -1.180477298912931006749097936865472856229436660698728384829373389839834747204024 +647 -1.180499351273186989434652765005676055238410740889087157832512239907195802038604 +648 -1.180521395442372370622884280635482981595362099464120259642633778517872152485645 +649 -1.180543431424479894317326929605390989927362442274007643381348914120662180784865 +650 -1.180565459223500389528132272852222552416963045223585009186477910522006693382822 +651 -1.180587478843422770891702849351673381808393726290340273942726647614719726568852 +652 -1.180609490288234039290629957660062414762455318704081143301360717978953628650522 +653 -1.180631493561919282473934439582405009004873539642955499444744664119622744966816 +654 -1.180653488668461675677609550536037005737131590388411365906858803329892049601505 +655 -1.180675475611842482245465002210897535910922083355116477540026059759527906993836 +656 -1.180697454396041054250271264159230589650947741835563173865428375055328090041683 +657 -1.180719425025034833115203211978887412297381658297395552537012905641333640651616 +658 -1.180741387502799350235582210785601733681438708798835887988890134891256435928454 +659 -1.180763341833308227600915723700565680291916210578891473457918439255233274239756 +660 -1.180785288020533178417233536110353969371172889386298823774472843614924201641527 +661 -1.180807226068444007729719687486725651610089794850507104079143909102239125022266 +662 -1.180829155981008613045639203584074272380756402749774163524838154484343906910588 +663 -1.180851077762192984957558722862296883207090007454934035856385719446918739796402 +664 -1.180872991415961207766860112012607883741016612370259184451606124923239900216346 +665 -1.180894896946275460107546166493333243651522068294836239053528532754985091888798 +666 -1.180916794357096015570337493011982282757803683737779936779038558787971563571728 +667 -1.180938683652381243327059671918905921096625458765134734898062331251767604920938 +668 -1.180960564836087608755319798506610198490294465619728214237766648333057239654499 +669 -1.180982437912169674063471503237299961082745387648835065048955863507598599968866 +670 -1.181004302884580098915867551949477981162221227995560094449524305061215788155494 +671 -1.181026159757269641058399128122417482726043754910652522374157547994559100607899 +672 -1.1810480085341871569443209003050591604059759236501784300736212601856192202288 +673 -1.181069849219279602360360978843355380698638256280900282407016479582183526163897 +674 -1.181091681816492033053114867067292424461268236606382787342137387832651874515259 +675 -1.181113506329767605355722513125764456248704811729341176471964733514232191191059 +676 -1.181135322763047576814827569684148482568729278923813974070416629214729519173591 +677 -1.18115713112027130681781796972583598617468538218194806598764313407850998473654 +678 -1.18117893140537625722034692772511230111351728866316894665704481901114812849444 +679 -1.181200723622297992974133476484637232775877003895462398840114382677138988139766 +680 -1.181222507774970182755041650956368043372616720763437787504129496841741746955431 +681 -1.181244283867324599591437431390076836149617761480468564256743793486583920811869 +682 -1.181266051903291121492822559178646706645285941095973995031964252575143423483322 +683 -1.181287811886797732078744339794082917113858714121381960671743543258062988948296 +684 -1.181309563821770521207980548232644926924515905411222120566552759985052844038944 +685 -1.181331307712133685607998553411690518655623176532126359461380111441902865314293 +686 -1.181353043561809529504687778984722643395556110238046495693953529319064029261356 +687 -1.181374771374718465252364619064741121395533634862111508791749208788412552104413 +688 -1.181396491154779013964048928369323132946559066897680094190581943044259995766663 +689 -1.181418202905907806142011207323886681707449335927397372893774507202586777896257 +690 -1.181439906632019582308589603682328076507196852799528545620252347748082478786961 +691 -1.18146160233702719363727585324666613096631120777485055950416457430784668261574 +692 -1.181483290024841602584069283289470401475614517688637283858399656339771477581062 +693 -1.18150496969937188351909800330469655674096334758690466520103963236393435392298 +694 -1.181526641364525223358506408734097085101685563772072632738652427908873798722417 +695 -1.181548305024206922196608124337618193254619374857263133253193619784848942487408 +696 -1.181569960682320393938303514897132131195238898184399696456643990828534288998304 +697 -1.181591608342767166931760891963486497681328733002138650837448149554412384396659 +698 -1.181613248009446884601360546377176548112997254904375211428321909286831995358667 +699 -1.181634879686257306080900737312961357399461239364258198801547183369780500455221 +700 -1.181656503377094306847064769618448104348867974168264921526052314848246440226734 +701 -1.181678119085851879353148292236058966773135071090700717664228098749887049961218 +702 -1.181699726816422133663045951516870378438790416629679976350000077510519129753167 +703 -1.181721326572695298085496534253572935996110266477193072556728585248933788596635 +704 -1.181742918358559719808585736278240297040021345235103712014027454262451120852172 +705 -1.181764502177901865534505693488715225626198782909759281444023172333558663205127 +706 -1.181786078034606322114570413185218770177798344849410602494913562007940098603193 +707 -1.181807645932555797184486244616262657222734653985438781555355337831148428108218 +708 -1.181829205875631119799876528650093614398849939094995005093920879011081614623432 +709 -1.181850757867711241072059567504719764398150798515318693427338934089659999642495 +710 -1.181872301912673234804079056486061729870789161271342555810574205829925597012008 +711 -1.181893838014392298126986120699932934782593342712404429874387577178994054661784 +712 -1.181915366176741752136372100719383062446252464562572934071557447896348936715882 +713 -1.18193688640359304252915123220443402166969935136090139578839031936822529589384 +714 -1.181958398698815740240592365486397372537106339888052724210844327501176755646871 +715 -1.181979903066277542081598872143784269709657733474942557393795988252259496349982 +716 -1.18200139950984427137623588661130189634937443301539687570135728562623500051789 +717 -1.182022888033379878599504031877572393460111079305477619570321238324198077410521 +718 -1.182044368640746442015358779341009750314537625066720598901377692762354140653656 +719 -1.182065841335804168314974593906745329475165439452207551183679467444140926932406 +720 -1.182087306122411393255253016420601977566438951949598359235862929365789423594104 +721 -1.182108763004424582297573836548878348316037686628292728782595899996698501397382 +722 -1.182130211985698331246788510225117470409410038701954722809340679973292106462158 +723 -1.182151653070085366890454976797095067387761555009489951321155662209413823563026 +724 -1.182173086261436547638313032018972023197642312829358597932834620673633389388352 +725 -1.182194511563600864161999414044910033129977492439854482688939503665999002744905 +726 -1.182215928980425440035001760591448238849417638213042070766329302131490461992754 +727 -1.182237338515755532372850596446579876107137706226725783914156687646393939831269 +728 -1.182258740173434532473548511513750027654738157358450908357836715410732855577717 +729 -1.182280133957303966458235690588916839936742380244801758103368416859738254845952 +730 -1.182301519871203495912090957078377403430209760348489482725010564279780167325764 +731 -1.182322897918970918525467493874254291103707635530624033122335571806314950899998 +732 -1.182344268104442168735262405613367880444294806294567657483612510999126569198637 +733 -1.182365630431451318366519287553681439881544638805508236754459951589643755067095 +734 -1.182386984903830577274262967310598933217371645536493879883641196433931803661206 +735 -1.18240833152541029398556558670311798380184886534660775140992425161539552709941 +736 -1.18242967030001895634184319196719084658039082720583618631182695214071436559634 +737 -1.182451001231483192141382001600622968621269176663573033455493995230362452970574 +738 -1.182472324323627769782093522110440190094443753344327883647659156870022640948584 +739 -1.182493639580275598904497682939880265621339190142047565430056635858288751780132 +740 -1.182514947005247731034933162858010593079683943759182665102561966142326761085004 +741 -1.182536246602363360228994081100440250870871608052606835894028391893368471618501 +742 -1.182557538375439823715192227554679097789135790398033990399299111392426479900262 +743 -1.182578822328292602538844007288398219321203825929495637885195999429567588759437 +744 -1.182600098464735322206181275723162852693291423291005325120199363965912228836107 +745 -1.182621366788579753328685241760139537395629572915928834020656875689586270597872 +746 -1.182642627303635812267642617167822070257317509987480929938997201484091663500957 +747 -1.182663880013711561778923191544974351290943861846432601875197702942127278663528 +748 -1.182685124922613211657978013174750850215316267884258701060070426730297473775627 +749 -1.182706362034145119385057357088325670390221270052214503837408215591382947592089 +750 -1.182727591352109790770647662658337508302861443635014330024529677801391085663463 +751 -1.182748812880307880601126624044038679016768790581220308665907396377361925061242 +752 -1.182770026622538193284635617811220282250473597131763385419893980878202220523418 +753 -1.182791232582597683497168653050771005942329679437310657680208310807074389450208 +754 -1.182812430764281456828877030320112495047179006938264163393750416668681567680858 +755 -1.182833621171382770430588896731738148480497622486599864634254339821432916361882 +756 -1.182854803807693033660542885512663146962606297203931697720144188496768126901727 +757 -1.18287597867700180873133502935776996420433909384018876861063100535369938325013 +758 -1.182897145783096811357078137898804083392496430030285139679328985655564195709165 +759 -1.182918305129763911400772830609137645038880861843385761970059564279494472171199 +760 -1.182939456720787133521889417462372810488085799654305588306703257465693300339929 +761 -1.182960600559948657824159820660400262043577426884635462615637435035831070191465 +762 -1.18298173665102882050357873174366000483859882231851676650165765194897565277976 +763 -1.183002864997806114496613199393070021072963000005323062021892847579117574050995 +764 -1.18302398560405719012861984422939189263191460264676045500208866838893563791107 +765 -1.183045098473556855762468897911689796712836504317162395252477386211369482457649 +766 -1.183066203610078078447374264832008838957233084964737078128206803711684822535484 +767 -1.18308730101739198456792880569844907249316428174599349103881779860946576409587 +768 -1.183108390699267860493344043293441316730398640928294133576446939153715212213164 +769 -1.183129472659473153226893491688238598922285959296339121775123911619491501118656 +770 -1.183150546901773471055558811188421261324812907195795040204781427975115821940738 +771 -1.183171613429932584199877992278573078852180161904853870897068362606899231973744 +772 -1.183192672247712425463994772827218692747582465218920383949440873751319898696168 +773 -1.18321372335887309088590849380561786593889627822005202732918459029299414726573 +774 -1.183234766767172840387923599766088091088836779224851760013835611948522145668799 +775 -1.183255802476368098427297991317172523203714652806799507855279482208333657711304 +776 -1.183276830490213454647089437824183660021589194241085487000439415234591859707416 +777 -1.183297850812461664527199259554433254901054972912947471272757667983852137278373 +778 -1.183318863446863650035612489476804222864867118758208809797707170448674340806558 +779 -1.18333986839716850027983372591522939974671665059474784647695878635099320204351 +780 -1.183360865667123472158517888245113550605966501314711745691623917391631029251815 +781 -1.183381855260473991013295088810767614900732408863021276168719215055424874197654 +782 -1.183402837180963651280788835230516445149233450109441082790602075250471393856655 +783 -1.183423811432334217144826778244291870378733578196262908021425043631810024191663 +784 -1.183444778018325623188843221246230427580317986956932197390398245040779936690208 +785 -1.183465736942675975048472608632058190272432707217564634633225521667020269169502 +786 -1.183486688209121550064333211077862424332150815224272211469485185399843460796764 +787 -1.183507631821396797935000226853219963268240449846638251824913052103880547715268 +788 -1.183528567783234341370167519257573868446949712634467387525800773718153866373106 +789 -1.183549496098364976743997211254221779370354566731425189278403346003378541000726 +790 -1.183570416770517674748656359361300024439000700133790237041386355510024453523598 +791 -1.183591329803419581048039929843715717749559398799407207244141116585390165556834 +792 -1.183612235200796016931679301234093380974537851154339245009141075725379457017016 +793 -1.183633132966370479968835518194461774373829208419350567268978794567945793735957 +794 -1.183654023103864644662776522713609275157806771771880416132874621864449736431922 +795 -1.183674905616998363105237589617780986943956827015566889225247968332259901741412 +796 -1.183695780509489665631064194354676487626141931433338708282868477030750265369292 +797 -1.183716647785054761473036541992532415819958519019412733721977293391466922933044 +798 -1.183737507447408039416874987357437653874592171982937715330722871683380893358043 +799 -1.183758359500262068456425577212929388461992722798887272162293229411885804283686 +800 -1.183779203947327598449024946366354522667415882516522052746728984623905154169532 +801 -1.183800040792313560771043800566451485491945336212001711881498059316664650014394 +802 -1.183820870038927068973608220036111149392063969960830120211012970601213613713183 +803 -1.183841691690873419438498018463311042045035805116282640270015010347120526325454 +804 -1.183862505751856092034221393251783047522747216773136243887021492880593520769954 +805 -1.183883312225576750772265103811070061514098549284067640062946059369904498778264 +806 -1.183904111115735244463519415643250326635603792804806510697526627284225517643582 +807 -1.183924902426029607374877048960758163128124734083333850342216593476846853857433 +808 -1.183945686160156059886005371546405267702028707653120133743653898231799304597299 +809 -1.183966462321809009146291076542906423734526225837124827581513723300397252605752 +810 -1.183987230914681049731956586834936098628951953792771446438203751045580546140257 +811 -1.18400799194246296430334742866198675251296816542535148935993479446327621208108 +812 -1.184028745408843724262389818075064504579804346567420425807873154079746797585559 +813 -1.184049491317510490410217704824541861657262787592451917350931933673761197233408 +814 -1.184070229672148613604968519240289274804544913804629009047603391340393547074051 +815 -1.184090960476441635419746868638526125048691479401243547197197253171081618024251 +816 -1.184111683734071288800755430762666124315578844248441183000797462546740611644539 +817 -1.184132399448717498725592292737780832086079486854638741951051887014877854644994 +818 -1.184153107624058382861713984990166816576210625090512448659827770109469789828575 +819 -1.184173808263770252225063460554875719912639615664498360360018364001643207046286 +820 -1.184194501371527611838862271164950912808135501569295943111510504191880735845476 +821 -1.184215186951003161392566192486508342929189842419616856636481786497997503311412 +822 -1.184235865005867795900983551833701394114028845763396480207352665691855915988252 +823 -1.184256535539790606363555512667018886790596011670571706547108276450698962430219 +824 -1.184277198556438880423797571147280573623662374010027358859339959949902508549603 +825 -1.184297854059478103028901520986114433159581336061393192752724114094209533956924 +826 -1.184318502052571957089497143801623556909439083301111671026006738601487434416806 +827 -1.184339142539382324139572883155376285083915829096025561156772647947189974019416 +828 -1.184359775523569284996554761413780300520723541879286003308769206935443817985167 +829 -1.184380401008791120421542799543328470962715121698822470165200446971110137546401 +830 -1.184401018998704311779704200915130172759237344403329839285889273628225408181103 +831 -1.184421629496963541700822561159565474548311997268470510513859850498928145512002 +832 -1.184442232507221694740002367076819752064624185872188590075029302397014156363934 +833 -1.184462828033129858038528048573471893691327879329744340115116746031623095626678 +834 -1.184483416078337321984876848559219093759854355182237229176983784218114375947445 +835 -1.184503996646491580875884776701224174165840812945416166088843523783910021756107 +836 -1.184524569741238333578064913896466286105550879667091162146364338493577263687951 +837 -1.184545135366221484189077335284861588363112177718834606696732729622984288222599 +838 -1.184565693525083142699349920587795946527590232262464347909540445473182715823446 +839 -1.184586244221463625653849321518075722931918416517714306255402101481366872493304 +840 -1.184606787459001456814001356968154208325960754866126200586387504901798529282723 +841 -1.184627323241333367819760107643829065860696415826375420233501277004692897654163 +842 -1.184647851572094298851824982770429202593993033962848133190399683817237645991754 +843 -1.18466837245491739929400503245781664433497301734824245871498644615384093740572 +844 -1.184688885893434028395729780269319161300716356408206742952376771488211258650956 +845 -1.184709391891273755934705851497981474008852643979379576054305799450249199739309 +846 -1.18472989045206436287971867361127576447394051891678043480397218144825751740277 +847 -1.18475038157943184205357852628264483466735763207607683216749271452479832716887 +848 -1.184770865277000398796210219384962504037028335615087167265406348140458231491758 +849 -1.184791341548392451627885678277184636499238919991124527126654768777543293224552 +850 -1.184811810397228632912598716671129454674695459087128088080432020313946478796089 +851 -1.184832271827127789521581278320466459332543984893770141190041821102962062822755 +852 -1.184852725841706983496960429728608253232876921546356730894636550488954626336665 +853 -1.184873172444581492715555387026287803132670169527632043859538113887556189828752 +854 -1.184893611639364811552813861123164098056201218564677146419950496698087515454757 +855 -1.184914043429668651546887006190830716537450753868541509085098800454390742376357 +856 -1.184934467819102942062842257487103445014941775364215790014051150943055959514483 +857 -1.184954884811275830957013345483433742575471745465119342304136801219474915766819 +858 -1.18497529440979368524148677420873347655209942495767651647403588420535428070732 +859 -1.18499569661826109174872405267380191589962778457132176474197213198335076354704 +860 -1.185016091440280857796318969190917425672873738801738243110194391618705887369162 +861 -1.185036478879454011851889199352992621246473396694707679894509837866739078081219 +862 -1.18505685893937980419810153938599188411203867741763658921646660785374550174582 +863 -1.185077231623655707597830057537073085179241491515893079098726148668045340094127 +864 -1.185097596935877417959446457109140083532747340785469095316898578027660682020115 +865 -1.185117954879638855002241945700178049621479100428464021946060121634086798574185 +866 -1.185138305458532162921979906152888886961758553714929551518189191861697650896434 +867 -1.185158648676147711056578665666747984712343170996645665915347629269117481798402 +868 -1.185178984536074094551923660470665218020681483746735053040499915238257317040279 +869 -1.185199313041898135027808294399951520934762790036256636552329744442777192488268 +870 -1.185219634197204881244002790666266489001067534041364225424021525020796537708961 +871 -1.185239948005577609766450337053651330485032861656699409299227135072879911113726 +872 -1.185260254470597825633589825717634085489150301422520787307856385909790717916335 +873 -1.185280553595845263022804489707729384105596406831724648612060305818380942998803 +874 -1.185300845384897885916995739276442135085676389997389463000510562686918724273258 +875 -1.185321129841331888771281501980122446251035466151192126085819650359102656479254 +876 -1.185341406968721697179818371518706801871412264569663315988333425515014995635789 +877 -1.185361676770639968542746871202517089289638261538109345379296822012403265912939 +878 -1.185381939250657592733259138874873509917677030997976820956527477388997565646892 +879 -1.185402194412343692764788341059308765013855832002843903137330521777715043827981 +880 -1.185422442259265625458319125039648214955213220350095226408816785579943674167806 +881 -1.185442682794988982109818418520143016525228483215947023117546060884489388108736 +882 -1.185462916023077589157785887451209594435268700042651637431521067750531440943319 +883 -1.185483141947093508850923363544138253174029566561903225323646342962518495959363 +884 -1.185503360570597039915922553935385339509175286807243745339607773308399701783305 +885 -1.185523571897146718225370346397756184608389569672041211027656180385764144606766 +886 -1.185543775930299317465771024431919151738190769984699915157162179132298814180175 +887 -1.185563972673609849805684707507263558642165554619769632623666542379835645449215 +888 -1.185584162130631566563981332656125104661737603735603553823404930591235061172069 +889 -1.185604344304915958878209494559850786963194318844790315440828687401356997151898 +890 -1.18562451920001275837307946219906021724342434285511155696570938891393043770714 +891 -1.185644686819469937829059691073780833213662570829966449146496374107012682058264 +892 -1.185664847166833711851086150931889825049519424129071473418369660725476135920213 +893 -1.185685000245648537537383789876484756717764826179059038311450412353132290705605 +894 -1.185705146059457115148399456654426950336904538739630661275015851539438572757081 +895 -1.185725284611800388775845603859355817003801195212063076924330999999292365807933 +896 -1.185745415906217547011854095712957562132877460376894636947299909279866950092407 +897 -1.185765539946246023618239445018187173417405280664716522100635054841499939666007 +898 -1.185785656735421498195870804807487424935875173201350897835847561766453826973123 +899 -1.185805766277277896854152041137821915377572759945469501762120795663616459167276 +900 -1.185825868575347392880609214412540019315714711054291924820837101271579718549527 +901 -1.18584596363316040741058479753771918915064470280866309109127572412835153452878 +902 -1.185866051454245610097037960147683426780935814255864478105940023329675416227275 +903 -1.185886132042129919780450249060875076995567760929944559740475622804184501214425 +904 -1.185906205400338505158835996053159511524995971539434549146490335517251506451816 +905 -1.185926271532394785457856784960967909895897816749001382850750097602208961653535 +906 -1.185946330441820431101039311051431340693379920160758415093474734214599866178645 +907 -1.185966382132135364380095966520828848264966691692228734781830782234932672682351 +908 -1.185986426606857760125347486906262402745151170880759766945174429046505365569963 +909 -1.186006463869504046376246994118481526696029365481859832688054995559571479035974 +910 -1.186026493923588905052004772726209324515971769878186483020655939283781146213525 +911 -1.186046516772625272622313117044168669633978516048691079383735135258483087567311 +912 -1.186066532420124340778170587498271611647140141202063414023400828994454916570421 +913 -1.186086540869595557102805015662115816925665632897774490142079602233893543695106 +914 -1.186106542124546625742694598279028221438892042231015769204072246879980447285232 +915 -1.186126536188483508078686421503407226955784606586211234310472265980781932193435 +916 -1.186146523064910423397211757514039888321599479479655152804317934918437966703838 +917 -1.186166502757329849561597476570408800846358223670245902078755734000742422265652 +918 -1.186186475269242523683472918500753987252264358875189584962868736486557922717277 +919 -1.186206440604147442794271568527817191054942666794006407935594788763628816640438 +920 -1.186226398765541864516826883254768799276376527718603793240499902997943837366358 +921 -1.186246349756921307737061613549800337217980952294750824262284341660700684729023 +922 -1.186266293581779553275769971983257300499195151786396993302914807720647751303553 +923 -1.186286230243608644560491993385987217148764764552957682279841444606133967122316 +924 -1.186306159745898888297479438011785471293759372554030624099463470302751273291067 +925 -1.18632608209213885514375258770043577960253471889219619404060208721932755620582 +926 -1.186345997285815380379247286350862505378611534904881709602835594084837515057083 +927 -1.186365905330413564579051576926337439941392129760534328937372858652112265107828 +928 -1.186385806229416774285731288125513497120808189543348229139250624360945519866059 +929 -1.186405699986306642681743924764291178369048465690205176684379205302221754652575 +930 -1.186425586604563070261940216824159900757916613871243084713540650017440172338912 +931 -1.186445466087664225506152683032694569154568881130858050924840478025288399695231 +932 -1.186465338439086545551870565751327351879007478084069509581917923468510516052574 +933 -1.186485203662304736867000494854354724422758427663946106704764940163614597949026 +934 -1.186505061760791775922712239191379720173212465302639209829140294468520124531195 +935 -1.186524912738018909866368905133028215903497448818191215353459348416028037196701 +936 -1.18654475659745565719454094260681523194580535459009210887279096420774834711794 +937 -1.186564593342569808426103319936471894883335160200345152452890359220094850971037 +938 -1.186584422976827426775415229703875150206365506934975200697443509792301602916576 +939 -1.186604245503692848825581688757949783126003121933904855285730096240185562598984 +940 -1.186624060926628685201796396399535070573291333923115527078133752443171128711401 +941 -1.186643869249095821244765215675225712777128202169800381431605364330775500641059 +942 -1.186663670474553417684209643616607848647687152883109895682190076333091206204009 +943 -1.186683464606458911312449637164115218912178621502960127327160305085692477277137 +944 -1.186703251648268015658065162416927181453082552484565690060515439959350172395341 +945 -1.186723031603434721659635835751918584951733427785940928765803265146926877348515 +946 -1.186742804475411298339558026255650753571994360435498985621074925797702727154142 +947 -1.186762570267648293477938789813762314315946767558714054792837508897669758910287 +948 -1.186782328983594534286566006101877600582135392042062190424730711770017363073183 +949 -1.186802080626697128082954090621298184536160843941007192447107408876174827466929 +950 -1.186821825200401462964464654821279024778923588127477505596580689054889102782525 +951 -1.186841562708151208482501488247614065514900624239065698209431308484158878853275 +952 -1.186861293153388316316779237554566193449757929672504068758382783566597852304722 +953 -1.186881016539553020949665158113872556867911539170388418680573691252375865164348 +954 -1.1869007328700838403405933148506376890504528169498120204038336826758191654275 +955 -1.186920442148417576600550609831392970089117378521449177816063080039598857829109 +956 -1.186940144377989316666634015024451025325841156778613447165867495766897655053485 +957 -1.186959839562232432976678389546917016582533066129655485521038181708627760980395 +958 -1.186979527704578584143954261606334758907423710401302839754660688540962634161021 +959 -1.1869992088084577156319349562379435189942686842696769873793119751974349687187 +960 -1.187018882877298060429132450830900553339789127949274853468055220173905830055287 +961 -1.187038549914526139724001341328584259566801086641381538963701934315100235106681 +962 -1.187058209923566763579910302879232581485420863975218484689199794806430402551146 +963 -1.187077862907843031610180429603690369071903657674440743826361960789552521462884 +964 -1.187097508870776333653189839036937093636259629254833492031450160068888228774618 +965 -1.18711714781578635044754392768934200438414620730811642611358258534320691409647 +966 -1.187136779746291054307310665062246837043537028806998137816142305083963677971554 +967 -1.187156404665706709797320314340505903233088574233842109642903901127985735643642 +968 -1.187176022577447874408528968872019159124000362113269948867659534679199048858613 +969 -1.187195633484927399233445294431075035327167137533919305716227776871398162779718 +970 -1.187215237391556429641619868148475771762244750608221020103329871825181905979476 +971 -1.187234834300744405955196505876948109770993877358148473023792459750535271676318 +972 -1.187254424215899064124524970645245820449823107799189868603091515882468226772704 +973 -1.187274007140426436403834455738627067904915227773406246079368210192245047836476 +974 -1.187293583077730852026967236827038396963374578633380148109875801633114787520691 +975 -1.187313152031214937883171888445357578161170810753753619977856820259156876595432 +976 -1.187332714004279619192955461012439023192385020389514553393523776831040953509891 +977 -1.187352269000324120183994015457467389320335240323496890386806207380017694998216 +978 -1.187371817022745964767100913403256712645778265962474737183614711649085633989734 +979 -1.187391358074940977212252261736633341970454204346347139534063494738157253717158 +980 -1.187410892160303282824668911275910484892786465147697351889563814874424215533613 +981 -1.187430419282225308620954410124699726564168951123727782947702806011551831115318 +982 -1.187449939444097784005288313179909843280574637269522909462869771785625699480031 +983 -1.187469452649309741445674250139755015064283390162693680445067130637911762465958 +984 -1.187488958901248517150242155234932554094354608389881218500324543963980760993715 +985 -1.187508458203299751743604062782833922966453367122272962441784957648936313072413 +986 -1.1875279505588473909432628735407215351950261041342996734905565815659182759834 +987 -1.187547435971273686236073497709237030197194699370173155801376317903922137226469 +988 -1.187566914443959195554755781312403819486490035086784920774321423810305918912935 +989 -1.187586385980282783954458623554447136402370592228255923998014675720183124403193 +990 -1.187605850583621624289374693627278018026851808153991815529885455986822856872531 +991 -1.1876253082573511978894051563153730377762794227553230639733830169413733488186 +992 -1.187644759004845295236873816617028626446877907711013282089796452706902628606743 +993 -1.187664202829476016643290094472576907332056720719076206056566992460851139815363 +994 -1.187683639734613772926160241561118569658241081183167468814499391082388892353864 +995 -1.187703069723627286085846212997656859384224373802382849736436168830805901698179 +996 -1.187722492799883589982471607632204725889592209318560098714977682134974917763917 +997 -1.187741908966748031012874091521483978879913664313823606690561655428510768709827 +998 -1.187761318227584268787603720012240436719335244701256850676663520500633548479642 +999 -1.18778072058575427680796657474296194323762526608053764671343711125963214344232 +1000 -1.187800116044618343143113132737906255828303424144124579745930128270745544971789 +1001 -1.187819504607535071107170785633822627437535786880931570808294517512645870703896 +1002 -1.187838886277861379936419927945583886014404667881605045801156504575455039579361 +1003 -1.187858261058952505466513034142134427414110357130833814551496748664225824431406 +1004 -1.187877628954162000809736145168703254960044228115706707610668060769973943006734 +1005 -1.187896989966841737032312185915129497296768256580862633260007010741726075493767 +1006 -1.187916344100341903831745535993400195290468561938012137564096540029601041977875 +1007 -1.187935691358011010214207277050106051105181301917815111040339940975903623354191 +1008 -1.187955031743195885171960540701479763806413015219875469001347984989105380120948 +1009 -1.187974365259241678360825382039993024572325815249352877024895938351454820468528 +1010 -1.187993691909491860777682604522151702522907551887242862477423778028659819958133 +1011 -1.188013011697288225438015962907143714042435156882067496838860025112414548325222 +1012 -1.188032324625970888053492171775360032033083731547714463496841218401094740991448 +1013 -1.188051630698878287709578148014525757584460045133203663345917395512589185789433 +1014 -1.188070929919347187543194916519244648879212987645025847991032050318527421228609 +1015 -1.188090222290712675420407609207176487593740498260074294872698476760376385878892 +1016 -1.188109507816308164614150988311831671415042161392222146190757038536258144041086 +1017 -1.188128786499465394481989925768080965397903863457194240871510222009335203047108 +1018 -1.188148058343514431143914271361939940540722788994429278507526333016169995348501 +1019 -1.18816732335178366816016754317099679395886024731653687678351375377658427541743 +1020 -1.188186581527599827209108874676008503156183768724510823764394901103429296581712 +1021 -1.188205832874287958765107653777693141886106167042113035342814432645115285298811 +1022 -1.188225077395171442776470289805595204667247106849763371715933541531292535639434 +1023 -1.188244315093571989343398545458095481850440792481163775470490319832343143879055 +1024 -1.188263545972809639395978871464176930851803581482007528236356021257345844162576 +1025 -1.188282770036202765372202182608442638347272712418670314015796031759403128661886 +1026 -1.188301987287068071896013514611110902385156435223350553376540442570501410726488 +1027 -1.188321197728720596455391002204285224967642950700972891881803535373198345477299 +1028 -1.188340401364473710080453619594713140061587403546915348808266728366063293924195 +1029 -1.188359598197639118021597125351506857527484628050828922543670777866868967341075 +1030 -1.188378788231526860427657654604900231323888552265628439411906971127931083181835 +1031 -1.188397971469445313024102402289060114683238775774939855151297673897227860308008 +1032 -1.188417147914701187791246842008255302798459547812556946777809435354607393321625 +1033 -1.188436317570599533642497925951312544839691730952965426107221247413488266463572 +1034 -1.188455480440443737102622712124256094660272802732588740130228072947251009886616 +1035 -1.188474636527535522986041866015334529058807261623465979153283244373800488351375 +1036 -1.188493785835174955075147484650285662526897636805402308563286400522627966119662 +1037 -1.188512928366660436798644691838676899489451225749448156520701487917926346913881 +1038 -1.188532064125288711909916454254483863462426460043119342924025195359108731130773 +1039 -1.188551193114354865165411068835734204497579994823336143794250220888609988356567 +1040 -1.188570315337152323003051772829045691795317564657058315936898919021609348633102 +1041 -1.188589430796972854220667928645227630332986764296170676892175437135605154206004 +1042 -1.188608539497106570654447236531791884506285371733118245872027013023454083411012 +1043 -1.188627641440841927857408428907233936680673621258615580550960588252534094332098 +1044 -1.188646736631465725777893901040295045591743194301871929724971767823383250440577 +1045 -1.18866582507226310943808173359510329293539694883001221858478652473678402817293 +1046 -1.18868490676651756961251656340011371328426820187570134348826316613670624027187 +1047 -1.188703981717510943506658759635125392500581343828049857716512280041782161950923 +1048 -1.188723049928523415435451363466345995736684392327076673270458130166698512819145 +1049 -1.188742111402833517501904249994501253370211069175895791002218170594280957759147 +1050 -1.188761166143718130275694972215348100050939941540387191005109264470953209016271 +1051 -1.188780214154452483471785747525645039466702925182017131319074837875865752951282 +1052 -1.188799255438310156629056048140661509271924692499997086260831928143525991020992 +1053 -1.188818289998563079788950257621669163444173195802328797813470917554130278839748 +1054 -1.188837317838481534174139856543551692488833642405494163516749821531627246518185 +1055 -1.18885633896133415286719960116369568750867733540618294384194134084488456993123 +1056 -1.188875353370387921489297159783682747058202632843229925871452378063474167417071 +1057 -1.188894361068908178878895672324992153526127384856233345873584654065707114710018 +1058 -1.188913362060158617770468699468943638890599689213917665922017775976164095407853 +1059 -1.188932356347401285473227028539460651165111804625144950461105713932584998247451 +1060 -1.188951343933896584549856804134915758524474745324123771347478255517560418641852 +1061 -1.188970324822903273495268452342331026520371176647469991830429785360480243887432 +1062 -1.188989299017678467415355868193547016234829128517371734685440361051914681935913 +1063 -1.189008266521477638705765336848644121660313466413688609829496071561303733345341 +1064 -1.189027227337554617730673659816898939726817323416862660621230625973943779847419 +1065 -1.189046181469161593501574958349885895610045555891026926972919541537652818743932 +1066 -1.189065128919549114356075626964990081336065376994147457454509048272735489479554 +1067 -1.189084069691966088636696910880580862021028222905677415486160714813693178644228 +1068 -1.189103003789659785369684581966406918806913804035932777914642982425657263984226 +1069 -1.189121931215875834943825188634411690809666284794226258292112652792185227462048 +1070 -1.189140851973858229789268355916133312989308561192840413845323045551480965362099 +1071 -1.18915976606684932505635461279314478825212502633002654471441174662611513834164 +1072 -1.189178673498089839294448224666607948431056039696617547312564539247264277250401 +1073 -1.18919757427081885513077450967095842084308609649491793715172581475561227896458 +1074 -1.189216468388273819949261118355007998319463074836470369330676027362111754715243 +1075 -1.189235355853690546569382757071345187014703902855520564568107509391102417407445 +1076 -1.189254236670303213925008836231833956627012771154444479460619251527277064161862 +1077 -1.189273110841344367743253525403254523238331726461145988782712703209743938545434 +1078 -1.189291978370044921223327698032698039762052416398927647716502495374195283190824 +1079 -1.189310839259634155715392249407219039542705425357258251307086452682408536360463 +1080 -1.189329693513339721399412272266465064168000521591810001664687242473912579641411 +1081 -1.189348541134387637964011575300541798817797132687654036651711333173926571342919 +1082 -1.189367382126002295285327030578233931874478025163412365674037568489913436938895 +1083 -1.189386216491406454105862236762886547035553613702024727173042902483742289531627 +1084 -1.18940504423382124671333998578475884537022997632013997676854235024243617964398 +1085 -1.189423865356466177619553021449491083796627647327441947177771971671296752171344 +1086 -1.189442679862559124239212579272476510050340694743733678728176663825104367887493 +1087 -1.189461487755316337568794197638402479662682497935092899113826655131936916730584 +1088 -1.189480289037952442865380291194018567626597768987291451909770754986887566005612 +1089 -1.189499083713680440325498978190304048715983717347315311528948726676466186014102 +1090 -1.189517871785711705763958654297642330808166466333918104741129213776299567314065 +1091 -1.189536653257255991292677806224365502553717283693454180297199722312529572794356 +1092 -1.189555428131521425999509559275107820397085004604773786839139471430536349347711 +1093 -1.189574196411714516627060453790802432864450825049404060784993295494843044847237 +1094 -1.189592958101040148251502946216870647319081147949574610182948501467775287579982 +1095 -1.189611713202701584961381131350187313679239625022222506849099703599354581142346 +1096 -1.189630461719900470536409183118759161056235999412804805449812111891023393474133 +1097 -1.189649203655836829126262012050724909568261766367662087655943768308520430920113 +1098 -1.189667939013709065929357638391276425892303841890687161553921424606743963958141 +1099 -1.189686667796713967871630780627408835104022850788610711712564413551812345823325 +1100 -1.189705390008046704285297159981034083189982161565184610958906006232082276707107 +1101 -1.189724105650900827587608022230936706951730159642342471326708944901563298986197 +1102 -1.189742814728468273959594379023312255992652550104492118744372435671501671381412 +1103 -1.189761517243939364024800471629207672698085448838691811401333032316579059839062 +1104 -1.189780213200502803528005960905078720669175233215816068637102088688363356586853 +1105 -1.189798902601345684013936348009892012498275097254235118643923364301811074754398 +1106 -1.189817585449653483505961131228728079084027446988408949407956627997238470661218 +1107 -1.189836261748610067184779205048687002336540980305368472647796698922634424775932 +1108 -1.189854931501397688067091008428059161023422489376669168425225627779535896227346 +1109 -1.18987359471119698768425692999420037800365647960825669649699044255020601969701 +1110 -1.189892251381186996760941478699342970972091071459382558128963138325530859835802 +1111 -1.189910901514545135893742729256681665306364475165536194030617774442886519357879 +1112 -1.189929545114447216229806552471495796308672958363000579443246727455087670864976 +1113 -1.189948182184067440145425141373806481123702723267022378944095445907913707787611 +1114 -1.189966812726578401924619344850119252361160674468772226716801079738632401584419 +1115 -1.189985436745151088437704321262168792833746423566630974991242472397856236765139 +1116 -1.190004054242954879819838025330262673117783660526956693205858563562337489006718 +1117 -1.19002266522315755014955204234781515252862604662342442993829334130025703878412 +1118 -1.190041269688925268127264284581969943641119370637152536548202179184265424655055 +1119 -1.190059867643422597753773065502832147126104948321080313611662304650346759652331 +1120 -1.190078459089812499008732068270764126245305248345459458630431400748172055491048 +1121 -1.190097044031256328529105725697447700050243877032555353412132450907117595047005 +1122 -1.190115622470913840287604529681975484734951235795967147625656075063419921156942 +1123 -1.190134194411943186271099788908107299627809009198012074286474057435571989541494 +1124 -1.190152759857500917159017354373013076261945763304110167122482915080066606391799 +1125 -1.190171318810741983001709833101321466473672186481664876158374235144290526032214 +1126 -1.190189871274819733898806811181103141527075245354834854416304006893758845033761 +1127 -1.19020841725288592067754260804053941417196990586416894114274477272096406686972 +1128 -1.190226956748090695571061084665460106967572334548416641455463977606167560114161 +1129 -1.190245489763582612896697029238679343129283343329560493534312556621808315424647 +1130 -1.19026401630250862973423364446211396288716578669253264428774832390100977458609 +1131 -1.190282536368014106604135661602036383505319411831345367859251399918680838660174 +1132 -1.190301049963242808145757607076491741636014741567432417790992449440820593697472 +1133 -1.190319557091336903795526748181897901811537578210693987401362737009348605812316 +1134 -1.190338057755436968465100245333146206150820056055775436280410713860114819562068 +1135 -1.190356551958681983219496038968130501612339621368043627346083611284136221192675 +1136 -1.190375039704209335955197000043551838483787720575471796769640696440215437086069 +1137 -1.190393520995154822078227873824076115670515974227919249390580850401899075524668 +1138 -1.19041199583465264518220454744146168541462347314525250858570681490291219312316 +1139 -1.190430464225835417726355172474123355303076336525276814800633231356545493788275 +1140 -1.190448926171834161713512674570758174031700089647793187292337914586140434829885 +1141 -1.190467381675778309368078182914126696868913564471234960382756513087409825052156 +1142 -1.190485830740795703813954913092860936851228399825900236558755664355085582388119 +1143 -1.190504273370012599752452037720256760434753240899551787599275780623014207728383 +1144 -1.1905227095665536641401580799094039258610320850219748901842465861461412952446 +1145 -1.190541139333541976866783365483711135348717250793654357612652414446533705210891 +1146 -1.190559562674099031432971070570896227105937736892753566660114500646457287349806 +1147 -1.190577979591344735628076401996832821011305722022830746353512883319101386084388 +1148 -1.190596390088397412207913448663274205796791688342268085664759425763814822321874 +1149 -1.19061479416837379957246924286041287106316265887616415294355883395511355476226 +1150 -1.190633191834389052443584571231479702060317325024841841166651697000403405621718 +1151 -1.190651583089556742542601075872140328669242981537432641675287673087846867288256 +1152 -1.190669967936988859267974186812307314429172574715265237955228021774523265522778 +1153 -1.190688346379795810372851427892155650958243374706510821553097548822190143131877 +1154 -1.19070671842108642264261563880760525410422704982046592707843390074720368636931 +1155 -1.190725084063967942572392656863317709204234804783413731117958988051345893444405 +1156 -1.190743443311546037044523002733345254678651384076233309399001909599969054312226 +1157 -1.190761796166924794005997115290967798758890774215299223863957847634959089613938 +1158 -1.190780142633206723145853681329958508543488066195516715594893069186230725602417 +1159 -1.190798482713492756572540606759530071048367137601629976041616049552879756016871 +1160 -1.190816816410882249491238176614531981878514199451766398692684563810442624345158 +1161 -1.19083514372847298088114395198109405016586560260846507322053173999631126784867 +1162 -1.190853464669361154172718952695842602205196229388987312753983033309592933321209 +1163 -1.190871779236641397924894675434053506631107605473857854908725746591691270504696 +1164 -1.190890087433406766502240497558650019006163539427425300326245826911658200691729 +1165 -1.1909083892627487407520910178578034434551214757308005860044591918852803932535 +1166 -1.190926684727757228681632886054050625731046878820642643984486099114301175417839 +1167 -1.190944973831520566134950673722304220204197616464930219243504977800280615833699 +1168 -1.190963256577125517470031340007899409207252659179966420343021825744650270855415 +1169 -1.190981532967657276235726846288894195543744919629336348408972502357261016802783 +1170 -1.190999803006199465848674474679219438467820518555354862722796003018609387972635 +1171 -1.191018066695834140270174406020959362869125549349910437870740073681783782140205 +1172 -1.19103632403964178468302411376503324563691588265301640254135381763902873530625 +1173 -1.19105457504070131616830913088984427921106167023462975050083224170923641706277 +1174 -1.191072819702090084382149747757062139216322344847374492765134956245404907267674 +1175 -1.19109105802688387223240319955261145195984784240016839282111684331406549889052 +1176 -1.191109290018156896555320902709149081662694860471714125165263549351594455883083 +1177 -1.191127515678981808792160300453828851873975561299866043090528570467660784312293 +1178 -1.191145735012429695665750878371972897922930148963135706913187926175341259977003 +1179 -1.191163948021570079857013911623394236898441485540145245799897594929191295057813 +1180 -1.191182154709470920681435506193545259957611007720482918006540130824319264403711 +1181 -1.191200355079198614765492497306401622251690877700184964427970066468113911383089 +1182 -1.191218549133817996723030768870030353956767742786953374984964421951419023804647 +1183 -1.191236736876392339831595558569134869381897481347891038506232479500053287109352 +1184 -1.191254918309983356708713313961517839503391110748182145380657233407813297404701 +1185 -1.191273093437651199988124665677355548170650346287205305301203952855848985896752 +1186 -1.19129126226245446299596808456143430729665560463190899225246046733737102297993 +1187 -1.191309424787450180426913790339060697250343257011344740975019739941557985567729 +1188 -1.191327581015693829020247480126222763084026317938805407728172511673401388432509 +1189 -1.191345730950239328235903445843748774836819037854452400344743143708145152436681 +1190 -1.191363874594139040930446650333683692634407607957991978159665479055625085916164 +1191 -1.191382011950443774033003332713881008330570334151609391158005951695152868450664 +1192 -1.191400143022202779221139714243889110669956143396551365748145863892130547880926 +1193 -1.191418267812463753596688376711596688042256925215257660115812267882613536883177 +1194 -1.191436386324272840361521886085790891471503643467280396500092768814352557974371 +1195 -1.19145449856067462949327323491477498214106021242258207289133786835911230176336 +1196 -1.191472604524712158421002677685488936063972344793512184814203427417775658171351 +1197 -1.191490704219426912700810534091176929002227925244944195547919161326023283596922 +1198 -1.191508797647858826691395535888549734908252356903887910364230861147558788064451 +1199 -1.191526884813046284229558293757597800452016850024137169279972347039734726900983 +1200 -1.191544965718026119305649461308722068000169976490017699697414697245694560168793 +1201 -1.1915630403658336167389621741126644730654820327266302929526434388493970033427 +1202 -1.19158110875950251285306834235883840501958163421084660050819750627379579917595 +1203 -1.191599170902064996151098376477081258966446250538163049117821902178785379827139 +1204 -1.191617226796551707990963925786576491243313191700611008379473676294780016131518 +1205 -1.191635276445991743260523210963721292107421015793142581819076313317012264834411 +1206 -1.191653319853412651052688531848048079756920525728891513303413770710504815274159 +1207 -1.191671357021840435340475532831943474810839626616160921069571779998385434399217 +1208 -1.191689387954299555651993808805847210532319979937733640779809394384633459547123 +1209 -1.191707412653812927745378435355855550120347395550963017279912416112297748342121 +1210 -1.191725431123401924283662007635199198914437041883766130016145602047148751267655 +1211 -1.191743443366086375509586773054914398843437771641580666082466333550415656274888 +1212 -1.191761449384884569920356443662177859280668629583179007482894821761033232762288 +1213 -1.191779449182813254942327274797231398902524567697232550778907780238226954823073 +1214 -1.191797442762887637605637997341580635323668220894559840256156810070752078087318 +1215 -1.191815430128121385218778191591213753208802143948917339125599124365688684182205 +1216 -1.191833411281526626043094691508951299116311578968480075404322544752402322321463 +1217 -1.191851386226113949967235608829706086253005192698798338349090343935812369864214 +1218 -1.191869354964892409181531567211403640209718934225703639873713900663127321460332 +1219 -1.191887317500869518852313737342588175055419045952797058166521275736737409978965 +1220 -1.191905273837051257796168264635316857191197715903791110625587196074362536052767 +1221 -1.191923223976442069154126681848826093246626494867083644683495832181057950102928 +1222 -1.191941167922044861065791899705637771018681115950026714938097144937136116032139 +1223 -1.191959105676861007343399369277260793820242673081688011924551407580473798376475 +1224 -1.191977037243890348145813010631433885261458782484264916484299667009317564775214 +1225 -1.191994962626131190652455502946949511896620169280330544722907233458374995910516 +1226 -1.192012881826580309737172532015495885613530044411818380536494197082324557698617 +1227 -1.192030794848232948642030591762654378216820916787638622377182801227080682875731 +1228 -1.192048701694082819651047937132193321264964069351806617130229785861399512642192 +1229 -1.192066602367122104763858286389106090570043108106273532627717308836756828992952 +1230 -1.192084496870341456369306871607451604365630309521505926245227840360582895984232 +1231 -1.192102385206729997918978436818968916291027884156177169771957617418476904827135 +1232 -1.192120267379275324600656784007654480118373488111955978207153916713608121024463 +1233 -1.192138143390963504011715467844010925435401556462398774282862309168522038689569 +1234 -1.192156013244779076832439240760499836942971880584485655283646714985055512329885 +1235 -1.192173876943705057499275850676858101059183408360068921650803473544902319490204 +1236 -1.192191734490722934878017794390367900336892552364433694231540795826112190052847 +1237 -1.192209585888812672936913630351904428759377980611234109241734030454047809474894 +1238 -1.192227431140952711419708455253622901000260073650656259876981436724690756778618 +1239 -1.192245270250119966518613149558487469694194756563704369204286729201903110640878 +1240 -1.192263103219289831547201997805489281890191115173471555490212916137204335180634 +1241 -1.192280930051436177613238290227349136120992661344232053673722005276683979055371 +1242 -1.19229875074953135429142751291975208363183152034136091826959892453587510485522 +1243 -1.192316565316546190296097734502716891717920138233976650144327458560395795057779 +1244 -1.192334373755449994153806797915562596001302473746485938324298765588552288706588 +1245 -1.192352176069210554875875926687097455739498970379319629599311596892660157229922 +1246 -1.192369972260794142630849355722122537527671507154589607819826883411983576184497 +1247 -1.192387762333165509416879597344112935376544415968459722183020684700001126348287 +1248 -1.192405546289287889734037954032014338175847126297551760396441183889909158984059 +1249 -1.192423324132123001256549889986471329750714442376647503815981699234061747795131 +1250 -1.192441095864631045504954874357486504551996908347711086378187927885961843227986 +1251 -1.192458861489770708518190309661496257654355947404284683178650701213208948408969 +1252 -1.19247662101049916152559915961114001702503931851582899841826965739247697338299 +1253 -1.192494374429772061618860891275594786516463409876205495660637766078021251417018 +1254 -1.192512121750543552423845347183246218955992925310255007150319276986237243919168 +1255 -1.192529862975766264772389163671671100964440059202719294875450506273988555065233 +1256 -1.192547598108391317373994352482414167312957514567994075457721601426149973000224 +1257 -1.192565327151368317487448663289854636977959205326152608103796810906401902054495 +1258 -1.192583050107645361592367345544574841492210741574945922223469500503611478588072 +1259 -1.192600766980169036060655928702064866294314383161303647192908602252938376255256 +1260 -1.192618477771884417827893640597323316781115840818991292226449478094135574064038 +1261 -1.192636182485735075064637084414945223551692541677602577180269582165489312328014 +1262 -1.192653881124663067847643795392623788427468514426852221243222855344130313963854 +1263 -1.192671573691608948831015299083633218412235857288051075927438465339808912581009 +1264 -1.192689260189511763917259293690805374627080123235825241780349498667124656840925 +1265 -1.192706940621309052928270579670763454859449848952202828064311343368312970488439 +1266 -1.192724614989936850276230360492731510771711046818905598996071212829474556437729 +1267 -1.192742283298329685634423539121099354714493955226375002044169222475123226358396 +1268 -1.192759945549420584607973635475088418794549884542998457905620101544439472544279 +1269 -1.19277760174614106940449495080233547428024000306205115434737843059574159827649 +1270 -1.192795251891421159504661605585987888124104424527990208483879482965165140014802 +1271 -1.192812895988189372332693078286986372479933322887199351493195138039485704176246 +1272 -1.192830534039372723926755872904599061330324494730031268447262292490012990498022 +1273 -1.192848166047896729609280944018964316054454513927271215334453765646387091080809 +1274 -1.192865792016685404657196508659399010880389564477218498827325951721143013977655 +1275 -1.192883411948661264972075875021534273193923356828447961924472013640532759739909 +1276 -1.192901025846745327750199918734951847710841049283278437904544432872612826677836 +1277 -1.192918633713857112152533838060911514233298178131282885160913802590517293664787 +1278 -1.192936235552914639974617820076983414348207257105208901814316389984146627039013 +1279 -1.192953831366834436316371250581928832799056878919790951536280047872908840972377 +1280 -1.19297142115853153025181010113000903574922419831661467316332832804048975776695 +1281 -1.192989004930919455498677127279044293690705058479075892546136665114344678229559 +1282 -1.193006582686910251087984512810994315828243180495661783721180987809429719060042 +1283 -1.193024154429414462033468595357587101426402254100979353637638115349166578701981 +1284 -1.193041720161341140000956309536585779433358234862229299215533106658828585017861 +1285 -1.193059279885597843977642984376652469818630201687039891274008531576206855249264 +1286 -1.193076833605090640941281132480444669148047666333202004046963775421062937257042 +1287 -1.19309438132272410652927986904656325116582634555033980990261030307341634025399 +1288 -1.193111923041401325707714599541261994286512374465402034279207468644872274917375 +1289 -1.193129458764023893440246615480426717168084369759245707564954758585379053483786 +1290 -1.19314698849349191535695223845123773771006194600467288996864093555961951372559 +1291 -1.193164512232704008423061153171142588180066759633375247386052686565705751123188 +1292 -1.193182029984557301607603571049286839512113311751352608749521633177852169689279 +1293 -1.193199541751947436551965866382379632438927749063221901589938334981060028373931 +1294 -1.193217047537768568238354327983107204819101707935930223964147339909512762171162 +1295 -1.193234547344913365658166669704652467595112765778546522284505721252888700372726 +1296 -1.193252041176273012480270943989631642059936531053382816982073092876383534818145 +1297 -1.193269529034737207719191503235820255796018880564785498393499383993475949602879 +1298 -1.193287010923194166403201654434410532542388894900999308688002497301470628032415 +1299 -1.193304486844530620242322653199220532584646515897103465575999708279605249909812 +1300 -1.19332195680163181829622868396726243676440500055181846851864821836801966117809 +1301 -1.193339420797381527642057473812373252056067419995715662201140763882142764805519 +1302 -1.193356878834662034042126187974216084512376959223129904978216931810858282365159 +1303 -1.193374330916354142611552255864874112350703893272206871134454055929389044517885 +1304 -1.193391777045337178485778776974482635611764746472154476200005568216151405572775 +1305 -1.193409217224488987488004156755877218196863484867452105400359615249136498439535 +1306 -1.193426651456685936796515623226078113653124973212498086388688969099666710871516 +1307 -1.19344407974480291561192627567958301974742774809178846804692127044966632755769 +1308 -1.193461502091713335824315317564901882007933976101965236986908981288243898334725 +1309 -1.193478918500289132680271126231539107812272203971281839508610989520033459365691 +1310 -1.193496328973400765449836812909710306490176785491147863746761833777624280671042 +1311 -1.193513733513917218093357926939472684939663455520939534608079133632948122462272 +1312 -1.19353113212470599992823195891965065150658289844978370390931112523531461243949 +1313 -1.193548524808633146295559298099951163843342212466029693679145185777243019692456 +1314 -1.193565911568563219226695299991987051053879982928185257427399774304285251364239 +1315 -1.193583292407359308109703120826561099968980428944831621121833576707247626086412 +1316 -1.193600667327883030355706976135509274605004066753869970223550963877231291118952 +1317 -1.193618036332994532065145481386658192868062051782781736234514973818501363720574 +1318 -1.193635399425552488693924733250020072899963759452809497686662430917438169680551 +1319 -1.193652756608414105719470790722227942040505921488759166728307044323263616438075 +1320 -1.193670107884435119306681215984405134510385565305345321088661084235076193385313 +1321 -1.193687453256469796973775335516166151292475550535841509591095342056866858039249 +1322 -1.193704792727370938258042882635260980379177301878074724684051588299534874902073 +1323 -1.193722126299989875381490683278502142009133903892737723215645798641039885325976 +1324 -1.193739453977176473916387047485053197558913151980358078132145611015291841095164 +1325 -1.193756775761779133450703529687909409573412958005504416316571771053498388226608 +1326 -1.193774091656644788253453721563465832565461502985530646422280989122894028855827 +1327 -1.193791401664618907939928741832445519602660785028309874548996601811324024027065 +1328 -1.19380870578854549813682908804815091959557508229260037775601235108420399243841 +1329 -1.193826004031267101147292516050005087224687060767205727419572331184033631075582 +1330 -1.193843296395624796615817613401666205559934042475561754786024051254334351342004 +1331 -1.193860582884458202193082733773629305944748265476398017985507990985853450836349 +1332 -1.193877863500605474200659959870173137283714738210793797561309920628076300248634 +1333 -1.193895138246903308295623763139768065471147717462979475532874253018964004674726 +1334 -1.19391240712618694013505402914663285263941874491192675016404687450562291762341 +1335 -1.193929670141290146040433118119014355829392399134352941431144670484480740851915 +1336 -1.193946927295045243661936630826964777551666737376438494386730657506527471742195 +1337 -1.193964178590283092642617550578906279795365999005885978928763140520184439047655 +1338 -1.193981424029833095282483432762102722943845103750485358222604422883609805763617 +1339 -1.19399866361652319720246631398730319767655030580684261370850867628693256288457 +1340 -1.1940158973531798880082850135322820684819170267569954320105508817886357085776 +1341 -1.194033125242628201954199500412775630387735380778463573114333290590836774485311 +1342 -1.194050347287691718606657000042406385740640827078673922646568153637907571599443 +1343 -1.194067563491192563507829515075592566436588538134793212714578029901179085191217 +1344 -1.194084773855951408839042435659163051310110058533863099535533682868306962402919 +1345 -1.19410197838478747408409391494943645210800465173075046154829147065917093284772 +1346 -1.194119177080518526692464686381878059560420402851779449613758516532445882273336 +1347 -1.194136369945960882742417999810119749753883286449243024831896695150301509657142 +1348 -1.194153556983929407603989354260116047814867844399901395268137372416280793315993 +1349 -1.194170738197237516601865705673514529606353463264197597774329075006838488927431 +1350 -1.194187913588697175678153828641940812766086459190183106735692051251037725703799 +1351 -1.194205083161118902055037511760837747277794141639981073373274413261658350751584 +1352 -1.194222246917311764897323266857755265426401032860986635332662735205344807825608 +1353 -1.194239404860083385974874232975561895259610692382712345859735717011432085723599 +1354 -1.194256556992239940324931956615941385624478752063625321203021051265915993593865 +1355 -1.194273703316586156914325730372748440777474248663713797041856668223585851477084 +1356 -1.194290843835925319301569172708326426029907804767604110021537902630189389318605 +1357 -1.194307978553059266298843732248737291674663876231766518563795706031446084834728 +1358 -1.194325107470788392633868800596020080565377240410759033981904697268302373487529 +1359 -1.194342230591911649611658118277079446435348341805920564848006788870359508717959 +1360 -1.19435934791922654577616215906960982782579254238749636895762833262424239022555 +1361 -1.194376459455529147571796178565584510038100680472227757092763838788731599021764 +1362 -1.194393565203614080004853613452281979746791065251594875567017068370620617919894 +1363 -1.194410665166274527304804518609584949936465065069756645240617700835685254435857 +1364 -1.194427759346302233585478729740370423994694152836552313939685676214720848056821 +1365 -1.194444847746487503506133439868212395646447290356661653798888520994736930761692 +1366 -1.194461930369619202932404878653342465699311541152956812923024370160073830595232 +1367 -1.194479007218484759597143784093858018225175191160767808476360291587661609344482 +1368 -1.194496078295870163761134356794532859970055125552119955302931225272925478063933 +1369 -1.194513143604559968873696387600271610786306252571848174435867491538053533445629 +1370 -1.194530203147337292233170250005256864233738067447765105738048945123672878941504 +1371 -1.19454725692698381564728444936216744189373317777685687417814103668198006676174 +1372 -1.194564304946279786093405421528497169257359594868138617338755501628345122637008 +1373 -1.194581347208004016378669274198976733333368392161127932343945796728210357079987 +1374 -1.194598383714933885799995164784396571594321181919343631468941881332878148312739 +1375 -1.194615414469845340803980009307746618925273514703416320199230884155764182165578 +1376 -1.194632439475512895646674217398529335408909724638992435355974176029987667161353 +1377 -1.194649458734709633053238149075365985782488672566680273512459441581446030734607 +1378 -1.194666472250207204877478989615602875099544242981783989331004142307152633321544 +1379 -1.194683480024775832761267739418534399538712807370072676717826120218563430530515 +1380 -1.19470048206118430879383601637609358258683831831951143864991467710811562309561 +1381 -1.194717478362199996170952368871418472291115052376150937899345263358747289711595 +1382 -1.194734468930588829853977798131584613373122592436911437767260538238830485537485 +1383 -1.19475145376911531722880018926600001831022094773742861486754631512266456462748 +1384 -1.194768432880542538764647350926489884733530987523166501749569102542942103989391 +1385 -1.194785406267632148672778364128953984512062925555630995724018926984644415144079 +1386 -1.194802373933144375565052941379660425659947006467542768768899584951299134759732 +1387 -1.194819335879838023112378497851745605809909642391097514833705951280645642866147 +1388 -1.194836292110470470703034636959321880650378941599018870631650384456365388010295 +1389 -1.194853242627797674100874753277752008748906487012860310213557610572141349322133 +1390 -1.194870187434574166103404456359133053013978143169267907221435115591371406044112 +1391 -1.194887126533553057199736519591842367220046775332246391325410572074340587066045 +1392 -1.194904059927486036228422058852134823178582672256045400072262050247143790089093 +1393 -1.194920987619123371035157646294243791021743065125849567718922096585469769353095 +1394 -1.194937909611213909130368065223228823510642213442642366792810619883451671565638 +1395 -1.194954825906505078346664412591930768214269165947009584334050064572774381939162 +1396 -1.194971736507742887496177256259840392842636063148012679383436523309298696138786 +1397 -1.194988641417671927027764554747459814057504725192163385997296649548560628785512 +1398 -1.195005540639035369684094047814837324905074421049817384093360256491595028517556 +1399 -1.195022434174574971158599826787385877872956943811983581639238794007903302540707 +1400 -1.195039322027031070752312794145853757797172113151932833033249291649224343259392 +1401 -1.195056204199142592030564722490403130831569167095391296151689019645475304398679 +1402 -1.195073080693647043479565623581168442905399400005771740721945380661263879916533 +1403 -1.19508995151328051916285413874941232506003718011061151289235803960638929449655 +1404 -1.195106816660777699377620662564472006356644810381703725115401479314615056035334 +1405 -1.195123676138871851310902912232094501321101555739413943988915452703422984983341 +1406 -1.195140529950294829695653655789494292829955509286992546624208199032967516506274 +1407 -1.195157378097777077466680312751533138678051167074495816437693705338433934431727 +1408 -1.195174220584047626416456141450818257585108500062799485374907511637710481082656 +1409 -1.195191057411834097850802727902242765915266183709889033186429318179213874600846 +1410 -1.195207888583862703244443491609551108757338597638122340645218874899845416708148 +1411 -1.195224714102858244896427924317902628134055509312756579047506559433506324391221 +1412 -1.195241533971544116585426278302128607894935357188663703720383238003765815239118 +1413 -1.195258348192642304224894421365432401244474813283024096119765064336412070369224 +1414 -1.195275156768873386518108576307668855831927924172662293780676617577015804987385 +1415 -1.195291959702956535613069663206058476866550719767414512792603376163531300378917 +1416 -1.195308756997609517757276963434243885823227554302325585740606196071503418139555 +1417 -1.195325548655548693952370824927981416979707454902029920069170068019728861141313 +1418 -1.195342334679489020608644128787479423297946293726237958269665814313053290052328 +1419 -1.195359115072144050199422237887447315052256270888531629008161649722490029415072 +1420 -1.19537588983622593191531114874630580814084462213223887211456324104388436376099 +1421 -1.195392658974445412318313568485729594216831262489299499783925907861811956557662 +1422 -1.195409422489511835995812639290748942655607457508216606439050202659003659760758 +1423 -1.195426180384133146214423033359026886943231632831434962029725506957719868330661 +1424 -1.195442932661015885573709141905653918317892866622735796053949382553671731982648 +1425 -1.195459679322865196659770082366862791398876456418442850143369539859799702265885 +1426 -1.195476420372384822698691248522462425050133558266925583922558295438911525241268 +1427 -1.19549315581227710820986212883252224277980969357279576183157372186825933736441 +1428 -1.195509885645242999659160118858906927476881774958692526269183802393104030581804 +1429 -1.195526609873982046112000054216666753104497471864738664378881568761581821999636 +1430 -1.195543328501192399886249191074030689945483414446345494776049435629099743751093 +1431 -1.195560041529570817205007361792828649929769200021536128412100301515466240418352 +1432 -1.195576748961812658849252033873585835225876515986948674619499928453574264551475 +1433 -1.195593450800611890810348000941286468364137153704866539847283517444928009603776 +1434 -1.195610147048661084942421435078896508344744507476499302718114782053527674127971 +1435 -1.19562683770865141961459803038616558808430306165585648665967338500325796560413 +1436 -1.195643522783272680363104968210997638730351605701948249180758310208015675888134 +1437 -1.195660202275213260543236435069787791326037813508357178991254297869700630926161 +1438 -1.19567687618716016198118242484157046247643494419210850825325561626018737044486 +1439 -1.195693544521798995625720557388610335428298250647175799346681644731739038675566 +1440 -1.195710207281813982199770646323194539631990852258163049655725818358485032127335 +1441 -1.195726864469887952851811749206851009641340886400129122476468192296930687879001 +1442 -1.195743516088702349807161434034025068282241457975907317746777712520214108503947 +1443 -1.195760162140937227019116996417394030462840048259079637705230945236901320558884 +1444 -1.195776802629271250819958362456488364803815788421311493978016153067456436989121 +1445 -1.195793437556381700571812412835117983347425742226242445266950987490694468461301 +1446 -1.195810066924944469317378464256273858780539059791422624768204831057262979688699 +1447 -1.19582669073763406443051464488568869860913699795861545390544531597222084160664 +1448 -1.195843308997123608266684901037096142183285605424028423128910632205115260446287 +1449 -1.195859921706084838813266372893426195926762260511633700624274835754338349851584 +1450 -1.195876528867188110339716877618715692006193144844028787236810660679849061686353 +1451 -1.195893130483102394047602238775396754306730869612540504308877199830489615785953 +1452 -1.195909726556495278720483201520853892181768675264699199896291015785540089897961 +1453 -1.19592631709003297137366167361571172711722458600885923718972075758274341111885 +1454 -1.195942902086380297903786032834230801184964370531341698518827670182037845978951 +1455 -1.195959481548200703738315241924448730824233628770644630284850392453597600702141 +1456 -1.195976055478156254484841512822308467831334134624268402684662069470196550043558 +1457 -1.195992623878907636580271262379964925077232474408559718103442291583517372511179 +1458 -1.196009186753114157939864102423756031902286202563574093489469992887262371336873 +1459 -1.196025744103433748606129607511964718716412204257666905278834610437608340466759 +1460 -1.196042295932522961397581604316484708285760421598831472171506572006900592589641 +1461 -1.196058842243036972557349727105835629598332250034476594172249137604590949538049 +1462 -1.196075383037629582401647984359652187013847086795839209867278226535363277890672 +1463 -1.19609191831895321596810008209679823141491080944029449423218826839991937320124 +1464 -1.196108448089658923663921250050629910935864723590431529276180087715331745926434 +1465 -1.196124972352396381913956317375652947049320227762130277569271875466877557369419 +1466 -1.196141491109813893808573785119887808679835001211636485733826328942808983458355 +1467 -1.196158004364558389751415643246673464772538910715837589294879153722081768688179 +1468 -1.196174512119275428107002680538405807393174157547277760615828694942885800311605 +1469 -1.196191014376609195848195036262821076831475081062723914930015175932898366700599 +1470 -1.196207511139202509203507743029898012010458440782936850309102316559573571454639 +1471 -1.196224002409696814304281010814265319287071294732871648486073615902768127490181 +1472 -1.196240488190732187831705002664163726807257083950049989569095474801051891295616 +1473 -1.196256968484947337663698853163524697115617285300838010375713265008697583182774 +1474 -1.196273443294979603521643681258591135700298001448641799297711665959054676450467 +1475 -1.196289912623464957616969349604719486377228549389720067751262609386920723398841 +1476 -1.196306376473038005297594723132567775496790190112481957592983129191810238348364 +1477 -1.196322834846331985694221180075790786312327741557088608832325771698415527380302 +1478 -1.196339287745978772366479129244631943711918963596846477798886229807927064094655 +1479 -1.196355735174608873948927287871421999913962004725433437538614861386727802968537 +1480 -1.196372177134851434796904474894967566494941325557319472271228643912868651854129 +1481 -1.196388613629334235632233675091138270882584976963263676500520376626410442422718 +1482 -1.196405044660683694188778129996640160631671337019884888634140064134490381460295 +1483 -1.196421470231524865857849212111995271615727595794528307669738526703009457357262 +1484 -1.196437890344481444333465839408133352716006616585618396687197583232459856367927 +1485 -1.19645430500217576225746518769874193645400499892117621820672832600684521125032 +1486 -1.196470714207228791864464458977615599861197200789454412216530009156520589250154 +1487 -1.196487117962260145626673464356694711053532728838648563976015593997860089739654 +1488 -1.196503516269888076898557780776288543597514546340829949424984779004020639577155 +1489 -1.196519909132729480561352241194137702710200965736223537794782431928862975772888 +1490 -1.196536296553399893667424518494486685286926255680606775527204386253095462839757 +1491 -1.196552678534513496084488563892209431123327758063792219738047619419431934738731 +1492 -1.196569055078683111139667661140259257680464350737813872955778734724036313167257 +1493 -1.196585426188520206263406858381299948281057045679475092811065510219556949292236 +1494 -1.196601791866634893633234540016317327425333051165167890415290592608297092010667 +1495 -1.196618152115635930817372901494310751434214527334121311526117646048965865616375 +1496 -1.196634506938130721418197090457821913073660485937298446217447168028531181012003 +1497 -1.196650856336725315715542778209074551142186238570002967720735503269455870044959 +1498 -1.196667200314024411309861925990873416913590807772165524597335815590400858526319 +1499 -1.196683538872631353765226511105144526259622662539297265667961487698255945781698 +1500 -1.196699872015148137252179978420091667411843279655106637641200643808685318511508 +1501 -1.19671619974417540519043618334439668857264798456898133694744055371680092686508 +1502 -1.196732522062312450891425592873703606598803426416416072313885383705006477311117 +1503 -1.196748838972157218200688511840799408132664852872737968461953064386294111980076 +1504 -1.196765150476306302140115102026437908948316318580176511637542998295143260211944 +1505 -1.196781456577354949550031962312647547737273221183632819649631366341895163737454 +1506 -1.196797757277897059731135038584619869626312876272750218312803403146206667330501 +1507 -1.196814052580525185086268632610893055660854482717766076120737308807209335817704 +1508 -1.196830342487830531762050279654524531277697556421605097150758713900944410884475 +1509 -1.196846627002402960290341265090288794118678098374454299666477837053289343315259 +1510 -1.196862906126830986229562550824641494798002624112859597098849358146111588981217 +1511 -1.196879179863701780805855882836258839532054095615962265881981995768459891680021 +1512 -1.196895448215601171554089851675392917675049738599879649023884147961000903675519 +1513 -1.19691171118511364295871067828007894768017278960736307700975941915762265802877 +1514 -1.196927968774822337094437497986390040023242211439579799320880535025070272377241 +1515 -1.196944220987309054266801916128459254077670561301087014012384024316090247037396 +1516 -1.196960467825154253652531609141877837399001874312358478432384472876301166656028 +1517 -1.196976709290937053939777745601332940635969999883451409412654864198878703422901 +1518 -1.196992945387235233968186002139968160288743527557750743155558153057675733805171 +1519 -1.197009176116625233368810949713936336421600286196997727705820646096525827877056 +1520 -1.197025401481682153203873586190966485523371193938564199427911959904535642623481 +1521 -1.197041621484979756606361791756485942987270565751901319701468727295515473247578 +1522 -1.197057836129090469419473484144925088817943281037032798749250892098913112187515 +1523 -1.197074045416585380835902251217285798503667821939147508784269840209659288845874 +1524 -1.197090249350034244036965238918876363518936470535768172886031132021375482477072 +1525 -1.197106447932005476831573073163305428314808373300486933570451587966020555341426 +1526 -1.19712264116506616229504159470038585924078344703396032322157444695217782106293 +1527 -1.197138829051782049407745186536526762610461255270210519098886747928612521131601 +1528 -1.197155011594717553693611473986488471717754516076784999014532848272550660418386 +1529 -1.197171188796435757858457177945041594327731833368829989856822380117880448699 +1530 -1.197187360659498412428164902476107521953214199264324360363493441224601568749548 +1531 -1.197203527186465936386700638325364519679283063149806172271658714917648413484516 +1532 -1.197219688379897417813971764470081010651568222652026539700149979810309195118634 +1533 -1.19723584424235061452352533032708631348088999678740957055291215506623945129439 +1534 -1.197251994776381954700086401746309255255650159437523785304440852551840005414494 +1535 -1.197268139984546537536936254423207139749398405312069356831772603664394416181189 +1536 -1.197284279869398133873130198868671872552511351840857280231848324355679084480747 +1537 -1.197300414433489186830554821579637005662534841566297412424370611915388978197388 +1538 -1.197316543679370812450824427557619437583641783490470576405221530905860091842268 +1539 -1.197332667609592800332016469825812865882794308998331667959337338549359030502758 +1540 -1.197348786226703614265245752098107212721491625584109724839055150875239293609322 +1541 -1.197364899533250392871077191255539506039544687323602346957295360744569021259018 +1542 -1.197381007531778950235776926787187476339669065078129031510184102901089305259623 +1543 -1.197397110224833776547401564853397798550992117917469148610225689320587275243222 +1544 -1.197413207614958038731725345129496847988868260171954558200055897707413747718016 +1545 -1.197429299704693581088005019087763427338839845330837895054343312534220364359149 +1546 -1.197445386496580925924582228874450536840684364270857549507158528437788092927643 +1547 -1.197461467993159274194323176437027282003376733459517430232949167538815364996318 +1548 -1.197477544196966506129895373054572822412463456183275994243743703875998424320474 +1549 -1.197493615110539181878881259921392242263921367318298644728494506469197430430351 +1550 -1.197509680736412542138728490930439749533587706178705217128491964119806378021107 +1551 -1.197525741077120508791536669299028068120907853730109125212898224750309479466964 +1552 -1.197541796135195685538680330174574658431217834831644262021444116170743208713446 +1553 -1.197557845913169358535267961852785869809471123886703494579574720942072983750603 +1554 -1.197573890413571497024436858734709676721181328295485837889521863473684369247405 +1555 -1.197589929638930753971483599642496663885167655414047498627593684805209842869413 +1556 -1.197605963591774466697829945606497788567382314743195252861619697657735332060938 +1557 -1.197621992274628657514823951728496546391041655636901623651536912848582476494703 +1558 -1.197638015690018034357376088217422886323614983025075497846322912973106067567291 +1559 -1.197654033840465991417430166184826947554172840555882255694948638818919529200064 +1560 -1.197670046728494609777268864277702812930800724961368990283768622376342855548834 +1561 -1.197686054356624658042653652715946378207632791698610847023284272177838720344082 +1562 -1.1977020567273755929757989117908075118370275170390063715768981696372446899171 +1563 -1.197718053843265560128180042369155315276398750847661396175679748658757663175904 +1564 -1.197734045706811394473175366436216878159917573240256148943678980808976757447699 +1565 -1.197750032320528621038541616196674846165536557182843784235532765950571791460586 +1566 -1.197766013686931455538722810740617772491881188936188025173987532167177533786431 +1567 -1.197781989808532805006992319766829997600692634508062956964280418331552054427201 +1568 -1.197797960687844268427427914341285087878120906047233770325085073661801298568914 +1569 -1.197813926327376137366719605153469054265305694025217042266973764115017132116506 +1570 -1.197829886729637396605810069217307059389395041045565189575909978094435669247855 +1571 -1.197845841897135724771367466447000499512884789066265390719819959191860310472065 +1572 -1.197861791832377494967090448021000609470149330066310672098355337721136724772327 +1573 -1.197877736537867775404845158929650478966703213062170204885497343679329771346525 +1574 -1.197893676016110330035634037583719982001109191699696750924320346774519740181035 +1575 -1.197909610269607619180396215842138003081569008249887450624177565693057459245062 +1576 -1.197925539300860800160639323297693890224567112178070136466785876081926751024105 +1577 -1.197941463112369727928902500139335671839808361286643062143262844890217023211431 +1578 -1.197957381706632955699050423388936639442707611579568033643285696898855191407035 +1579 -1.197973295086147735576398151789034818129182034265711808046679916719034834917582 +1580 -1.197989203253410019187666595096072019848958412511894172741840011191973502911091 +1581 -1.198005106210914458310768414011070999187139282638711066566406487279731335005762 +1582 -1.198021003961154405504424157456491106583537206839592758875097144448047306555296 +1583 -1.198036896506621914737608444384195159166969409491833828696565083676386929888955 +1584 -1.198052783849807742018825997775043424643973100443329719573587377405106127597033 +1585 -1.198068665993201346025217338965605039447375994122007179239285253319896167632852 +1586 -1.198084542939290888731493950911843259608886091608613913985382485094898471666456 +1587 -1.198100414690563236038702719473389073057807927325729517497220616290497044460779 +1588 -1.19811628124950395840281946227516828724650249472323158937142375475454772265191 +1589 -1.198132142618597331463171355175690648636025103821330472952906476768017217920144 +1590 -1.19814799880032633667068806684324625360612379371954099704288945291977864332135 +1591 -1.198163849797172661915981412412584877233471961579087477832134396364781309236793 +1592 -1.198179695611616702157253337665378281046549366720455794000288255360802106488472 +1593 -1.19819553624613756004803204564788446773329183783822061524062977388811628511283 +1594 -1.198211371703213046564736078108746634746746995870604528013107147628900769397666 +1595 -1.19822720198531968163406616460876864520020021451797221103549132988995392121296 +1596 -1.198243027094932694760224652622813589217255512404942912315087852949798688177333 +1597 -1.198258847034526025651962332421672858327374348682970016119646341437654355012678 +1598 -1.198274661806572324849452470988850506366657813749840502144733702999432596427642 +1599 -1.198290471413542954350991869693701929918080187954853848139984709299171495205739 +1600 -1.198306275857907988239528760908257477330981871293391779127256126361724952558817 +1601 -1.198322075142136213309017359220350895985164796056108541355143872504175996525923 +1602 -1.198337869268695129690598883360359961359444649534886438588367399869157633146223 +1603 -1.198353658240050951478608865422952607734895109500679219792596718798949061284932 +1604 -1.198369442058668607356410564428716808571590409194124041345344150018148706074964 +1605 -1.198385220727011741222054301733436744759741459380886615084567893411924709480709 +1606 -1.198400994247542712813762536255061861527647411259127626415419470011004645959853 +1607 -1.198416762622722598335240497950099660703952140345615900707732022658430495337697 +1608 -1.198432525855011191080812198432247915640186403256269109385402785993041438679916 +1609 -1.198448283946867002060381638086567843204755368935870947023313504963802289966808 +1610 -1.198464036900747260624219029492387033105650273882791053559336081310210771216579 +1611 -1.198479784719107915087571857427410032069075504477229672755926720476635586619536 +1612 -1.198495527404403633355100596184205822213960841670054791427494861064924429083259 +1613 -1.198511264959087803545138905388335432870887635269552971054021737800934512429894 +1614 -1.19852699738561253461377812596487999708268315504250215100957359602713132862764 +1615 -1.198542724686428656978775898357030122506320436745615881713275001344789546124853 +1616 -1.19855844686398572314328872555670190625203759056542690609862747463470126477175 +1617 -1.198574163920732008319428303962853699610386524214789424727038371420184079175745 +1618 -1.198589875859114511051641445538291237317902172047817341099073603195839246588612 +1619 -1.198605582681578953839913415190267403103611149206710611565584766246972363993359 +1620 -1.198621284390569783762794507754107125265391522289085168966143574427994884687017 +1621 -1.198636980988530173100249689412418099885994436971454121412572606382694153874181 +1622 -1.198652672477902019956331128835184642364779768040900034946186007761722256845456 +1623 -1.19866835886112594888167344377818538797470965069308428319837039617373721161657 +1624 -1.198684040140641311495811489328726217324747748625590656037260358370465905037389 +1625 -1.198699716318886187109320514438638091491132259579552786265010630635193360591704 +1626 -1.198715387398297383345778513834855863156065586613519559811257673771385673645056 +1627 -1.198731053381310436763550602847669003739365018661895229147522845457299886588276 +1628 -1.198746714270359613477395243145918972006555021775080489630524476395876516049124 +1629 -1.198762370067877909779892147817011067161306715722485965166926650917382209691373 +1630 -1.198778020776297052762691694677611479550857340506949013859950548288666385182063 +1631 -1.198793666398047500937585677148313295791864638672474181988092102687515278486767 +1632 -1.198809306935558444857399222472378853712564514121640552057095871455116584404248 +1633 -1.198824942391257807736703707504900497744035239906100955690758709925328441320164 +1634 -1.198840572767572246072350502744367879402926988789581953085107118496120990318402 +1635 -1.198856198066927150263825375723687902797200067651646880630495004507279475270554 +1636 -1.19887181829174664523342338532217365454289256378209552611820984764968719459021 +1637 -1.198887433444453591046244099003901604369777795007905659394068279197426223444064 +1638 -1.198903043527469583530006965431132440659205808055212825540312424096876508519094 +1639 -1.198918648543214954894686675344200538214606545646012576262532651222632954933893 +1640 -1.198934248494108774351968344041400668101910680741721711025528926811560670237446 +1641 -1.198949843382568848734522349233938576170824880658157443446853511258942917863439 +1642 -1.198965433211011723115098658491964903003027685211885363147043658012432973925383 +1643 -1.198981017981852681425440480938080019019497587487689548117159666057702677178646 +1644 -1.198996597697505747075017078284481130168722025388996944217869096810209562624239 +1645 -1.199012172360383683569575570749122898223441491356454213766786392379391231303262 +1646 -1.199027741972897995129511573824879241807232137264021677828290666986981818168266 +1647 -1.199043306537458927308058502313727366781199863027867319256658954837630321387949 +1648 -1.199058866056475467609295378475425844826935191121954202247542320670265174240352 +1649 -1.199074420532355346105972981577027144598070148227777304027676869823365702387645 +1650 -1.199089969967505036057158176565851848662335739326261842271029388790357177510239 +1651 -1.19910551436432975452569626002425728994945561015836935866230147421317374986867 +1652 -1.199121053725233462995491161999657942233335264640103187822483985536862795618352 +1653 -1.199136588052618867988603342737799029328750427860044903911813241772134995391284 +1654 -1.199152117348887421682165223781248906533001874191631906885101844177589391527883 +1655 -1.199167641616439322525113993328460245090495565025839956107982209278291397253104 +1656 -1.199183160857673515854741626181555346138292770332103793115496087088274977135056 +1657 -1.199198675074987694513061959043217455073233775477677492845937206072211980648474 +1658 -1.199214184270778299462994662354718171268521024870075511372689476626939976158881 +1659 -1.199229688447440520404365950298181382592139008110912620936546532453332594261731 +1660 -1.199245187607368296389725871016677030601779679754981664195757878128294511205034 +1661 -1.199260681752954316439982019535653862297603844767431516115734974923217981706347 +1662 -1.199276170886590020159849516298559579915629563600173909151515111623897522785972 +1663 -1.199291655010665598353117094658259893772970209460105165686365126774714850980084 +1664 -1.199307134127569993637729141094055347283351961159238562478466766471101396524514 +1665 -1.199322608239690901060683532351706850916655012786770313100268348591428486440371 +1666 -1.199338077349414768712745114130918066364403105300977599357723288116292952200536 +1667 -1.199353541459126798342974666371185557092261879913197101421032642066609155266921 +1668 -1.199369000571210945973073200612816400720028601557536086616961643568715708830517 +1669 -1.199384454688049922511541435335228176487789998142396644354680048335673195606795 +1670 -1.199399903812025194367654295599388331969452286101430530031224950410157835592402 +1671 -1.199415347945516984065250283745419332012268425591662104610050401833323148151139 +1672 -1.199430787090904270856335568319993134746791872687227461709945810519198284310682 +1673 -1.19944622125056479133450263883116385986022677144548898121871735040524383231457 +1674 -1.199461650426875040048163374350741448890577934981678767660719311636850661679308 +1675 -1.19947707462221027011359637440619210210923390123704399665318942087640560224807 +1676 -1.199492493838944493827808401025363747940243530070421326853230782368999111531771 +1677 -1.199507908079450483281209781218077195432823002006488722836003704965345872550524 +1678 -1.199523317346099770970103619598796374967418186103087803033727696301938307165971 +1679 -1.199538721641262650408988671274194624331384407149205573477412796450381342436635 +1680 -1.199554120967308176742675725538468764031012777718589858687895701883558048027355 +1681 -1.19956951532660416735821735133771916497972851023056522752930466293139260236841 +1682 -1.199584904721517202496650855882612581567807914380864014868652398163831191918531 +1683 -1.199600289154412625864554308205875641907383789106529388318955394895473490390923 +1684 -1.199615668627654545245415479877930993366779812916708191811311170754449618363618 +1685 -1.19963104314360583311081355551018563424574264919883496930185139380268351267471 +1686 -1.199646412704628127231413466091112360757796817894947963881059648733547467014688 +1687 -1.199661777313081831287772698615330961810068022800503492029996023161075269413804 +1688 -1.199677136971326115480960435880396242107314990073413733730704207708310309975094 +1689 -1.199692491681718917142988880739935586826873864769180438369668041414201020549906 +1690 -1.199707841446616941347056619515150038752553174765124025775611911316606054175535 +1691 -1.19972318626837566151760387967950018182054892591103117319091958518155734386479 +1692 -1.19973852614934932004017953734364195428406109561380760026175054343974159064835 +1693 -1.199753861091890928871119730479358291170954630684395425285828059634523884993579 +1694 -1.199769191098352270147037934232350660674614761598466776788347770597570820725972 +1695 -1.199784516171083896794126355084310554122859631137962182305846703918924717607156 +1696 -1.19979983631243513313726850103468525600886833442557284596731191156676719271369 +1697 -1.199815151524754075508962785381985201289800480146569405864119740011474728047409 +1698 -1.199830461810387592858057022093352364062187416431258676184410982613331639859266 +1699 -1.199845767171681327358293671159420857356211861041735132081445463392948454843847 +1700 -1.199861067610979695016665692739252700948557918733192354742989285534726675787889 +1701 -1.199876363130625886281582869307323975815523868609539684433576019610094198029718 +1702 -1.199891653732961866650848455421169773417558244313579888337052772966967169472422 +1703 -1.199906939420328377279446015134370908947494674890639048599551214831323358000926 +1704 -1.199922220195064935587136307485081743750973410634714723142557479878504538464332 +1705 -1.199937496059509835865864080895257097339649679278295519709435909793118853361657 +1706 -1.199952767016000149886974637720137568002049446137012984009252119169718516367251 +1707 -1.199968033066871727508240030591397067443135792992812245490860884035105417012773 +1708 -1.199983294214459197280694752600644453853237650602516328787590884973929068528725 +1709 -1.199998550461095967055280783772703264251169158650429906003383041033312484044621 +1710 -1.200013801809114224589301856680270146024206621409994228456504700557354721924564 +1711 -1.200029048260844938152686804453174114684155235867408818914348473842037481709506 +1712 -1.200044289818617857134061854836525665583206992028865003801624665889397641843858 +1713 -1.200059526484761512646631734352557487517082632889946418294194813034078120417497 +1714 -1.200074758261603218133869447020917511837855602973726392674742188828980677625826 +1715 -1.200089985151469069975014592491580728175175799229917912899628424917412186711482 +1716 -1.200105207156683948090380088843399053609298585942023320716497412613723527279382 +1717 -1.200120424279571516546467165699609002854130783532659568971761227723303351350762 +1718 -1.200135636522454224160888493709365419608129885541948126869120967989394742645996 +1719 -1.200150843887653305107099316841566540841139738205551953558768373054606184890076 +1720 -1.200166046377488779518936454333881623741184140009452775657661582888945338740971 +1721 -1.200181243994279454094965039535987716889367613194095521167773299135791557491478 +1722 -1.200196436740342922702632863281567350711447294246297337275773366970697456215414 +1723 -1.200211624617995566982232189818614405323211909563095575767814254532188254823732 +1724 -1.200226807629552556950668913722041634697355368424599009456019243589208416684395 +1725 -1.200241985777327851605038926606480732986020946765772919028834598891059832921491 +1726 -1.20025715906363419952601156285051487038789768850311800033179164436856709764821 +1727 -1.200272327490783139481019993936384750900469351038261981510948434148721660806627 +1728 -1.200287491061085001027258441401462901590256372234083077683504590470405410380446 +1729 -1.20030264977684890511448607878949754178307555670587278150867364725800763120043 +1730 -1.200317803640382764687637493380787450150013515841672233749247392179102724391831 +1731 -1.200332952653993285289239578871063197559842593818300470159958445521118751335537 +1732 -1.200348096819985965661634730558918393489422840087401297845819288738205580336057 +1733 -1.200363236140665098349010214991157653620417710577824355034569913413868481419542 +1734 -1.200378370618333770299233586404406286077582561364980053749314906237173785553626 +1735 -1.20039350025529386346549402268976066383736134916810248549022079312267251399004 +1736 -1.200408625053846055407749453995148351592399189911910207395447038425371101348837 +1737 -1.200423745016289819893979357467413737413388656504971760037210908024491704725832 +1738 -1.200438860144923427501243092022948633696891708332062588323079368077692279343326 +1739 -1.200453970442043946216543647421948509094073402821864837836804376004311202431919 +1740 -1.200469075909947242037496682307094144521736676724826459919669827832809350978298 +1741 -1.200484176550927979572804726252636023276436282147105022727988630290174129721682 +1742 -1.200499272367279622642536421254495119187499810405661978933984752449312888460816 +1743 -1.200514363361294434878210678476089389306433572311325088005929145760051268179252 +1744 -1.200529449535263480322685626448150660655862814343480702327288784835868073511499 +1745 -1.200544530891476624029852227303812176033028040124262495397937346043562091760292 +1746 -1.200559607432222532664132438012723283926145914093045640199604145010925337839711 +1747 -1.200574679159788675099781793959885074563176087732980257826443138028015600505152 +1748 -1.200589746076461323019996292596299630437851151220315742310504542501355649978232 +1749 -1.200604808184525551515823455269386427971259359960203750339340562773136467882507 +1750 -1.200619865486265239684877445721442750049045205628223338304892458517614398525241 +1751 -1.200634917983963071229858124124211199959130969959432353049334495763222807230976 +1752 -1.200649965679900535056873915896866998830280969171081362121365082475847727566896 +1753 -1.200665008576357925873568374933451154276454594272137142751185194389530593383332 +1754 -1.200680046675614344787050321243953260973770972168457004621797693298492617813338 +1755 -1.200695079979947699901627433390890087871822860755218916815165531589722155825287 +1756 -1.200710108491634706916343176480333675350877713272566975721508556415732855435261 +1757 -1.200725132212950889722316946842915862707425730288454085099709642587199040501719 +1758 -1.200740151146170580999887314916375445851533963287341105019097697697339490484421 +1759 -1.200755165293566922815558248216719981140553292201305168082885552049731314068039 +1760 -1.200770174657411867218748196660047058104307798663831071912446704877894243162601 +1761 -1.200785179239976176838341922871510115824119681240726523198241694520611538677394 +1762 -1.200800179043529425479044960491822029435121566450124631886352034569376715512877 +1763 -1.200815174070339998717540583865066199285957144712301259786783279871088596001812 +1764 -1.200830164322675094498449172864430190502644194333292249835220282796676667874334 +1765 -1.200845149802800723730089856984791549985704945813338888840181443912669448066504 +1766 -1.20086013051298171088004432320286972627281699805818855749442410035612216954595 +1767 -1.200875106455481694570522672476912490402259379195472316163274319726430389936642 +1768 -1.200890077632563128173531210128610358220649253852188133302054202412511121293389 +1769 -1.200905044046487280405842055720128701921861086204267412320872117740749505943154 +1770 -1.200920005699514235923764458408814966535600202883041793286034366012874903689727 +1771 -1.200934962593902895917717704131278131278295022407155410140099729218582342439584 +1772 -1.200949914731910978706605501337149731930016663973509738817344246259932395696808 +1773 -1.200964862115795020331991732360920844621478637150056749210828013130786365484619 +1774 -1.200979804747810375152077457887807879633867912463069141725767632112500074736628 +1775 -1.200994742630211216435479062336632302175379011695714219710903916215398181183476 +1776 -1.201009675765250536954807428349205941859352688384526687501699292080153945984897 +1777 -1.201024604155180149580048028941694830139181762458270450568279041465711113753328 +1778 -1.201039527802250687871741826238890971734210937533111050539954804139811914469648 +1779 -1.201054446708711606673966866077253568696969260993388738400581105868047988914475 +1780 -1.201069360876811182707120458126989430920575229793563217913640715955109826896967 +1781 -1.201084270308796515160501831547327081366914761291179995348850774500681867060469 +1782 -1.201099175006913526284695156552500855016042090471868090114610327645154339978556 +1783 -1.201114074973406961983752822628800554502423430533890009131425023262648657341054 +1784 -1.201128970210520392407178864505359419722205160249285349509632304986644041819833 +1785 -1.201143860720496212541712427343148750575003039816933124698888075542488149002089 +1786 -1.201158746505575642802911162967921948748876319843281663729836006611118256267187 +1787 -1.201173627567998729626534449333604473469464435035350861542903740622040028438896 +1788 -1.201188503910004346059726325762859694909671165967174400107519270796229097662042 +1789 -1.201203375533830192351998036871274335083844858815112995581073625936483209903837 +1790 -1.20121824244171279654601007844080156721077024711235628993422839539471981508368 +1791 -1.201233104635887515068153638866775358493659410101713797957031451184189789192207 +1792 -1.201247962118588533318931330160966745891938879019427483342882171264601537155556 +1793 -1.201262814892048866263137102850791887695219707125767898447318409519617054217058 +1794 -1.201277662958500359019835239471903393586144533675927235485657226444001294512661 +1795 -1.201292506320173687452138321708001060511549579688459137991380732525698601866334 +1796 -1.201307344979298358756784066587786189268753664169341021069881282436572364974347 +1797 -1.201322178938102712053510927504555585534954702716078959081253777500661739146059 +1798 -1.201337008198813918974232356178987617481311408883892207269346958044295261757991 +1799 -1.201351832763657984252009622040213768555923746413559689247607363492626143474267 +1800 -1.201366652634859746309823085854295447004693197907895199962782738195035901787362 +1801 -1.201381467814642877849141824782737851814032165134709814067949764722519429423772 +1802 -1.201396278305229886438291506406670906666202310788153973704336147324283887754628 +1803 -1.201411084108842115100620409604812117930328980204798703948292110840240383697253 +1804 -1.201425885227699742902463490525298148474055324205837527870419377573377718295635 +1805 -1.201440681664021785540904392242931385045644129892247689909053101388731264833332 +1806 -1.201455473420026095931335297044335272085005566716498887344458868167305632161567 +1807 -1.201470260497929364794814520633948148081678908326634687044720365653553891287626 +1808 -1.201485042899947121245221747903710211079976345738474960414635145656286553796177 +1809 -1.201499820628293733376210810258712516771299325821987718627098475898884977190563 +1810 -1.20151459368518240884795990483998103500784481419192827172854216241403942998485 +1811 -1.201529362072825195473719156333963217777656009876858615781635787695685463274938 +1812 -1.201544125793432981806155422406169723014264786706512354616711570420048544269079 +1813 -1.201558884849215497723494244143800353448507693489263561397744708278597631599819 +1814 -1.201573639242381315015458843239051367474985412183428421467409373191340162638605 +1815 -1.201588388975137847969006067991161559185183111523913514208149912337544074364292 +1816 -1.201603134049691353953859190551107346850749083077527911305915450392421113230359 +1817 -1.201617874468246934007837458178203012812858005878982208036939938861810909158482 +1818 -1.201632610233008533421982301622701662586304044801419937399343357151103016976125 +1819 -1.201647341346178942325480104092825876708227509385136577707351314558674153058433 +1820 -1.201662067809959796270381434608484875186924140766196038386779375693301671629204 +1821 -1.2016767896265515768161166498872577611178552606960498500373730038865025546343 +1822 -1.201691506798153612113807769251040516958293246122049151666029102499863511677691 +1823 -1.201706219326964077490376527384068353958809857305273621659654100194147184504274 +1824 -1.201720927215179996032448510114835222250745369176895220749744835947061296807336 +1825 -1.201735630464997239170053278735739236036083629896250769586989606658599770986859 +1826 -1.201750329078610527260120388715086915211112388643472678639639533480370856266011 +1827 -1.201765023058213430169771208996390951606906599836752301426810387468947221976599 +1828 -1.201779712405998367859406448419696134913418641042245992543343799545696418865621 +1829 -1.201794397124156610965589296138966580370147491517098388798761012544681078433912 +1830 -1.201809077214878281383724083248364947588940774399741274347489778642037788151994 +1831 -1.20182375268035235285053037316855138758964030853960567988747807748137145385015 +1832 -1.201838423522766651526312388681926963474059141146162452635324685134347896267742 +1833 -1.201853089744307856577023683843043719364725323867347019086131691005573887257801 +1834 -1.201867751347161500756126969327201882546641005363703120042356080586755681889204 +1835 -1.201882408333511970986249000116554335454474283871443431304103698953176944905317 +1836 -1.201897060705542508940630434758839947551059374835643913537340782126643995293089 +1837 -1.201911708465435211624370575769171072576860300937715492422870315824844570040039 +1838 -1.201926351615371031955466901080106954467943719865246040148502089156011816990397 +1839 -1.201940990157529779345649296779554405817215909642545673364747354764561015812961 +1840 -1.201955624094090120281008901709850386485500514256026321700251339880790218582267 +1841 -1.201970253427229578902421474834698477269515252001503136693447529521264220526897 +1842 -1.201984878159124537585765196613453174834423407636815145084679452064028363567581 +1843 -1.201999498291950237521932815954572889866971026455259422495881671574822547574988 +1844 -1.202014113827880779296638054651894971063641292993420704486190181901083008883826 +1845 -1.202028724769089123470016181538724463612602973286004139905581982417427744859557 +1846 -1.202043331117747091156018668925573102746499377182984690535335170889420544470262 +1847 -1.202057932876025364601601844217736701234169761946164509892914392770425884155243 +1848 -1.202072530046093487765709449938758074851616634408621229843879599976390064942079 +1849 -1.202087122630119866898049025715189422442578547833338275415077801000586184572618 +1850 -1.202101710630271771117662026106943097670539217680434391311403506881535340703879 +1851 -1.202116294048715332991287588495903438506159879723694286820654776775690671972531 +1852 -1.20213087288761554911151986557336521842059292828762926912165462547971208538534 +1853 -1.202145447149136280674758837294266810702636293633814165184512814887731769694498 +1854 -1.202160016835440254058954517493098774824738684073579271607065643231685713925192 +1855 -1.202174581948689061401144470682791741888510519925688867092490490306809370096002 +1856 -1.202189142491043161174784554883821655422930668361346015455100356227614828825502 +1857 -1.202203698464661878766872806656216074724142848851201854019481675044483993044934 +1858 -1.202218249871703407054866384832102831047600353331001128006822765547831673717154 +1859 -1.202232796714324806983391489770912302819787648320686357547165543743156201961071 +1860 -1.202247338994682008140746175283327405150458869617265944136411539841981339510385 +1861 -1.20226187671492980933519597069357153181285909509532328246522911680948401037864 +1862 -1.202276409877221879171062230832634605025992001717252579207533171133926138001113 +1863 -1.202290938483710756624603132077561540317360612666718079769497375547967557462542 +1864 -1.202305462536547851619687232873966280953621236095484467821797259203327054512275 +1865 -1.202319982037883445603259517500488559375089591558139159720931994280352326516506 +1866 -1.202334496989866692120599842154980162219570541312476559636788446607491670306373 +1867 -1.202349007394645617390373702762793171318575807825918696302408604088116777753401 +1868 -1.202363513254367120879475244227644885925923357049791961048254791182084024074999 +1869 -1.202378014571176975877662431165153361809275724322840792431131315576789711346693 +1870 -1.202392511347219830071984300478274191095469602341520227004898232116663215138836 +1871 -1.202407003584639206121000216452523753287192434096151471406702729635062876971588 +1872 -1.202421491285577502228791049367047153017714485819314673840816437085020154703316 +1873 -1.20243597445217599271876219893528088421617962663338374136308630765611485642016 +1874 -1.202450453086574828607238384206171383729530678871877967814256006259036341211757 +1875 -1.202464927190913038176850121873641520375369694843172286590168668820382013039206 +1876 -1.202479396767328527549711815258248168144340449546816143420669324394380713628752 +1877 -1.202493861817958081260391376540745795065719098470868618183386631206339747453931 +1878 -1.20250832234493736282867130514256392230270294895053816498991055183635051503452 +1879 -1.202522778350400915332101145463020831532243758937061438791916359115009789664818 +1880 -1.202537229836482161978341247497432482735794272195485423342443133802983829074322 +1881 -1.202551676805313406677297754174134709298220686389075181028377128776883411673446 +1882 -1.202566119259025834613048739561818842865977582192810418305801853475466950495252 +1883 -1.202580557199749512815561422411486446802269272999093273433811661526636168153877 +1884 -1.20259499062961339073220037980975826431120875567257846607692593844393668497892 +1885 -1.202609419550745300799026686032226275363691418173987697298357493839493233845639 +1886 -1.202623843965271959011887901997016365386300974807469456736331114328431257570161 +1887 -1.202638263875318965497298841029732998174089301808130357102891155936063597097464 +1888 -1.202652679283010805083113036961486915521944277998255275139145286708878325184072 +1889 -1.202667090190470847868984840891762716460143853647244089278216643693649827556415 +1890 -1.202681496599821349796622073257465659508340741015817429428262518732779962902495 +1891 -1.202695898513183453219829158158596641766318884678506194451679482927612007399106 +1892 -1.20271029593267718747434066719964149863289168059754538596630550970779857436622 +1893 -1.202724688860421469447445200413925997134405323513579484225765163471719418676015 +1894 -1.202739077298534104147399532145881623853113971702554910911071066311742317599816 +1895 -1.20275346124913178527263295007338995482722976182361744378191308989412163722261 +1896 -1.202767840714330095780741715859125499053989585985313988505062643940730514970606 +1897 -1.202782215696243508457273576226098888820009789517702262914071666735422166888529 +1898 -1.202796586196985386484302253558414608413901112613188276459386782115179347413027 +1899 -1.202810952218667984008791845433600567196843364507725444038379307003712807327642 +1900 -1.202825313763402446710751062797741192816581324174645523750338553857628633825653 +1901 -1.202839670833298812371177236799051804793749435158569203446572302700735276230859 +1902 -1.20285402343046601143979002459947028697574165705601808450787701645787957817438 +1903 -1.202868371557011867602554744787312968575114859324446647031276049219804916941843 +1904 -1.202882715215043098348995273317045606761667574598209044748369122075847334075106 +1905 -1.202897054406665315539296431204757898076005822763223096363289136624323488932029 +1906 -1.202911389133983025971195795510001490233848579648463999707004479177240824299917 +1907 -1.202925719399099631946664865436257479089817200341318203241479693377151233702936 +1908 -1.202940045204117431838379515683440316460210331802118869258941024364649888661899 +1909 -1.202954366551137620655979669486521381936350555755878644542392644486026464623191 +1910 -1.202968683442260290612118124074567644459326581154191605996271065074130742999132 +1911 -1.202982995879584431688298461584239315913853407251011449436857767109084772420345 +1912 -1.202997303865207932200501978761075637907646118142746041559860894062274329988508 +1913 -1.203011607401227579364603569080720402739795959538211941846796505963724786138436 +1914 -1.203025906489739059861576491220598948765256058074091918988644948459916784198575 +1915 -1.203040201132836960402485958110456647301188079254569168496162032724166280725456 +1916 -1.203054491332614768293271481087605771192419318545428889268967878478248051231306 +1917 -1.203068777091164871999317903979703562383710047522749168659212598921583798901759 +1918 -1.203083058410578561709815062234399755489242689860644196591560098181203653275844 +1919 -1.203097335292946029901906002511247224484184202426186801973732508063383057101747 +1920 -1.203111607740356371904623698446865258273914015795805193016653233275156085877837 +1921 -1.203125875754897586462616198599481695952184151380503140610506788019576626782205 +1922 -1.203140139338656576299660142873658221891732499839728905017770309119815056720628 +1923 -1.203154398493719148681962584020222992193325264704667831611906419490224567912457 +1924 -1.203168653222170015981251051100196895146416793759969201771578689090661945503475 +1925 -1.203182903526092796237651792094804596841042518224786470543709715434421006319915 +1926 -1.20319714940757001372235613313650954644953188972153900999421778154592468628711 +1927 -1.203211390868683099500074892128403771419313782162266274962761989609820127766332 +1928 -1.203225627911512391991280784811219038252475151493605003206399553771416202882841 +1929 -1.203239860538137137534238761628706246977609266901936258985403983877557879068577 +1930 -1.203254088750635490946824214033155224043414817635965994215164586558985006567221 +1931 -1.203268312551084516088128989163397836293806708152081077540110873377722928425006 +1932 -1.203282531941560186419855152117754024946049360017932865524934304071514930927492 +1933 -1.203296746924137385567496435334043410023442117940758200059746342700190139114277 +1934 -1.203310957500889907881307314877994999339929049545148482011515328337720320103709 +1935 -1.203325163673890458997059653730144708652961801015168009556999468608633857193213 +1936 -1.203339365445210656396586852449615317659039569044445166135227818963789407138438 +1937 -1.203353562816921029968115447881026606677349733052703907194777516416332419233342 +1938 -1.203367755791091022566384100858185197631348345443416140726354970375968342161397 +1939 -1.203381944369788990572549914145154516682221095568885500473776454285092064469393 +1940 -1.203396128555082204453882022141805760882993295108243274854133246153580152951242 +1941 -1.203410308349036849323242394167001243702440591398104511652192670255455600856304 +1942 -1.203424483753718025498353793418162470311527134919719488656215539059400710393994 +1943 -1.203438654771189749060854833991127209131332468311017209419590921641895222608127 +1944 -1.203452821403514952415142078628903137210647399838380640540289888886428889796307 +1945 -1.203466983652755484846999120152180799333834159219758085404806563728166512244015 +1946 -1.203481141520972113082012589808276090054287953152801317636714798746592803400151 +1947 -1.203495295010224521843775036058532699702991177261647720378414557894795074945258 +1948 -1.203509444122571314411874617607128415329297072300748368451322211969007468557191 +1949 -1.203523588860070013179671554756696290882330999869306274503167200185106689784894 +1950 -1.203537729224777060211861283458192953021449573897900490730865585913856307346994 +1951 -1.203551865218747817801824256704022144932373846855908019989673595014753415576071 +1952 -1.203565996844036569028762338194552485494415402719623334639058789639860888848165 +1953 -1.203580124102696518314621733488854790058380137271476019129881741946931645847806 +1954 -1.203594246996779791980802404130726616810291407074372583973792120160809069538908 +1955 -1.20360836552833743880465391052087042395940129928221119100970160102647923228633 +1956 -1.203622479699419430575757629585447302435850171086407070585000790636720896666097 +1957 -1.203636589512074662651995293570141140938065962543964473550052515781796437868593 +1958 -1.203650694968350954515403796567338739444392783451873161942857570837662518464764 +1959 -1.203664796070295050327816215662060267995953272899880986919783635764541404378073 +1960 -1.203678892819952619486288993859862023852530931621442306980250166472372671378747 +1961 -1.20369298521936825717831523223708012608923478391372733723918175729924321584354 +1962 -1.203707073270585484936824039030490056291666876105239880122147239956076598641472 +1963 -1.203721156975646751194965883659723261056985350876564262284104919424905853667674 +1964 -1.20373523633659343184068390395160883023540657321474893233009853340786671508188 +1965 -1.20374931135546583077107111511099600785020657711807823796971257359140089467484 +1966 -1.203763382034303180446513469257562433893269440955237470851094526017350954453594 +1967 -1.203777448375143642444618714622624008066106315310608307392578101303133462199548 +1968 -1.203791510380024308013931003774035564259865498323696418725291375154559032248368 +1969 -1.203805568050981198627431200510907600256519297967646102716532420980198441074944 +1970 -1.203819621390049266535822835343063573778117674055429572738731650594040867772945 +1971 -1.203833670399262395320603659742925206478442924350544795903933058491848145529665 +1972 -1.20384771508065340044692274962984028450312768049902256407595900407423652355505 +1973 -1.203861755436254029816223108818759060455811219261217276099150789984646300776091 +1974 -1.203875791468094964318669723436621999487782534152243998779130347000362363121858 +1975 -1.203889823178205818385363018580843724137564276668206585731683941701067164259622 +1976 -1.203903850568615140540337668764866050717120211666249402771497949160418473615529 +1977 -1.203917873641350413952346713965907426575356509545593753568170046611637494292976 +1978 -1.203931892398438056986430933359757324439445353758534891163374657605880677603226 +1979 -1.203945906841903423755273429096752679081046745235616278477231233472915436793512 +1980 -1.203959916973770804670339372741929714486402535055731947983324038496891920942347 +1981 -1.203973922796063426992800867270768958102168058219320309555486131027014545947211 +1982 -1.20398792431080345538424687777994432402449579446782062715523739980528804706917 +1983 -1.204001921520011992457178184340049320504322878168991828885435849138776055143425 +1984 -1.204015914425709079325287310684405150028483700441423556867995347121199486885343 +1985 -1.204029903029913696153523382694757173539176860857549491555758668140777200286772 +1986 -1.204043887334643762707941870910938354971184512609569366759137349091227994554683 +1987 -1.204057867341916138905339171557421338976665104904845701276345105166586132752163 +1988 -1.204071843053746625362671980845095194091940771058233993713288495223640307954576 +1989 -1.204085814472149963946261417571589026160292324183819793252987308747792151556293 +1990 -1.204099781599139838320781849308023082899527490004714619511694843122791299046145 +1991 -1.204113744436728874498034377724199080291693505578773341906257166086489614878444 +1992 -1.204127702986928641385504938867945735031147759329467908196767692086254786192813 +1993 -1.204141657251749651334706974477613334509529091483525382394877390408983782382406 +1994 -1.204155607233201360689308630669563066511277838908806733976468907522753121133839 +1995 -1.204169552933292170333044440604923214565744071157084201191572160126393051749686 +1996 -1.204183494354029426237411448001885651230510665692367145294083751943045417755437 +1997 -1.204197431497419420009149728621392779797835551852173516708125693312848695123143 +1998 -1.204211364365467389437507267115217634207351917642686731205977136288800067059744 +1999 -1.204225292960177519041289146886168696350584158550979998894004987920992663315481 +2000 -1.204239217283552940615691010870456578354822609696087403680814419213565666895828 diff --git a/examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/log_param_by_sz=true,epochs=2000.log b/examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/log_param_by_sz=true,epochs=2000.log new file mode 100644 index 00000000..c28e515f --- /dev/null +++ b/examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/log_param_by_sz=true,epochs=2000.log @@ -0,0 +1,31 @@ +2023-12-26T17:04:32.794 +== Config == +INIT_SIZE: 2 +GEN_TYP_SIZE: 1 +PARAMETERIZE_FLIP_GROUPS_BY_SZ: true +EPOCHS: 2000 +DistNat: DistUInt32 +TAG: v3_opt_meta_ad + +Building (gen_expr(...)) computation graph... + 7.216795583 seconds + +Initial adnodes_of_interest: +Dict("sz1_succ_abs" => 0.5, "tysz1_gen_type_tbool" => 0.5, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.5, "sz2_succ_abs" => 0.5, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5, "sz1_succ_app" => 0.5) +Saving samples... +Saved samples to examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/terms_before.txt. + 1.970943042 seconds + +Initial entropy: 1.164324889768336817765395270065151324652229424763360009858320885423779852711331 + +Training... + 117.817972375 seconds + +Final entropy: 1.204239217283552940615691010870456578354822609696087403680814419213565666895828 + +Learned adnodes_of_interest: +Dict{String, BigFloat}("sz1_succ_abs" => 0.4869180714585302048570691232081182505035314975712561891330706457265077292495624, "tysz1_gen_type_tbool" => 0.4032244342636440581314631791189805529647330199176391995559655804680627593107093, "sz0_zero_pr_var2" => 0.5363102627524367109315280385158543365485249142267061685217095391137725521451866, "sz2_succ_app" => 0.5310888332267741651410380935576152249841616557040295523185300153916628485459204, "sz2_succ_abs" => 0.4668556352115892728646660044489504476059097249154731008664729006580142980245938, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5333202372740048442191299519771065502391005550942749484340712888669154670773755, "sz1_succ_app" => 0.4779235071274206156476036536648448358274716682736680104217035231776925978595043) +Saving samples... +Saved samples to examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/terms_trained_param_by_sz=true,epochs=2000.txt. + 0.253028375 seconds + diff --git a/examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/terms_before.txt b/examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/terms_before.txt new file mode 100644 index 00000000..de77bab7 --- /dev/null +++ b/examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/terms_before.txt @@ -0,0 +1,200 @@ +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +(λx:Bool. λy:Bool. false) false +(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +false +λx:Bool. (λy:Bool. false) x +(λx:Bool. x) false +λx:Bool. x +(λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) (λx:Bool. x) +true +(λx:Bool. λy:Bool. true) true ((λx:Bool. false) false) +(λx:Bool. λy:Bool. false) false +λx:Bool. x +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) false +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) false +(λx:Bool. λy:Bool. λz:Bool. true) true ((λx:Bool. true) false) +false +λx:Bool. true +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +(λx:Bool. λy:Bool. true) true ((λx:Bool. true) true) +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) false +true +true +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) (λx:Bool. true) +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) +λx:Bool. false +(λx:Bool. λy:Bool. false) false true +(λx:Bool. λy:Bool. false) ((λx:Bool. true) true) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. true)) +λx:Bool. (λy:Bool. false) x +(λx:Bool. λy:Bool. true) ((λx:Bool. true) true) +λx:Bool. (λy:Bool. false) true +true +true +true +(λx:Bool. λy:Bool. true) false ((λx:Bool. false) true) +(λx:Bool. λy:Bool -> Bool. true) true (λx:Bool. true) +(λx:Bool. true) true +(λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool. true) true) +(λx:Bool. x) ((λx:Bool -> Bool. true) (λx:Bool. true)) +false +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. false) +(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +λx:Bool. false +false +false +(λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +λx:Bool. (λy:Bool. true) x +(λx:Bool. x) true +true +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) false +true +λx:Bool. x +(λx:Bool -> Bool. x) (λx:Bool. true) +(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +true +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) false +(λx:Bool. λy:Bool. true) false false +true +false +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. true)) +λx:Bool. x +true +true +false +λx:Bool. true +(λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. true)) +true +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. x) +false +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) +λx:Bool. (λy:Bool. false) true +false +λx:Bool. false +(λx:Bool. λy:Bool. true) false +(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. true) true) +true +λx:Bool. x +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. false) +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool. false) false) +λx:Bool. (λy:Bool. false) x +false +(λx:Bool. x) ((λx:Bool. false) true) +true +λx:Bool. true +false +λx:Bool. false +λx:Bool. x +λx:Bool. true +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) (λx:Bool. true) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. true) true) +true +false +λx:Bool. true +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) (λx:Bool. x) +(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +(λx:Bool -> Bool. x) (λx:Bool. x) +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) +true +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) true +false +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. false) true) +true +(λx:Bool -> Bool. true) (λx:Bool. x) +λx:Bool. x +(λx:Bool. λy:Bool -> Bool. true) true ((λx:Bool. λy:Bool. true) true) +false +(λx:Bool -> Bool. false) (λx:Bool. x) +(λx:Bool. x) false +λx:Bool. (λy:Bool. true) false +(λx:Bool. λy:Bool. false) false ((λx:Bool -> Bool. false) (λx:Bool. true)) +λx:Bool. (λy:Bool. true) x +true +(λx:Bool. λy:Bool. λz:Bool. true) true true +true +(λx:Bool. λy:Bool. false) false ((λx:Bool -> Bool. false) (λx:Bool. false)) +(λx:Bool -> Bool. true) (λx:Bool. false) +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true (λx:Bool. x) +λx:Bool. x +true +(λx:Bool -> Bool. false) (λx:Bool. x) +(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +false +false +λx:Bool. true +true +λx:Bool. true +false +false +(λx:Bool. x) true +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) (λx:Bool. false) +(λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) false +(λx:Bool. λy:Bool. false) false ((λx:Bool -> Bool. true) (λx:Bool. false)) +(λx:Bool. λy:Bool -> Bool. false) true ((λx:Bool. λy:Bool. true) false) +λx:Bool. (λy:Bool. true) x +(λx:Bool. λy:Bool -> Bool. false) true ((λx:Bool. λy:Bool. false) true) +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) +false +(λx:Bool -> Bool. false) (λx:Bool. x) +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) (λx:Bool. x) +true +true +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. true) true) +true +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) true +(λx:Bool. x) ((λx:Bool -> Bool. true) (λx:Bool. true)) +λx:Bool. true +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) (λx:Bool. x) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) (λx:Bool. false) +(λx:Bool -> Bool. true) (λx:Bool. false) +false +(λx:Bool. x) ((λx:Bool. true) false) +(λx:Bool -> Bool. x) (λx:Bool. x) +true +(λx:Bool. λy:Bool -> Bool. true) false (λx:Bool. false) +(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +λx:Bool. true +λx:Bool. x +true +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) false) +false +false +(λx:Bool. λy:Bool. false) false ((λx:Bool. false) true) +(λx:Bool -> Bool. false) (λx:Bool. x) +false +(λx:Bool. λy:Bool. true) ((λx:Bool. false) false) +true +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) +λx:Bool. x +λx:Bool. x +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. false) true) +(λx:Bool. λy:Bool. true) false true +true +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) (λx:Bool. false) +(λx:Bool. λy:Bool. λz:Bool. false) false ((λx:Bool -> Bool. false) (λx:Bool. false)) +false +(λx:Bool. λy:Bool. false) true +λx:Bool. x +(λx:Bool. λy:Bool. false) true +(λx:Bool. λy:Bool -> Bool. true) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +true +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +true +(λx:Bool -> Bool. x) (λx:Bool. true) +(λx:Bool. λy:Bool -> Bool. true) false ((λx:Bool. λy:Bool. true) true) +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) true +λx:Bool. (λy:Bool. false) true +true +λx:Bool. x +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) true +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false (λx:Bool. x) +false +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) false) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. true) true) +λx:Bool. x +(λx:Bool. λy:Bool. true) false false diff --git a/examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/terms_trained_param_by_sz=true,epochs=2000.txt b/examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/terms_trained_param_by_sz=true,epochs=2000.txt new file mode 100644 index 00000000..b7e3735a --- /dev/null +++ b/examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/terms_trained_param_by_sz=true,epochs=2000.txt @@ -0,0 +1,200 @@ +λx:Bool. x +false +(λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) (λx:Bool. x) +(λx:Bool. λy:Bool. false) false ((λx:Bool -> Bool. true) (λx:Bool. true)) +λx:Bool. (λy:Bool. true) false +λx:Bool. x +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool. false) true) +(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +true +false +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool. false) true) +(λx:Bool. x) ((λx:Bool -> Bool. true) (λx:Bool. true)) +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) false +(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +true +false +(λx:Bool. λy:Bool. true) false +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool. λy:Bool. false) false) +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) false +false +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. true) true) +true +false +(λx:Bool. λy:Bool -> Bool. false) false (λx:Bool. true) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +λx:Bool. false +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +λx:Bool. x +(λx:Bool. λy:Bool. true) true ((λx:Bool. false) false) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +λx:Bool. x +(λx:Bool. λy:Bool -> Bool. false) false (λx:Bool. x) +false +(λx:Bool. λy:Bool. false) ((λx:Bool. true) false) +false +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) false) +λx:Bool. x +λx:Bool. x +λx:Bool. (λy:Bool. true) x +λx:Bool. (λy:Bool. false) x +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +(λx:Bool -> Bool. true) (λx:Bool. x) +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false ((λx:Bool. λy:Bool. false) false) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +false +λx:Bool. true +λx:Bool. true +λx:Bool. x +λx:Bool. false +false +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) false +false +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) (λx:Bool. false) +λx:Bool. true +true +λx:Bool. x +(λx:Bool. λy:Bool. false) true +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. x) +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) +(λx:Bool. λy:Bool. false) true +(λx:Bool. λy:Bool -> Bool. false) false ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +(λx:Bool -> Bool. false) (λx:Bool. x) +false +λx:Bool. x +λx:Bool. x +λx:Bool. x +true +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) true +true +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true (λx:Bool. true) +(λx:Bool. λy:Bool -> Bool. false) true (λx:Bool. x) +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true (λx:Bool. true) +(λx:Bool. x) ((λx:Bool. true) false) +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) +(λx:Bool. true) false +(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) +(λx:Bool. false) true +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +(λx:Bool -> Bool. true) (λx:Bool. x) +λx:Bool. (λy:Bool. false) false +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. x) +false +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) false) +(λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool -> Bool. true) (λx:Bool. true)) +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. true)) +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) (λx:Bool. x) +(λx:Bool. x) ((λx:Bool. false) true) +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) true +(λx:Bool -> Bool. x) (λx:Bool. false) +true +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) true +true +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) +(λx:Bool -> Bool. false) (λx:Bool. x) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) (λx:Bool. x) +true +λx:Bool. false +false +λx:Bool. false +(λx:Bool. λy:Bool. false) true true +λx:Bool. false +λx:Bool. false +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) +λx:Bool. (λy:Bool. true) x +λx:Bool. x +λx:Bool. false +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) +λx:Bool. x +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool. true) false) +λx:Bool. false +(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +false +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) +λx:Bool. x +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. false) false) +(λx:Bool. false) true +(λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool. true) false) +(λx:Bool. true) false +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) true) +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) +λx:Bool. true +(λx:Bool. λy:Bool. true) false false +λx:Bool. x +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. x) +(λx:Bool. λy:Bool. λz:Bool. true) true false +false +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) +λx:Bool. (λy:Bool. false) false +true +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. true)) +true +true +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) false) +false +(λx:Bool -> Bool. true) (λx:Bool. x) +(λx:Bool. x) true +(λx:Bool. λy:Bool. true) false +(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool. false) false) +false +λx:Bool. x +false +(λx:Bool -> Bool. true) (λx:Bool. x) +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) (λx:Bool. x) +(λx:Bool -> Bool. false) (λx:Bool. true) +λx:Bool. x +(λx:Bool -> Bool. x) (λx:Bool. x) +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool. true) false) +λx:Bool. x +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) (λx:Bool. x) +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) true +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) true +(λx:Bool. x) ((λx:Bool. false) true) +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false (λx:Bool. x) +(λx:Bool. λy:Bool. true) true +(λx:Bool -> Bool. x) (λx:Bool. x) +(λx:Bool. λy:Bool. λz:Bool. true) false false +(λx:Bool. λy:Bool. true) ((λx:Bool. false) true) +λx:Bool. x +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) false +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) +(λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool. true) true) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool. true) false) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) (λx:Bool. x) +false +λx:Bool. x +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true (λx:Bool. x) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. false) true) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +λx:Bool. (λy:Bool. false) x +false +(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +(λx:Bool. λy:Bool. false) true true +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) +(λx:Bool. true) ((λx:Bool. true) true) +λx:Bool. x +(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. true)) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +(λx:Bool. λy:Bool. false) true +true +λx:Bool. x +λx:Bool. (λy:Bool. true) false +(λx:Bool. λy:Bool. false) ((λx:Bool. false) true) diff --git a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_before.csv b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_before.csv new file mode 100644 index 00000000..d1440ff9 --- /dev/null +++ b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_before.csv @@ -0,0 +1,9 @@ +num_apps probability +0 0.3784722222222223 +1 0.10286458333333337 +2 0.1511501736111112 +3 0.14680989583333343 +4 0.11425781250000003 +5 0.06738281250000001 +6 0.03125 +7 0.007812500000000002 diff --git a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=100.csv b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=100.csv new file mode 100644 index 00000000..9700f62e --- /dev/null +++ b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=100.csv @@ -0,0 +1,9 @@ +num_apps probability +0 0.3125572704145472 +1 0.07735489491608907 +2 0.13610854147514473 +3 0.15261066940220364 +4 0.1404676330301102 +5 0.10049392046673733 +6 0.059517793091192275 +7 0.020889277203975522 diff --git a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=2000.csv b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=2000.csv new file mode 100644 index 00000000..1d895580 --- /dev/null +++ b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=2000.csv @@ -0,0 +1,9 @@ +num_apps probability +0 0.16486577196496097 +1 0.047180881871368596 +2 0.10888985265933444 +3 0.15080968983713247 +4 0.1723462128044957 +5 0.16286665359517 +6 0.10749048574248583 +7 0.0855504515250517 diff --git a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=100.csv b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=100.csv new file mode 100644 index 00000000..07b81577 --- /dev/null +++ b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=100.csv @@ -0,0 +1,101 @@ +0 20.238481981031438 +1 20.212172303759335 +2 20.186130303707692 +3 20.160352655808524 +4 20.13483608957884 +5 20.10957738797502 +6 20.084573386274748 +7 20.059820970985776 +8 20.035317078780828 +9 20.01105869545803 +10 19.98704285492616 +11 19.96326663821411 +12 19.939727172504014 +13 19.916421630187337 +14 19.893347227943366 +15 19.870501225839668 +16 19.847880926453747 +17 19.82548367401553 +18 19.8033068535701 +19 19.781347890160117 +20 19.759604248027554 +21 19.738073429834124 +22 19.716752975899983 +23 19.69564046346033 +24 19.674733505939265 +25 19.654029752240692 +26 19.633526886055623 +27 19.613222625185664 +28 19.59311472088216 +29 19.57320095720061 +30 19.55347915036999 +31 19.533947148176708 +32 19.514602829362616 +33 19.495444103036867 +34 19.47646890810131 +35 19.457675212688983 +36 19.439061013615365 +37 19.42062433584222 +38 19.402363231953522 +39 19.384275781643346 +40 19.366360091215263 +41 19.34861429309307 +42 19.331036545342528 +43 19.313625031203838 +44 19.296377958634594 +45 19.279293559862914 +46 19.262370090950622 +47 19.245605831366078 +48 19.22899908356645 +49 19.212548172589344 +50 19.19625144565336 +51 19.180107271767454 +52 19.16411404134893 +53 19.148270165849734 +54 19.13257407739097 +55 19.11702422840531 +56 19.101619091287258 +57 19.086357158050944 +58 19.07123693999531 +59 19.05625696737652 +60 19.04141578908743 +61 19.026711972343875 +62 19.012144102377746 +63 18.997710782136487 +64 18.983410631989088 +65 18.969242289438228 +66 18.955204408838533 +67 18.94129566112076 +68 18.92751473352176 +69 18.913860329320084 +70 18.90033116757713 +71 18.886925982883632 +72 18.87364352511144 +73 18.8604825591704 +74 18.84744186477028 +75 18.834520236187473 +76 18.821716482036646 +77 18.809029425046884 +78 18.796457901842444 +79 18.784000762727977 +80 18.77165687147802 +81 18.759425105130767 +82 18.74730435378595 +83 18.735293520406767 +84 18.723391520625718 +85 18.71159728255436 +86 18.6999097465967 +87 18.688327865266398 +88 18.676850603007427 +89 18.66547693601835 +90 18.654205852079894 +91 18.64303635038597 +92 18.631967441377867 +93 18.620998146581776 +94 18.61012749844918 +95 18.599354540200554 +96 18.58867832567188 +97 18.578097919164094 +98 18.567612395295384 +99 18.557220838856253 +100 18.54692234466734 diff --git a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv new file mode 100644 index 00000000..cf0ca477 --- /dev/null +++ b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv @@ -0,0 +1,2001 @@ +0 20.238481981031438 +1 20.21217230375934 +2 20.186130303707692 +3 20.160352655808524 +4 20.13483608957884 +5 20.10957738797502 +6 20.084573386274744 +7 20.059820970985772 +8 20.035317078780828 +9 20.011058695458033 +10 19.98704285492616 +11 19.96326663821411 +12 19.939727172504014 +13 19.916421630187337 +14 19.89334722794337 +15 19.870501225839668 +16 19.847880926453747 +17 19.82548367401553 +18 19.8033068535701 +19 19.781347890160117 +20 19.759604248027557 +21 19.738073429834124 +22 19.716752975899986 +23 19.69564046346033 +24 19.67473350593927 +25 19.654029752240692 +26 19.633526886055627 +27 19.613222625185664 +28 19.593114720882163 +29 19.573200957200605 +30 19.55347915036999 +31 19.533947148176708 +32 19.514602829362612 +33 19.495444103036867 +34 19.47646890810131 +35 19.457675212688983 +36 19.43906101361537 +37 19.420624335842213 +38 19.40236323195352 +39 19.384275781643346 +40 19.366360091215263 +41 19.34861429309307 +42 19.331036545342528 +43 19.313625031203838 +44 19.29637795863459 +45 19.279293559862914 +46 19.262370090950622 +47 19.24560583136608 +48 19.22899908356645 +49 19.212548172589344 +50 19.19625144565336 +51 19.180107271767454 +52 19.164114041348927 +53 19.14827016584974 +54 19.132574077390966 +55 19.11702422840531 +56 19.101619091287258 +57 19.086357158050944 +58 19.071236939995302 +59 19.05625696737652 +60 19.041415789087427 +61 19.02671197234388 +62 19.012144102377746 +63 18.99771078213649 +64 18.983410631989088 +65 18.969242289438228 +66 18.955204408838537 +67 18.941295661120762 +68 18.92751473352176 +69 18.913860329320084 +70 18.90033116757712 +71 18.886925982883632 +72 18.87364352511144 +73 18.8604825591704 +74 18.84744186477028 +75 18.834520236187476 +76 18.821716482036646 +77 18.809029425046884 +78 18.79645790184244 +79 18.784000762727977 +80 18.771656871478015 +81 18.759425105130767 +82 18.747304353785957 +83 18.735293520406767 +84 18.723391520625718 +85 18.71159728255436 +86 18.6999097465967 +87 18.688327865266398 +88 18.676850603007427 +89 18.665476936018347 +90 18.654205852079894 +91 18.64303635038597 +92 18.63196744137787 +93 18.620998146581783 +94 18.610127498449177 +95 18.59935454020055 +96 18.588678325671882 +97 18.578097919164094 +98 18.567612395295384 +99 18.557220838856253 +100 18.54692234466734 +101 18.53671601743976 +102 18.52660097163817 +103 18.51657633134632 +104 18.506641230135045 +105 18.49679481093267 +106 18.48703622589783 +107 18.477364636294574 +108 18.467779212369717 +109 18.458279133232367 +110 18.4488635867357 +111 18.439531769360762 +112 18.430282886102344 +113 18.421116150356927 +114 18.412030783812543 +115 18.403026016340597 +116 18.394101085889545 +117 18.385255238380466 +118 18.376487727604392 +119 18.367797815121406 +120 18.35918477016153 +121 18.350647869527197 +122 18.342186397497485 +123 18.333799645733908 +124 18.325486913187763 +125 18.317247506009117 +126 18.309080737457222 +127 18.30098592781247 +128 18.29296240428975 +129 18.285009500953276 +130 18.277126558632794 +131 18.269312924841117 +132 18.261567953693017 +133 18.253891005825448 +134 18.246281448319014 +135 18.23873865462068 +136 18.231262004467727 +137 18.223850883812947 +138 18.216504684750916 +139 18.20922280544552 +140 18.202004650058527 +141 18.194849628679325 +142 18.187757157255724 +143 18.180726657525792 +144 18.17375755695076 +145 18.16684928864893 +146 18.160001291330616 +147 18.153213009233987 +148 18.146483892061983 +149 18.139813394920026 +150 18.133200978254763 +151 18.12664610779371 +152 18.12014825448571 +153 18.1137068944423 +154 18.10732150887994 +155 18.10099158406309 +156 18.094716611248028 +157 18.088496086627543 +158 18.082329511276427 +159 18.076216391097645 +160 18.070156236769392 +161 18.06414856369279 +162 18.058192891940337 +163 18.05228874620515 +164 18.046435655750777 +165 18.040633154361792 +166 18.034880780295072 +167 18.029178076231652 +168 18.023524589229382 +169 18.017919870676018 +170 18.01236347624314 +171 18.00685496584056 +172 18.00139390357143 +173 17.995979857687814 +174 17.990612400546976 +175 17.985291108568216 +176 17.98001556219019 +177 17.974785345828845 +178 17.969600047835975 +179 17.96445926045808 +180 17.959362579796068 +181 17.954309605765154 +182 17.949299942055553 +183 17.94433319609342 +184 17.939408979002494 +185 17.934526905566063 +186 17.929686594189505 +187 17.92488766686325 +188 17.920129749126218 +189 17.915412470029658 +190 17.91073546210153 +191 17.90609836131124 +192 17.901500807034814 +193 17.89694244202053 +194 17.89242291235494 +195 17.88794186742929 +196 17.883498959906373 +197 17.879093845687763 +198 17.87472618388141 +199 17.870395636769665 +200 17.8661018697777 +201 17.86184455144215 +202 17.85762335338035 +203 17.85343795025974 +204 17.84928801976772 +205 17.84517324258182 +206 17.841093302340255 +207 17.83704788561274 +208 17.83303668187173 +209 17.8290593834639 +210 17.82511568558201 +211 17.821205286237095 +212 17.817327886230917 +213 17.813483189128753 +214 17.80967090123247 +215 17.805890731553966 +216 17.802142391788827 +217 17.798425596290308 +218 17.794740062043587 +219 17.791085508640368 +220 17.787461658253623 +221 17.7838682356128 +222 17.7803049679791 +223 17.776771585121203 +224 17.773267819291142 +225 17.769793405200453 +226 17.7663480799966 +227 17.76293158323973 +228 17.75954365687949 +229 17.75618404523228 +230 17.752852494958624 +231 17.749548755040866 +232 17.74627257676104 +233 17.743023713678998 +234 17.739801921610763 +235 17.73660695860714 +236 17.733438584932504 +237 17.73029656304382 +238 17.727180657569917 +239 17.72409063529093 +240 17.721026265118013 +241 17.71798731807316 +242 17.714973567269396 +243 17.711984787890973 +244 17.70902075717396 +245 17.70608125438688 +246 17.703166060811668 +247 17.7002749597247 +248 17.697407736378143 +249 17.694564177981384 +250 17.69174407368273 +251 17.688947214551227 +252 17.686173393558708 +253 17.683422405562016 +254 17.680694047285364 +255 17.677988117302952 +256 17.675304416021667 +257 17.67264274566401 +258 17.67000291025121 +259 17.66738471558644 +260 17.664787969238244 +261 17.662212480524154 +262 17.659658060494397 +263 17.65712452191584 +264 17.65461167925602 +265 17.65211934866738 +266 17.64964734797169 +267 17.647195496644496 +268 17.64476361579987 +269 17.64235152817524 +270 17.639959058116325 +271 17.63758603156231 +272 17.635232276031093 +273 17.632897620604705 +274 17.630581895914894 +275 17.62828493412877 +276 17.62600656893469 +277 17.623746635528196 +278 17.62150497059816 +279 17.61928141231297 +280 17.61707580030697 +281 17.614887975666935 +282 17.61271778091868 +283 17.61056506001387 +284 17.608429658316876 +285 17.606311422591816 +286 17.604210200989666 +287 17.60212584303555 +288 17.600058199616118 +289 17.598007122967022 +290 17.595972466660584 +291 17.593954085593495 +292 17.591951835974704 +293 17.58996557531337 +294 17.587995162406948 +295 17.5860404573294 +296 17.5841013214195 +297 17.582177617269252 +298 17.580269208712412 +299 17.578375960813162 +300 17.576497739854787 +301 17.57463441332861 +302 17.572785849922873 +303 17.570951919511838 +304 17.569132493144963 +305 17.5673274430361 +306 17.56553664255294 +307 17.563759966206415 +308 17.561997289640303 +309 17.560248489620857 +310 17.558513444026584 +311 17.556792031838086 +312 17.55508413312801 +313 17.55338962905108 +314 17.55170840183426 +315 17.55004033476694 +316 17.548385312191293 +317 17.54674321949263 +318 17.54511394308995 +319 17.54349737042648 +320 17.541893389960403 +321 17.540301891155536 +322 17.538722764472237 +323 17.53715590135831 +324 17.535601194240016 +325 17.53405853651318 +326 17.53252782253437 +327 17.531008947612115 +328 17.529501807998315 +329 17.528006300879603 +330 17.526522324368866 +331 17.525049777496836 +332 17.523588560203713 +333 17.52213857333093 +334 17.520699718612953 +335 17.519271898669125 +336 17.517855016995718 +337 17.51644897795785 +338 17.515053686781677 +339 17.51366904954655 +340 17.51229497317723 +341 17.51093136543626 +342 17.509578134916328 +343 17.508235191032746 +344 17.506902444015942 +345 17.505579804904134 +346 17.5042671855359 +347 17.502964498543015 +348 17.50167165734317 +349 17.500388576132877 +350 17.499115169880422 +351 17.49785135431879 +352 17.49659704593882 +353 17.495352161982257 +354 17.494116620434966 +355 17.49289034002021 +356 17.49167324019189 +357 17.490465241127996 +358 17.489266263724 +359 17.488076229586355 +360 17.48689506102605 +361 17.48572268105221 +362 17.48455901336579 +363 17.483403982353295 +364 17.482257513080555 +365 17.48111953128656 +366 17.479989963377392 +367 17.478868736420157 +368 17.47775577813697 +369 17.476651016899066 +370 17.475554381720894 +371 17.474465802254276 +372 17.47338520878265 +373 17.472312532215348 +374 17.47124770408191 +375 17.470190656526476 +376 17.469141322302217 +377 17.468099634765807 +378 17.46706552787198 +379 17.466038936168083 +380 17.465019794788716 +381 17.464008039450448 +382 17.463003606446488 +383 17.46200643264149 +384 17.461016455466396 +385 17.460033612913286 +386 17.459057843530296 +387 17.45808908641657 +388 17.45712728121732 +389 17.45617236811882 +390 17.455224287843553 +391 17.454282981645335 +392 17.453348391304484 +393 17.452420459123108 +394 17.451499127920336 +395 17.450584341027643 +396 17.449676042284235 +397 17.448774176032416 +398 17.447878687113068 +399 17.44698952086112 +400 17.446106623101088 +401 17.445229940142614 +402 17.44435941877613 +403 17.44349500626843 +404 17.442636650358438 +405 17.44178429925288 +406 17.440937901622057 +407 17.440097406595687 +408 17.439262763758705 +409 17.43843392314715 +410 17.437610835244115 +411 17.43679345097565 +412 17.43598172170681 +413 17.435175599237628 +414 17.434375035799224 +415 17.43357998404987 +416 17.432790397071155 +417 17.432006228364127 +418 17.431227431845524 +419 17.430453961843988 +420 17.42968577309635 +421 17.428922820743946 +422 17.428165060328944 +423 17.427412447790715 +424 17.426664939462263 +425 17.425922492066633 +426 17.42518506271341 +427 17.42445260889519 +428 17.423725088484158 +429 17.42300245972862 +430 17.422284681249618 +431 17.421571712037533 +432 17.420863511448793 +433 17.42016003920252 +434 17.419461255377257 +435 17.41876712040773 +436 17.418077595081623 +437 17.417392640536374 +438 17.416712218256027 +439 17.416036290068092 +440 17.41536481814043 +441 17.414697764978193 +442 17.41403509342076 +443 17.413376766638706 +444 17.41272274813084 +445 17.412073001721197 +446 17.411427491556147 +447 17.41078618210142 +448 17.410149038139263 +449 17.409516024765544 +450 17.408887107386988 +451 17.408262251718252 +452 17.407641423779246 +453 17.407024589892316 +454 17.40641171667952 +455 17.405802771059953 +456 17.405197720246985 +457 17.404596531745696 +458 17.403999173350165 +459 17.403405613140887 +460 17.402815819482193 +461 17.40222976101964 +462 17.401647406677558 +463 17.401068725656437 +464 17.400493687430465 +465 17.39992226174508 +466 17.39935441861447 +467 17.3987901283192 +468 17.39822936140375 +469 17.397672088674188 +470 17.39711828119572 +471 17.396567910290457 +472 17.396020947535025 +473 17.395477364758253 +474 17.394937134038944 +475 17.394400227703596 +476 17.39386661832414 +477 17.39333627871576 +478 17.392809181934688 +479 17.39228530127599 +480 17.39176461027146 +481 17.391247082687443 +482 17.39073269252274 +483 17.390221414006497 +484 17.38971322159613 +485 17.38920808997524 +486 17.388705994051616 +487 17.388206908955162 +488 17.387710810035937 +489 17.387217672862132 +490 17.3867274732181 +491 17.386240187102434 +492 17.385755790725995 +493 17.38527426051003 +494 17.38479557308425 +495 17.38431970528495 +496 17.38384663415316 +497 17.383376336932773 +498 17.382908791068726 +499 17.382443974205202 +500 17.381981864183786 +501 17.38152243904173 +502 17.381065677010167 +503 17.380611556512356 +504 17.380160056161966 +505 17.379711154761313 +506 17.37926483129973 +507 17.378821064951822 +508 17.378379835075805 +509 17.37794112121186 +510 17.377504903080514 +511 17.377071160580925 +512 17.376639873789394 +513 17.376211022957662 +514 17.37578458851139 +515 17.375360551048566 +516 17.37493889133793 +517 17.37451959031751 +518 17.37410262909299 +519 17.373687988936275 +520 17.37327565128396 +521 17.372865597735867 +522 17.37245781005354 +523 17.372052270158814 +524 17.371648960132354 +525 17.371247862212236 +526 17.37084895879252 +527 17.370452232421847 +528 17.37005766580204 +529 17.36966524178673 +530 17.36927494337997 +531 17.368886753734923 +532 17.368500656152463 +533 17.36811663407988 +534 17.36773467110954 +535 17.367354750977615 +536 17.36697685756272 +537 17.366600974884697 +538 17.366227087103304 +539 17.36585517851698 +540 17.365485233561564 +541 17.365117236809084 +542 17.364751172966507 +543 17.36438702687456 +544 17.364024783506487 +545 17.363664427966878 +546 17.36330594549047 +547 17.362949321440997 +548 17.362594541310003 +549 17.36224159071572 +550 17.361890455401895 +551 17.361541121236705 +552 17.361193574211562 +553 17.3608478004401 +554 17.360503786156993 +555 17.360161517716914 +556 17.35982098159344 +557 17.35948216437797 +558 17.359145052778672 +559 17.358809633619465 +560 17.35847589383893 +561 17.358143820489296 +562 17.357813400735427 +563 17.3574846218538 +564 17.3571574712315 +565 17.356831936365232 +566 17.35650800486033 +567 17.356185664429788 +568 17.355864902893273 +569 17.35554570817619 +570 17.355228068308715 +571 17.354911971424862 +572 17.354597405761535 +573 17.35428435965764 +574 17.35397282155312 +575 17.35366277998808 +576 17.35335422360187 +577 17.35304714113222 +578 17.352741521414305 +579 17.352437353379926 +580 17.352134626056607 +581 17.35183332856677 +582 17.35153345012681 +583 17.351234980046346 +584 17.350937907727314 +585 17.35064222266319 +586 17.350347914438093 +587 17.35005497272605 +588 17.349763387290178 +589 17.349473147981808 +590 17.3491842447398 +591 17.348896667589692 +592 17.348610406642926 +593 17.3483254520961 +594 17.34804179423019 +595 17.347759423409812 +596 17.34747833008243 +597 17.347198504777655 +598 17.346919938106495 +599 17.34664262076062 +600 17.34636654351163 +601 17.346091697210372 +602 17.345818072786187 +603 17.345545661246256 +604 17.345274453674847 +605 17.34500444123266 +606 17.344735615156132 +607 17.34446796675678 +608 17.344201487420484 +609 17.343936168606863 +610 17.34367200184857 +611 17.343408978750706 +612 17.343147090990108 +613 17.342886330314734 +614 17.34262668854301 +615 17.342368157563246 +616 17.342110729332934 +617 17.3418543958782 +618 17.34159914929315 +619 17.341344981739276 +620 17.341091885444847 +621 17.340839852704327 +622 17.340588875877756 +623 17.340338947390183 +624 17.340090059731093 +625 17.339842205453795 +626 17.3395953771749 +627 17.33934956757371 +628 17.3391047693917 +629 17.338860975431917 +630 17.338618178558466 +631 17.33837637169596 +632 17.338135547828948 +633 17.33789570000144 +634 17.337656821316315 +635 17.337418904934793 +636 17.337181944076015 +637 17.336945932016384 +638 17.336710862089156 +639 17.33647672768389 +640 17.336243522245958 +641 17.336011239276043 +642 17.335779872329635 +643 17.33554941501658 +644 17.33531986100056 +645 17.335091203998587 +646 17.33486343778062 +647 17.334636556168995 +648 17.33441055303801 +649 17.334185422313464 +650 17.333961157972162 +651 17.333737754041504 +652 17.333515204599 +653 17.333293503771863 +654 17.3330726457365 +655 17.33285262471816 +656 17.332633434990424 +657 17.332415070874813 +658 17.332197526740362 +659 17.331980797003187 +660 17.33176487612606 +661 17.331549758618024 +662 17.331335439033936 +663 17.331121911974087 +664 17.330909172083803 +665 17.330697214053046 +666 17.330486032615994 +667 17.330275622550662 +668 17.33006597867852 +669 17.3298570958641 +670 17.3296489690146 +671 17.32944159307953 +672 17.329234963050336 +673 17.329029073959987 +674 17.32882392088266 +675 17.32861949893335 +676 17.328415803267497 +677 17.328212829080638 +678 17.32801057160806 +679 17.327809026124452 +680 17.327608187943504 +681 17.327408052417642 +682 17.32720861493762 +683 17.327009870932216 +684 17.32681181586787 +685 17.326614445248367 +686 17.326417754614514 +687 17.32622173954379 +688 17.326026395650036 +689 17.325831718583117 +690 17.325637704028626 +691 17.325444347707574 +692 17.325251645376035 +693 17.325059592824864 +694 17.324868185879392 +695 17.324677420399127 +696 17.324487292277414 +697 17.324297797441186 +698 17.324108931850635 +699 17.32392069149892 +700 17.323733072411905 +701 17.323546070647826 +702 17.323359682297028 +703 17.323173903481695 +704 17.322988730355544 +705 17.322804159103573 +706 17.322620185941737 +707 17.322436807116752 +708 17.322254018905745 +709 17.32207181761604 +710 17.321890199584853 +711 17.321709161179072 +712 17.321528698794957 +713 17.32134880885789 +714 17.32116948782215 +715 17.3209907321706 +716 17.320812538414497 +717 17.320634903093204 +718 17.320457822773943 +719 17.32028129405157 +720 17.320105313548318 +721 17.319929877913566 +722 17.31975498382359 +723 17.31958062798132 +724 17.319406807116142 +725 17.31923351798361 +726 17.31906075736528 +727 17.318888522068413 +728 17.318716808925803 +729 17.318545614795546 +730 17.31837493656079 +731 17.318204771129537 +732 17.318035115434416 +733 17.317865966432485 +734 17.31769732110498 +735 17.31752917645715 +736 17.317361529518013 +737 17.317194377340154 +738 17.317027716999533 +739 17.316861545595252 +740 17.316695860249393 +741 17.316530658106768 +742 17.316365936334783 +743 17.316201692123173 +744 17.31603792268385 +745 17.315874625250697 +746 17.31571179707936 +747 17.315549435447117 +748 17.31538753765259 +749 17.315226101015664 +750 17.31506512287722 +751 17.314904600598997 +752 17.3147445315634 +753 17.31458491317331 +754 17.314425742851924 +755 17.314267018042536 +756 17.314108736208446 +757 17.31395089483268 +758 17.313793491417904 +759 17.31363652348619 +760 17.313479988578912 +761 17.313323884256516 +762 17.313168208098396 +763 17.313012957702703 +764 17.3128581306862 +765 17.312703724684084 +766 17.312549737349848 +767 17.312396166355114 +768 17.31224300938945 +769 17.312090264160254 +770 17.311937928392574 +771 17.311785999828945 +772 17.311634476229283 +773 17.311483355370694 +774 17.31133263504733 +775 17.311182313070255 +776 17.311032387267282 +777 17.31088285548286 +778 17.31073371557786 +779 17.310584965429552 +780 17.310436602931325 +781 17.310288625992644 +782 17.31014103253887 +783 17.30999382051116 +784 17.30984698786627 +785 17.30970053257648 +786 17.309554452629413 +787 17.309408746027948 +788 17.309263410790045 +789 17.309118444948645 +790 17.30897384655153 +791 17.308829613661196 +792 17.308685744354722 +793 17.308542236723657 +794 17.308399088873873 +795 17.308256298925457 +796 17.308113865012615 +797 17.307971785283485 +798 17.307830057900077 +799 17.30768868103814 +800 17.307547652887006 +801 17.30740697164953 +802 17.30726663554195 +803 17.307126642793737 +804 17.306986991647555 +805 17.30684768035909 +806 17.30670870719694 +807 17.30657007044254 +808 17.306431768390038 +809 17.306293799346157 +810 17.30615616163013 +811 17.306018853573566 +812 17.30588187352035 +813 17.305745219826537 +814 17.305608890860274 +815 17.305472885001638 +816 17.305337200642608 +817 17.305201836186896 +818 17.305066790049885 +819 17.304932060658533 +820 17.304797646451238 +821 17.3046635458778 +822 17.30452975739925 +823 17.304396279487825 +824 17.304263110626817 +825 17.304130249310525 +826 17.30399769404412 +827 17.303865443343575 +828 17.3037334957356 +829 17.303601849757463 +830 17.303470503957016 +831 17.30333945689252 +832 17.303208707132583 +833 17.303078253256086 +834 17.302948093852073 +835 17.30281822751968 +836 17.302688652868056 +837 17.30255936851625 +838 17.30243037309315 +839 17.302301665237405 +840 17.30217324359732 +841 17.3020451068308 +842 17.30191725360524 +843 17.30178968259747 +844 17.301662392493675 +845 17.301535381989282 +846 17.30140864978895 +847 17.301282194606397 +848 17.301156015164413 +849 17.301030110194738 +850 17.300904478438007 +851 17.30077911864364 +852 17.300654029569813 +853 17.300529209983356 +854 17.300404658659694 +855 17.300280374382755 +856 17.300156355944928 +857 17.300032602146985 +858 17.299909111797984 +859 17.29978588371522 +860 17.299662916724174 +861 17.299540209658396 +862 17.2994177613595 +863 17.299295570677042 +864 17.29917363646848 +865 17.2990519575991 +866 17.298930532941963 +867 17.298809361377828 +868 17.298688441795093 +869 17.29856777308972 +870 17.29844735416519 +871 17.298327183932436 +872 17.298207261309766 +873 17.298087585222824 +874 17.297968154604515 +875 17.29784896839494 +876 17.297730025541362 +877 17.2976113249981 +878 17.29749286572653 +879 17.297374646694973 +880 17.297256666878685 +881 17.29713892525975 +882 17.297021420827065 +883 17.296904152576253 +884 17.296787119509627 +885 17.296670320636153 +886 17.29655375497133 +887 17.29643742153722 +888 17.29632131936232 +889 17.29620544748156 +890 17.29608980493622 +891 17.295974390773885 +892 17.29585920404842 +893 17.295744243819875 +894 17.29562950915446 +895 17.29551499912449 +896 17.29540071280833 +897 17.29528664929036 +898 17.29517280766091 +899 17.295059187016214 +900 17.294945786458367 +901 17.29483260509527 +902 17.29471964204059 +903 17.29460689641372 +904 17.294494367339716 +905 17.29438205394924 +906 17.294269955378564 +907 17.294158070769466 +908 17.294046399269224 +909 17.293934940030542 +910 17.293823692211557 +911 17.293712654975725 +912 17.293601827491837 +913 17.29349120893393 +914 17.293380798481287 +915 17.293270595318365 +916 17.293160598634756 +917 17.293050807625168 +918 17.292941221489354 +919 17.292831839432086 +920 17.292722660663124 +921 17.29261368439714 +922 17.292504909853733 +923 17.29239633625735 +924 17.29228796283725 +925 17.29217978882747 +926 17.2920718134668 +927 17.29196403599873 +928 17.2918564556714 +929 17.29174907173761 +930 17.291641883454734 +931 17.291534890084684 +932 17.291428090893916 +933 17.29132148515336 +934 17.291215072138378 +935 17.291108851128786 +936 17.291002821408718 +937 17.290896982266695 +938 17.290791332995504 +939 17.290685872892244 +940 17.290580601258224 +941 17.290475517398967 +942 17.290370620624184 +943 17.290265910247694 +944 17.290161385587435 +945 17.290057045965426 +946 17.2899528907077 +947 17.28984891914434 +948 17.28974513060936 +949 17.28964152444076 +950 17.289538099980422 +951 17.28943485657414 +952 17.28933179357154 +953 17.28922891032608 +954 17.289126206195 +955 17.289023680539334 +956 17.2889213327238 +957 17.28881916211686 +958 17.28871716809063 +959 17.288615350020898 +960 17.288513707287045 +961 17.288412239272027 +962 17.28831094536242 +963 17.288209824948265 +964 17.288108877423156 +965 17.288008102184158 +966 17.28790749863176 +967 17.287807066169925 +968 17.28770680420596 +969 17.287606712150595 +970 17.287506789417865 +971 17.287407035425147 +972 17.287307449593104 +973 17.28720803134568 +974 17.287108780110046 +975 17.2870096953166 +976 17.286910776398937 +977 17.286812022793814 +978 17.28671343394114 +979 17.286615009283942 +980 17.286516748268333 +981 17.286418650343524 +982 17.286320714961743 +983 17.286222941578277 +984 17.286125329651398 +985 17.28602787864235 +986 17.285930588015347 +987 17.285833457237544 +988 17.28573648577899 +989 17.285639673112634 +990 17.2855430187143 +991 17.28544652206265 +992 17.285350182639164 +993 17.28525399992813 +994 17.285157973416638 +995 17.285062102594505 +996 17.284966386954316 +997 17.28487082599136 +998 17.284775419203626 +999 17.284680166091796 +1000 17.28458506615919 +1001 17.28449011891178 +1002 17.284395323858153 +1003 17.284300680509492 +1004 17.284206188379553 +1005 17.284111846984686 +1006 17.28401765584374 +1007 17.283923614478102 +1008 17.283829722411674 +1009 17.283735979170817 +1010 17.283642384284384 +1011 17.28354893728367 +1012 17.283455637702374 +1013 17.283362485076644 +1014 17.283269478944998 +1015 17.283176618848337 +1016 17.28308390432992 +1017 17.282991334935335 +1018 17.28289891021252 +1019 17.28280662971169 +1020 17.282714492985377 +1021 17.282622499588363 +1022 17.28253064907768 +1023 17.28243894101265 +1024 17.282347374954746 +1025 17.282255950467693 +1026 17.28216466711741 +1027 17.282073524471958 +1028 17.281982522101583 +1029 17.281891659578662 +1030 17.281800936477715 +1031 17.28171035237535 +1032 17.28161990685028 +1033 17.281529599483306 +1034 17.281439429857297 +1035 17.281349397557157 +1036 17.281259502169846 +1037 17.281169743284327 +1038 17.281080120491584 +1039 17.28099063338458 +1040 17.280901281558286 +1041 17.280812064609588 +1042 17.280722982137355 +1043 17.2806340337424 +1044 17.280545219027438 +1045 17.28045653759709 +1046 17.280367989057883 +1047 17.280279573018237 +1048 17.280191289088393 +1049 17.280103136880502 +1050 17.28001511600852 +1051 17.279927226088255 +1052 17.279839466737315 +1053 17.279751837575102 +1054 17.279664338222826 +1055 17.27957696830347 +1056 17.279489727441778 +1057 17.279402615264253 +1058 17.279315631399104 +1059 17.27922877547632 +1060 17.27914204712758 +1061 17.279055445986256 +1062 17.27896897168742 +1063 17.27888262386783 +1064 17.27879640216591 +1065 17.278710306221726 +1066 17.278624335677012 +1067 17.278538490175116 +1068 17.278452769361024 +1069 17.278367172881314 +1070 17.278281700384174 +1071 17.278196351519384 +1072 17.27811112593829 +1073 17.278026023293823 +1074 17.277941043240443 +1075 17.27785618543419 +1076 17.277771449532608 +1077 17.27768683519478 +1078 17.277602342081295 +1079 17.27751796985424 +1080 17.277433718177228 +1081 17.27734958671532 +1082 17.277265575135058 +1083 17.27718168310446 +1084 17.277097910292966 +1085 17.27701425637151 +1086 17.2769307210124 +1087 17.2768473038894 +1088 17.276764004677702 +1089 17.27668082305388 +1090 17.276597758695896 +1091 17.276514811283118 +1092 17.276431980496273 +1093 17.27634926601747 +1094 17.276266667530184 +1095 17.276184184719195 +1096 17.27610181727068 +1097 17.276019564872097 +1098 17.27593742721226 +1099 17.27585540398129 +1100 17.275773494870595 +1101 17.275691699572896 +1102 17.275610017782206 +1103 17.27552844919379 +1104 17.275446993504225 +1105 17.2753656504113 +1106 17.275284419614103 +1107 17.27520330081295 +1108 17.27512229370939 +1109 17.275041398006206 +1110 17.274960613407394 +1111 17.274879939618184 +1112 17.27479937634499 +1113 17.274718923295442 +1114 17.274638580178344 +1115 17.274558346703685 +1116 17.274478222582648 +1117 17.27439820752755 +1118 17.2743183012519 +1119 17.274238503470336 +1120 17.274158813898655 +1121 17.274079232253786 +1122 17.273999758253783 +1123 17.273920391617835 +1124 17.273841132066238 +1125 17.273761979320394 +1126 17.27368293310282 +1127 17.273603993137108 +1128 17.27352515914796 +1129 17.273446430861135 +1130 17.27336780800349 +1131 17.273289290302934 +1132 17.273210877488438 +1133 17.27313256929003 +1134 17.27305436543879 +1135 17.272976265666824 +1136 17.272898269707287 +1137 17.27282037729435 +1138 17.27274258816323 +1139 17.272664902050114 +1140 17.272587318692246 +1141 17.272509837827844 +1142 17.272432459196118 +1143 17.272355182537297 +1144 17.27227800759257 +1145 17.272200934104106 +1146 17.27212396181505 +1147 17.27204709046952 +1148 17.27197031981258 +1149 17.271893649590268 +1150 17.271817079549557 +1151 17.27174060943834 +1152 17.271664239005496 +1153 17.271587968000798 +1154 17.271511796174963 +1155 17.271435723279623 +1156 17.271359749067322 +1157 17.271283873291505 +1158 17.271208095706545 +1159 17.27113241606769 +1160 17.27105683413109 +1161 17.270981349653777 +1162 17.270905962393684 +1163 17.270830672109586 +1164 17.27075547856116 +1165 17.27068038150894 +1166 17.270605380714326 +1167 17.270530475939555 +1168 17.270455666947743 +1169 17.270380953502833 +1170 17.270306335369618 +1171 17.270231812313718 +1172 17.270157384101594 +1173 17.27008305050054 +1174 17.270008811278636 +1175 17.26993466620484 +1176 17.269860615048852 +1177 17.26978665758124 +1178 17.269712793573348 +1179 17.269639022797307 +1180 17.26956534502606 +1181 17.269491760033336 +1182 17.269418267593643 +1183 17.269344867482285 +1184 17.269271559475307 +1185 17.269198343349565 +1186 17.269125218882643 +1187 17.26905218585294 +1188 17.268979244039564 +1189 17.26890639322238 +1190 17.268833633182034 +1191 17.2687609636999 +1192 17.268688384558086 +1193 17.268615895539448 +1194 17.268543496427576 +1195 17.26847118700676 +1196 17.268398967062073 +1197 17.268326836379252 +1198 17.268254794744774 +1199 17.268182841945833 +1200 17.268110977770327 +1201 17.268039202006843 +1202 17.267967514444706 +1203 17.267895914873893 +1204 17.267824403085108 +1205 17.26775297886974 +1206 17.26768164201984 +1207 17.267610392328177 +1208 17.267539229588156 +1209 17.267468153593903 +1210 17.267397164140167 +1211 17.267326261022415 +1212 17.267255444036735 +1213 17.267184712979887 +1214 17.267114067649295 +1215 17.267043507843045 +1216 17.266973033359843 +1217 17.266902643999064 +1218 17.266832339560725 +1219 17.266762119845467 +1220 17.26669198465458 +1221 17.266621933789978 +1222 17.266551967054223 +1223 17.26648208425047 +1224 17.266412285182522 +1225 17.26634256965479 +1226 17.26627293747232 +1227 17.266203388440736 +1228 17.2661339223663 +1229 17.266064539055865 +1230 17.265995238316897 +1231 17.265926019957462 +1232 17.26585688378621 +1233 17.265787829612396 +1234 17.26571885724586 +1235 17.265649966497044 +1236 17.26558115717696 +1237 17.26551242909719 +1238 17.26544378206993 +1239 17.265375215907916 +1240 17.265306730424484 +1241 17.265238325433526 +1242 17.265170000749478 +1243 17.265101756187413 +1244 17.265033591562876 +1245 17.264965506692032 +1246 17.264897501391584 +1247 17.264829575478775 +1248 17.264761728771415 +1249 17.264693961087843 +1250 17.264626272246975 +1251 17.26455866206823 +1252 17.264491130371596 +1253 17.26442367697759 +1254 17.26435630170724 +1255 17.26428900438215 +1256 17.264221784824407 +1257 17.264154642856653 +1258 17.264087578302043 +1259 17.264020590984256 +1260 17.263953680727486 +1261 17.263886847356446 +1262 17.26382009069636 +1263 17.26375341057297 +1264 17.26368680681252 +1265 17.263620279241753 +1266 17.263553827687932 +1267 17.2634874519788 +1268 17.263421151942627 +1269 17.263354927408155 +1270 17.263288778204632 +1271 17.263222704161787 +1272 17.26315670510985 +1273 17.26309078087954 +1274 17.263024931302045 +1275 17.26295915620905 +1276 17.262893455432717 +1277 17.262827828805673 +1278 17.262762276161038 +1279 17.2626967973324 +1280 17.262631392153814 +1281 17.262566060459815 +1282 17.262500802085388 +1283 17.26243561686599 +1284 17.262370504637552 +1285 17.262305465236448 +1286 17.262240498499523 +1287 17.262175604264076 +1288 17.262110782367834 +1289 17.262046032649025 +1290 17.261981354946307 +1291 17.261916749098752 +1292 17.261852214945925 +1293 17.261787752327812 +1294 17.261723361084844 +1295 17.261659041057897 +1296 17.261594792088278 +1297 17.261530614017726 +1298 17.261466506688432 +1299 17.26140246994301 +1300 17.261338503624483 +1301 17.26127460757634 +1302 17.26121078164248 +1303 17.261147025667203 +1304 17.26108333949527 +1305 17.261019722971845 +1306 17.260956175942503 +1307 17.260892698253254 +1308 17.260829289750504 +1309 17.26076595028109 +1310 17.26070267969225 +1311 17.26063947783163 +1312 17.260576344547303 +1313 17.26051327968772 +1314 17.26045028310175 +1315 17.260387354638688 +1316 17.260324494148165 +1317 17.26026170148028 +1318 17.26019897648552 +1319 17.260136319014727 +1320 17.260073728919163 +1321 17.260011206050493 +1322 17.259948750260747 +1323 17.259886361402373 +1324 17.25982403932818 +1325 17.259761783891385 +1326 17.259699594945573 +1327 17.259637472344725 +1328 17.25957541594319 +1329 17.25951342559571 +1330 17.259451501157386 +1331 17.25938964248372 +1332 17.259327849430573 +1333 17.259266121854186 +1334 17.259204459611166 +1335 17.259142862558488 +1336 17.259081330553506 +1337 17.259019863453936 +1338 17.258958461117864 +1339 17.258897123403734 +1340 17.258835850170353 +1341 17.258774641276897 +1342 17.258713496582892 +1343 17.258652415948216 +1344 17.258591399233136 +1345 17.25853044629824 +1346 17.258469557004492 +1347 17.25840873121319 +1348 17.258347968786005 +1349 17.258287269584933 +1350 17.25822663347234 +1351 17.258166060310938 +1352 17.258105549963766 +1353 17.258045102294222 +1354 17.25798471716605 +1355 17.25792439444333 +1356 17.25786413399047 +1357 17.257803935672246 +1358 17.257743799353747 +1359 17.257683724900406 +1360 17.257623712178 +1361 17.257563761052616 +1362 17.257503871390703 +1363 17.257444043059024 +1364 17.25738427592468 +1365 17.257324569855083 +1366 17.257264924717994 +1367 17.25720534038149 +1368 17.257145816713983 +1369 17.25708635358418 +1370 17.257026950861153 +1371 17.25696760841426 +1372 17.256908326113198 +1373 17.256849103827978 +1374 17.256789941428924 +1375 17.256730838786677 +1376 17.256671795772206 +1377 17.256612812256783 +1378 17.256553888111984 +1379 17.256495023209716 +1380 17.256436217422188 +1381 17.256377470621914 +1382 17.256318782681728 +1383 17.256260153474763 +1384 17.256201582874446 +1385 17.256143070754536 +1386 17.256084616989078 +1387 17.256026221452416 +1388 17.255967884019213 +1389 17.255909604564426 +1390 17.255851382963293 +1391 17.255793219091377 +1392 17.255735112824528 +1393 17.25567706403888 +1394 17.25561907261088 +1395 17.255561138417256 +1396 17.25550326133505 +1397 17.255445441241573 +1398 17.255387678014426 +1399 17.255329971531516 +1400 17.255272321671033 +1401 17.255214728311458 +1402 17.255157191331545 +1403 17.25509971061034 +1404 17.255042286027198 +1405 17.25498491746172 +1406 17.254927604793806 +1407 17.254870347903648 +1408 17.254813146671705 +1409 17.254756000978716 +1410 17.25469891070571 +1411 17.25464187573398 +1412 17.254584895945115 +1413 17.25452797122096 +1414 17.254471101443634 +1415 17.254414286495557 +1416 17.254357526259398 +1417 17.254300820618106 +1418 17.254244169454893 +1419 17.25418757265326 +1420 17.254131030096964 +1421 17.254074541670022 +1422 17.254018107256744 +1423 17.253961726741682 +1424 17.253905400009668 +1425 17.25384912694579 +1426 17.253792907435418 +1427 17.253736741364158 +1428 17.253680628617904 +1429 17.253624569082795 +1430 17.25356856264523 +1431 17.253512609191883 +1432 17.253456708609676 +1433 17.253400860785792 +1434 17.25334506560766 +1435 17.253289322962978 +1436 17.253233632739708 +1437 17.253177994826046 +1438 17.25312240911045 +1439 17.253066875481622 +1440 17.253011393828555 +1441 17.25295596404043 +1442 17.25290058600674 +1443 17.252845259617185 +1444 17.252789984761737 +1445 17.252734761330608 +1446 17.252679589214253 +1447 17.252624468303377 +1448 17.25256939848894 +1449 17.25251437966213 +1450 17.2524594117144 +1451 17.252404494537434 +1452 17.25234962802314 +1453 17.2522948120637 +1454 17.252240046551528 +1455 17.25218533137927 +1456 17.252130666439818 +1457 17.252076051626297 +1458 17.25202148683207 +1459 17.251966971950758 +1460 17.251912506876188 +1461 17.251858091502434 +1462 17.251803725723818 +1463 17.25174940943487 +1464 17.251695142530394 +1465 17.251640924905377 +1466 17.25158675645508 +1467 17.251532637074973 +1468 17.25147856666077 +1469 17.251424545108392 +1470 17.25137057231402 +1471 17.25131664817405 +1472 17.25126277258509 +1473 17.251208945444 +1474 17.251155166647866 +1475 17.251101436093972 +1476 17.251047753679856 +1477 17.250994119303268 +1478 17.250940532862188 +1479 17.25088699425482 +1480 17.25083350337956 +1481 17.25078006013509 +1482 17.25072666442024 +1483 17.25067331613412 +1484 17.25062001517602 +1485 17.250566761445473 +1486 17.25051355484221 +1487 17.250460395266213 +1488 17.250407282617644 +1489 17.250354216796897 +1490 17.250301197704594 +1491 17.250248225241545 +1492 17.250195299308803 +1493 17.250142419807617 +1494 17.250089586639454 +1495 17.250036799706006 +1496 17.249984058909156 +1497 17.249931364151006 +1498 17.24987871533388 +1499 17.249826112360292 +1500 17.249773555133 +1501 17.24972104355492 +1502 17.249668577529235 +1503 17.249616156959277 +1504 17.24956378174864 +1505 17.249511451801087 +1506 17.2494591670206 +1507 17.249406927311366 +1508 17.24935473257778 +1509 17.249302582724436 +1510 17.24925047765614 +1511 17.24919841727789 +1512 17.249146401494883 +1513 17.24909443021254 +1514 17.249042503336476 +1515 17.24899062077248 +1516 17.248938782426585 +1517 17.248886988204994 +1518 17.248835238014117 +1519 17.248783531760562 +1520 17.248731869351136 +1521 17.248680250692836 +1522 17.248628675692874 +1523 17.248577144258643 +1524 17.24852565629774 +1525 17.248474211717962 +1526 17.248422810427282 +1527 17.248371452333867 +1528 17.248320137346116 +1529 17.24826886537258 +1530 17.24821763632201 +1531 17.248166450103373 +1532 17.248115306625802 +1533 17.248064205798634 +1534 17.24801314753139 +1535 17.247962131733786 +1536 17.247911158315716 +1537 17.24786022718729 +1538 17.24780933825877 +1539 17.247758491440642 +1540 17.247707686643555 +1541 17.247656923778347 +1542 17.247606202756057 +1543 17.247555523487904 +1544 17.247504885885277 +1545 17.247454289859782 +1546 17.24740373532317 +1547 17.247353222187407 +1548 17.247302750364632 +1549 17.24725231976716 +1550 17.24720193030751 +1551 17.24715158189835 +1552 17.247101274452564 +1553 17.247051007883186 +1554 17.247000782103466 +1555 17.2469505970268 +1556 17.246900452566777 +1557 17.246850348637174 +1558 17.246800285151938 +1559 17.246750262025188 +1560 17.24670027917123 +1561 17.24665033650455 +1562 17.24660043393981 +1563 17.24655057139183 +1564 17.246500748775635 +1565 17.246450966006396 +1566 17.24640122299949 +1567 17.246351519670444 +1568 17.246301855934966 +1569 17.24625223170895 +1570 17.246202646908447 +1571 17.246153101449668 +1572 17.246103595249046 +1573 17.246054128223136 +1574 17.246004700288687 +1575 17.245955311362625 +1576 17.245905961362034 +1577 17.24585665020415 +1578 17.245807377806422 +1579 17.24575814408644 +1580 17.24570894896197 +1581 17.245659792350942 +1582 17.245610674171466 +1583 17.245561594341797 +1584 17.245512552780376 +1585 17.24546354940582 +1586 17.24541458413688 +1587 17.245365656892503 +1588 17.245316767591774 +1589 17.24526791615398 +1590 17.245219102498535 +1591 17.245170326545043 +1592 17.245121588213255 +1593 17.245072887423103 +1594 17.245024224094657 +1595 17.24497559814818 +1596 17.244927009504075 +1597 17.2448784580829 +1598 17.244829943805406 +1599 17.244781466592492 +1600 17.244733026365193 +1601 17.244684623044733 +1602 17.244636256552486 +1603 17.24458792680999 +1604 17.244539633738928 +1605 17.244491377261163 +1606 17.24444315729869 +1607 17.244394973773694 +1608 17.24434682660849 +1609 17.244298715725556 +1610 17.24425064104754 +1611 17.244202602497225 +1612 17.244154599997586 +1613 17.244106633471702 +1614 17.244058702842857 +1615 17.24401080803445 +1616 17.243962948970065 +1617 17.24391512557342 +1618 17.24386733776839 +1619 17.243819585479017 +1620 17.243771868629477 +1621 17.243724187144117 +1622 17.24367654094742 +1623 17.24362892996403 +1624 17.243581354118742 +1625 17.243533813336498 +1626 17.243486307542398 +1627 17.243438836661667 +1628 17.24339140061973 +1629 17.24334399934211 +1630 17.243296632754507 +1631 17.243249300782768 +1632 17.24320200335289 +1633 17.243154740391 +1634 17.2431075118234 +1635 17.24306031757651 +1636 17.24301315757692 +1637 17.24296603175137 +1638 17.242918940026726 +1639 17.24287188233 +1640 17.24282485858838 +1641 17.24277786872917 +1642 17.242730912679832 +1643 17.242683990367965 +1644 17.24263710172133 +1645 17.242590246667792 +1646 17.24254342513541 +1647 17.242496637052355 +1648 17.242449882346964 +1649 17.24240316094768 +1650 17.242356472783126 +1651 17.242309817782044 +1652 17.242263195873324 +1653 17.24221660698601 +1654 17.242170051049264 +1655 17.24212352799241 +1656 17.242077037744902 +1657 17.242030580236328 +1658 17.24198415539643 +1659 17.241937763155086 +1660 17.241891403442303 +1661 17.241845076188234 +1662 17.241798781323183 +1663 17.241752518777563 +1664 17.24170628848195 +1665 17.241660090367052 +1666 17.241613924363705 +1667 17.241567790402886 +1668 17.241521688415716 +1669 17.241475618333457 +1670 17.241429580087484 +1671 17.24138357360932 +1672 17.24133759883063 +1673 17.24129165568322 +1674 17.241245744098997 +1675 17.241199864010035 +1676 17.241154015348542 +1677 17.241108198046838 +1678 17.241062412037394 +1679 17.241016657252796 +1680 17.2409709336258 +1681 17.240925241089247 +1682 17.24087957957614 +1683 17.240833949019624 +1684 17.24078834935294 +1685 17.240742780509493 +1686 17.240697242422794 +1687 17.24065173502651 +1688 17.240606258254417 +1689 17.24056081204044 +1690 17.24051539631861 +1691 17.240470011023106 +1692 17.240424656088244 +1693 17.24037933144845 +1694 17.240334037038284 +1695 17.24028877279244 +1696 17.24024353864573 +1697 17.240198334533112 +1698 17.240153160389653 +1699 17.240108016150568 +1700 17.24006290175117 +1701 17.240017817126915 +1702 17.239972762213405 +1703 17.23992773694633 +1704 17.239882741261532 +1705 17.239837775094983 +1706 17.23979283838275 +1707 17.23974793106106 +1708 17.239703053066236 +1709 17.239658204334752 +1710 17.239613384803185 +1711 17.23956859440826 +1712 17.23952383308679 +1713 17.23947910077575 +1714 17.2394343974122 +1715 17.23938972293336 +1716 17.23934507727656 +1717 17.23930046037922 +1718 17.239255872178955 +1719 17.23921131261342 +1720 17.239166781620444 +1721 17.23912227913797 +1722 17.239077805104046 +1723 17.23903335945684 +1724 17.238988942134668 +1725 17.23894455307595 +1726 17.238900192219212 +1727 17.238855859503115 +1728 17.23881155486645 +1729 17.238767278248098 +1730 17.238723029587096 +1731 17.238678808822552 +1732 17.238634615893748 +1733 17.238590450740038 +1734 17.238546313300926 +1735 17.23850220351601 +1736 17.238458121325017 +1737 17.238414066667794 +1738 17.2383700394843 +1739 17.238326039714607 +1740 17.23828206729892 +1741 17.23823812217754 +1742 17.23819420429089 +1743 17.238150313579517 +1744 17.23810644998408 +1745 17.23806261344535 +1746 17.238018803904215 +1747 17.23797502130167 +1748 17.237931265578837 +1749 17.237887536676954 +1750 17.23784383453735 +1751 17.237800159101496 +1752 17.237756510310966 +1753 17.237712888107428 +1754 17.23766929243271 +1755 17.2376257232287 +1756 17.237582180437435 +1757 17.237538664001043 +1758 17.237495173861777 +1759 17.237451709961995 +1760 17.23740827224418 +1761 17.237364860650906 +1762 17.23732147512487 +1763 17.23727811560887 +1764 17.23723478204584 +1765 17.237191474378793 +1766 17.23714819255088 +1767 17.237104936505332 +1768 17.237061706185514 +1769 17.23701850153489 +1770 17.23697532249704 +1771 17.23693216901566 +1772 17.236889041034523 +1773 17.236845938497545 +1774 17.23680286134873 +1775 17.236759809532202 +1776 17.23671678299219 +1777 17.236673781673026 +1778 17.236630805519145 +1779 17.23658785447511 +1780 17.236544928485575 +1781 17.2365020274953 +1782 17.236459151449154 +1783 17.236416300292113 +1784 17.23637347396927 +1785 17.236330672425805 +1786 17.23628789560701 +1787 17.236245143458294 +1788 17.236202415925156 +1789 17.236159712953214 +1790 17.236117034488167 +1791 17.236074380475856 +1792 17.236031750862182 +1793 17.23598914559319 +1794 17.23594656461502 +1795 17.23590400787389 +1796 17.23586147531615 +1797 17.23581896688824 +1798 17.235776482536693 +1799 17.235734022208177 +1800 17.23569158584944 +1801 17.235649173407346 +1802 17.23560678482882 +1803 17.235564420060957 +1804 17.23552207905089 +1805 17.2354797617459 +1806 17.23543746809334 +1807 17.23539519804067 +1808 17.235352951535482 +1809 17.235310728525402 +1810 17.235268528958237 +1811 17.235226352781833 +1812 17.235184199944158 +1813 17.235142070393284 +1814 17.23509996407738 +1815 17.235057880944716 +1816 17.235015820943644 +1817 17.234973784022653 +1818 17.234931770130288 +1819 17.234889779215216 +1820 17.234847811226203 +1821 17.234805866112108 +1822 17.234763943821886 +1823 17.234722044304604 +1824 17.234680167509396 +1825 17.234638313385545 +1826 17.234596481882374 +1827 17.234554672949333 +1828 17.234512886535974 +1829 17.23447112259193 +1830 17.234429381066942 +1831 17.234387661910844 +1832 17.234345965073555 +1833 17.23430429050511 +1834 17.234262638155627 +1835 17.23422100797532 +1836 17.234179399914506 +1837 17.234137813923585 +1838 17.234096249953065 +1839 17.234054707953543 +1840 17.234013187875703 +1841 17.23397168967034 +1842 17.23393021328832 +1843 17.233888758680642 +1844 17.233847325798354 +1845 17.23380591459262 +1846 17.2337645250147 +1847 17.233723157015937 +1848 17.233681810547786 +1849 17.23364048556176 +1850 17.233599182009506 +1851 17.233557899842737 +1852 17.23351663901326 +1853 17.233475399472983 +1854 17.233434181173898 +1855 17.233392984068104 +1856 17.233351808107763 +1857 17.233310653245166 +1858 17.233269519432667 +1859 17.233228406622715 +1860 17.233187314767854 +1861 17.233146243820727 +1862 17.233105193734055 +1863 17.23306416446065 +1864 17.23302315595343 +1865 17.23298216816538 +1866 17.23294120104958 +1867 17.23290025455922 +1868 17.232859328647553 +1869 17.23281842326794 +1870 17.232777538373824 +1871 17.232736673918737 +1872 17.232695829856297 +1873 17.232655006140213 +1874 17.232614202724285 +1875 17.232573419562396 +1876 17.232532656608512 +1877 17.232491913816713 +1878 17.232451191141138 +1879 17.23241048853602 +1880 17.23236980595569 +1881 17.232329143354544 +1882 17.2322885006871 +1883 17.23224787790794 +1884 17.232207274971724 +1885 17.232166691833225 +1886 17.232126128447266 +1887 17.232085584768797 +1888 17.232045060752828 +1889 17.232004556354454 +1890 17.231964071528868 +1891 17.23192360623134 +1892 17.231883160417247 +1893 17.23184273404199 +1894 17.231802327061146 +1895 17.231761939430292 +1896 17.23172157110514 +1897 17.23168122204148 +1898 17.23164089219516 +1899 17.231600581522137 +1900 17.23156028997845 +1901 17.231520017520214 +1902 17.23147976410362 +1903 17.231439529684977 +1904 17.231399314220624 +1905 17.231359117667036 +1906 17.231318939980728 +1907 17.23127878111833 +1908 17.231238641036533 +1909 17.231198519692125 +1910 17.231158417041964 +1911 17.231118333043003 +1912 17.23107826765226 +1913 17.231038220826854 +1914 17.230998192523977 +1915 17.23095818270089 +1916 17.230918191314963 +1917 17.230878218323603 +1918 17.230838263684362 +1919 17.23079832735482 +1920 17.230758409292644 +1921 17.23071850945561 +1922 17.23067862780155 +1923 17.230638764288372 +1924 17.230598918874087 +1925 17.23055909151677 +1926 17.230519282174587 +1927 17.230479490805756 +1928 17.23043971736861 +1929 17.230399961821544 +1930 17.23036022412301 +1931 17.230320504231603 +1932 17.230280802105927 +1933 17.2302411177047 +1934 17.230201450986712 +1935 17.230161801910832 +1936 17.230122170436008 +1937 17.23008255652126 +1938 17.230042960125697 +1939 17.230003381208494 +1940 17.229963819728898 +1941 17.22992427564626 +1942 17.229884748919996 +1943 17.229845239509576 +1944 17.229805747374574 +1945 17.229766272474627 +1946 17.229726814769478 +1947 17.22968737421889 +1948 17.229647950782763 +1949 17.229608544421026 +1950 17.229569155093714 +1951 17.22952978276092 +1952 17.229490427382828 +1953 17.22945108891968 +1954 17.22941176733181 +1955 17.229372462579615 +1956 17.229333174623576 +1957 17.22929390342424 +1958 17.22925464894225 +1959 17.22921541113829 +1960 17.229176189973145 +1961 17.229136985407663 +1962 17.22909779740277 +1963 17.229058625919457 +1964 17.229019470918807 +1965 17.22898033236197 +1966 17.228941210210156 +1967 17.22890210442467 +1968 17.228863014966866 +1969 17.228823941798197 +1970 17.22878488488017 +1971 17.228745844174373 +1972 17.22870681964247 +1973 17.228667811246183 +1974 17.22862881894733 +1975 17.228589842707784 +1976 17.228550882489486 +1977 17.228511938254464 +1978 17.228473009964812 +1979 17.228434097582692 +1980 17.22839520107035 +1981 17.228356320390088 +1982 17.228317455504286 +1983 17.22827860637539 +1984 17.228239772965935 +1985 17.22820095523851 +1986 17.22816215315577 +1987 17.22812336668046 +1988 17.22808459577538 +1989 17.22804584040341 +1990 17.228007100527496 +1991 17.22796837611065 +1992 17.227929667115966 +1993 17.2278909735066 +1994 17.227852295245768 +1995 17.227813632296773 +1996 17.227774984622982 +1997 17.22773635218783 +1998 17.227697734954816 +1999 17.227659132887513 +2000 17.22762054594957 diff --git a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=100.log b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=100.log new file mode 100644 index 00000000..c3aaba04 --- /dev/null +++ b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=100.log @@ -0,0 +1,39 @@ +2023-12-23T22:38:13.431 +== Config == +INIT_SIZE: 3 +GEN_TYP_SIZE: 2 +PARAMETERIZE_FLIP_GROUPS_BY_SZ: true +EPOCHS: 100 +DistNat: DistUInt32 +TAG: v3_opt_meta_ad + +Building num_apps(gen_expr(...)) computation graph... + 9.797323125 seconds + +Initial adnodes_of_interest: +Dict("tysz2_gen_type_tbool" => 0.5, "tysz1_gen_type_tbool" => 0.5, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.5, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5, "sz1_succ_app" => 0.5, "sz1_succ_abs" => 0.5, "sz3_succ_abs" => 0.5, "sz3_succ_app" => 0.5, "sz2_succ_abs" => 0.5, "sz3_succ_var" => 0.5) +Inferring initial distribution... + 0.368995208 seconds +Saved num_apps dist to examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_before.csv. + +Saving samples... +Saved samples to examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_before.txt. + 5.36046275 seconds + +Initial logprob: -20.238481981031438 + +Training... + 7.11384975 seconds + +Final logprob: -18.54692234466734 +Drawing the target dataset is 5.43x more likely + +Learned adnodes_of_interest: +Dict("tysz2_gen_type_tbool" => 0.4769967684232314, "tysz1_gen_type_tbool" => 0.4962538566537244, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.561559374299581, "sz2_succ_var" => 0.49666005253839807, "sz1_succ_var" => 0.49906693556544923, "sz1_succ_app" => 0.5767350167020707, "sz1_succ_abs" => 0.41080879746746896, "sz3_succ_abs" => 0.432508934977342, "sz3_succ_app" => 0.5595926683247854, "sz2_succ_abs" => 0.4336897457382177, "sz3_succ_var" => 0.5) +Inferring trained distribution... +Saved num_apps dist to examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=100.csv. + +Saving samples... +Saved samples to examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=100.txt. + 3.144126583 seconds + diff --git a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log new file mode 100644 index 00000000..1ec7db2b --- /dev/null +++ b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log @@ -0,0 +1,39 @@ +2023-12-24T14:57:33.753 +== Config == +INIT_SIZE: 3 +GEN_TYP_SIZE: 2 +PARAMETERIZE_FLIP_GROUPS_BY_SZ: true +EPOCHS: 2000 +DistNat: DistUInt32 +TAG: v3_opt_meta_ad + +Building num_apps(gen_expr(...)) computation graph... + 9.788417833 seconds + +Initial adnodes_of_interest: +Dict("tysz2_gen_type_tbool" => 0.5, "tysz1_gen_type_tbool" => 0.5, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.5, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5, "sz1_succ_app" => 0.5, "sz1_succ_abs" => 0.5, "sz3_succ_abs" => 0.5, "sz3_succ_app" => 0.5, "sz2_succ_abs" => 0.5, "sz3_succ_var" => 0.5) +Inferring initial distribution... + 0.371381167 seconds +Saved num_apps dist to examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_before.csv. + +Saving samples... +Saved samples to examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_before.txt. + 4.67617525 seconds + +Initial logprob: -20.238481981031438 + +Training... + 15.66972375 seconds + +Final logprob: -17.22762054594957 +Drawing the target dataset is 20.3x more likely + +Learned adnodes_of_interest: +Dict("tysz2_gen_type_tbool" => 0.34083724764380813, "tysz1_gen_type_tbool" => 0.39501557295049883, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.6151878798944755, "sz2_succ_var" => 0.43468900171159874, "sz1_succ_var" => 0.5103724794228329, "sz1_succ_app" => 0.68419917231591, "sz1_succ_abs" => 0.2149167539907951, "sz3_succ_abs" => 0.25149682656466177, "sz3_succ_app" => 0.6712638585215596, "sz2_succ_abs" => 0.4236132578800875, "sz3_succ_var" => 0.5) +Inferring trained distribution... +Saved num_apps dist to examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=2000.csv. + +Saving samples... +Saved samples to examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt. + 2.335930042 seconds + diff --git a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_before.txt b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_before.txt new file mode 100644 index 00000000..e275f274 --- /dev/null +++ b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_before.txt @@ -0,0 +1,200 @@ +λx:Bool. x +λx:Bool -> Bool. true +(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. false) false (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. λz:Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false))) +(λx:(Bool -> Bool) -> Bool. (λy:Bool. false) true) (λx:Bool -> Bool. false) +(λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool. λz:Bool. false)) (λx:Bool. true) +(λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool. true) true ((λx:Bool. false) true)) +(λx:Bool. λy:Bool. x) true +true +(λx:Bool. (λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. true) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true))) +(λx:Bool. λy:Bool. λz:Bool. true) false true +(λx:Bool. true) false +true +λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. true) false +(λx:Bool. false) true +(λx:Bool. x) false +false +false +(λx:Bool. λy:Bool -> Bool. false) true +true +λx:Bool -> Bool. true +(λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. false) (λx:Bool. false) true ((λx:Bool. λy:Bool. λz:Bool. false) false) +(λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. x) +λx:Bool -> Bool. x +(λx:Bool -> Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) false) (λx:Bool. (λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. false)) +λx:Bool. x +λx:Bool -> Bool. λy:Bool. true +(λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. x) +(λx:Bool. λy:(Bool -> Bool) -> Bool. true) true ((λx:Bool. λy:Bool -> Bool. true) false) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. false) false +λx:Bool. false +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) ((λy:Bool. λz:Bool -> Bool. λw:Bool. false) false) +λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) x ((λy:Bool -> Bool -> Bool. λz:Bool. false) (λy:Bool. λz:Bool. false)) +(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. true) ((λx:Bool. λy:Bool -> Bool. false) false) (λx:Bool -> Bool. x false) +false +(λx:Bool. true) ((λx:Bool -> Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. false))) +λx:Bool. λy:Bool. y +λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. λz:Bool. false) ((λy:Bool. true) x) +(λx:Bool. λy:Bool -> Bool. x) false +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false)) false +λx:Bool. (λy:(Bool -> Bool) -> Bool. x) ((λy:Bool. λz:Bool -> Bool. true) x) +λx:Bool. λy:Bool. true +λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. true) +(λx:Bool -> Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. false))) +true +(λx:Bool. true) ((λx:(Bool -> Bool) -> Bool. false) ((λx:Bool. λy:Bool -> Bool. true) true)) +(λx:Bool. λy:Bool. x) true +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. false) true ((λx:Bool. false) false) +true +λx:Bool. (λy:Bool. λz:Bool. λw:Bool. true) x ((λy:Bool. true) x) +(λx:Bool. λy:Bool. λz:Bool. true) false true ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false)) +λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. false) (λy:Bool. λz:Bool. true) ((λy:Bool. λz:Bool -> Bool. false) true) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) +true +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. false) false ((λx:Bool. λy:Bool -> Bool. false) true) (λx:Bool. (λy:Bool -> Bool. λz:Bool. true) (λy:Bool. false)) +true +false +(λx:Bool. (λy:Bool. λz:Bool. false) x) false +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. true) false +λx:Bool -> Bool. (λy:Bool -> Bool. false) ((λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool -> Bool. false)) +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. true) false ((λx:Bool. λy:Bool -> Bool. true) false) (λx:Bool -> Bool. λy:Bool. y) +(λx:Bool. λy:Bool -> Bool. true) true ((λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool. false) false)) +λx:Bool. false +false +(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true) false ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. true))) +λx:Bool. λy:Bool. (λz:Bool. false) y +false +(λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) true ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. false)) +(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool. true) true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true))) +false +(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) x) ((λx:Bool. λy:(Bool -> Bool) -> Bool. true) true (λx:Bool -> Bool. false)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. x) +(λx:Bool. λy:(Bool -> Bool) -> Bool. true) false (λx:Bool -> Bool. true) +(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) false) ((λx:Bool. λy:Bool -> Bool. false) false) +(λx:Bool. false) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true)) +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. false) ((λy:Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool. false)) +(λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool. false)) (λx:Bool. (λy:Bool. false) x) +(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) ((λx:Bool -> Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool. false) true)) +(λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) true ((λx:Bool. false) false) (λx:Bool. x) +λx:Bool -> Bool. true +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) +(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. λy:Bool. false) +false +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. true) (λx:Bool -> Bool. false) false ((λx:Bool. λy:Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true))) +(λx:Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) (λx:Bool. true) ((λx:Bool. true) true) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. false)) +λx:Bool. (λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. true) x ((λy:Bool. λz:Bool. λw:Bool. false) true) +λx:Bool. (λy:Bool. λz:Bool. λw:Bool. false) true ((λy:Bool. true) x) +false +λx:Bool -> Bool. λy:Bool. y +true +(λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. false)) ((λx:Bool -> Bool. false) (λx:Bool. false)) +true +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true)) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) +false +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool. true) (λy:Bool. true)) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:Bool. λy:Bool. true) false)) +(λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) true +λx:Bool -> Bool. x +(λx:Bool -> Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false))) +(λx:Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) false)) +false +true +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. false) true (λx:Bool -> Bool. (λy:Bool. true) true) +true +λx:Bool. false +(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. true)) ((λx:Bool. λy:(Bool -> Bool) -> Bool. false) true ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. true))) +true +(λx:Bool. λy:Bool. true) ((λx:Bool. false) true) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. false) (λx:Bool -> Bool. true)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. x) +(λx:Bool. x) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. false) (λx:Bool -> Bool. false) (λx:Bool. λy:Bool. false)) +(λx:Bool. λy:(Bool -> Bool) -> Bool. true) false (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. false)) +(λx:Bool. λy:Bool -> Bool. x) ((λx:Bool. false) true) +true +(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool. true) false)) +(λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool. λz:Bool. false)) ((λx:Bool. λy:Bool. λz:Bool -> Bool. false) false ((λx:Bool -> Bool. false) (λx:Bool. false))) +false +false +(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λx:Bool. false) (λx:Bool -> Bool. (λy:Bool. true) true) +(λx:Bool -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. true)) ((λx:Bool. λy:Bool. λz:Bool -> Bool. true) false ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false))) +λx:Bool. (λy:Bool. false) ((λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. true)) +(λx:Bool -> Bool. false) ((λx:Bool -> Bool. x) ((λx:(Bool -> Bool) -> Bool. λy:Bool. false) (λx:Bool -> Bool. false))) +(λx:Bool. λy:Bool -> Bool. y) true +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. true)) ((λx:Bool. x) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. false))) +λx:Bool. x +λx:Bool -> Bool. (λy:Bool. λz:Bool. false) true false +λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) (λy:Bool -> Bool. false) ((λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool. λz:Bool. false)) +λx:Bool -> Bool. x +false +(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false) true (λx:Bool. λy:Bool. y) +(λx:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x)) +λx:Bool. (λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. false) +(λx:Bool. x) true +(λx:Bool. x) true +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. (λy:Bool. λz:Bool. true) x) +false +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. false) true +λx:Bool. (λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. true) +λx:Bool. (λy:Bool. λz:Bool. λw:Bool. true) x false +true +(λx:Bool. (λy:Bool. λz:Bool. true) false) true +λx:Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. false) true +(λx:Bool. λy:Bool. λz:Bool -> Bool. false) ((λx:Bool. false) false) ((λx:Bool. true) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false))) +(λx:(Bool -> Bool) -> Bool. (λy:Bool. false) false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false))) +true +false +λx:Bool. false +(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. false) (λx:Bool. λy:Bool. false) (λx:Bool -> Bool. false) +(λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. false) false ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. false)) +(λx:Bool. λy:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) false true) +true +(λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) true ((λx:Bool. true) false) (λx:Bool. x) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. x) false +λx:Bool. (λy:Bool. λz:Bool. true) ((λy:Bool. true) x) +λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool. false) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) true ((λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true))) +λx:Bool -> Bool. false +(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. false) (λx:Bool. λy:Bool. false) true true +false +λx:Bool. false +(λx:Bool -> Bool -> Bool. (λy:Bool. true) false) (λx:Bool. λy:Bool. y) +false +false +true +(λx:Bool. λy:(Bool -> Bool) -> Bool. true) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false)) ((λx:Bool. λy:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true))) +true +(λx:Bool. λy:Bool -> Bool. x) ((λx:Bool. x) ((λx:Bool. true) true)) +true +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false) ((λx:Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. λy:Bool. false)) +(λx:Bool. x) true +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false) (λx:Bool -> Bool. λy:Bool. y) +false +(λx:Bool. λy:Bool -> Bool. y) false +true +λx:Bool. false +λx:Bool -> Bool. λy:Bool. (λz:(Bool -> Bool) -> Bool. false) (λz:Bool -> Bool. true) +λx:Bool. λy:Bool. (λz:Bool -> Bool -> Bool. true) (λz:Bool. λw:Bool. true) +false +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) (λx:Bool. x) ((λx:Bool -> Bool. true) (λx:Bool. x)) +(λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) false true +false +true +false +true +(λx:Bool. λy:Bool. λz:Bool. true) true ((λx:Bool. false) false) ((λx:Bool. false) ((λx:Bool. false) false)) +(λx:Bool. λy:Bool. false) ((λx:Bool. false) true) ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true))) +λx:Bool. true +false +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. x) +λx:Bool. λy:Bool. y +(λx:Bool. λy:Bool -> Bool. x) true +(λx:Bool -> Bool -> Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) ((λx:Bool. false) false)) +(λx:(Bool -> Bool) -> Bool. (λy:Bool. true) true) (λx:Bool -> Bool. x false) +(λx:Bool. x) true +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. false) false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true) +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false)) +true +(λx:Bool. λy:Bool. λz:Bool. false) true false true +(λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. x) +true +false +λx:Bool. λy:Bool. (λz:Bool. true) true +(λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. true)) diff --git a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=100.txt b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=100.txt new file mode 100644 index 00000000..cbb23a76 --- /dev/null +++ b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=100.txt @@ -0,0 +1,200 @@ +(λx:Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. λa:Bool. true) (λx:Bool. false) (λx:Bool. λy:Bool. true) (λx:Bool. false) +true +(λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool. true) false ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false))) +(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. false)) ((λx:Bool. λy:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false))) +(λx:Bool. λy:Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false)) ((λx:Bool. x) ((λx:Bool -> Bool. true) (λx:Bool. true))) +false +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. false) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool. x) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. true)) +λx:Bool. λy:Bool. x +(λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. true) false) +(λx:Bool. x) ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true))) +false +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. λy:Bool. y) +(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) false) ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. false) false) +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool. false) true) true +λx:Bool -> Bool. (λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. true) false ((λy:Bool. λz:Bool. λw:Bool. false) true) +(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true))) +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. true) (λx:Bool. λy:Bool. false) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false))) +(λx:Bool. x) true +λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. true) (λy:Bool -> Bool. true) ((λy:Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool. false)) +(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool. λy:Bool -> Bool. true) true) +(λx:Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. false) true (λx:Bool -> Bool. λy:Bool. true)) +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. true)) true +(λx:Bool -> Bool -> Bool. false) (λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. false) (λy:Bool. λz:Bool. false)) +false +λx:Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. true) false +(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. false) true ((λx:Bool -> Bool. false) (λx:Bool. false)) ((λx:(Bool -> Bool) -> Bool. x) (λx:Bool -> Bool. false)) +(λx:Bool. x) false +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) false ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true)) +(λx:Bool. true) false +false +false +λx:Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. true) x +(λx:Bool -> Bool. (λy:Bool. λz:Bool -> Bool. true) true) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. true) false ((λx:Bool. λy:Bool -> Bool. true) true)) +λx:Bool -> Bool. x +(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) false ((λx:Bool. true) false)) +false +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. true) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false)) (λx:Bool -> Bool. (λy:Bool. λz:Bool. false) true) +(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. false) false) (λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. false) (λy:Bool. λz:Bool. true)) +false +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. true) (λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. false)) +(λx:Bool. λy:(Bool -> Bool) -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool -> Bool. false) +(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) false (λx:Bool. λy:Bool. x) +λx:Bool -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. true) false (λy:Bool -> Bool. true) +(λx:Bool. (λy:Bool. λz:Bool. true) false) ((λx:Bool. λy:Bool. true) true false) +λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. false) (λy:Bool. λz:Bool. true) ((λy:Bool. λz:Bool. λw:Bool. true) false) +λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. false) ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. true)) +(λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) ((λx:Bool. true) true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. true) false) +λx:Bool. λy:Bool. (λz:Bool. true) x +(λx:Bool. x) false +true +(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool. true) (λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λx:Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. false) true)) +true +true +λx:Bool. λy:Bool. y +(λx:Bool. (λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. true)) ((λx:Bool. x) false) +false +true +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. false) true ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. true)) ((λx:Bool. λy:Bool. false) false true) +false +false +λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. false) (λy:Bool -> Bool. false) ((λy:Bool. λz:Bool. λw:Bool. true) true) +(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. false) false ((λx:Bool. false) true) ((λx:Bool. λy:Bool -> Bool. false) true) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool. true) ((λx:Bool. λy:Bool -> Bool. false) false)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true) false +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. false) +(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool. true) ((λx:Bool. λy:Bool -> Bool. false) true) ((λx:Bool. λy:Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true))) +(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. true) false ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false))) +false +false +(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true)) (λx:Bool. λy:Bool. true) +(λx:Bool. λy:Bool -> Bool. false) true (λx:Bool. true) +(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. false) false true (λx:Bool -> Bool. false) +(λx:Bool. λy:Bool. λz:Bool. false) false +(λx:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. false) true ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true))) +(λx:(Bool -> Bool) -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. false) false) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool. false) false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) false) +false +(λx:Bool -> Bool. (λy:Bool. false) true) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. λy:Bool. true) false) +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. λa:Bool. false) true ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true)) ((λx:Bool. true) true) +(λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. λz:Bool. false)) (λx:Bool -> Bool. true) +(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) x) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) (λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true))) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool. λy:Bool. true) (λx:Bool. x)) +(λx:Bool. x) true +(λx:Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. true) true ((λx:Bool -> Bool. false) (λx:Bool. true)) ((λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false))) +true +λx:Bool. λy:Bool. true +(λx:(Bool -> Bool) -> Bool. (λy:Bool. false) true) (λx:Bool -> Bool. false) +(λx:Bool. λy:Bool. λz:Bool. true) false true ((λx:Bool. λy:Bool. true) false true) +(λx:Bool. x) false +(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. λz:Bool. true)) (λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool. true)) +true +true +(λx:Bool. (λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. false)) ((λx:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true))) +λx:Bool -> Bool. (λy:Bool. λz:Bool. true) true true +(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true)) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) false true) +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. false) +λx:Bool. (λy:Bool. true) x +(λx:Bool. λy:Bool. true) false +(λx:Bool. λy:Bool. false) false +λx:Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool. true) false true +(λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. false) +λx:Bool. x +false +λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. false) +(λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. true) ((λx:Bool. λy:Bool. true) true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. true) false) +(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. false) false) +false +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false)) false +(λx:Bool. λy:Bool -> Bool. y) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true)) +(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. false) (λx:Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false)) (λx:Bool. (λy:Bool. true) true) +true +λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. false) ((λy:Bool. false) x) +(λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. true) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false)) +(λx:Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool. true) false ((λx:Bool -> Bool -> Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) false)) +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. true)) false +λx:Bool. (λy:Bool. λz:Bool. false) x +false +(λx:Bool. λy:Bool. true) false true +false +λx:Bool. λy:Bool. true +(λx:Bool -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. false) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. false)) ((λx:Bool. λy:Bool -> Bool. true) true) +(λx:Bool -> Bool. x) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. false)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true))) +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. true) (λx:Bool. false)) +λx:Bool -> Bool. true +(λx:Bool. x) ((λx:Bool. λy:Bool. true) true true) +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool. true) true) ((λx:Bool. λy:Bool. false) false ((λx:Bool. false) false)) +(λx:Bool. λy:Bool -> Bool. y) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) +(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false (λx:Bool. true)) +(λx:Bool. x) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) false (λx:Bool -> Bool. λy:Bool. false)) +λx:Bool -> Bool. false +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. false) (λx:Bool -> Bool. false) ((λx:Bool. false) true) ((λx:Bool. λy:Bool. true) true) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. false) true) false +λx:Bool -> Bool. (λy:Bool -> Bool. x) ((λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool -> Bool. true)) +false +λx:Bool -> Bool. false +true +(λx:Bool. x) true +(λx:Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. false) (λx:Bool. false) false ((λx:Bool -> Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true))) +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. false) false) (λx:Bool -> Bool. (λy:Bool. λz:Bool. false) false) +(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool. false) x) (λx:Bool -> Bool. x false) +λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. true)) +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. true) ((λx:Bool. true) false) false +(λx:Bool. true) ((λx:Bool. λy:Bool. false) true ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true))) +(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool. false) x) ((λx:Bool. λy:Bool. λz:Bool -> Bool. false) true ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true))) +(λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. false) true true ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false)) +(λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. true) ((λx:Bool. true) true)) +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. true) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false)) +λx:Bool -> Bool. false +(λx:Bool. λy:Bool -> Bool. true) ((λx:Bool. false) true) (λx:Bool. false) +(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. true) x) ((λx:Bool. λy:Bool. false) true true) +λx:Bool. λy:Bool. (λz:Bool. false) x +(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. false) x) true +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false)) ((λx:Bool. λy:Bool. λz:Bool. true) ((λx:Bool. false) false)) +false +(λx:Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) true (λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false) +(λx:Bool. λy:(Bool -> Bool) -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. false))) +λx:Bool. true +λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. true) +(λx:Bool -> Bool. (λy:Bool. true) false) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. true))) +λx:Bool. (λy:Bool. λz:Bool -> Bool -> Bool. true) x (λy:Bool. λz:Bool. true) +λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. true) x +(λx:Bool -> Bool -> Bool. x) ((λx:Bool. λy:Bool. λz:Bool. false) true) +(λx:(Bool -> Bool) -> Bool. x (λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false))) +false +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool. true) false) (λx:Bool -> Bool. x) +λx:Bool -> Bool. x +(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. false) true (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. x)) +(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) (λx:Bool. λy:Bool. false) +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true))) +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false))) +λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. true) x ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. true)) +true +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false (λx:Bool. true) false +false +(λx:Bool. (λy:Bool. false) x) true +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true)) +true +λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. true) true ((λy:Bool. λz:Bool -> Bool. false) true) +(λx:Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. true) false ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true)) ((λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. false) false)) +true +(λx:Bool -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λx:Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) true (λx:Bool -> Bool. x)) +λx:Bool. x +(λx:Bool -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool. true) false) (λx:Bool. λy:Bool. y) +(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) true (λx:Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. false))) +(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool. false)) +true +λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. true) ((λy:Bool. λz:Bool. λw:Bool. false) false) +true +(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool. λz:Bool. false)) false +(λx:Bool. λy:Bool. λz:Bool. false) ((λx:Bool. true) true) false +(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true)) +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) false +(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. false) x) ((λx:Bool -> Bool. false) (λx:Bool. x)) +(λx:Bool -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool. true) false) (λx:Bool. λy:Bool. x) +λx:Bool. λy:Bool. true +(λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool. λz:Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool. true) true)) +false +true +true diff --git a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt new file mode 100644 index 00000000..ed28ba40 --- /dev/null +++ b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt @@ -0,0 +1,200 @@ +(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool. λz:Bool. false)) ((λx:Bool. λy:Bool. true) false ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false))) +(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool. false) false)) +(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. y) ((λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. true) false ((λx:Bool. λy:Bool. false) true)) +(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. true)) (λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. false)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. false) true) (λx:Bool. x) +(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. false)) (λx:Bool. λy:Bool. y) +λx:Bool -> Bool. λy:Bool. (λz:Bool. true) y +λx:Bool -> Bool. λy:Bool. y +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) true) (λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false)) +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. true)) ((λx:Bool -> Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool. false) false)) +(λx:Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. false)) true +(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. false) false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true))) +true +(λx:Bool -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool -> Bool. x true) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. x) (λx:Bool -> Bool. x) +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. λa:Bool. true) false ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false) ((λx:Bool. λy:(Bool -> Bool) -> Bool. false) true (λx:Bool -> Bool. false)) +(λx:Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. λa:Bool. false) true (λx:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false))) +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. true)) (λx:Bool -> Bool. x) +true +false +(λx:Bool -> Bool. (λy:Bool. true) true) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. true) true ((λx:Bool. λy:Bool -> Bool. true) false)) +true +false +(λx:Bool. λy:Bool. λz:Bool. λw:Bool. false) false ((λx:Bool. false) true) false +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true))) +false +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. false) false) (λx:Bool -> Bool. x) +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) true ((λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false))) +false +(λx:(Bool -> Bool) -> Bool. λy:Bool. y) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool. false) false)) +false +(λx:Bool -> Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) true) ((λx:Bool. λy:(Bool -> Bool) -> Bool. true) false ((λx:Bool. λy:Bool -> Bool. false) false)) +λx:Bool -> Bool. x ((λy:Bool. true) false) +λx:Bool -> Bool. x +false +λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λy:Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. true) +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) false (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) false (λx:Bool -> Bool. λy:Bool. true)) +(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true))) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false) ((λx:Bool. λy:Bool. true) false ((λx:Bool. true) false)) +(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool -> Bool. true) false) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) false (λx:Bool -> Bool. λy:Bool. true)) +(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. true)) (λx:Bool -> Bool. false) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false)) ((λx:Bool. x) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true))) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. x) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. false)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true))) +(λx:Bool -> Bool -> Bool. false) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) +(λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool. false) false) true +(λx:Bool. (λy:Bool. λz:Bool -> Bool. false) false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. false) (λx:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. false))) +(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. false) (λx:Bool -> Bool. false) (λx:Bool. x) ((λx:Bool. λy:Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false))) +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) true ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false)) true +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. false) ((λx:Bool. true) true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true)) +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. false) false) (λx:Bool -> Bool. (λy:Bool. λz:Bool. false) false) +(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) false) false +(λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true)) true +(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool. λy:Bool. false) (λx:Bool -> Bool. x) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. true))) +(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) true ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. false)) +(λx:Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) false ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. false)) false +λx:Bool -> Bool. x +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. true) true) (λx:Bool. (λy:Bool. true) x) +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) true ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) false ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false))) +(λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. true) true ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true)) (λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. true)) +λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. true) ((λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. true) (λy:Bool -> Bool. false)) +true +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool -> Bool. false) ((λx:Bool. true) false) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) false ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. λy:Bool. true))) +(λx:Bool -> Bool -> Bool. (λy:Bool. true) false) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. true)) +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. true) ((λx:Bool. λy:Bool. λz:Bool. true) true) (λx:Bool. λy:Bool. x) +(λx:(Bool -> Bool) -> Bool. λy:Bool. y) (λx:Bool -> Bool. (λy:Bool. false) false) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. false)) ((λx:Bool. false) ((λx:Bool. true) true)) +(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. false) (λy:Bool. λz:Bool. false)) (λx:Bool. λy:Bool. false) +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool. λz:Bool. false)) ((λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true))) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) false (λx:Bool -> Bool. true) +(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. false)) false +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool. λz:Bool. true)) (λx:Bool -> Bool. x) +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. false)) +(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool -> Bool. (λy:Bool. false) false) +λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. false) true +λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. false) x +(λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. false))) +λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. false) ((λy:Bool. λz:Bool. λw:Bool. true) true) +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true)) true +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. false) (λy:Bool -> Bool. false) ((λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. false)) +(λx:Bool. x) false +false +λx:Bool. (λy:Bool. λz:Bool. false) true x +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. y) (λx:Bool -> Bool. x) +(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. true) false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. x)) +true +(λx:Bool -> Bool -> Bool. (λy:Bool. λz:Bool. false) false) ((λx:Bool. λy:Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true))) +(λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) ((λx:Bool. λy:Bool. true) false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false))) +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. x) ((λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. true)) +(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. true)) (λx:Bool. λy:Bool. false) +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. true) (λx:Bool -> Bool. false) ((λx:Bool. true) false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. x)) +(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λx:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. false))) +false +(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. true))) +(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool. λz:Bool. true)) ((λx:Bool -> Bool. λy:Bool -> Bool -> Bool. false) (λx:Bool. true) (λx:Bool. λy:Bool. false)) +(λx:Bool. λy:Bool. λz:Bool. true) false +true +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. true)) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool. false) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false))) +λx:Bool -> Bool. x +(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. false)) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. false) (λx:Bool. λy:Bool. true) false) +(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. false)) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool. true) false)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) ((λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool. false) ((λx:Bool. true) false)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. false))) +(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool -> Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. true)) +true +(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool. false)) (λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. false)) +λx:Bool. λy:Bool. true +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. false)) false +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. true)) +true +(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) true ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. λy:Bool. false))) +λx:Bool -> Bool. (λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool. true) (λy:Bool. false) +(λx:Bool. x) false +λx:Bool. λy:Bool. x +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. false))) +(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool. λz:Bool. true)) true +(λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true)) true +(λx:Bool. λy:Bool. λz:Bool. true) false ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. true))) +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. true)) (λx:Bool -> Bool. (λy:Bool -> Bool. λz:Bool. false) (λy:Bool. true)) +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. true))) +(λx:Bool. λy:Bool. λz:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) false +(λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. false)) (λx:Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. true)) +(λx:Bool. λy:Bool. λz:Bool. true) false +(λx:Bool. (λy:Bool. false) false) true +(λx:Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true)) +λx:Bool. false +(λx:Bool. x) true +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. true) true)) +(λx:(Bool -> Bool) -> Bool -> Bool. x) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool. true)) +(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool -> Bool. x) +λx:Bool -> Bool. false +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true ((λx:(Bool -> Bool) -> Bool. λy:Bool. false) (λx:Bool -> Bool. false)) true +(λx:Bool -> Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false)) +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. λy:Bool. false))) +(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. true) ((λx:Bool. λy:Bool. λz:Bool. λw:Bool. false) true ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false))) +λx:Bool -> Bool. true +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. x) true +λx:Bool -> Bool. false +(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. true)) (λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. false)) +(λx:Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. false) true ((λx:Bool. true) true) true +λx:Bool -> Bool. x true +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. false) (λx:Bool -> Bool. true) ((λx:Bool. true) false) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. false) false (λx:Bool -> Bool. λy:Bool. true)) +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. false) true ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. true)) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) true ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false)) +λx:Bool -> Bool. x +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) ((λy:Bool. λz:Bool -> Bool. λw:Bool. true) true) +(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) true ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. λy:Bool. false))) +(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. false))) +true +true +λx:Bool -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) true (λy:Bool -> Bool. λz:Bool. false) +λx:Bool -> Bool. λy:Bool. (λz:Bool -> Bool -> Bool. false) (λz:Bool. λw:Bool. true) +(λx:Bool -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. true) true) (λx:Bool. (λy:Bool -> Bool. λz:Bool. true) (λy:Bool. true)) +(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool -> Bool. false) x) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. true) true)) +true +(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. false) true ((λx:Bool. true) true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) false)) +λx:Bool. λy:Bool. y +(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) ((λx:Bool. λy:Bool. λz:Bool. true) false) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) false (λx:Bool -> Bool. λy:Bool. false)) +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true))) +λx:Bool -> Bool. λy:Bool. (λz:Bool -> Bool -> Bool. true) (λz:Bool. λw:Bool. true) +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false) ((λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool. λz:Bool. false)) +true +λx:Bool -> Bool. x ((λy:Bool. false) true) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. x)) +(λx:Bool. λy:Bool. λz:Bool. false) false ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true)) ((λx:Bool. λy:Bool. false) true ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true))) +false +(λx:Bool. λy:Bool. λz:Bool. true) false false ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false))) +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. x) (λy:Bool -> Bool. true) +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. true) ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. true)) +λx:Bool. λy:Bool. x +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false)) (λx:Bool. λy:Bool. x) +true +(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. false))) +(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true))) +λx:Bool -> Bool. λy:Bool. false +(λx:Bool. (λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. false)) ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false))) +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. true) +(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. true)) (λx:Bool -> Bool. x true) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. true) true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:Bool. λy:Bool -> Bool. false) true)) +λx:Bool. λy:Bool. true +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false)) +(λx:Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. true) true (λx:Bool. λy:Bool. true) (λx:Bool -> Bool. true) +(λx:Bool -> Bool -> Bool. false) (λx:Bool. (λy:Bool. λz:Bool. false) true) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. λy:Bool. false)) (λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. true)) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. false) (λx:Bool. true) (λx:Bool -> Bool. x) +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. x) ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. true)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. false) (λx:Bool. x)) +λx:Bool. λy:Bool. x +(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true)) +(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. λz:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true))) +(λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool. λz:Bool. false) (λy:Bool. true)) ((λx:Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) (λx:Bool. true) ((λx:Bool. λy:Bool. λz:Bool. false) false)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool. true) true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) false)) +false +(λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool -> Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. x)) +(λx:Bool -> Bool -> Bool. x) ((λx:Bool. λy:Bool. λz:Bool. λw:Bool. true) false ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. false))) +(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. λa:Bool. false) (λx:Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. true)) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. false))) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. true)) +(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. false) false)) +true +true +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. true) ((λx:Bool. false) false)) diff --git a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=5,tysz=3/log_param_by_sz=true,epochs=2000.log b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=5,tysz=3/log_param_by_sz=true,epochs=2000.log new file mode 100644 index 00000000..509efbbb --- /dev/null +++ b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=5,tysz=3/log_param_by_sz=true,epochs=2000.log @@ -0,0 +1,15 @@ +2023-12-24T11:39:43.590 +== Config == +INIT_SIZE: 5 +GEN_TYP_SIZE: 3 +PARAMETERIZE_FLIP_GROUPS_BY_SZ: true +EPOCHS: 2000 +DistNat: DistUInt32 +TAG: v3_opt_meta_ad + +Building num_apps(gen_expr(...)) computation graph... + 121.455475375 seconds + +Initial adnodes_of_interest: +Dict("tysz2_gen_type_tbool" => 0.5, "sz4_succ_var" => 0.5, "tysz1_gen_type_tbool" => 0.5, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.5, "sz4_succ_abs" => 0.5, "sz5_succ_var" => 0.5, "sz5_succ_abs" => 0.5, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5, "sz1_succ_app" => 0.5, "sz1_succ_abs" => 0.5, "sz3_succ_abs" => 0.5, "sz3_succ_app" => 0.5, "sz5_succ_app" => 0.5, "sz4_succ_app" => 0.5, "sz2_succ_abs" => 0.5, "sz3_succ_var" => 0.5, "tysz3_gen_type_tbool" => 0.5) +Inferring initial distribution... diff --git a/src/dist/vector.jl b/src/dist/vector.jl index 40fd2490..31a51035 100644 --- a/src/dist/vector.jl +++ b/src/dist/vector.jl @@ -217,9 +217,10 @@ function choice_obs(v::DistVector{T})::Tuple{T, AnyBool} where T end function choice(v::DistVector{T})::T where T - if prob_equals(v.len, DistUInt32(0)) - return dummy(T) + @dice_ite if prob_equals(v.len, DistUInt32(0)) + dummy(T) + else + i = unif(DistUInt32(1), v.len) + prob_getindex(v, i) end - i = unif(DistUInt32(1), v.len) - prob_getindex(v, i) end \ No newline at end of file From 096f0b8702941bbbff6f4246d607ec94b450ee00 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Fri, 12 Jan 2024 20:06:27 -0800 Subject: [PATCH 028/231] approx entropy --- examples/qc/stlc/entropy.jl | 16 +- examples/qc/stlc/entropy_approx.jl | 191 ++ examples/qc/stlc/lib/generator.jl | 86 +- ...ing_curve_param_by_sz=true,epochs=2000.csv | 2001 +++++++++++++++++ .../log_param_by_sz=true,epochs=2000.log | 31 + .../entropy/sz=2,tysz=1/terms_before.txt | 200 ++ ...s_trained_param_by_sz=true,epochs=2000.txt | 200 ++ src/autodiff_pr/train.jl | 4 + 8 files changed, 2684 insertions(+), 45 deletions(-) create mode 100644 examples/qc/stlc/entropy_approx.jl create mode 100644 examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/learning_curve_param_by_sz=true,epochs=2000.csv create mode 100644 examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/log_param_by_sz=true,epochs=2000.log create mode 100644 examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_before.txt create mode 100644 examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_trained_param_by_sz=true,epochs=2000.txt diff --git a/examples/qc/stlc/entropy.jl b/examples/qc/stlc/entropy.jl index 396efde8..c50fd561 100644 --- a/examples/qc/stlc/entropy.jl +++ b/examples/qc/stlc/entropy.jl @@ -116,17 +116,25 @@ to_id = Dict( "Abs" => DistUInt32(4), ) -function collect_terminals(e) +# 99% \x. x ["Var", "Abs"] +# 1% (\x. x) y ["Var", "Var", "Abs", "App"] + +# dist(collect_constructors(e)) +# Var => 0.99 * 1/2 + 0.01 * 2/4 +# Abs => 0.99 * 1/2 + 0.01 * 1/4 +# App => 0.01 * 1/4 + +function collect_constructors(e) match(e, [ "Var" => (i) -> DistVector([to_id["Var"]]), "Boolean" => (b) -> DistVector([to_id["Boolean"]]), - "App" => (f, x) -> prob_append(prob_extend(collect_terminals(f), collect_terminals(x)), to_id["App"]), - "Abs" => (ty, e′) -> prob_append(collect_terminals(e′), to_id["Abs"]), + "App" => (f, x) -> prob_append(prob_extend(collect_constructors(f), collect_constructors(x)), to_id["App"]), + "Abs" => (ty, e′) -> prob_append(collect_constructors(e′), to_id["Abs"]), ]) end random_term = match(e, [ "None" => () -> DistNone(DistUInt32), - "Some" => e -> DistSome(choice(collect_terminals(e))) + "Some" => e -> DistSome(choice(collect_constructors(e))) ]) loss = neg_entropy(random_term, Set([DistSome(i) for i in values(to_id)])) diff --git a/examples/qc/stlc/entropy_approx.jl b/examples/qc/stlc/entropy_approx.jl new file mode 100644 index 00000000..a423076f --- /dev/null +++ b/examples/qc/stlc/entropy_approx.jl @@ -0,0 +1,191 @@ +# Train an STLC generator to have some property (term size or num apps) match a +# specific distribution (linear or uniform). +# +# Saves the distributions and sampled terms before and after training. + +using Dice +include("lib/dist.jl") +include("lib/util.jl") +include("lib/generator.jl") + +############################ +# Config +############################ + +# Specify generator, initial & target distributions +METRIC = "entropy" +INIT_SIZE = 2 # size passed to top call of gen_expr +GEN_TYP_SIZE = 1 # size passed to all calls of gen_type + +# Hyperparams +PARAMETERIZE_FLIP_GROUPS_BY_SZ = true # whether flips at the same code location + # but different sizes can have different + # probabilities +EPOCHS = 2000 # epochs to train for + +LOG_TO_FILE = true + +TAG = "entropy_approx_v01" + +############################ + +# Corresponds to "problem" - generator we are trying to train & desired dist. +# Data within a directory would get plotted on the same graph +OUT_DIR = "examples/qc/stlc/output/$(TAG)/$(METRIC)/sz=$(INIT_SIZE),tysz=$(GEN_TYP_SIZE)" + +# Hyperparams +OUT_FILE_TAG = "param_by_sz=$(PARAMETERIZE_FLIP_GROUPS_BY_SZ),epochs=$(EPOCHS)" + +############################ +# Intro +############################ + +LOG_PATH = joinpath(OUT_DIR, "log_" * OUT_FILE_TAG * ".log") +LEARNING_CURVE_PATH = joinpath(OUT_DIR, "learning_curve_" * OUT_FILE_TAG * ".csv") + +mkpath(OUT_DIR) +io = if LOG_TO_FILE + open(LOG_PATH, "w") +else + stdout +end + +using Dates +t = now() +for io′ in Set([io, stdout]) + println(io′, t) + println(io′, "== Config ==") + println(io′, "INIT_SIZE: $(INIT_SIZE)") + println(io′, "GEN_TYP_SIZE: $(GEN_TYP_SIZE)") + println(io′, "PARAMETERIZE_FLIP_GROUPS_BY_SZ: $(PARAMETERIZE_FLIP_GROUPS_BY_SZ)") + println(io′, "EPOCHS: $(EPOCHS)") + println(io′, "DistNat: $(DistNat)") + println(io′, "TAG: $(TAG)") + println(io′) +end +if LOG_TO_FILE + println("Logging to $(LOG_PATH)") + println() +end + +var_vals = Valuation() +adnodes_of_interest = Dict{String, ADNode}() +function register_weight!(s) + var = Var("$(s)_before_sigmoid") + var_vals[var] = 0 + weight = sigmoid(var) + adnodes_of_interest[s] = weight + weight +end + +function ctor_to_id(ctor) + match(ctor, [ + "Var" => _ -> DistInt32(0) + "Boolean" => _ -> DistInt32(1) + "App" => (_, _) -> DistInt32(2) + "Abs" => (_, _) -> DistInt32(3) + ]) +end + +function opt_ctor_to_id(opt_ctor) + match(opt_ctor, [ + "Some" => ctor_to_id, + "None" => () -> DistInt32(-1), + ]) +end + +generated_constructors = DistInt32[] +function add_ctor(v::DistI{Opt{DistI{Expr}}}) + push!(generated_constructors, opt_ctor_to_id(v)) + v +end + + +println_flush(io, "Building (gen_expr(...)) computation graph...") +generated_constructors = [] +time_build = @elapsed begin + e = gen_expr( + DistNil(DistI{Typ}), + gen_type(GEN_TYP_SIZE, PARAMETERIZE_FLIP_GROUPS_BY_SZ), + INIT_SIZE, + GEN_TYP_SIZE, + PARAMETERIZE_FLIP_GROUPS_BY_SZ, + add_ctor + ) +end +println(io, " $(time_build) seconds") +println(io) + +loss = sum( + neg_entropy(ctor, Set([DistInt32(i) for i in 0:3])) + for ctor in generated_constructors + if begin + sup = support_mixed(ctor) + ct = sum(1 for i in 0:3 if i in sup) + ct > 1 + end +) + +############################ +# Before +############################ + +println(io, "Initial adnodes_of_interest:") +vals = compute(var_vals, values(adnodes_of_interest)) +show(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) +println(io) + + +println_flush(io, "Saving samples...") +time_sample_init = @elapsed with_concrete_ad_flips(var_vals, e) do + save_samples(joinpath(OUT_DIR, "terms_before.txt"), e; io=io) +end +println(io, " $(time_sample_init) seconds") +println(io) + +to_id = Dict( + "Var" => DistUInt32(1), + "Boolean" => DistUInt32(2), + "App" => DistUInt32(3), + "Abs" => DistUInt32(4), +) + + +initial_entropy = compute_mixed(var_vals, -loss) +println(io, "Initial entropy: $(initial_entropy)") +println(io) + +############################ +# Train +############################ + +println_flush(io, "Training...") +time_train = @elapsed learning_curve = train!(var_vals, loss; epochs=EPOCHS, learning_rate=0.003) +println(io, " $(time_train) seconds") +println(io) + +open(LEARNING_CURVE_PATH, "w") do file + for (epoch, logpr) in zip(0:EPOCHS, learning_curve) + println(file, "$(epoch)\t$(logpr)") + end +end + +############################ +# After +############################ + +final_entropy = compute_mixed(var_vals, -loss) +println(io, "Final entropy: $(final_entropy)") +println(io) + +println(io, "Learned adnodes_of_interest:") +vals = compute(var_vals, values(adnodes_of_interest)) +show(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) +println(io) + +println(io, "Saving samples...") +time_sample_final = @elapsed with_concrete_ad_flips(var_vals, e) do + save_samples(joinpath(OUT_DIR, "terms_trained_" * OUT_FILE_TAG * ".txt"), e; io=io) +end +println(io, " $(time_sample_final) seconds") +println(io) diff --git a/examples/qc/stlc/lib/generator.jl b/examples/qc/stlc/lib/generator.jl index cb52f80e..7b89f88c 100644 --- a/examples/qc/stlc/lib/generator.jl +++ b/examples/qc/stlc/lib/generator.jl @@ -48,45 +48,49 @@ function gen_bool() DistBoolean(flip(0.5)) end -function gen_expr(env::Ctx, tau::DistI{Typ}, sz::Integer, gen_typ_sz::Integer, by_sz)::DistI{Opt{DistI{Expr}}} - for_prefix = if by_sz "sz$(sz)_" else "" end - if sz == 0 - backtrack_for(for_prefix * "zero", [ - one_of( - map(DistI{Expr})( - DistVar, - gen_var(env, tau, zero(DistNat), DistNil(DistNat)) - ) - ), - gen_zero(env, tau) - ]) - else - sz′ = sz - 1 - backtrack_for(for_prefix * "succ", [ - # Var - one_of( - map(DistI{Expr})( - DistVar, - gen_var(env, tau, zero(DistNat), DistNil(DistNat)) - ) - ), - # App - begin - T1 = gen_type(gen_typ_sz, by_sz) - bind_opt(gen_expr(env, DistTFun(T1, tau), sz′, gen_typ_sz, by_sz)) do e1 - bind_opt(gen_expr(env, T1, sz′, gen_typ_sz, by_sz)) do e2 - DistSome(DistApp(e1, e2)) - end - end - end, - # Value - match(tau, [ - "TBool" => () -> DistSome(gen_bool()), - "TFun" => (T1, T2) -> - bind_opt(gen_expr(DistCons(T1, env), T2, sz′, gen_typ_sz, by_sz)) do e - DistSome(DistAbs(T1, e)) - end - ]), - ]) - end +function gen_expr(env::Ctx, tau::DistI{Typ}, sz::Integer, gen_typ_sz::Integer, by_sz, track_return)::DistI{Opt{DistI{Expr}}} + track_return( + begin + for_prefix = if by_sz "sz$(sz)_" else "" end + if sz == 0 + backtrack_for(for_prefix * "zero", [ + one_of( + map(DistI{Expr})( + DistVar, + gen_var(env, tau, zero(DistNat), DistNil(DistNat)) + ) + ), + gen_zero(env, tau) + ]) + else + sz′ = sz - 1 + backtrack_for(for_prefix * "succ", [ + # Var + one_of( + map(DistI{Expr})( + DistVar, + gen_var(env, tau, zero(DistNat), DistNil(DistNat)) + ) + ), + # App + begin + T1 = gen_type(gen_typ_sz, by_sz) + bind_opt(gen_expr(env, DistTFun(T1, tau), sz′, gen_typ_sz, by_sz, track_return)) do e1 + bind_opt(gen_expr(env, T1, sz′, gen_typ_sz, by_sz, track_return)) do e2 + DistSome(DistApp(e1, e2)) + end + end + end, + # Value + match(tau, [ + "TBool" => () -> DistSome(gen_bool()), + "TFun" => (T1, T2) -> + bind_opt(gen_expr(DistCons(T1, env), T2, sz′, gen_typ_sz, by_sz, track_return)) do e + DistSome(DistAbs(T1, e)) + end + ]), + ]) + end + end + ) end diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/learning_curve_param_by_sz=true,epochs=2000.csv b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/learning_curve_param_by_sz=true,epochs=2000.csv new file mode 100644 index 00000000..557228d7 --- /dev/null +++ b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/learning_curve_param_by_sz=true,epochs=2000.csv @@ -0,0 +1,2001 @@ +0 NaN +1 NaN +2 NaN +3 NaN +4 NaN +5 NaN +6 NaN +7 NaN +8 NaN +9 NaN +10 NaN +11 NaN +12 NaN +13 NaN +14 NaN +15 NaN +16 NaN +17 NaN +18 NaN +19 NaN +20 NaN +21 NaN +22 NaN +23 NaN +24 NaN +25 NaN +26 NaN +27 NaN +28 NaN +29 NaN +30 NaN +31 NaN +32 NaN +33 NaN +34 NaN +35 NaN +36 NaN +37 NaN +38 NaN +39 NaN +40 NaN +41 NaN +42 NaN +43 NaN +44 NaN +45 NaN +46 NaN +47 NaN +48 NaN +49 NaN +50 NaN +51 NaN +52 NaN +53 NaN +54 NaN +55 NaN +56 NaN +57 NaN +58 NaN +59 NaN +60 NaN +61 NaN +62 NaN +63 NaN +64 NaN +65 NaN +66 NaN +67 NaN +68 NaN +69 NaN +70 NaN +71 NaN +72 NaN +73 NaN +74 NaN +75 NaN +76 NaN +77 NaN +78 NaN +79 NaN +80 NaN +81 NaN +82 NaN +83 NaN +84 NaN +85 NaN +86 NaN +87 NaN +88 NaN +89 NaN +90 NaN +91 NaN +92 NaN +93 NaN +94 NaN +95 NaN +96 NaN +97 NaN +98 NaN +99 NaN +100 NaN +101 NaN +102 NaN +103 NaN +104 NaN +105 NaN +106 NaN +107 NaN +108 NaN +109 NaN +110 NaN +111 NaN +112 NaN +113 NaN +114 NaN +115 NaN +116 NaN +117 NaN +118 NaN +119 NaN +120 NaN +121 NaN +122 NaN +123 NaN +124 NaN +125 NaN +126 NaN +127 NaN +128 NaN +129 NaN +130 NaN +131 NaN +132 NaN +133 NaN +134 NaN +135 NaN +136 NaN +137 NaN +138 NaN +139 NaN +140 NaN +141 NaN +142 NaN +143 NaN +144 NaN +145 NaN +146 NaN +147 NaN +148 NaN +149 NaN +150 NaN +151 NaN +152 NaN +153 NaN +154 NaN +155 NaN +156 NaN +157 NaN +158 NaN +159 NaN +160 NaN +161 NaN +162 NaN +163 NaN +164 NaN +165 NaN +166 NaN +167 NaN +168 NaN +169 NaN +170 NaN +171 NaN +172 NaN +173 NaN +174 NaN +175 NaN +176 NaN +177 NaN +178 NaN +179 NaN +180 NaN +181 NaN +182 NaN +183 NaN +184 NaN +185 NaN +186 NaN +187 NaN +188 NaN +189 NaN +190 NaN +191 NaN +192 NaN +193 NaN +194 NaN +195 NaN +196 NaN +197 NaN +198 NaN +199 NaN +200 NaN +201 NaN +202 NaN +203 NaN +204 NaN +205 NaN +206 NaN +207 NaN +208 NaN +209 NaN +210 NaN +211 NaN +212 NaN +213 NaN +214 NaN +215 NaN +216 NaN +217 NaN +218 NaN +219 NaN +220 NaN +221 NaN +222 NaN +223 NaN +224 NaN +225 NaN +226 NaN +227 NaN +228 NaN +229 NaN +230 NaN +231 NaN +232 NaN +233 NaN +234 NaN +235 NaN +236 NaN +237 NaN +238 NaN +239 NaN +240 NaN +241 NaN +242 NaN +243 NaN +244 NaN +245 NaN +246 NaN +247 NaN +248 NaN +249 NaN +250 NaN +251 NaN +252 NaN +253 NaN +254 NaN +255 NaN +256 NaN +257 NaN +258 NaN +259 NaN +260 NaN +261 NaN +262 NaN +263 NaN +264 NaN +265 NaN +266 NaN +267 NaN +268 NaN +269 NaN +270 NaN +271 NaN +272 NaN +273 NaN +274 NaN +275 NaN +276 NaN +277 NaN +278 NaN +279 NaN +280 NaN +281 NaN +282 NaN +283 NaN +284 NaN +285 NaN +286 NaN +287 NaN +288 NaN +289 NaN +290 NaN +291 NaN +292 NaN +293 NaN +294 NaN +295 NaN +296 NaN +297 NaN +298 NaN +299 NaN +300 NaN +301 NaN +302 NaN +303 NaN +304 NaN +305 NaN +306 NaN +307 NaN +308 NaN +309 NaN +310 NaN +311 NaN +312 NaN +313 NaN +314 NaN +315 NaN +316 NaN +317 NaN +318 NaN +319 NaN +320 NaN +321 NaN +322 NaN +323 NaN +324 NaN +325 NaN +326 NaN +327 NaN +328 NaN +329 NaN +330 NaN +331 NaN +332 NaN +333 NaN +334 NaN +335 NaN +336 NaN +337 NaN +338 NaN +339 NaN +340 NaN +341 NaN +342 NaN +343 NaN +344 NaN +345 NaN +346 NaN +347 NaN +348 NaN +349 NaN +350 NaN +351 NaN +352 NaN +353 NaN +354 NaN +355 NaN +356 NaN +357 NaN +358 NaN +359 NaN +360 NaN +361 NaN +362 NaN +363 NaN +364 NaN +365 NaN +366 NaN +367 NaN +368 NaN +369 NaN +370 NaN +371 NaN +372 NaN +373 NaN +374 NaN +375 NaN +376 NaN +377 NaN +378 NaN +379 NaN +380 NaN +381 NaN +382 NaN +383 NaN +384 NaN +385 NaN +386 NaN +387 NaN +388 NaN +389 NaN +390 NaN +391 NaN +392 NaN +393 NaN +394 NaN +395 NaN +396 NaN +397 NaN +398 NaN +399 NaN +400 NaN +401 NaN +402 NaN +403 NaN +404 NaN +405 NaN +406 NaN +407 NaN +408 NaN +409 NaN +410 NaN +411 NaN +412 NaN +413 NaN +414 NaN +415 NaN +416 NaN +417 NaN +418 NaN +419 NaN +420 NaN +421 NaN +422 NaN +423 NaN +424 NaN +425 NaN +426 NaN +427 NaN +428 NaN +429 NaN +430 NaN +431 NaN +432 NaN +433 NaN +434 NaN +435 NaN +436 NaN +437 NaN +438 NaN +439 NaN +440 NaN +441 NaN +442 NaN +443 NaN +444 NaN +445 NaN +446 NaN +447 NaN +448 NaN +449 NaN +450 NaN +451 NaN +452 NaN +453 NaN +454 NaN +455 NaN +456 NaN +457 NaN +458 NaN +459 NaN +460 NaN +461 NaN +462 NaN +463 NaN +464 NaN +465 NaN +466 NaN +467 NaN +468 NaN +469 NaN +470 NaN +471 NaN +472 NaN +473 NaN +474 NaN +475 NaN +476 NaN +477 NaN +478 NaN +479 NaN +480 NaN +481 NaN +482 NaN +483 NaN +484 NaN +485 NaN +486 NaN +487 NaN +488 NaN +489 NaN +490 NaN +491 NaN +492 NaN +493 NaN +494 NaN +495 NaN +496 NaN +497 NaN +498 NaN +499 NaN +500 NaN +501 NaN +502 NaN +503 NaN +504 NaN +505 NaN +506 NaN +507 NaN +508 NaN +509 NaN +510 NaN +511 NaN +512 NaN +513 NaN +514 NaN +515 NaN +516 NaN +517 NaN +518 NaN +519 NaN +520 NaN +521 NaN +522 NaN +523 NaN +524 NaN +525 NaN +526 NaN +527 NaN +528 NaN +529 NaN +530 NaN +531 NaN +532 NaN +533 NaN +534 NaN +535 NaN +536 NaN +537 NaN +538 NaN +539 NaN +540 NaN +541 NaN +542 NaN +543 NaN +544 NaN +545 NaN +546 NaN +547 NaN +548 NaN +549 NaN +550 NaN +551 NaN +552 NaN +553 NaN +554 NaN +555 NaN +556 NaN +557 NaN +558 NaN +559 NaN +560 NaN +561 NaN +562 NaN +563 NaN +564 NaN +565 NaN +566 NaN +567 NaN +568 NaN +569 NaN +570 NaN +571 NaN +572 NaN +573 NaN +574 NaN +575 NaN +576 NaN +577 NaN +578 NaN +579 NaN +580 NaN +581 NaN +582 NaN +583 NaN +584 NaN +585 NaN +586 NaN +587 NaN +588 NaN +589 NaN +590 NaN +591 NaN +592 NaN +593 NaN +594 NaN +595 NaN +596 NaN +597 NaN +598 NaN +599 NaN +600 NaN +601 NaN +602 NaN +603 NaN +604 NaN +605 NaN +606 NaN +607 NaN +608 NaN +609 NaN +610 NaN +611 NaN +612 NaN +613 NaN +614 NaN +615 NaN +616 NaN +617 NaN +618 NaN +619 NaN +620 NaN +621 NaN +622 NaN +623 NaN +624 NaN +625 NaN +626 NaN +627 NaN +628 NaN +629 NaN +630 NaN +631 NaN +632 NaN +633 NaN +634 NaN +635 NaN +636 NaN +637 NaN +638 NaN +639 NaN +640 NaN +641 NaN +642 NaN +643 NaN +644 NaN +645 NaN +646 NaN +647 NaN +648 NaN +649 NaN +650 NaN +651 NaN +652 NaN +653 NaN +654 NaN +655 NaN +656 NaN +657 NaN +658 NaN +659 NaN +660 NaN +661 NaN +662 NaN +663 NaN +664 NaN +665 NaN +666 NaN +667 NaN +668 NaN +669 NaN +670 NaN +671 NaN +672 NaN +673 NaN +674 NaN +675 NaN +676 NaN +677 NaN +678 NaN +679 NaN +680 NaN +681 NaN +682 NaN +683 NaN +684 NaN +685 NaN +686 NaN +687 NaN +688 NaN +689 NaN +690 NaN +691 NaN +692 NaN +693 NaN +694 NaN +695 NaN +696 NaN +697 NaN +698 NaN +699 NaN +700 NaN +701 NaN +702 NaN +703 NaN +704 NaN +705 NaN +706 NaN +707 NaN +708 NaN +709 NaN +710 NaN +711 NaN +712 NaN +713 NaN +714 NaN +715 NaN +716 NaN +717 NaN +718 NaN +719 NaN +720 NaN +721 NaN +722 NaN +723 NaN +724 NaN +725 NaN +726 NaN +727 NaN +728 NaN +729 NaN +730 NaN +731 NaN +732 NaN +733 NaN +734 NaN +735 NaN +736 NaN +737 NaN +738 NaN +739 NaN +740 NaN +741 NaN +742 NaN +743 NaN +744 NaN +745 NaN +746 NaN +747 NaN +748 NaN +749 NaN +750 NaN +751 NaN +752 NaN +753 NaN +754 NaN +755 NaN +756 NaN +757 NaN +758 NaN +759 NaN +760 NaN +761 NaN +762 NaN +763 NaN +764 NaN +765 NaN +766 NaN +767 NaN +768 NaN +769 NaN +770 NaN +771 NaN +772 NaN +773 NaN +774 NaN +775 NaN +776 NaN +777 NaN +778 NaN +779 NaN +780 NaN +781 NaN +782 NaN +783 NaN +784 NaN +785 NaN +786 NaN +787 NaN +788 NaN +789 NaN +790 NaN +791 NaN +792 NaN +793 NaN +794 NaN +795 NaN +796 NaN +797 NaN +798 NaN +799 NaN +800 NaN +801 NaN +802 NaN +803 NaN +804 NaN +805 NaN +806 NaN +807 NaN +808 NaN +809 NaN +810 NaN +811 NaN +812 NaN +813 NaN +814 NaN +815 NaN +816 NaN +817 NaN +818 NaN +819 NaN +820 NaN +821 NaN +822 NaN +823 NaN +824 NaN +825 NaN +826 NaN +827 NaN +828 NaN +829 NaN +830 NaN +831 NaN +832 NaN +833 NaN +834 NaN +835 NaN +836 NaN +837 NaN +838 NaN +839 NaN +840 NaN +841 NaN +842 NaN +843 NaN +844 NaN +845 NaN +846 NaN +847 NaN +848 NaN +849 NaN +850 NaN +851 NaN +852 NaN +853 NaN +854 NaN +855 NaN +856 NaN +857 NaN +858 NaN +859 NaN +860 NaN +861 NaN +862 NaN +863 NaN +864 NaN +865 NaN +866 NaN +867 NaN +868 NaN +869 NaN +870 NaN +871 NaN +872 NaN +873 NaN +874 NaN +875 NaN +876 NaN +877 NaN +878 NaN +879 NaN +880 NaN +881 NaN +882 NaN +883 NaN +884 NaN +885 NaN +886 NaN +887 NaN +888 NaN +889 NaN +890 NaN +891 NaN +892 NaN +893 NaN +894 NaN +895 NaN +896 NaN +897 NaN +898 NaN +899 NaN +900 NaN +901 NaN +902 NaN +903 NaN +904 NaN +905 NaN +906 NaN +907 NaN +908 NaN +909 NaN +910 NaN +911 NaN +912 NaN +913 NaN +914 NaN +915 NaN +916 NaN +917 NaN +918 NaN +919 NaN +920 NaN +921 NaN +922 NaN +923 NaN +924 NaN +925 NaN +926 NaN +927 NaN +928 NaN +929 NaN +930 NaN +931 NaN +932 NaN +933 NaN +934 NaN +935 NaN +936 NaN +937 NaN +938 NaN +939 NaN +940 NaN +941 NaN +942 NaN +943 NaN +944 NaN +945 NaN +946 NaN +947 NaN +948 NaN +949 NaN +950 NaN +951 NaN +952 NaN +953 NaN +954 NaN +955 NaN +956 NaN +957 NaN +958 NaN +959 NaN +960 NaN +961 NaN +962 NaN +963 NaN +964 NaN +965 NaN +966 NaN +967 NaN +968 NaN +969 NaN +970 NaN +971 NaN +972 NaN +973 NaN +974 NaN +975 NaN +976 NaN +977 NaN +978 NaN +979 NaN +980 NaN +981 NaN +982 NaN +983 NaN +984 NaN +985 NaN +986 NaN +987 NaN +988 NaN +989 NaN +990 NaN +991 NaN +992 NaN +993 NaN +994 NaN +995 NaN +996 NaN +997 NaN +998 NaN +999 NaN +1000 NaN +1001 NaN +1002 NaN +1003 NaN +1004 NaN +1005 NaN +1006 NaN +1007 NaN +1008 NaN +1009 NaN +1010 NaN +1011 NaN +1012 NaN +1013 NaN +1014 NaN +1015 NaN +1016 NaN +1017 NaN +1018 NaN +1019 NaN +1020 NaN +1021 NaN +1022 NaN +1023 NaN +1024 NaN +1025 NaN +1026 NaN +1027 NaN +1028 NaN +1029 NaN +1030 NaN +1031 NaN +1032 NaN +1033 NaN +1034 NaN +1035 NaN +1036 NaN +1037 NaN +1038 NaN +1039 NaN +1040 NaN +1041 NaN +1042 NaN +1043 NaN +1044 NaN +1045 NaN +1046 NaN +1047 NaN +1048 NaN +1049 NaN +1050 NaN +1051 NaN +1052 NaN +1053 NaN +1054 NaN +1055 NaN +1056 NaN +1057 NaN +1058 NaN +1059 NaN +1060 NaN +1061 NaN +1062 NaN +1063 NaN +1064 NaN +1065 NaN +1066 NaN +1067 NaN +1068 NaN +1069 NaN +1070 NaN +1071 NaN +1072 NaN +1073 NaN +1074 NaN +1075 NaN +1076 NaN +1077 NaN +1078 NaN +1079 NaN +1080 NaN +1081 NaN +1082 NaN +1083 NaN +1084 NaN +1085 NaN +1086 NaN +1087 NaN +1088 NaN +1089 NaN +1090 NaN +1091 NaN +1092 NaN +1093 NaN +1094 NaN +1095 NaN +1096 NaN +1097 NaN +1098 NaN +1099 NaN +1100 NaN +1101 NaN +1102 NaN +1103 NaN +1104 NaN +1105 NaN +1106 NaN +1107 NaN +1108 NaN +1109 NaN +1110 NaN +1111 NaN +1112 NaN +1113 NaN +1114 NaN +1115 NaN +1116 NaN +1117 NaN +1118 NaN +1119 NaN +1120 NaN +1121 NaN +1122 NaN +1123 NaN +1124 NaN +1125 NaN +1126 NaN +1127 NaN +1128 NaN +1129 NaN +1130 NaN +1131 NaN +1132 NaN +1133 NaN +1134 NaN +1135 NaN +1136 NaN +1137 NaN +1138 NaN +1139 NaN +1140 NaN +1141 NaN +1142 NaN +1143 NaN +1144 NaN +1145 NaN +1146 NaN +1147 NaN +1148 NaN +1149 NaN +1150 NaN +1151 NaN +1152 NaN +1153 NaN +1154 NaN +1155 NaN +1156 NaN +1157 NaN +1158 NaN +1159 NaN +1160 NaN +1161 NaN +1162 NaN +1163 NaN +1164 NaN +1165 NaN +1166 NaN +1167 NaN +1168 NaN +1169 NaN +1170 NaN +1171 NaN +1172 NaN +1173 NaN +1174 NaN +1175 NaN +1176 NaN +1177 NaN +1178 NaN +1179 NaN +1180 NaN +1181 NaN +1182 NaN +1183 NaN +1184 NaN +1185 NaN +1186 NaN +1187 NaN +1188 NaN +1189 NaN +1190 NaN +1191 NaN +1192 NaN +1193 NaN +1194 NaN +1195 NaN +1196 NaN +1197 NaN +1198 NaN +1199 NaN +1200 NaN +1201 NaN +1202 NaN +1203 NaN +1204 NaN +1205 NaN +1206 NaN +1207 NaN +1208 NaN +1209 NaN +1210 NaN +1211 NaN +1212 NaN +1213 NaN +1214 NaN +1215 NaN +1216 NaN +1217 NaN +1218 NaN +1219 NaN +1220 NaN +1221 NaN +1222 NaN +1223 NaN +1224 NaN +1225 NaN +1226 NaN +1227 NaN +1228 NaN +1229 NaN +1230 NaN +1231 NaN +1232 NaN +1233 NaN +1234 NaN +1235 NaN +1236 NaN +1237 NaN +1238 NaN +1239 NaN +1240 NaN +1241 NaN +1242 NaN +1243 NaN +1244 NaN +1245 NaN +1246 NaN +1247 NaN +1248 NaN +1249 NaN +1250 NaN +1251 NaN +1252 NaN +1253 NaN +1254 NaN +1255 NaN +1256 NaN +1257 NaN +1258 NaN +1259 NaN +1260 NaN +1261 NaN +1262 NaN +1263 NaN +1264 NaN +1265 NaN +1266 NaN +1267 NaN +1268 NaN +1269 NaN +1270 NaN +1271 NaN +1272 NaN +1273 NaN +1274 NaN +1275 NaN +1276 NaN +1277 NaN +1278 NaN +1279 NaN +1280 NaN +1281 NaN +1282 NaN +1283 NaN +1284 NaN +1285 NaN +1286 NaN +1287 NaN +1288 NaN +1289 NaN +1290 NaN +1291 NaN +1292 NaN +1293 NaN +1294 NaN +1295 NaN +1296 NaN +1297 NaN +1298 NaN +1299 NaN +1300 NaN +1301 NaN +1302 NaN +1303 NaN +1304 NaN +1305 NaN +1306 NaN +1307 NaN +1308 NaN +1309 NaN +1310 NaN +1311 NaN +1312 NaN +1313 NaN +1314 NaN +1315 NaN +1316 NaN +1317 NaN +1318 NaN +1319 NaN +1320 NaN +1321 NaN +1322 NaN +1323 NaN +1324 NaN +1325 NaN +1326 NaN +1327 NaN +1328 NaN +1329 NaN +1330 NaN +1331 NaN +1332 NaN +1333 NaN +1334 NaN +1335 NaN +1336 NaN +1337 NaN +1338 NaN +1339 NaN +1340 NaN +1341 NaN +1342 NaN +1343 NaN +1344 NaN +1345 NaN +1346 NaN +1347 NaN +1348 NaN +1349 NaN +1350 NaN +1351 NaN +1352 NaN +1353 NaN +1354 NaN +1355 NaN +1356 NaN +1357 NaN +1358 NaN +1359 NaN +1360 NaN +1361 NaN +1362 NaN +1363 NaN +1364 NaN +1365 NaN +1366 NaN +1367 NaN +1368 NaN +1369 NaN +1370 NaN +1371 NaN +1372 NaN +1373 NaN +1374 NaN +1375 NaN +1376 NaN +1377 NaN +1378 NaN +1379 NaN +1380 NaN +1381 NaN +1382 NaN +1383 NaN +1384 NaN +1385 NaN +1386 NaN +1387 NaN +1388 NaN +1389 NaN +1390 NaN +1391 NaN +1392 NaN +1393 NaN +1394 NaN +1395 NaN +1396 NaN +1397 NaN +1398 NaN +1399 NaN +1400 NaN +1401 NaN +1402 NaN +1403 NaN +1404 NaN +1405 NaN +1406 NaN +1407 NaN +1408 NaN +1409 NaN +1410 NaN +1411 NaN +1412 NaN +1413 NaN +1414 NaN +1415 NaN +1416 NaN +1417 NaN +1418 NaN +1419 NaN +1420 NaN +1421 NaN +1422 NaN +1423 NaN +1424 NaN +1425 NaN +1426 NaN +1427 NaN +1428 NaN +1429 NaN +1430 NaN +1431 NaN +1432 NaN +1433 NaN +1434 NaN +1435 NaN +1436 NaN +1437 NaN +1438 NaN +1439 NaN +1440 NaN +1441 NaN +1442 NaN +1443 NaN +1444 NaN +1445 NaN +1446 NaN +1447 NaN +1448 NaN +1449 NaN +1450 NaN +1451 NaN +1452 NaN +1453 NaN +1454 NaN +1455 NaN +1456 NaN +1457 NaN +1458 NaN +1459 NaN +1460 NaN +1461 NaN +1462 NaN +1463 NaN +1464 NaN +1465 NaN +1466 NaN +1467 NaN +1468 NaN +1469 NaN +1470 NaN +1471 NaN +1472 NaN +1473 NaN +1474 NaN +1475 NaN +1476 NaN +1477 NaN +1478 NaN +1479 NaN +1480 NaN +1481 NaN +1482 NaN +1483 NaN +1484 NaN +1485 NaN +1486 NaN +1487 NaN +1488 NaN +1489 NaN +1490 NaN +1491 NaN +1492 NaN +1493 NaN +1494 NaN +1495 NaN +1496 NaN +1497 NaN +1498 NaN +1499 NaN +1500 NaN +1501 NaN +1502 NaN +1503 NaN +1504 NaN +1505 NaN +1506 NaN +1507 NaN +1508 NaN +1509 NaN +1510 NaN +1511 NaN +1512 NaN +1513 NaN +1514 NaN +1515 NaN +1516 NaN +1517 NaN +1518 NaN +1519 NaN +1520 NaN +1521 NaN +1522 NaN +1523 NaN +1524 NaN +1525 NaN +1526 NaN +1527 NaN +1528 NaN +1529 NaN +1530 NaN +1531 NaN +1532 NaN +1533 NaN +1534 NaN +1535 NaN +1536 NaN +1537 NaN +1538 NaN +1539 NaN +1540 NaN +1541 NaN +1542 NaN +1543 NaN +1544 NaN +1545 NaN +1546 NaN +1547 NaN +1548 NaN +1549 NaN +1550 NaN +1551 NaN +1552 NaN +1553 NaN +1554 NaN +1555 NaN +1556 NaN +1557 NaN +1558 NaN +1559 NaN +1560 NaN +1561 NaN +1562 NaN +1563 NaN +1564 NaN +1565 NaN +1566 NaN +1567 NaN +1568 NaN +1569 NaN +1570 NaN +1571 NaN +1572 NaN +1573 NaN +1574 NaN +1575 NaN +1576 NaN +1577 NaN +1578 NaN +1579 NaN +1580 NaN +1581 NaN +1582 NaN +1583 NaN +1584 NaN +1585 NaN +1586 NaN +1587 NaN +1588 NaN +1589 NaN +1590 NaN +1591 NaN +1592 NaN +1593 NaN +1594 NaN +1595 NaN +1596 NaN +1597 NaN +1598 NaN +1599 NaN +1600 NaN +1601 NaN +1602 NaN +1603 NaN +1604 NaN +1605 NaN +1606 NaN +1607 NaN +1608 NaN +1609 NaN +1610 NaN +1611 NaN +1612 NaN +1613 NaN +1614 NaN +1615 NaN +1616 NaN +1617 NaN +1618 NaN +1619 NaN +1620 NaN +1621 NaN +1622 NaN +1623 NaN +1624 NaN +1625 NaN +1626 NaN +1627 NaN +1628 NaN +1629 NaN +1630 NaN +1631 NaN +1632 NaN +1633 NaN +1634 NaN +1635 NaN +1636 NaN +1637 NaN +1638 NaN +1639 NaN +1640 NaN +1641 NaN +1642 NaN +1643 NaN +1644 NaN +1645 NaN +1646 NaN +1647 NaN +1648 NaN +1649 NaN +1650 NaN +1651 NaN +1652 NaN +1653 NaN +1654 NaN +1655 NaN +1656 NaN +1657 NaN +1658 NaN +1659 NaN +1660 NaN +1661 NaN +1662 NaN +1663 NaN +1664 NaN +1665 NaN +1666 NaN +1667 NaN +1668 NaN +1669 NaN +1670 NaN +1671 NaN +1672 NaN +1673 NaN +1674 NaN +1675 NaN +1676 NaN +1677 NaN +1678 NaN +1679 NaN +1680 NaN +1681 NaN +1682 NaN +1683 NaN +1684 NaN +1685 NaN +1686 NaN +1687 NaN +1688 NaN +1689 NaN +1690 NaN +1691 NaN +1692 NaN +1693 NaN +1694 NaN +1695 NaN +1696 NaN +1697 NaN +1698 NaN +1699 NaN +1700 NaN +1701 NaN +1702 NaN +1703 NaN +1704 NaN +1705 NaN +1706 NaN +1707 NaN +1708 NaN +1709 NaN +1710 NaN +1711 NaN +1712 NaN +1713 NaN +1714 NaN +1715 NaN +1716 NaN +1717 NaN +1718 NaN +1719 NaN +1720 NaN +1721 NaN +1722 NaN +1723 NaN +1724 NaN +1725 NaN +1726 NaN +1727 NaN +1728 NaN +1729 NaN +1730 NaN +1731 NaN +1732 NaN +1733 NaN +1734 NaN +1735 NaN +1736 NaN +1737 NaN +1738 NaN +1739 NaN +1740 NaN +1741 NaN +1742 NaN +1743 NaN +1744 NaN +1745 NaN +1746 NaN +1747 NaN +1748 NaN +1749 NaN +1750 NaN +1751 NaN +1752 NaN +1753 NaN +1754 NaN +1755 NaN +1756 NaN +1757 NaN +1758 NaN +1759 NaN +1760 NaN +1761 NaN +1762 NaN +1763 NaN +1764 NaN +1765 NaN +1766 NaN +1767 NaN +1768 NaN +1769 NaN +1770 NaN +1771 NaN +1772 NaN +1773 NaN +1774 NaN +1775 NaN +1776 NaN +1777 NaN +1778 NaN +1779 NaN +1780 NaN +1781 NaN +1782 NaN +1783 NaN +1784 NaN +1785 NaN +1786 NaN +1787 NaN +1788 NaN +1789 NaN +1790 NaN +1791 NaN +1792 NaN +1793 NaN +1794 NaN +1795 NaN +1796 NaN +1797 NaN +1798 NaN +1799 NaN +1800 NaN +1801 NaN +1802 NaN +1803 NaN +1804 NaN +1805 NaN +1806 NaN +1807 NaN +1808 NaN +1809 NaN +1810 NaN +1811 NaN +1812 NaN +1813 NaN +1814 NaN +1815 NaN +1816 NaN +1817 NaN +1818 NaN +1819 NaN +1820 NaN +1821 NaN +1822 NaN +1823 NaN +1824 NaN +1825 NaN +1826 NaN +1827 NaN +1828 NaN +1829 NaN +1830 NaN +1831 NaN +1832 NaN +1833 NaN +1834 NaN +1835 NaN +1836 NaN +1837 NaN +1838 NaN +1839 NaN +1840 NaN +1841 NaN +1842 NaN +1843 NaN +1844 NaN +1845 NaN +1846 NaN +1847 NaN +1848 NaN +1849 NaN +1850 NaN +1851 NaN +1852 NaN +1853 NaN +1854 NaN +1855 NaN +1856 NaN +1857 NaN +1858 NaN +1859 NaN +1860 NaN +1861 NaN +1862 NaN +1863 NaN +1864 NaN +1865 NaN +1866 NaN +1867 NaN +1868 NaN +1869 NaN +1870 NaN +1871 NaN +1872 NaN +1873 NaN +1874 NaN +1875 NaN +1876 NaN +1877 NaN +1878 NaN +1879 NaN +1880 NaN +1881 NaN +1882 NaN +1883 NaN +1884 NaN +1885 NaN +1886 NaN +1887 NaN +1888 NaN +1889 NaN +1890 NaN +1891 NaN +1892 NaN +1893 NaN +1894 NaN +1895 NaN +1896 NaN +1897 NaN +1898 NaN +1899 NaN +1900 NaN +1901 NaN +1902 NaN +1903 NaN +1904 NaN +1905 NaN +1906 NaN +1907 NaN +1908 NaN +1909 NaN +1910 NaN +1911 NaN +1912 NaN +1913 NaN +1914 NaN +1915 NaN +1916 NaN +1917 NaN +1918 NaN +1919 NaN +1920 NaN +1921 NaN +1922 NaN +1923 NaN +1924 NaN +1925 NaN +1926 NaN +1927 NaN +1928 NaN +1929 NaN +1930 NaN +1931 NaN +1932 NaN +1933 NaN +1934 NaN +1935 NaN +1936 NaN +1937 NaN +1938 NaN +1939 NaN +1940 NaN +1941 NaN +1942 NaN +1943 NaN +1944 NaN +1945 NaN +1946 NaN +1947 NaN +1948 NaN +1949 NaN +1950 NaN +1951 NaN +1952 NaN +1953 NaN +1954 NaN +1955 NaN +1956 NaN +1957 NaN +1958 NaN +1959 NaN +1960 NaN +1961 NaN +1962 NaN +1963 NaN +1964 NaN +1965 NaN +1966 NaN +1967 NaN +1968 NaN +1969 NaN +1970 NaN +1971 NaN +1972 NaN +1973 NaN +1974 NaN +1975 NaN +1976 NaN +1977 NaN +1978 NaN +1979 NaN +1980 NaN +1981 NaN +1982 NaN +1983 NaN +1984 NaN +1985 NaN +1986 NaN +1987 NaN +1988 NaN +1989 NaN +1990 NaN +1991 NaN +1992 NaN +1993 NaN +1994 NaN +1995 NaN +1996 NaN +1997 NaN +1998 NaN +1999 NaN +2000 NaN diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/log_param_by_sz=true,epochs=2000.log b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/log_param_by_sz=true,epochs=2000.log new file mode 100644 index 00000000..7f879e4e --- /dev/null +++ b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/log_param_by_sz=true,epochs=2000.log @@ -0,0 +1,31 @@ +2024-01-12T20:04:08.711 +== Config == +INIT_SIZE: 2 +GEN_TYP_SIZE: 1 +PARAMETERIZE_FLIP_GROUPS_BY_SZ: true +EPOCHS: 2000 +DistNat: DistUInt32 +TAG: entropy_approx_v01 + +Building (gen_expr(...)) computation graph... + 7.221540375 seconds + +Initial adnodes_of_interest: +Dict("sz1_succ_abs" => 0.5, "tysz1_gen_type_tbool" => 0.5, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.5, "sz2_succ_abs" => 0.5, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5, "sz1_succ_app" => 0.5) +Saving samples... +Saved samples to examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_before.txt. + 1.844304333 seconds + +Initial entropy: NaN + +Training... + 2.905164583 seconds + +Final entropy: NaN + +Learned adnodes_of_interest: +Dict("sz1_succ_abs" => 0.5524501787278423, "tysz1_gen_type_tbool" => 0.5403919103189322, "sz0_zero_pr_var2" => 0.5254890263986366, "sz2_succ_app" => 0.4028255954724057, "sz2_succ_abs" => 0.5815814594956497, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.500007314162315, "sz1_succ_app" => 0.44144173842959433) +Saving samples... +Saved samples to examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_trained_param_by_sz=true,epochs=2000.txt. + 0.139626708 seconds + diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_before.txt b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_before.txt new file mode 100644 index 00000000..6fb7b7aa --- /dev/null +++ b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_before.txt @@ -0,0 +1,200 @@ +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool. λy:Bool. false) true) +λx:Bool. x +λx:Bool. x +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) +(λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool. true) true) +λx:Bool. true +λx:Bool. (λy:Bool. true) x +true +true +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. true)) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) (λx:Bool. true) +false +(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) ((λx:Bool. true) true) +(λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool -> Bool. true) (λx:Bool. false)) +true +(λx:Bool. x) true +(λx:Bool. true) false +(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false)) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. true) false) +false +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) false +(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. true) true) +true +λx:Bool. true +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) +λx:Bool. x +λx:Bool. false +λx:Bool. (λy:Bool. false) x +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false ((λx:Bool. λy:Bool. false) true) +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false (λx:Bool. x) +(λx:Bool. x) false +λx:Bool. true +(λx:Bool. λy:Bool. false) true ((λx:Bool -> Bool. false) (λx:Bool. true)) +λx:Bool. false +λx:Bool. (λy:Bool. true) x +false +false +(λx:Bool. true) true +false +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) (λx:Bool. false) +λx:Bool. x +λx:Bool. x +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. true) true) +(λx:Bool. false) true +false +true +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. false) false) +(λx:Bool -> Bool. false) (λx:Bool. x) +false +λx:Bool. true +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +false +λx:Bool. (λy:Bool. true) x +false +false +λx:Bool. false +λx:Bool. true +(λx:Bool. λy:Bool. false) true ((λx:Bool -> Bool. true) (λx:Bool. false)) +(λx:Bool. λy:Bool -> Bool. false) true (λx:Bool. false) +(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. false) true) +(λx:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. true)) +(λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool. false) true) +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) false +(λx:Bool. false) ((λx:Bool. false) true) +(λx:Bool. x) true +(λx:Bool. λy:Bool. λz:Bool. true) true ((λx:Bool -> Bool. false) (λx:Bool. true)) +λx:Bool. (λy:Bool. true) false +true +λx:Bool. (λy:Bool. true) x +true +(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +false +(λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) false +false +(λx:Bool. λy:Bool. true) false false +true +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. x) +(λx:Bool. λy:Bool. true) true +false +(λx:Bool. λy:Bool. true) ((λx:Bool. true) false) +false +true +false +true +(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) +λx:Bool. x +(λx:Bool -> Bool. true) (λx:Bool. x) +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) true +true +λx:Bool. x +false +(λx:Bool. λy:Bool -> Bool. false) false (λx:Bool. x) +(λx:Bool -> Bool. x) (λx:Bool. x) +λx:Bool. x +λx:Bool. false +(λx:Bool. λy:Bool. true) false ((λx:Bool. false) false) +(λx:Bool. true) ((λx:Bool. false) false) +(λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) true) +(λx:Bool. λy:Bool. λz:Bool. true) false true +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) ((λx:Bool. true) true) +(λx:Bool. λy:Bool. false) false ((λx:Bool. true) true) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) (λx:Bool. x) +(λx:Bool -> Bool. false) (λx:Bool. x) +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) +true +λx:Bool. true +λx:Bool. false +(λx:Bool. λy:Bool. true) true true +(λx:Bool. x) true +(λx:Bool. λy:Bool. true) ((λx:Bool. false) true) +λx:Bool. true +(λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +false +(λx:Bool. λy:Bool. true) true ((λx:Bool. false) true) +(λx:Bool. λy:Bool. true) false ((λx:Bool -> Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) true +λx:Bool. x +true +(λx:Bool. λy:Bool. true) ((λx:Bool. false) false) +(λx:Bool. λy:Bool. λz:Bool. false) true false +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool. true) true) +false +(λx:Bool -> Bool. x) (λx:Bool. x) +λx:Bool. x +λx:Bool. true +(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +λx:Bool. x +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +true +(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +(λx:Bool. λy:Bool. false) false +λx:Bool. x +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) +(λx:Bool. λy:Bool. false) true ((λx:Bool -> Bool. false) (λx:Bool. true)) +false +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false (λx:Bool. x) +(λx:Bool. λy:Bool. true) true +(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. false) true) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) (λx:Bool. x) +(λx:Bool. λy:Bool. true) true true +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true ((λx:Bool. λy:Bool. false) true) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) +(λx:Bool. λy:Bool. λz:Bool. false) false false +(λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. true)) +false +true +(λx:Bool. true) true +false +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. false) false) +false +λx:Bool. (λy:Bool. false) false +true +λx:Bool. false +true +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) (λx:Bool. true) +(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +λx:Bool. x +λx:Bool. x +(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) (λx:Bool. x) +(λx:Bool. λy:Bool. false) false +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool. false) false) +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true ((λx:Bool. λy:Bool. false) true) +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) +(λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool. false) false) +(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +λx:Bool. x +(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +true +true +(λx:Bool. λy:Bool. λz:Bool. true) true ((λx:Bool. false) false) +(λx:Bool. λy:Bool. true) true ((λx:Bool. true) false) +false +(λx:Bool. λy:Bool. false) true +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) +(λx:Bool. λy:Bool. λz:Bool. false) false ((λx:Bool -> Bool. true) (λx:Bool. true)) +λx:Bool. false +(λx:Bool. x) ((λx:Bool -> Bool. true) (λx:Bool. false)) +(λx:Bool. λy:Bool. true) false +λx:Bool. false +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. false) false) +false +(λx:Bool. false) ((λx:Bool. true) true) +true +true +(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +false +(λx:Bool. λy:Bool. λz:Bool. false) false ((λx:Bool -> Bool. false) (λx:Bool. true)) +(λx:Bool. λy:Bool. true) true false +(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +λx:Bool. x diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_trained_param_by_sz=true,epochs=2000.txt b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_trained_param_by_sz=true,epochs=2000.txt new file mode 100644 index 00000000..0be5bf08 --- /dev/null +++ b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_trained_param_by_sz=true,epochs=2000.txt @@ -0,0 +1,200 @@ +(λx:Bool. false) ((λx:Bool. false) false) +λx:Bool. true +λx:Bool. x +(λx:Bool -> Bool. true) (λx:Bool. x) +λx:Bool. true +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. false) true) +λx:Bool. (λy:Bool. false) x +(λx:Bool. λy:Bool. true) false ((λx:Bool -> Bool. false) (λx:Bool. true)) +false +λx:Bool. x +true +(λx:Bool. λy:Bool. false) false true +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) +(λx:Bool. false) ((λx:Bool. true) true) +(λx:Bool. λy:Bool -> Bool. false) true (λx:Bool. false) +(λx:Bool. λy:Bool. false) false +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) false +false +false +false +λx:Bool. true +true +(λx:Bool -> Bool. true) (λx:Bool. false) +λx:Bool. (λy:Bool. true) x +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +false +false +λx:Bool. false +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool. λy:Bool. true) true) +λx:Bool. x +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) +false +false +false +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. true) false) +true +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) false +false +(λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) +(λx:Bool. λy:Bool. false) true +false +false +false +(λx:Bool. x) ((λx:Bool. true) true) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. false) false) +(λx:Bool -> Bool. false) (λx:Bool. true) +λx:Bool. x +(λx:Bool -> Bool. x) (λx:Bool. x) +λx:Bool. (λy:Bool. false) x +(λx:Bool -> Bool. x) (λx:Bool. false) +(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +(λx:Bool. x) false +true +λx:Bool. x +true +true +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. x) +λx:Bool. true +false +λx:Bool. x +λx:Bool. true +true +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +false +(λx:Bool. x) true +λx:Bool. true +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) false +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. true)) +(λx:Bool. λy:Bool. λz:Bool. true) true false +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) +false +false +true +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) false +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. false) true) +true +λx:Bool. (λy:Bool. false) false +λx:Bool. x +true +true +true +(λx:Bool. λy:Bool -> Bool. true) false ((λx:Bool. λy:Bool. false) false) +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool. false) false) +λx:Bool. (λy:Bool. false) x +true +(λx:Bool -> Bool. true) (λx:Bool. x) +(λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. true) (λx:Bool. true) +true +false +λx:Bool. false +(λx:Bool. λy:Bool -> Bool. false) true (λx:Bool. false) +true +(λx:Bool. x) false +λx:Bool. false +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) true +λx:Bool. true +(λx:Bool. x) true +false +true +false +(λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) +false +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) false +(λx:Bool. λy:Bool -> Bool. false) true (λx:Bool. false) +true +λx:Bool. x +(λx:Bool. λy:Bool. true) true +false +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +true +λx:Bool. true +λx:Bool. true +(λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) +λx:Bool. true +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +λx:Bool. (λy:Bool. false) x +false +false +λx:Bool. false +λx:Bool. x +(λx:Bool. λy:Bool. true) ((λx:Bool. false) false) +true +false +λx:Bool. (λy:Bool. true) true +false +λx:Bool. (λy:Bool. false) x +λx:Bool. true +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true ((λx:Bool. λy:Bool. false) false) +λx:Bool. x +(λx:Bool. λy:Bool. λz:Bool. false) false true +λx:Bool. (λy:Bool. true) x +true +(λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. true)) +(λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool. true) true) +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) (λx:Bool. x) +(λx:Bool. λy:Bool. false) ((λx:Bool. false) true) +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool. false) false) +(λx:Bool -> Bool. false) (λx:Bool. true) +false +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +λx:Bool. x +true +(λx:Bool. λy:Bool. true) true +λx:Bool. x +true +(λx:Bool. λy:Bool -> Bool. false) false ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) true +λx:Bool. x +λx:Bool. x +true +true +λx:Bool. x +true +false +(λx:Bool. λy:Bool. true) false ((λx:Bool. false) true) +(λx:Bool. false) false +λx:Bool. true +(λx:Bool. λy:Bool. false) false ((λx:Bool -> Bool. false) (λx:Bool. true)) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) +false +λx:Bool. true +(λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. true)) +true +(λx:Bool. λy:Bool -> Bool. false) false ((λx:Bool. λy:Bool. true) true) +(λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool -> Bool. false) (λx:Bool. false)) +(λx:Bool. λy:Bool -> Bool. true) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. false) true) +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. true)) +false +true +(λx:Bool. λy:Bool -> Bool. false) false ((λx:Bool. λy:Bool. false) true) +true +true +false +(λx:Bool -> Bool. x) (λx:Bool. false) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +false +(λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool. false) false) +true +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +false +λx:Bool. false +(λx:Bool. λy:Bool. false) true false +(λx:Bool. λy:Bool. true) false ((λx:Bool -> Bool. false) (λx:Bool. false)) +λx:Bool. false +(λx:Bool. λy:Bool. false) true true +(λx:Bool -> Bool. false) (λx:Bool. false) +false +λx:Bool. true +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) true) +(λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +true +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool. λy:Bool. true) true) +(λx:Bool -> Bool. false) (λx:Bool. false) +true +λx:Bool. x +true +(λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) diff --git a/src/autodiff_pr/train.jl b/src/autodiff_pr/train.jl index c5e4183e..cf4acec0 100644 --- a/src/autodiff_pr/train.jl +++ b/src/autodiff_pr/train.jl @@ -7,6 +7,7 @@ end NodeType(::Type{LogPr}) = Leaf() compute_leaf(::LogPr) = error("LogPr must be expanded") backward(::LogPr, _, _) = error("LogPr must be expanded") +LogPr(b::Bool) = Constant(if b log(1.) else log(0.) end) mutable struct LogPrExpander w::WMC @@ -16,6 +17,9 @@ mutable struct LogPrExpander end end +function expand_logprs(l::LogPrExpander, x::Float64) + Constant(x) +end function expand_logprs(l::LogPrExpander, root::ADNode)::ADNode fl(x::LogPr) = expand_logprs(l, logprob(l.w, x.bool)) fl(x::Var) = x From 96104d6f4d7734ebc3339cbb30509cbe1fb7eb69 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Fri, 12 Jan 2024 20:38:45 -0800 Subject: [PATCH 029/231] show loss --- examples/qc/stlc/entropy_approx.jl | 22 +- ...ing_curve_param_by_sz=true,epochs=2000.csv | 4002 ++++++++--------- .../log_param_by_sz=true,epochs=2000.log | 16 +- .../entropy/sz=2,tysz=1/terms_before.txt | 306 +- ...s_trained_param_by_sz=true,epochs=2000.txt | 260 +- ...ing_curve_param_by_sz=true,epochs=2000.csv | 2001 +++++++++ .../log_param_by_sz=true,epochs=2000.log | 31 + .../entropy/sz=3,tysz=2/terms_before.txt | 200 + ...s_trained_param_by_sz=true,epochs=2000.txt | 200 + src/autodiff_pr/losses.jl | 7 +- 10 files changed, 4750 insertions(+), 2295 deletions(-) create mode 100644 examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv create mode 100644 examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log create mode 100644 examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/terms_before.txt create mode 100644 examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt diff --git a/examples/qc/stlc/entropy_approx.jl b/examples/qc/stlc/entropy_approx.jl index a423076f..d35ca197 100644 --- a/examples/qc/stlc/entropy_approx.jl +++ b/examples/qc/stlc/entropy_approx.jl @@ -116,8 +116,25 @@ end println(io, " $(time_build) seconds") println(io) +ctor = generated_constructors[2] +function neg_entropy2(p::Dist, domain::Set{<:Dist}) + sum(domain) do x + pe = prob_equals(p, x) + if length(support_mixed(pe)) == 1 + Dice.Constant(0) + else + LogPr(pe) * exp(LogPr(pe)) + end + end +end +generated_constructors +# compute_mixed(neg_entropy2()) +compute_mixed(var_vals, LogPr(prob_equals(generated_constructors[end], DistInt32(0)))) +[compute_mixed(var_vals, neg_entropy2(ctor, Set([DistInt32(i) for i in 0:3]))) for ctor in generated_constructors] +prob_equals(ctor, DistInt32(2)) + loss = sum( - neg_entropy(ctor, Set([DistInt32(i) for i in 0:3])) + neg_entropy2(ctor, Set([DistInt32(i) for i in 0:3])) for ctor in generated_constructors if begin sup = support_mixed(ctor) @@ -125,6 +142,7 @@ loss = sum( ct > 1 end ) +compute_mixed(var_vals, loss) ############################ # Before @@ -160,7 +178,7 @@ println(io) ############################ println_flush(io, "Training...") -time_train = @elapsed learning_curve = train!(var_vals, loss; epochs=EPOCHS, learning_rate=0.003) +time_train = @elapsed learning_curve = train!(var_vals, loss; epochs=EPOCHS, learning_rate=0.03) println(io, " $(time_train) seconds") println(io) diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/learning_curve_param_by_sz=true,epochs=2000.csv b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/learning_curve_param_by_sz=true,epochs=2000.csv index 557228d7..260516f7 100644 --- a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/learning_curve_param_by_sz=true,epochs=2000.csv +++ b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/learning_curve_param_by_sz=true,epochs=2000.csv @@ -1,2001 +1,2001 @@ -0 NaN -1 NaN -2 NaN -3 NaN -4 NaN -5 NaN -6 NaN -7 NaN -8 NaN -9 NaN -10 NaN -11 NaN -12 NaN -13 NaN -14 NaN -15 NaN -16 NaN -17 NaN -18 NaN -19 NaN -20 NaN -21 NaN -22 NaN -23 NaN -24 NaN -25 NaN -26 NaN -27 NaN -28 NaN -29 NaN -30 NaN -31 NaN -32 NaN -33 NaN -34 NaN -35 NaN -36 NaN -37 NaN -38 NaN -39 NaN -40 NaN -41 NaN -42 NaN -43 NaN -44 NaN -45 NaN -46 NaN -47 NaN -48 NaN -49 NaN -50 NaN -51 NaN -52 NaN -53 NaN -54 NaN -55 NaN -56 NaN -57 NaN -58 NaN -59 NaN -60 NaN -61 NaN -62 NaN -63 NaN -64 NaN -65 NaN -66 NaN -67 NaN -68 NaN -69 NaN -70 NaN -71 NaN -72 NaN -73 NaN -74 NaN -75 NaN -76 NaN -77 NaN -78 NaN -79 NaN -80 NaN -81 NaN -82 NaN -83 NaN -84 NaN -85 NaN -86 NaN -87 NaN -88 NaN -89 NaN -90 NaN -91 NaN -92 NaN -93 NaN -94 NaN -95 NaN -96 NaN -97 NaN -98 NaN -99 NaN -100 NaN -101 NaN -102 NaN -103 NaN -104 NaN -105 NaN -106 NaN -107 NaN -108 NaN -109 NaN -110 NaN -111 NaN -112 NaN -113 NaN -114 NaN -115 NaN -116 NaN -117 NaN -118 NaN -119 NaN -120 NaN -121 NaN -122 NaN -123 NaN -124 NaN -125 NaN -126 NaN -127 NaN -128 NaN -129 NaN -130 NaN -131 NaN -132 NaN -133 NaN -134 NaN -135 NaN -136 NaN -137 NaN -138 NaN -139 NaN -140 NaN -141 NaN -142 NaN -143 NaN -144 NaN -145 NaN -146 NaN -147 NaN -148 NaN -149 NaN -150 NaN -151 NaN -152 NaN -153 NaN -154 NaN -155 NaN -156 NaN -157 NaN -158 NaN -159 NaN -160 NaN -161 NaN -162 NaN -163 NaN -164 NaN -165 NaN -166 NaN -167 NaN -168 NaN -169 NaN -170 NaN -171 NaN -172 NaN -173 NaN -174 NaN -175 NaN -176 NaN -177 NaN -178 NaN -179 NaN -180 NaN -181 NaN -182 NaN -183 NaN -184 NaN -185 NaN -186 NaN -187 NaN -188 NaN -189 NaN -190 NaN -191 NaN -192 NaN -193 NaN -194 NaN -195 NaN -196 NaN -197 NaN -198 NaN -199 NaN -200 NaN -201 NaN -202 NaN -203 NaN -204 NaN -205 NaN -206 NaN -207 NaN -208 NaN -209 NaN -210 NaN -211 NaN -212 NaN -213 NaN -214 NaN -215 NaN -216 NaN -217 NaN -218 NaN -219 NaN -220 NaN -221 NaN -222 NaN -223 NaN -224 NaN -225 NaN -226 NaN -227 NaN -228 NaN -229 NaN -230 NaN -231 NaN -232 NaN -233 NaN -234 NaN -235 NaN -236 NaN -237 NaN -238 NaN -239 NaN -240 NaN -241 NaN -242 NaN -243 NaN -244 NaN -245 NaN -246 NaN -247 NaN -248 NaN -249 NaN -250 NaN -251 NaN -252 NaN -253 NaN -254 NaN -255 NaN -256 NaN -257 NaN -258 NaN -259 NaN -260 NaN -261 NaN -262 NaN -263 NaN -264 NaN -265 NaN -266 NaN -267 NaN -268 NaN -269 NaN -270 NaN -271 NaN -272 NaN -273 NaN -274 NaN -275 NaN -276 NaN -277 NaN -278 NaN -279 NaN -280 NaN -281 NaN -282 NaN -283 NaN -284 NaN -285 NaN -286 NaN -287 NaN -288 NaN -289 NaN -290 NaN -291 NaN -292 NaN -293 NaN -294 NaN -295 NaN -296 NaN -297 NaN -298 NaN -299 NaN -300 NaN -301 NaN -302 NaN -303 NaN -304 NaN -305 NaN -306 NaN -307 NaN -308 NaN -309 NaN -310 NaN -311 NaN -312 NaN -313 NaN -314 NaN -315 NaN -316 NaN -317 NaN -318 NaN -319 NaN -320 NaN -321 NaN -322 NaN -323 NaN -324 NaN -325 NaN -326 NaN -327 NaN -328 NaN -329 NaN -330 NaN -331 NaN -332 NaN -333 NaN -334 NaN -335 NaN -336 NaN -337 NaN -338 NaN -339 NaN -340 NaN -341 NaN -342 NaN -343 NaN -344 NaN -345 NaN -346 NaN -347 NaN -348 NaN -349 NaN -350 NaN -351 NaN -352 NaN -353 NaN -354 NaN -355 NaN -356 NaN -357 NaN -358 NaN -359 NaN -360 NaN -361 NaN -362 NaN -363 NaN -364 NaN -365 NaN -366 NaN -367 NaN -368 NaN -369 NaN -370 NaN -371 NaN -372 NaN -373 NaN -374 NaN -375 NaN -376 NaN -377 NaN -378 NaN -379 NaN -380 NaN -381 NaN -382 NaN -383 NaN -384 NaN -385 NaN -386 NaN -387 NaN -388 NaN -389 NaN -390 NaN -391 NaN -392 NaN -393 NaN -394 NaN -395 NaN -396 NaN -397 NaN -398 NaN -399 NaN -400 NaN -401 NaN -402 NaN -403 NaN -404 NaN -405 NaN -406 NaN -407 NaN -408 NaN -409 NaN -410 NaN -411 NaN -412 NaN -413 NaN -414 NaN -415 NaN -416 NaN -417 NaN -418 NaN -419 NaN -420 NaN -421 NaN -422 NaN -423 NaN -424 NaN -425 NaN -426 NaN -427 NaN -428 NaN -429 NaN -430 NaN -431 NaN -432 NaN -433 NaN -434 NaN -435 NaN -436 NaN -437 NaN -438 NaN -439 NaN -440 NaN -441 NaN -442 NaN -443 NaN -444 NaN -445 NaN -446 NaN -447 NaN -448 NaN -449 NaN -450 NaN -451 NaN -452 NaN -453 NaN -454 NaN -455 NaN -456 NaN -457 NaN -458 NaN -459 NaN -460 NaN -461 NaN -462 NaN -463 NaN -464 NaN -465 NaN -466 NaN -467 NaN -468 NaN -469 NaN -470 NaN -471 NaN -472 NaN -473 NaN -474 NaN -475 NaN -476 NaN -477 NaN -478 NaN -479 NaN -480 NaN -481 NaN -482 NaN -483 NaN -484 NaN -485 NaN -486 NaN -487 NaN -488 NaN -489 NaN -490 NaN -491 NaN -492 NaN -493 NaN -494 NaN -495 NaN -496 NaN -497 NaN -498 NaN -499 NaN -500 NaN -501 NaN -502 NaN -503 NaN -504 NaN -505 NaN -506 NaN -507 NaN -508 NaN -509 NaN -510 NaN -511 NaN -512 NaN -513 NaN -514 NaN -515 NaN -516 NaN -517 NaN -518 NaN -519 NaN -520 NaN -521 NaN -522 NaN -523 NaN -524 NaN -525 NaN -526 NaN -527 NaN -528 NaN -529 NaN -530 NaN -531 NaN -532 NaN -533 NaN -534 NaN -535 NaN -536 NaN -537 NaN -538 NaN -539 NaN -540 NaN -541 NaN -542 NaN -543 NaN -544 NaN -545 NaN -546 NaN -547 NaN -548 NaN -549 NaN -550 NaN -551 NaN -552 NaN -553 NaN -554 NaN -555 NaN -556 NaN -557 NaN -558 NaN -559 NaN -560 NaN -561 NaN -562 NaN -563 NaN -564 NaN -565 NaN -566 NaN -567 NaN -568 NaN -569 NaN -570 NaN -571 NaN -572 NaN -573 NaN -574 NaN -575 NaN -576 NaN -577 NaN -578 NaN -579 NaN -580 NaN -581 NaN -582 NaN -583 NaN -584 NaN -585 NaN -586 NaN -587 NaN -588 NaN -589 NaN -590 NaN -591 NaN -592 NaN -593 NaN -594 NaN -595 NaN -596 NaN -597 NaN -598 NaN -599 NaN -600 NaN -601 NaN -602 NaN -603 NaN -604 NaN -605 NaN -606 NaN -607 NaN -608 NaN -609 NaN -610 NaN -611 NaN -612 NaN -613 NaN -614 NaN -615 NaN -616 NaN -617 NaN -618 NaN -619 NaN -620 NaN -621 NaN -622 NaN -623 NaN -624 NaN -625 NaN -626 NaN -627 NaN -628 NaN -629 NaN -630 NaN -631 NaN -632 NaN -633 NaN -634 NaN -635 NaN -636 NaN -637 NaN -638 NaN -639 NaN -640 NaN -641 NaN -642 NaN -643 NaN -644 NaN -645 NaN -646 NaN -647 NaN -648 NaN -649 NaN -650 NaN -651 NaN -652 NaN -653 NaN -654 NaN -655 NaN -656 NaN -657 NaN -658 NaN -659 NaN -660 NaN -661 NaN -662 NaN -663 NaN -664 NaN -665 NaN -666 NaN -667 NaN -668 NaN -669 NaN -670 NaN -671 NaN -672 NaN -673 NaN -674 NaN -675 NaN -676 NaN -677 NaN -678 NaN -679 NaN -680 NaN -681 NaN -682 NaN -683 NaN -684 NaN -685 NaN -686 NaN -687 NaN -688 NaN -689 NaN -690 NaN -691 NaN -692 NaN -693 NaN -694 NaN -695 NaN -696 NaN -697 NaN -698 NaN -699 NaN -700 NaN -701 NaN -702 NaN -703 NaN -704 NaN -705 NaN -706 NaN -707 NaN -708 NaN -709 NaN -710 NaN -711 NaN -712 NaN -713 NaN -714 NaN -715 NaN -716 NaN -717 NaN -718 NaN -719 NaN -720 NaN -721 NaN -722 NaN -723 NaN -724 NaN -725 NaN -726 NaN -727 NaN -728 NaN -729 NaN -730 NaN -731 NaN -732 NaN -733 NaN -734 NaN -735 NaN -736 NaN -737 NaN -738 NaN -739 NaN -740 NaN -741 NaN -742 NaN -743 NaN -744 NaN -745 NaN -746 NaN -747 NaN -748 NaN -749 NaN -750 NaN -751 NaN -752 NaN -753 NaN -754 NaN -755 NaN -756 NaN -757 NaN -758 NaN -759 NaN -760 NaN -761 NaN -762 NaN -763 NaN -764 NaN -765 NaN -766 NaN -767 NaN -768 NaN -769 NaN -770 NaN -771 NaN -772 NaN -773 NaN -774 NaN -775 NaN -776 NaN -777 NaN -778 NaN -779 NaN -780 NaN -781 NaN -782 NaN -783 NaN -784 NaN -785 NaN -786 NaN -787 NaN -788 NaN -789 NaN -790 NaN -791 NaN -792 NaN -793 NaN -794 NaN -795 NaN -796 NaN -797 NaN -798 NaN -799 NaN -800 NaN -801 NaN -802 NaN -803 NaN -804 NaN -805 NaN -806 NaN -807 NaN -808 NaN -809 NaN -810 NaN -811 NaN -812 NaN -813 NaN -814 NaN -815 NaN -816 NaN -817 NaN -818 NaN -819 NaN -820 NaN -821 NaN -822 NaN -823 NaN -824 NaN -825 NaN -826 NaN -827 NaN -828 NaN -829 NaN -830 NaN -831 NaN -832 NaN -833 NaN -834 NaN -835 NaN -836 NaN -837 NaN -838 NaN -839 NaN -840 NaN -841 NaN -842 NaN -843 NaN -844 NaN -845 NaN -846 NaN -847 NaN -848 NaN -849 NaN -850 NaN -851 NaN -852 NaN -853 NaN -854 NaN -855 NaN -856 NaN -857 NaN -858 NaN -859 NaN -860 NaN -861 NaN -862 NaN -863 NaN -864 NaN -865 NaN -866 NaN -867 NaN -868 NaN -869 NaN -870 NaN -871 NaN -872 NaN -873 NaN -874 NaN -875 NaN -876 NaN -877 NaN -878 NaN -879 NaN -880 NaN -881 NaN -882 NaN -883 NaN -884 NaN -885 NaN -886 NaN -887 NaN -888 NaN -889 NaN -890 NaN -891 NaN -892 NaN -893 NaN -894 NaN -895 NaN -896 NaN -897 NaN -898 NaN -899 NaN -900 NaN -901 NaN -902 NaN -903 NaN -904 NaN -905 NaN -906 NaN -907 NaN -908 NaN -909 NaN -910 NaN -911 NaN -912 NaN -913 NaN -914 NaN -915 NaN -916 NaN -917 NaN -918 NaN -919 NaN -920 NaN -921 NaN -922 NaN -923 NaN -924 NaN -925 NaN -926 NaN -927 NaN -928 NaN -929 NaN -930 NaN -931 NaN -932 NaN -933 NaN -934 NaN -935 NaN -936 NaN -937 NaN -938 NaN -939 NaN -940 NaN -941 NaN -942 NaN -943 NaN -944 NaN -945 NaN -946 NaN -947 NaN -948 NaN -949 NaN -950 NaN -951 NaN -952 NaN -953 NaN -954 NaN -955 NaN -956 NaN -957 NaN -958 NaN -959 NaN -960 NaN -961 NaN -962 NaN -963 NaN -964 NaN -965 NaN -966 NaN -967 NaN -968 NaN -969 NaN -970 NaN -971 NaN -972 NaN -973 NaN -974 NaN -975 NaN -976 NaN -977 NaN -978 NaN -979 NaN -980 NaN -981 NaN -982 NaN -983 NaN -984 NaN -985 NaN -986 NaN -987 NaN -988 NaN -989 NaN -990 NaN -991 NaN -992 NaN -993 NaN -994 NaN -995 NaN -996 NaN -997 NaN -998 NaN -999 NaN -1000 NaN -1001 NaN -1002 NaN -1003 NaN -1004 NaN -1005 NaN -1006 NaN -1007 NaN -1008 NaN -1009 NaN -1010 NaN -1011 NaN -1012 NaN -1013 NaN -1014 NaN -1015 NaN -1016 NaN -1017 NaN -1018 NaN -1019 NaN -1020 NaN -1021 NaN -1022 NaN -1023 NaN -1024 NaN -1025 NaN -1026 NaN -1027 NaN -1028 NaN -1029 NaN -1030 NaN -1031 NaN -1032 NaN -1033 NaN -1034 NaN -1035 NaN -1036 NaN -1037 NaN -1038 NaN -1039 NaN -1040 NaN -1041 NaN -1042 NaN -1043 NaN -1044 NaN -1045 NaN -1046 NaN -1047 NaN -1048 NaN -1049 NaN -1050 NaN -1051 NaN -1052 NaN -1053 NaN -1054 NaN -1055 NaN -1056 NaN -1057 NaN -1058 NaN -1059 NaN -1060 NaN -1061 NaN -1062 NaN -1063 NaN -1064 NaN -1065 NaN -1066 NaN -1067 NaN -1068 NaN -1069 NaN -1070 NaN -1071 NaN -1072 NaN -1073 NaN -1074 NaN -1075 NaN -1076 NaN -1077 NaN -1078 NaN -1079 NaN -1080 NaN -1081 NaN -1082 NaN -1083 NaN -1084 NaN -1085 NaN -1086 NaN -1087 NaN -1088 NaN -1089 NaN -1090 NaN -1091 NaN -1092 NaN -1093 NaN -1094 NaN -1095 NaN -1096 NaN -1097 NaN -1098 NaN -1099 NaN -1100 NaN -1101 NaN -1102 NaN -1103 NaN -1104 NaN -1105 NaN -1106 NaN -1107 NaN -1108 NaN -1109 NaN -1110 NaN -1111 NaN -1112 NaN -1113 NaN -1114 NaN -1115 NaN -1116 NaN -1117 NaN -1118 NaN -1119 NaN -1120 NaN -1121 NaN -1122 NaN -1123 NaN -1124 NaN -1125 NaN -1126 NaN -1127 NaN -1128 NaN -1129 NaN -1130 NaN -1131 NaN -1132 NaN -1133 NaN -1134 NaN -1135 NaN -1136 NaN -1137 NaN -1138 NaN -1139 NaN -1140 NaN -1141 NaN -1142 NaN -1143 NaN -1144 NaN -1145 NaN -1146 NaN -1147 NaN -1148 NaN -1149 NaN -1150 NaN -1151 NaN -1152 NaN -1153 NaN -1154 NaN -1155 NaN -1156 NaN -1157 NaN -1158 NaN -1159 NaN -1160 NaN -1161 NaN -1162 NaN -1163 NaN -1164 NaN -1165 NaN -1166 NaN -1167 NaN -1168 NaN -1169 NaN -1170 NaN -1171 NaN -1172 NaN -1173 NaN -1174 NaN -1175 NaN -1176 NaN -1177 NaN -1178 NaN -1179 NaN -1180 NaN -1181 NaN -1182 NaN -1183 NaN -1184 NaN -1185 NaN -1186 NaN -1187 NaN -1188 NaN -1189 NaN -1190 NaN -1191 NaN -1192 NaN -1193 NaN -1194 NaN -1195 NaN -1196 NaN -1197 NaN -1198 NaN -1199 NaN -1200 NaN -1201 NaN -1202 NaN -1203 NaN -1204 NaN -1205 NaN -1206 NaN -1207 NaN -1208 NaN -1209 NaN -1210 NaN -1211 NaN -1212 NaN -1213 NaN -1214 NaN -1215 NaN -1216 NaN -1217 NaN -1218 NaN -1219 NaN -1220 NaN -1221 NaN -1222 NaN -1223 NaN -1224 NaN -1225 NaN -1226 NaN -1227 NaN -1228 NaN -1229 NaN -1230 NaN -1231 NaN -1232 NaN -1233 NaN -1234 NaN -1235 NaN -1236 NaN -1237 NaN -1238 NaN -1239 NaN -1240 NaN -1241 NaN -1242 NaN -1243 NaN -1244 NaN -1245 NaN -1246 NaN -1247 NaN -1248 NaN -1249 NaN -1250 NaN -1251 NaN -1252 NaN -1253 NaN -1254 NaN -1255 NaN -1256 NaN -1257 NaN -1258 NaN -1259 NaN -1260 NaN -1261 NaN -1262 NaN -1263 NaN -1264 NaN -1265 NaN -1266 NaN -1267 NaN -1268 NaN -1269 NaN -1270 NaN -1271 NaN -1272 NaN -1273 NaN -1274 NaN -1275 NaN -1276 NaN -1277 NaN -1278 NaN -1279 NaN -1280 NaN -1281 NaN -1282 NaN -1283 NaN -1284 NaN -1285 NaN -1286 NaN -1287 NaN -1288 NaN -1289 NaN -1290 NaN -1291 NaN -1292 NaN -1293 NaN -1294 NaN -1295 NaN -1296 NaN -1297 NaN -1298 NaN -1299 NaN -1300 NaN -1301 NaN -1302 NaN -1303 NaN -1304 NaN -1305 NaN -1306 NaN -1307 NaN -1308 NaN -1309 NaN -1310 NaN -1311 NaN -1312 NaN -1313 NaN -1314 NaN -1315 NaN -1316 NaN -1317 NaN -1318 NaN -1319 NaN -1320 NaN -1321 NaN -1322 NaN -1323 NaN -1324 NaN -1325 NaN -1326 NaN -1327 NaN -1328 NaN -1329 NaN -1330 NaN -1331 NaN -1332 NaN -1333 NaN -1334 NaN -1335 NaN -1336 NaN -1337 NaN -1338 NaN -1339 NaN -1340 NaN -1341 NaN -1342 NaN -1343 NaN -1344 NaN -1345 NaN -1346 NaN -1347 NaN -1348 NaN -1349 NaN -1350 NaN -1351 NaN -1352 NaN -1353 NaN -1354 NaN -1355 NaN -1356 NaN -1357 NaN -1358 NaN -1359 NaN -1360 NaN -1361 NaN -1362 NaN -1363 NaN -1364 NaN -1365 NaN -1366 NaN -1367 NaN -1368 NaN -1369 NaN -1370 NaN -1371 NaN -1372 NaN -1373 NaN -1374 NaN -1375 NaN -1376 NaN -1377 NaN -1378 NaN -1379 NaN -1380 NaN -1381 NaN -1382 NaN -1383 NaN -1384 NaN -1385 NaN -1386 NaN -1387 NaN -1388 NaN -1389 NaN -1390 NaN -1391 NaN -1392 NaN -1393 NaN -1394 NaN -1395 NaN -1396 NaN -1397 NaN -1398 NaN -1399 NaN -1400 NaN -1401 NaN -1402 NaN -1403 NaN -1404 NaN -1405 NaN -1406 NaN -1407 NaN -1408 NaN -1409 NaN -1410 NaN -1411 NaN -1412 NaN -1413 NaN -1414 NaN -1415 NaN -1416 NaN -1417 NaN -1418 NaN -1419 NaN -1420 NaN -1421 NaN -1422 NaN -1423 NaN -1424 NaN -1425 NaN -1426 NaN -1427 NaN -1428 NaN -1429 NaN -1430 NaN -1431 NaN -1432 NaN -1433 NaN -1434 NaN -1435 NaN -1436 NaN -1437 NaN -1438 NaN -1439 NaN -1440 NaN -1441 NaN -1442 NaN -1443 NaN -1444 NaN -1445 NaN -1446 NaN -1447 NaN -1448 NaN -1449 NaN -1450 NaN -1451 NaN -1452 NaN -1453 NaN -1454 NaN -1455 NaN -1456 NaN -1457 NaN -1458 NaN -1459 NaN -1460 NaN -1461 NaN -1462 NaN -1463 NaN -1464 NaN -1465 NaN -1466 NaN -1467 NaN -1468 NaN -1469 NaN -1470 NaN -1471 NaN -1472 NaN -1473 NaN -1474 NaN -1475 NaN -1476 NaN -1477 NaN -1478 NaN -1479 NaN -1480 NaN -1481 NaN -1482 NaN -1483 NaN -1484 NaN -1485 NaN -1486 NaN -1487 NaN -1488 NaN -1489 NaN -1490 NaN -1491 NaN -1492 NaN -1493 NaN -1494 NaN -1495 NaN -1496 NaN -1497 NaN -1498 NaN -1499 NaN -1500 NaN -1501 NaN -1502 NaN -1503 NaN -1504 NaN -1505 NaN -1506 NaN -1507 NaN -1508 NaN -1509 NaN -1510 NaN -1511 NaN -1512 NaN -1513 NaN -1514 NaN -1515 NaN -1516 NaN -1517 NaN -1518 NaN -1519 NaN -1520 NaN -1521 NaN -1522 NaN -1523 NaN -1524 NaN -1525 NaN -1526 NaN -1527 NaN -1528 NaN -1529 NaN -1530 NaN -1531 NaN -1532 NaN -1533 NaN -1534 NaN -1535 NaN -1536 NaN -1537 NaN -1538 NaN -1539 NaN -1540 NaN -1541 NaN -1542 NaN -1543 NaN -1544 NaN -1545 NaN -1546 NaN -1547 NaN -1548 NaN -1549 NaN -1550 NaN -1551 NaN -1552 NaN -1553 NaN -1554 NaN -1555 NaN -1556 NaN -1557 NaN -1558 NaN -1559 NaN -1560 NaN -1561 NaN -1562 NaN -1563 NaN -1564 NaN -1565 NaN -1566 NaN -1567 NaN -1568 NaN -1569 NaN -1570 NaN -1571 NaN -1572 NaN -1573 NaN -1574 NaN -1575 NaN -1576 NaN -1577 NaN -1578 NaN -1579 NaN -1580 NaN -1581 NaN -1582 NaN -1583 NaN -1584 NaN -1585 NaN -1586 NaN -1587 NaN -1588 NaN -1589 NaN -1590 NaN -1591 NaN -1592 NaN -1593 NaN -1594 NaN -1595 NaN -1596 NaN -1597 NaN -1598 NaN -1599 NaN -1600 NaN -1601 NaN -1602 NaN -1603 NaN -1604 NaN -1605 NaN -1606 NaN -1607 NaN -1608 NaN -1609 NaN -1610 NaN -1611 NaN -1612 NaN -1613 NaN -1614 NaN -1615 NaN -1616 NaN -1617 NaN -1618 NaN -1619 NaN -1620 NaN -1621 NaN -1622 NaN -1623 NaN -1624 NaN -1625 NaN -1626 NaN -1627 NaN -1628 NaN -1629 NaN -1630 NaN -1631 NaN -1632 NaN -1633 NaN -1634 NaN -1635 NaN -1636 NaN -1637 NaN -1638 NaN -1639 NaN -1640 NaN -1641 NaN -1642 NaN -1643 NaN -1644 NaN -1645 NaN -1646 NaN -1647 NaN -1648 NaN -1649 NaN -1650 NaN -1651 NaN -1652 NaN -1653 NaN -1654 NaN -1655 NaN -1656 NaN -1657 NaN -1658 NaN -1659 NaN -1660 NaN -1661 NaN -1662 NaN -1663 NaN -1664 NaN -1665 NaN -1666 NaN -1667 NaN -1668 NaN -1669 NaN -1670 NaN -1671 NaN -1672 NaN -1673 NaN -1674 NaN -1675 NaN -1676 NaN -1677 NaN -1678 NaN -1679 NaN -1680 NaN -1681 NaN -1682 NaN -1683 NaN -1684 NaN -1685 NaN -1686 NaN -1687 NaN -1688 NaN -1689 NaN -1690 NaN -1691 NaN -1692 NaN -1693 NaN -1694 NaN -1695 NaN -1696 NaN -1697 NaN -1698 NaN -1699 NaN -1700 NaN -1701 NaN -1702 NaN -1703 NaN -1704 NaN -1705 NaN -1706 NaN -1707 NaN -1708 NaN -1709 NaN -1710 NaN -1711 NaN -1712 NaN -1713 NaN -1714 NaN -1715 NaN -1716 NaN -1717 NaN -1718 NaN -1719 NaN -1720 NaN -1721 NaN -1722 NaN -1723 NaN -1724 NaN -1725 NaN -1726 NaN -1727 NaN -1728 NaN -1729 NaN -1730 NaN -1731 NaN -1732 NaN -1733 NaN -1734 NaN -1735 NaN -1736 NaN -1737 NaN -1738 NaN -1739 NaN -1740 NaN -1741 NaN -1742 NaN -1743 NaN -1744 NaN -1745 NaN -1746 NaN -1747 NaN -1748 NaN -1749 NaN -1750 NaN -1751 NaN -1752 NaN -1753 NaN -1754 NaN -1755 NaN -1756 NaN -1757 NaN -1758 NaN -1759 NaN -1760 NaN -1761 NaN -1762 NaN -1763 NaN -1764 NaN -1765 NaN -1766 NaN -1767 NaN -1768 NaN -1769 NaN -1770 NaN -1771 NaN -1772 NaN -1773 NaN -1774 NaN -1775 NaN -1776 NaN -1777 NaN -1778 NaN -1779 NaN -1780 NaN -1781 NaN -1782 NaN -1783 NaN -1784 NaN -1785 NaN -1786 NaN -1787 NaN -1788 NaN -1789 NaN -1790 NaN -1791 NaN -1792 NaN -1793 NaN -1794 NaN -1795 NaN -1796 NaN -1797 NaN -1798 NaN -1799 NaN -1800 NaN -1801 NaN -1802 NaN -1803 NaN -1804 NaN -1805 NaN -1806 NaN -1807 NaN -1808 NaN -1809 NaN -1810 NaN -1811 NaN -1812 NaN -1813 NaN -1814 NaN -1815 NaN -1816 NaN -1817 NaN -1818 NaN -1819 NaN -1820 NaN -1821 NaN -1822 NaN -1823 NaN -1824 NaN -1825 NaN -1826 NaN -1827 NaN -1828 NaN -1829 NaN -1830 NaN -1831 NaN -1832 NaN -1833 NaN -1834 NaN -1835 NaN -1836 NaN -1837 NaN -1838 NaN -1839 NaN -1840 NaN -1841 NaN -1842 NaN -1843 NaN -1844 NaN -1845 NaN -1846 NaN -1847 NaN -1848 NaN -1849 NaN -1850 NaN -1851 NaN -1852 NaN -1853 NaN -1854 NaN -1855 NaN -1856 NaN -1857 NaN -1858 NaN -1859 NaN -1860 NaN -1861 NaN -1862 NaN -1863 NaN -1864 NaN -1865 NaN -1866 NaN -1867 NaN -1868 NaN -1869 NaN -1870 NaN -1871 NaN -1872 NaN -1873 NaN -1874 NaN -1875 NaN -1876 NaN -1877 NaN -1878 NaN -1879 NaN -1880 NaN -1881 NaN -1882 NaN -1883 NaN -1884 NaN -1885 NaN -1886 NaN -1887 NaN -1888 NaN -1889 NaN -1890 NaN -1891 NaN -1892 NaN -1893 NaN -1894 NaN -1895 NaN -1896 NaN -1897 NaN -1898 NaN -1899 NaN -1900 NaN -1901 NaN -1902 NaN -1903 NaN -1904 NaN -1905 NaN -1906 NaN -1907 NaN -1908 NaN -1909 NaN -1910 NaN -1911 NaN -1912 NaN -1913 NaN -1914 NaN -1915 NaN -1916 NaN -1917 NaN -1918 NaN -1919 NaN -1920 NaN -1921 NaN -1922 NaN -1923 NaN -1924 NaN -1925 NaN -1926 NaN -1927 NaN -1928 NaN -1929 NaN -1930 NaN -1931 NaN -1932 NaN -1933 NaN -1934 NaN -1935 NaN -1936 NaN -1937 NaN -1938 NaN -1939 NaN -1940 NaN -1941 NaN -1942 NaN -1943 NaN -1944 NaN -1945 NaN -1946 NaN -1947 NaN -1948 NaN -1949 NaN -1950 NaN -1951 NaN -1952 NaN -1953 NaN -1954 NaN -1955 NaN -1956 NaN -1957 NaN -1958 NaN -1959 NaN -1960 NaN -1961 NaN -1962 NaN -1963 NaN -1964 NaN -1965 NaN -1966 NaN -1967 NaN -1968 NaN -1969 NaN -1970 NaN -1971 NaN -1972 NaN -1973 NaN -1974 NaN -1975 NaN -1976 NaN -1977 NaN -1978 NaN -1979 NaN -1980 NaN -1981 NaN -1982 NaN -1983 NaN -1984 NaN -1985 NaN -1986 NaN -1987 NaN -1988 NaN -1989 NaN -1990 NaN -1991 NaN -1992 NaN -1993 NaN -1994 NaN -1995 NaN -1996 NaN -1997 NaN -1998 NaN -1999 NaN -2000 NaN +0 -8.072558853466411 +1 -8.074420028242267 +2 -8.07621267169211 +3 -8.077940280375184 +4 -8.079606156892172 +5 -8.081213420458718 +6 -8.082765016963194 +7 -8.084263728525322 +8 -8.085712182572928 +9 -8.087112860454672 +10 -8.088468105606728 +11 -8.089780131291619 +12 -8.091051027927275 +13 -8.09228277002427 +14 -8.093477222748856 +15 -8.094636148129192 +16 -8.095761210921626 +17 -8.096853984153515 +18 -8.097915954358518 +19 -8.098948526519827 +20 -8.099953028736167 +21 -8.100930716624923 +22 -8.101882777476126 +23 -8.102810334170485 +24 -8.10371444887407 +25 -8.10459612652169 +26 -8.105456318100485 +27 -8.106295923744682 +28 -8.107115795651932 +29 -8.107916740831168 +30 -8.108699523691415 +31 -8.109464868480455 +32 -8.110213461581903 +33 -8.110945953678671 +34 -8.111662961790483 +35 -8.112365071192633 +36 -8.11305283722282 +37 -8.113726786982497 +38 -8.11438742093885 +39 -8.11503521443316 +40 -8.115670619100992 +41 -8.116294064209338 +42 -8.11690595791557 +43 -8.117506688452774 +44 -8.11809662524578 +45 -8.118676119961945 +46 -8.119245507500525 +47 -8.119805106924256 +48 -8.12035522233654 +49 -8.120896143707437 +50 -8.121428147651496 +51 -8.121951498160252 +52 -8.122466447292082 +53 -8.122973235821934 +54 -8.123472093853296 +55 -8.123963241394648 +56 -8.124446888902488 +57 -8.12492323779292 +58 -8.125392480923665 +59 -8.125854803048234 +60 -8.126310381243913 +61 -8.126759385315127 +62 -8.127201978173618 +63 -8.127638316196819 +64 -8.128068549565718 +65 -8.128492822583404 +66 -8.128911273975463 +67 -8.129324037173292 +68 -8.129731240581302 +69 -8.130133007829029 +70 -8.130529458008965 +71 -8.130920705901026 +72 -8.131306862184374 +73 -8.131688033637401 +74 -8.13206432332651 +75 -8.132435830784415 +76 -8.132802652178501 +77 -8.13316488046991 +78 -8.133522605563813 +79 -8.133875914451453 +80 -8.134224891344392 +81 -8.134569617801441 +82 -8.1349101728487 +83 -8.135246633093084 +84 -8.135579072829744 +85 -8.13590756414373 +86 -8.136232177006208 +87 -8.136552979365568 +88 -8.136870037233718 +89 -8.137183414767826 +90 -8.137493174347794 +91 -8.137799376649667 +92 -8.13810208071528 +93 -8.138401344018266 +94 -8.138697222526748 +95 -8.138989770762759 +96 -8.13927904185873 +97 -8.139565087611086 +98 -8.139847958531188 +99 -8.140127703893747 +100 -8.140404371782832 +101 -8.140678009135653 +102 -8.1409486617842 +103 -8.141216374494878 +104 -8.141481191006251 +105 -8.141743154064976 +106 -8.142002305460071 +107 -8.14225868605555 +108 -8.14251233582158 +109 -8.142763293864185 +110 -8.143011598453594 +111 -8.14325728705133 +112 -8.143500396336064 +113 -8.143740962228346 +114 -8.143979019914228 +115 -8.144214603867884 +116 -8.144447747873226 +117 -8.144678485044635 +118 -8.144906847846785 +119 -8.145132868113665 +120 -8.145356577066785 +121 -8.145578005332672 +122 -8.145797182959633 +123 -8.146014139433856 +124 -8.14622890369487 +125 -8.146441504150415 +126 -8.146651968690705 +127 -8.146860324702175 +128 -8.1470665990807 +129 -8.147270818244307 +130 -8.147473008145429 +131 -8.147673194282708 +132 -8.147871401712374 +133 -8.148067655059208 +134 -8.148261978527135 +135 -8.148454395909418 +136 -8.14864493059855 +137 -8.148833605595746 +138 -8.14902044352017 +139 -8.149205466617827 +140 -8.149388696770163 +141 -8.149570155502408 +142 -8.149749863991609 +143 -8.149927843074456 +144 -8.150104113254827 +145 -8.150278694711117 +146 -8.15045160730334 +147 -8.150622870580001 +148 -8.15079250378479 +149 -8.150960525863052 +150 -8.151126955468076 +151 -8.15129181096721 +152 -8.151455110447788 +153 -8.151616871722903 +154 -8.151777112336996 +155 -8.15193584957132 +156 -8.152093100449228 +157 -8.15224888174133 +158 -8.152403209970513 +159 -8.152556101416812 +160 -8.152707572122175 +161 -8.152857637895094 +162 -8.153006314315105 +163 -8.153153616737182 +164 -8.153299560296038 +165 -8.153444159910276 +166 -8.153587430286482 +167 -8.15372938592318 +168 -8.153870041114715 +169 -8.154009409955027 +170 -8.154147506341348 +171 -8.154284343977796 +172 -8.154419936378893 +173 -8.154554296872996 +174 -8.154687438605654 +175 -8.154819374542884 +176 -8.154950117474364 +177 -8.155079680016566 +178 -8.155208074615818 +179 -8.155335313551282 +180 -8.155461408937883 +181 -8.155586372729157 +182 -8.15571021672006 +183 -8.155832952549682 +184 -8.155954591703933 +185 -8.15607514551816 +186 -8.156194625179692 +187 -8.15631304173036 +188 -8.156430406068942 +189 -8.156546728953561 +190 -8.156662021004042 +191 -8.156776292704198 +192 -8.156889554404101 +193 -8.157001816322271 +194 -8.157113088547849 +195 -8.157223381042709 +196 -8.157332703643528 +197 -8.157441066063821 +198 -8.157548477895933 +199 -8.157654948612985 +200 -8.157760487570789 +201 -8.157865104009721 +202 -8.157968807056553 +203 -8.158071605726263 +204 -8.158173508923785 +205 -8.158274525445753 +206 -8.158374663982194 +207 -8.15847393311818 +208 -8.158572341335487 +209 -8.158669897014159 +210 -8.158766608434105 +211 -8.158862483776627 +212 -8.158957531125932 +213 -8.15905175847061 +214 -8.159145173705102 +215 -8.159237784631104 +216 -8.15932959895898 +217 -8.15942062430913 +218 -8.159510868213347 +219 -8.159600338116126 +220 -8.159689041375966 +221 -8.159776985266658 +222 -8.159864176978507 +223 -8.159950623619595 +224 -8.160036332216949 +225 -8.16012130971776 +226 -8.160205562990512 +227 -8.160289098826148 +228 -8.160371923939188 +229 -8.160454044968802 +230 -8.160535468479925 +231 -8.1606162009643 +232 -8.160696248841525 +233 -8.160775618460065 +234 -8.160854316098277 +235 -8.160932347965387 +236 -8.161009720202458 +237 -8.161086438883343 +238 -8.161162510015638 +239 -8.161237939541572 +240 -8.16131273333894 +241 -8.161386897221977 +242 -8.161460436942235 +243 -8.161533358189436 +244 -8.161605666592324 +245 -8.161677367719488 +246 -8.16174846708018 +247 -8.16181897012511 +248 -8.161888882247236 +249 -8.16195820878255 +250 -8.162026955010818 +251 -8.16209512615634 +252 -8.162162727388683 +253 -8.162229763823406 +254 -8.162296240522773 +255 -8.162362162496445 +256 -8.16242753470217 +257 -8.162492362046464 +258 -8.162556649385278 +259 -8.162620401524633 +260 -8.162683623221294 +261 -8.162746319183377 +262 -8.162808494070985 +263 -8.162870152496817 +264 -8.162931299026766 +265 -8.162991938180523 +266 -8.163052074432148 +267 -8.163111712210657 +268 -8.163170855900571 +269 -8.163229509842486 +270 -8.163287678333614 +271 -8.16334536562832 +272 -8.163402575938651 +273 -8.163459313434867 +274 -8.163515582245939 +275 -8.163571386460069 +276 -8.163626730125175 +277 -8.16368161724939 +278 -8.16373605180154 +279 -8.163790037711617 +280 -8.163843578871251 +281 -8.163896679134162 +282 -8.163949342316622 +283 -8.164001572197897 +284 -8.164053372520687 +285 -8.164104746991555 +286 -8.164155699281363 +287 -8.164206233025673 +288 -8.164256351825188 +289 -8.164306059246131 +290 -8.164355358820668 +291 -8.164404254047286 +292 -8.164452748391195 +293 -8.164500845284707 +294 -8.16454854812761 +295 -8.164595860287553 +296 -8.164642785100394 +297 -8.164689325870578 +298 -8.164735485871486 +299 -8.16478126834578 +300 -8.164826676505776 +301 -8.164871713533739 +302 -8.164916382582268 +303 -8.164960686774595 +304 -8.165004629204923 +305 -8.165048212938744 +306 -8.165091441013168 +307 -8.165134316437225 +308 -8.165176842192167 +309 -8.165219021231795 +310 -8.165260856482739 +311 -8.16530235084476 +312 -8.165343507191043 +313 -8.165384328368487 +314 -8.165424817197984 +315 -8.165464976474702 +316 -8.165504808968361 +317 -8.165544317423501 +318 -8.16558350455976 +319 -8.165622373072129 +320 -8.165660925631219 +321 -8.165699164883517 +322 -8.165737093451645 +323 -8.165774713934603 +324 -8.165812028908022 +325 -8.165849040924408 +326 -8.165885752513388 +327 -8.165922166181934 +328 -8.165958284414616 +329 -8.165994109673814 +330 -8.166029644399972 +331 -8.166064891011796 +332 -8.166099851906504 +333 -8.16613452946002 +334 -8.166168926027211 +335 -8.166203043942094 +336 -8.16623688551805 +337 -8.16627045304803 +338 -8.166303748804761 +339 -8.166336775040955 +340 -8.166369533989506 +341 -8.166402027863695 +342 -8.166434258857368 +343 -8.166466229145158 +344 -8.166497940882651 +345 -8.166529396206593 +346 -8.166560597235065 +347 -8.166591546067675 +348 -8.166622244785732 +349 -8.166652695452434 +350 -8.166682900113045 +351 -8.166712860795068 +352 -8.166742579508412 +353 -8.16677205824558 +354 -8.166801298981824 +355 -8.166830303675319 +356 -8.166859074267323 +357 -8.166887612682345 +358 -8.166915920828309 +359 -8.16694400059671 +360 -8.166971853862762 +361 -8.166999482485577 +362 -8.1670268883083 +363 -8.167054073158258 +364 -8.167081038847138 +365 -8.1671077871711 +366 -8.167134319910947 +367 -8.167160638832268 +368 -8.167186745685575 +369 -8.167212642206445 +370 -8.16723833011567 +371 -8.167263811119382 +372 -8.167289086909204 +373 -8.167314159162377 +374 -8.167339029541896 +375 -8.167363699696644 +376 -8.16738817126152 +377 -8.167412445857575 +378 -8.167436525092134 +379 -8.167460410558926 +380 -8.16748410383821 +381 -8.167507606496894 +382 -8.167530920088673 +383 -8.167554046154121 +384 -8.167576986220846 +385 -8.167599741803585 +386 -8.167622314404325 +387 -8.167644705512432 +388 -8.167666916604748 +389 -8.167688949145724 +390 -8.16771080458751 +391 -8.167732484370088 +392 -8.167753989921367 +393 -8.167775322657302 +394 -8.167796483981995 +395 -8.167817475287805 +396 -8.167838297955454 +397 -8.167858953354127 +398 -8.167879442841585 +399 -8.167899767764252 +400 -8.167919929457337 +401 -8.167939929244909 +402 -8.167959768440024 +403 -8.167979448344795 +404 -8.167998970250517 +405 -8.168018335437736 +406 -8.168037545176368 +407 -8.168056600725777 +408 -8.16807550333487 +409 -8.168094254242202 +410 -8.168112854676057 +411 -8.168131305854534 +412 -8.168149608985642 +413 -8.168167765267397 +414 -8.168185775887896 +415 -8.168203642025409 +416 -8.16822136484847 +417 -8.168238945515956 +418 -8.168256385177166 +419 -8.168273684971926 +420 -8.16829084603064 +421 -8.168307869474404 +422 -8.168324756415066 +423 -8.16834150795531 +424 -8.168358125188737 +425 -8.16837460919995 +426 -8.168390961064624 +427 -8.168407181849581 +428 -8.168423272612875 +429 -8.168439234403866 +430 -8.16845506826329 +431 -8.16847077522333 +432 -8.168486356307701 +433 -8.16850181253172 +434 -8.168517144902363 +435 -8.168532354418364 +436 -8.168547442070256 +437 -8.168562408840467 +438 -8.168577255703369 +439 -8.168591983625358 +440 -8.16860659356492 +441 -8.168621086472703 +442 -8.168635463291565 +443 -8.168649724956667 +444 -8.168663872395522 +445 -8.168677906528059 +446 -8.168691828266695 +447 -8.168705638516398 +448 -8.168719338174744 +449 -8.168732928131986 +450 -8.168746409271106 +451 -8.168759782467893 +452 -8.168773048590992 +453 -8.168786208501965 +454 -8.16879926305535 +455 -8.168812213098729 +456 -8.168825059472773 +457 -8.168837803011316 +458 -8.1688504445414 +459 -8.16886298488333 +460 -8.168875424850746 +461 -8.168887765250666 +462 -8.168900006883547 +463 -8.16891215054333 +464 -8.168924197017516 +465 -8.168936147087194 +466 -8.168948001527117 +467 -8.16895976110574 +468 -8.168971426585276 +469 -8.168982998721761 +470 -8.168994478265077 +471 -8.169005865959036 +472 -8.16901716254141 +473 -8.169028368743986 +474 -8.169039485292615 +475 -8.169050512907265 +476 -8.169061452302072 +477 -8.16907230418538 +478 -8.169083069259791 +479 -8.16909374822222 +480 -8.169104341763934 +481 -8.169114850570608 +482 -8.169125275322354 +483 -8.16913561669379 +484 -8.16914587535407 +485 -8.169156051966931 +486 -8.16916614719074 +487 -8.169176161678546 +488 -8.16918609607811 +489 -8.169195951031952 +490 -8.169205727177404 +491 -8.169215425146643 +492 -8.169225045566739 +493 -8.169234589059691 +494 -8.169244056242476 +495 -8.169253447727087 +496 -8.16926276412057 +497 -8.169272006025071 +498 -8.169281174037877 +499 -8.169290268751451 +500 -8.16929929075347 +501 -8.169308240626872 +502 -8.169317118949891 +503 -8.169325926296093 +504 -8.169334663234421 +505 -8.169343330329221 +506 -8.169351928140294 +507 -8.169360457222929 +508 -8.169368918127931 +509 -8.169377311401664 +510 -8.169385637586096 +511 -8.169393897218816 +512 -8.169402090833092 +513 -8.169410218957886 +514 -8.169418282117899 +515 -8.16942628083361 +516 -8.169434215621305 +517 -8.169442086993103 +518 -8.169449895457008 +519 -8.169457641516933 +520 -8.16946532567273 +521 -8.169472948420225 +522 -8.169480510251258 +523 -8.169488011653709 +524 -8.169495453111528 +525 -8.169502835104776 +526 -8.169510158109645 +527 -8.169517422598503 +528 -8.169524629039909 +529 -8.169531777898662 +530 -8.169538869635813 +531 -8.169545904708716 +532 -8.16955288357104 +533 -8.169559806672803 +534 -8.169566674460414 +535 -8.169573487376686 +536 -8.169580245860875 +537 -8.169586950348704 +538 -8.169593601272394 +539 -8.1696001990607 +540 -8.169606744138918 +541 -8.169613236928937 +542 -8.169619677849251 +543 -8.169626067314994 +544 -8.169632405737966 +545 -8.169638693526654 +546 -8.169644931086271 +547 -8.16965111881877 +548 -8.169657257122875 +549 -8.169663346394117 +550 -8.169669387024836 +551 -8.169675379404234 +552 -8.169681323918388 +553 -8.169687220950262 +554 -8.169693070879765 +555 -8.169698874083743 +556 -8.169704630936016 +557 -8.169710341807415 +558 -8.169716007065784 +559 -8.16972162707602 +560 -8.16972720220009 +561 -8.169732732797058 +562 -8.16973821922311 +563 -8.169743661831566 +564 -8.169749060972913 +565 -8.169754416994834 +566 -8.169759730242218 +567 -8.169765001057183 +568 -8.169770229779113 +569 -8.16977541674466 +570 -8.169780562287784 +571 -8.169785666739758 +572 -8.169790730429208 +573 -8.169795753682113 +574 -8.169800736821855 +575 -8.169805680169206 +576 -8.169810584042379 +577 -8.169815448757026 +578 -8.169820274626273 +579 -8.169825061960736 +580 -8.169829811068544 +581 -8.16983452225535 +582 -8.169839195824359 +583 -8.169843832076346 +584 -8.16984843130968 +585 -8.169852993820328 +586 -8.169857519901898 +587 -8.169862009845636 +588 -8.16986646394046 +589 -8.169870882472964 +590 -8.169875265727457 +591 -8.169879613985962 +592 -8.169883927528247 +593 -8.169888206631835 +594 -8.169892451572027 +595 -8.169896662621918 +596 -8.169900840052417 +597 -8.169904984132264 +598 -8.169909095128041 +599 -8.1699131733042 +600 -8.169917218923072 +601 -8.169921232244889 +602 -8.169925213527796 +603 -8.16992916302787 +604 -8.169933080999144 +605 -8.169936967693605 +606 -8.169940823361237 +607 -8.16994464825001 +608 -8.169948442605913 +609 -8.169952206672964 +610 -8.169955940693228 +611 -8.169959644906832 +612 -8.16996331955198 +613 -8.16996696486497 +614 -8.16997058108021 +615 -8.169974168430223 +616 -8.169977727145682 +617 -8.169981257455403 +618 -8.169984759586374 +619 -8.169988233763771 +620 -8.169991680210963 +621 -8.16999509914953 +622 -8.16999849079928 +623 -8.170001855378265 +624 -8.170005193102782 +625 -8.170008504187408 +626 -8.170011788844995 +627 -8.170015047286698 +628 -8.170018279721976 +629 -8.170021486358616 +630 -8.170024667402739 +631 -8.170027823058817 +632 -8.17003095352969 +633 -8.170034059016569 +634 -8.17003713971906 +635 -8.170040195835167 +636 -8.170043227561314 +637 -8.170046235092348 +638 -8.170049218621566 +639 -8.17005217834071 +640 -8.170055114439991 +641 -8.170058027108098 +642 -8.170060916532211 +643 -8.170063782898012 +644 -8.1700666263897 +645 -8.170069447189992 +646 -8.170072245480156 +647 -8.170075021439999 +648 -8.170077775247895 +649 -8.170080507080794 +650 -8.17008321711422 +651 -8.170085905522303 +652 -8.170088572477777 +653 -8.170091218151995 +654 -8.17009384271494 +655 -8.170096446335227 +656 -8.170099029180136 +657 -8.170101591415602 +658 -8.170104133206234 +659 -8.17010665471532 +660 -8.170109156104852 +661 -8.170111637535513 +662 -8.170114099166716 +663 -8.170116541156588 +664 -8.170118963661995 +665 -8.170121366838549 +666 -8.170123750840618 +667 -8.170126115821335 +668 -8.170128461932608 +669 -8.170130789325132 +670 -8.170133098148394 +671 -8.170135388550687 +672 -8.170137660679123 +673 -8.170139914679625 +674 -8.170142150696964 +675 -8.170144368874748 +676 -8.170146569355435 +677 -8.17014875228034 +678 -8.170150917789657 +679 -8.170153066022458 +680 -8.170155197116694 +681 -8.170157311209223 +682 -8.170159408435804 +683 -8.170161488931116 +684 -8.170163552828752 +685 -8.170165600261244 +686 -8.170167631360066 +687 -8.170169646255632 +688 -8.170171645077321 +689 -8.17017362795348 +690 -8.170175595011422 +691 -8.170177546377445 +692 -8.170179482176843 +693 -8.170181402533904 +694 -8.17018330757192 +695 -8.170185197413199 +696 -8.170187072179075 +697 -8.170188931989912 +698 -8.170190776965104 +699 -8.1701926072231 +700 -8.1701944228814 +701 -8.170196224056559 +702 -8.170198010864208 +703 -8.17019978341905 +704 -8.170201541834874 +705 -8.170203286224554 +706 -8.170205016700068 +707 -8.170206733372495 +708 -8.170208436352029 +709 -8.170210125747982 +710 -8.170211801668792 +711 -8.170213464222028 +712 -8.17021511351441 +713 -8.170216749651791 +714 -8.170218372739187 +715 -8.170219982880772 +716 -8.170221580179888 +717 -8.170223164739049 +718 -8.170224736659954 +719 -8.170226296043486 +720 -8.170227842989723 +721 -8.170229377597947 +722 -8.170230899966638 +723 -8.170232410193499 +724 -8.170233908375442 +725 -8.170235394608612 +726 -8.170236868988384 +727 -8.170238331609374 +728 -8.170239782565435 +729 -8.170241221949675 +730 -8.170242649854458 +731 -8.170244066371406 +732 -8.170245471591414 +733 -8.17024686560465 +734 -8.170248248500556 +735 -8.17024962036787 +736 -8.17025098129461 +737 -8.170252331368097 +738 -8.170253670674953 +739 -8.170254999301106 +740 -8.170256317331802 +741 -8.170257624851605 +742 -8.170258921944395 +743 -8.170260208693396 +744 -8.170261485181156 +745 -8.170262751489567 +746 -8.17026400769987 +747 -8.170265253892651 +748 -8.170266490147858 +749 -8.170267716544796 +750 -8.170268933162141 +751 -8.170270140077935 +752 -8.1702713373696 +753 -8.170272525113939 +754 -8.170273703387142 +755 -8.17027487226479 +756 -8.170276031821857 +757 -8.170277182132725 +758 -8.170278323271178 +759 -8.17027945531041 +760 -8.17028057832303 +761 -8.170281692381069 +762 -8.17028279755598 +763 -8.170283893918654 +764 -8.1702849815394 +765 -8.170286060487978 +766 -8.17028713083359 +767 -8.170288192644877 +768 -8.17028924598994 +769 -8.170290290936332 +770 -8.170291327551073 +771 -8.170292355900637 +772 -8.170293376050973 +773 -8.170294388067505 +774 -8.17029539201513 +775 -8.170296387958233 +776 -8.170297375960677 +777 -8.170298356085821 +778 -8.170299328396515 +779 -8.17030029295511 +780 -8.170301249823453 +781 -8.170302199062904 +782 -8.17030314073433 +783 -8.170304074898112 +784 -8.17030500161415 +785 -8.17030592094186 +786 -8.170306832940193 +787 -8.170307737667624 +788 -8.170308635182156 +789 -8.170309525541343 +790 -8.170310408802262 +791 -8.17031128502155 +792 -8.170312154255377 +793 -8.17031301655948 +794 -8.170313871989135 +795 -8.170314720599192 +796 -8.170315562444053 +797 -8.170316397577686 +798 -8.170317226053632 +799 -8.170318047925004 +800 -8.17031886324449 +801 -8.170319672064355 +802 -8.17032047443645 +803 -8.170321270412211 +804 -8.170322060042661 +805 -8.17032284337842 +806 -8.170323620469702 +807 -8.170324391366318 +808 -8.170325156117684 +809 -8.17032591477282 +810 -8.170326667380355 +811 -8.17032741398853 +812 -8.1703281546452 +813 -8.17032888939784 +814 -8.170329618293545 +815 -8.170330341379032 +816 -8.170331058700645 +817 -8.170331770304363 +818 -8.170332476235794 +819 -8.170333176540181 +820 -8.170333871262407 +821 -8.170334560447003 +822 -8.170335244138132 +823 -8.17033592237961 +824 -8.17033659521491 +825 -8.170337262687147 +826 -8.170337924839101 +827 -8.170338581713203 +828 -8.170339233351552 +829 -8.170339879795906 +830 -8.17034052108769 +831 -8.170341157268002 +832 -8.170341788377609 +833 -8.170342414456954 +834 -8.170343035546153 +835 -8.170343651685009 +836 -8.170344262913003 +837 -8.1703448692693 +838 -8.170345470792755 +839 -8.170346067521908 +840 -8.170346659495001 +841 -8.170347246749959 +842 -8.170347829324413 +843 -8.170348407255691 +844 -8.17034898058082 +845 -8.170349549336537 +846 -8.170350113559284 +847 -8.170350673285208 +848 -8.17035122855017 +849 -8.17035177938975 +850 -8.170352325839236 +851 -8.170352867933635 +852 -8.170353405707683 +853 -8.17035393919583 +854 -8.170354468432256 +855 -8.170354993450866 +856 -8.170355514285294 +857 -8.170356030968907 +858 -8.170356543534805 +859 -8.170357052015824 +860 -8.170357556444536 +861 -8.170358056853258 +862 -8.170358553274045 +863 -8.170359045738698 +864 -8.170359534278761 +865 -8.17036001892553 +866 -8.170360499710052 +867 -8.17036097666312 +868 -8.170361449815289 +869 -8.170361919196868 +870 -8.170362384837919 +871 -8.17036284676827 +872 -8.170363305017506 +873 -8.170363759614983 +874 -8.170364210589817 +875 -8.170364657970893 +876 -8.170365101786865 +877 -8.17036554206616 +878 -8.170365978836976 +879 -8.17036641212729 +880 -8.17036684196485 +881 -8.170367268377188 +882 -8.170367691391611 +883 -8.170368111035215 +884 -8.170368527334873 +885 -8.170368940317246 +886 -8.170369350008784 +887 -8.170369756435726 +888 -8.170370159624097 +889 -8.170370559599721 +890 -8.17037095638821 +891 -8.170371350014975 +892 -8.170371740505226 +893 -8.170372127883963 +894 -8.170372512176 +895 -8.170372893405943 +896 -8.170373271598201 +897 -8.170373646777001 +898 -8.17037401896636 +899 -8.170374388190112 +900 -8.170374754471899 +901 -8.170375117835178 +902 -8.170375478303217 +903 -8.170375835899094 +904 -8.170376190645708 +905 -8.170376542565775 +906 -8.170376891681823 +907 -8.17037723801621 +908 -8.170377581591111 +909 -8.170377922428527 +910 -8.170378260550276 +911 -8.17037859597801 +912 -8.170378928733202 +913 -8.170379258837162 +914 -8.170379586311018 +915 -8.170379911175742 +916 -8.170380233452132 +917 -8.170380553160816 +918 -8.17038087032227 +919 -8.170381184956794 +920 -8.170381497084534 +921 -8.170381806725471 +922 -8.170382113899427 +923 -8.17038241862607 +924 -8.17038272092491 +925 -8.170383020815292 +926 -8.170383318316418 +927 -8.170383613447335 +928 -8.170383906226936 +929 -8.170384196673961 +930 -8.170384484807004 +931 -8.170384770644509 +932 -8.170385054204777 +933 -8.170385335505955 +934 -8.170385614566051 +935 -8.17038589140293 +936 -8.170386166034312 +937 -8.170386438477772 +938 -8.170386708750756 +939 -8.170386976870562 +940 -8.17038724285435 +941 -8.170387506719145 +942 -8.170387768481838 +943 -8.170388028159184 +944 -8.170388285767803 +945 -8.170388541324183 +946 -8.170388794844683 +947 -8.17038904634553 +948 -8.170389295842817 +949 -8.170389543352513 +950 -8.170389788890466 +951 -8.170390032472383 +952 -8.17039027411386 +953 -8.170390513830359 +954 -8.170390751637223 +955 -8.17039098754967 +956 -8.1703912215828 +957 -8.170391453751591 +958 -8.170391684070903 +959 -8.170391912555473 +960 -8.170392139219922 +961 -8.170392364078761 +962 -8.170392587146377 +963 -8.170392808437047 +964 -8.170393027964929 +965 -8.170393245744075 +966 -8.170393461788422 +967 -8.170393676111791 +968 -8.1703938887279 +969 -8.170394099650357 +970 -8.170394308892657 +971 -8.17039451646819 +972 -8.170394722390236 +973 -8.17039492667198 +974 -8.170395129326485 +975 -8.170395330366725 +976 -8.170395529805559 +977 -8.170395727655752 +978 -8.170395923929965 +979 -8.170396118640753 +980 -8.17039631180058 +981 -8.1703965034218 +982 -8.170396693516679 +983 -8.170396882097377 +984 -8.17039706917596 +985 -8.1703972547644 +986 -8.170397438874572 +987 -8.170397621518253 +988 -8.17039780270713 +989 -8.170397982452798 +990 -8.170398160766755 +991 -8.17039833766041 +992 -8.17039851314508 +993 -8.170398687231996 +994 -8.170398859932293 +995 -8.170399031257018 +996 -8.170399201217139 +997 -8.17039936982352 +998 -8.170399537086956 +999 -8.170399703018145 +1000 -8.170399867627701 +1001 -8.17040003092616 +1002 -8.170400192923962 +1003 -8.170400353631479 +1004 -8.170400513058985 +1005 -8.170400671216681 +1006 -8.170400828114687 +1007 -8.170400983763036 +1008 -8.170401138171693 +1009 -8.170401291350528 +1010 -8.170401443309343 +1011 -8.170401594057857 +1012 -8.17040174360572 +1013 -8.17040189196249 +1014 -8.17040203913766 +1015 -8.170402185140649 +1016 -8.170402329980789 +1017 -8.170402473667354 +1018 -8.170402616209527 +1019 -8.17040275761643 +1020 -8.170402897897109 +1021 -8.170403037060535 +1022 -8.17040317511561 +1023 -8.170403312071166 +1024 -8.170403447935962 +1025 -8.17040358271869 +1026 -8.17040371642797 +1027 -8.170403849072354 +1028 -8.170403980660328 +1029 -8.170404111200305 +1030 -8.17040424070064 +1031 -8.170404369169614 +1032 -8.17040449661544 +1033 -8.170404623046274 +1034 -8.170404748470201 +1035 -8.170404872895242 +1036 -8.170404996329356 +1037 -8.170405118780442 +1038 -8.170405240256324 +1039 -8.170405360764775 +1040 -8.170405480313505 +1041 -8.170405598910154 +1042 -8.170405716562312 +1043 -8.170405833277501 +1044 -8.170405949063188 +1045 -8.170406063926775 +1046 -8.17040617787561 +1047 -8.170406290916981 +1048 -8.170406403058113 +1049 -8.170406514306183 +1050 -8.170406624668304 +1051 -8.170406734151534 +1052 -8.170406842762874 +1053 -8.170406950509273 +1054 -8.170407057397615 +1055 -8.170407163434742 +1056 -8.17040726862743 +1057 -8.17040737298241 +1058 -8.170407476506355 +1059 -8.170407579205882 +1060 -8.17040768108756 +1061 -8.170407782157907 +1062 -8.170407882423383 +1063 -8.170407981890401 +1064 -8.170408080565322 +1065 -8.170408178454455 +1066 -8.170408275564057 +1067 -8.170408371900342 +1068 -8.17040846746947 +1069 -8.17040856227755 +1070 -8.170408656330647 +1071 -8.170408749634772 +1072 -8.170408842195894 +1073 -8.170408934019928 +1074 -8.170409025112749 +1075 -8.170409115480181 +1076 -8.170409205128001 +1077 -8.170409294061944 +1078 -8.170409382287692 +1079 -8.170409469810892 +1080 -8.170409556637136 +1081 -8.170409642771974 +1082 -8.170409728220918 +1083 -8.170409812989428 +1084 -8.17040989708293 +1085 -8.170409980506793 +1086 -8.170410063266356 +1087 -8.170410145366908 +1088 -8.170410226813699 +1089 -8.170410307611938 +1090 -8.170410387766788 +1091 -8.170410467283377 +1092 -8.170410546166785 +1093 -8.17041062442206 +1094 -8.170410702054204 +1095 -8.170410779068176 +1096 -8.170410855468905 +1097 -8.170410931261273 +1098 -8.170411006450129 +1099 -8.170411081040276 +1100 -8.170411155036485 +1101 -8.170411228443484 +1102 -8.17041130126597 +1103 -8.170411373508596 +1104 -8.170411445175983 +1105 -8.170411516272708 +1106 -8.170411586803322 +1107 -8.17041165677233 +1108 -8.170411726184208 +1109 -8.17041179504339 +1110 -8.170411863354282 +1111 -8.170411931121247 +1112 -8.170411998348621 +1113 -8.1704120650407 +1114 -8.170412131201749 +1115 -8.170412196835994 +1116 -8.17041226194763 +1117 -8.170412326540827 +1118 -8.170412390619708 +1119 -8.170412454188368 +1120 -8.170412517250877 +1121 -8.170412579811261 +1122 -8.170412641873522 +1123 -8.170412703441624 +1124 -8.170412764519506 +1125 -8.170412825111072 +1126 -8.170412885220193 +1127 -8.170412944850714 +1128 -8.170413004006443 +1129 -8.170413062691166 +1130 -8.170413120908634 +1131 -8.170413178662562 +1132 -8.170413235956648 +1133 -8.170413292794553 +1134 -8.170413349179912 +1135 -8.170413405116323 +1136 -8.170413460607367 +1137 -8.170413515656588 +1138 -8.170413570267506 +1139 -8.170413624443613 +1140 -8.17041367818837 +1141 -8.170413731505212 +1142 -8.170413784397548 +1143 -8.17041383686876 +1144 -8.170413888922198 +1145 -8.170413940561195 +1146 -8.170413991789045 +1147 -8.170414042609028 +1148 -8.170414093024386 +1149 -8.170414143038348 +1150 -8.170414192654107 +1151 -8.170414241874834 +1152 -8.170414290703675 +1153 -8.170414339143754 +1154 -8.170414387198162 +1155 -8.170414434869976 +1156 -8.170414482162238 +1157 -8.170414529077973 +1158 -8.17041457562018 +1159 -8.17041462179183 +1160 -8.170414667595878 +1161 -8.170414713035251 +1162 -8.170414758112852 +1163 -8.170414802831562 +1164 -8.170414847194237 +1165 -8.170414891203718 +1166 -8.170414934862814 +1167 -8.170414978174314 +1168 -8.170415021140988 +1169 -8.170415063765581 +1170 -8.170415106050818 +1171 -8.170415147999401 +1172 -8.170415189614012 +1173 -8.170415230897307 +1174 -8.170415271851928 +1175 -8.170415312480493 +1176 -8.170415352785595 +1177 -8.170415392769812 +1178 -8.170415432435698 +1179 -8.170415471785788 +1180 -8.1704155108226 +1181 -8.170415549548624 +1182 -8.170415587966337 +1183 -8.170415626078194 +1184 -8.170415663886633 +1185 -8.170415701394067 +1186 -8.170415738602891 +1187 -8.170415775515487 +1188 -8.170415812134213 +1189 -8.170415848461408 +1190 -8.170415884499393 +1191 -8.170415920250473 +1192 -8.170415955716932 +1193 -8.170415990901034 +1194 -8.17041602580503 +1195 -8.170416060431151 +1196 -8.170416094781608 +1197 -8.170416128858594 +1198 -8.170416162664294 +1199 -8.17041619620086 +1200 -8.170416229470439 +1201 -8.170416262475156 +1202 -8.170416295217121 +1203 -8.170416327698426 +1204 -8.170416359921143 +1205 -8.170416391887338 +1206 -8.170416423599049 +1207 -8.170416455058302 +1208 -8.170416486267108 +1209 -8.170416517227462 +1210 -8.170416547941343 +1211 -8.170416578410709 +1212 -8.170416608637515 +1213 -8.170416638623685 +1214 -8.17041666837114 +1215 -8.170416697881777 +1216 -8.170416727157484 +1217 -8.170416756200131 +1218 -8.170416785011572 +1219 -8.17041681359365 +1220 -8.170416841948194 +1221 -8.170416870077009 +1222 -8.170416897981898 +1223 -8.170416925664641 +1224 -8.170416953127006 +1225 -8.170416980370753 +1226 -8.170417007397617 +1227 -8.170417034209327 +1228 -8.170417060807598 +1229 -8.170417087194124 +1230 -8.170417113370597 +1231 -8.170417139338687 +1232 -8.170417165100051 +1233 -8.170417190656341 +1234 -8.170417216009184 +1235 -8.170417241160203 +1236 -8.170417266111002 +1237 -8.170417290863178 +1238 -8.170417315418312 +1239 -8.170417339777972 +1240 -8.170417363943715 +1241 -8.170417387917084 +1242 -8.17041741169961 +1243 -8.170417435292816 +1244 -8.170417458698207 +1245 -8.170417481917278 +1246 -8.170417504951514 +1247 -8.170417527802385 +1248 -8.170417550471353 +1249 -8.170417572959863 +1250 -8.170417595269356 +1251 -8.170417617401252 +1252 -8.17041763935697 +1253 -8.170417661137911 +1254 -8.170417682745466 +1255 -8.170417704181014 +1256 -8.170417725445928 +1257 -8.170417746541567 +1258 -8.170417767469273 +1259 -8.170417788230388 +1260 -8.170417808826237 +1261 -8.170417829258135 +1262 -8.170417849527388 +1263 -8.170417869635292 +1264 -8.17041788958313 +1265 -8.170417909372176 +1266 -8.170417929003696 +1267 -8.170417948478944 +1268 -8.170417967799162 +1269 -8.170417986965587 +1270 -8.170418005979444 +1271 -8.170418024841943 +1272 -8.170418043554292 +1273 -8.17041806211769 +1274 -8.170418080533317 +1275 -8.170418098802351 +1276 -8.170418116925962 +1277 -8.170418134905304 +1278 -8.170418152741528 +1279 -8.170418170435772 +1280 -8.170418187989167 +1281 -8.170418205402834 +1282 -8.170418222677888 +1283 -8.17041823981543 +1284 -8.170418256816552 +1285 -8.170418273682346 +1286 -8.170418290413885 +1287 -8.170418307012241 +1288 -8.170418323478472 +1289 -8.170418339813631 +1290 -8.17041835601876 +1291 -8.170418372094899 +1292 -8.170418388043068 +1293 -8.17041840386429 +1294 -8.170418419559574 +1295 -8.170418435129925 +1296 -8.170418450576335 +1297 -8.170418465899791 +1298 -8.170418481101274 +1299 -8.170418496181753 +1300 -8.170418511142191 +1301 -8.170418525983546 +1302 -8.170418540706764 +1303 -8.170418555312787 +1304 -8.170418569802548 +1305 -8.170418584176968 +1306 -8.170418598436973 +1307 -8.170418612583468 +1308 -8.170418626617357 +1309 -8.170418640539541 +1310 -8.170418654350906 +1311 -8.170418668052331 +1312 -8.170418681644696 +1313 -8.17041869512887 +1314 -8.17041870850571 +1315 -8.170418721776073 +1316 -8.170418734940807 +1317 -8.170418748000753 +1318 -8.170418760956744 +1319 -8.170418773809608 +1320 -8.170418786560166 +1321 -8.170418799209232 +1322 -8.170418811757614 +1323 -8.170418824206115 +1324 -8.170418836555529 +1325 -8.170418848806644 +1326 -8.170418860960243 +1327 -8.170418873017104 +1328 -8.170418884977995 +1329 -8.170418896843682 +1330 -8.170418908614922 +1331 -8.170418920292464 +1332 -8.170418931877059 +1333 -8.170418943369443 +1334 -8.170418954770351 +1335 -8.170418966080515 +1336 -8.17041897730065 +1337 -8.170418988431479 +1338 -8.17041899947371 +1339 -8.17041901042805 +1340 -8.170419021295196 +1341 -8.170419032075847 +1342 -8.170419042770686 +1343 -8.170419053380398 +1344 -8.170419063905662 +1345 -8.170419074347148 +1346 -8.170419084705527 +1347 -8.170419094981456 +1348 -8.170419105175593 +1349 -8.17041911528859 +1350 -8.170419125321093 +1351 -8.170419135273741 +1352 -8.170419145147171 +1353 -8.170419154942014 +1354 -8.170419164658894 +1355 -8.170419174298434 +1356 -8.170419183861245 +1357 -8.170419193347943 +1358 -8.170419202759133 +1359 -8.170419212095414 +1360 -8.170419221357381 +1361 -8.17041923054563 +1362 -8.170419239660745 +1363 -8.170419248703311 +1364 -8.170419257673903 +1365 -8.170419266573091 +1366 -8.17041927540145 +1367 -8.170419284159538 +1368 -8.17041929284792 +1369 -8.170419301467144 +1370 -8.170419310017767 +1371 -8.17041931850033 +1372 -8.170419326915379 +1373 -8.170419335263448 +1374 -8.170419343545074 +1375 -8.170419351760783 +1376 -8.1704193599111 +1377 -8.170419367996546 +1378 -8.170419376017637 +1379 -8.170419383974886 +1380 -8.170419391868801 +1381 -8.170419399699886 +1382 -8.170419407468641 +1383 -8.17041941517556 +1384 -8.17041942282114 +1385 -8.170419430405865 +1386 -8.170419437930223 +1387 -8.17041944539469 +1388 -8.170419452799749 +1389 -8.170419460145867 +1390 -8.170419467433517 +1391 -8.17041947466316 +1392 -8.170419481835262 +1393 -8.17041948895028 +1394 -8.17041949600867 +1395 -8.170419503010876 +1396 -8.170419509957355 +1397 -8.170419516848543 +1398 -8.170419523684883 +1399 -8.17041953046681 +1400 -8.17041953719476 +1401 -8.17041954386916 +1402 -8.17041955049044 +1403 -8.170419557059018 +1404 -8.170419563575315 +1405 -8.170419570039751 +1406 -8.170419576452733 +1407 -8.170419582814674 +1408 -8.170419589125979 +1409 -8.170419595387052 +1410 -8.170419601598292 +1411 -8.170419607760097 +1412 -8.170419613872859 +1413 -8.170419619936968 +1414 -8.170419625952814 +1415 -8.170419631920778 +1416 -8.170419637841242 +1417 -8.170419643714586 +1418 -8.170419649541184 +1419 -8.170419655321407 +1420 -8.170419661055625 +1421 -8.170419666744204 +1422 -8.170419672387508 +1423 -8.170419677985896 +1424 -8.170419683539727 +1425 -8.170419689049352 +1426 -8.170419694515129 +1427 -8.170419699937405 +1428 -8.170419705316522 +1429 -8.170419710652826 +1430 -8.170419715946661 +1431 -8.170419721198362 +1432 -8.170419726408264 +1433 -8.1704197315767 +1434 -8.170419736704002 +1435 -8.170419741790496 +1436 -8.170419746836506 +1437 -8.170419751842354 +1438 -8.170419756808363 +1439 -8.170419761734847 +1440 -8.170419766622121 +1441 -8.170419771470497 +1442 -8.170419776280287 +1443 -8.170419781051795 +1444 -8.170419785785327 +1445 -8.170419790481185 +1446 -8.17041979513967 +1447 -8.170419799761078 +1448 -8.170419804345705 +1449 -8.170419808893843 +1450 -8.170419813405784 +1451 -8.170419817881815 +1452 -8.17041982232222 +1453 -8.170419826727287 +1454 -8.170419831097293 +1455 -8.170419835432519 +1456 -8.17041983973324 +1457 -8.170419843999733 +1458 -8.170419848232271 +1459 -8.170419852431124 +1460 -8.170419856596556 +1461 -8.170419860728838 +1462 -8.170419864828231 +1463 -8.170419868895 +1464 -8.170419872929399 +1465 -8.17041987693169 +1466 -8.170419880902129 +1467 -8.170419884840967 +1468 -8.170419888748457 +1469 -8.170419892624848 +1470 -8.170419896470387 +1471 -8.170419900285323 +1472 -8.170419904069893 +1473 -8.170419907824344 +1474 -8.170419911548915 +1475 -8.170419915243842 +1476 -8.170419918909364 +1477 -8.17041992254571 +1478 -8.170419926153116 +1479 -8.170419929731814 +1480 -8.170419933282027 +1481 -8.170419936803988 +1482 -8.170419940297917 +1483 -8.17041994376404 +1484 -8.170419947202573 +1485 -8.170419950613745 +1486 -8.170419953997765 +1487 -8.170419957354856 +1488 -8.170419960685226 +1489 -8.170419963989092 +1490 -8.170419967266662 +1491 -8.17041997051815 +1492 -8.170419973743757 +1493 -8.170419976943695 +1494 -8.170419980118163 +1495 -8.17041998326737 +1496 -8.17041998639151 +1497 -8.170419989490789 +1498 -8.1704199925654 +1499 -8.170419995615543 +1500 -8.17041999864141 +1501 -8.170420001643196 +1502 -8.170420004621091 +1503 -8.170420007575286 +1504 -8.170420010505971 +1505 -8.17042001341333 +1506 -8.17042001629755 +1507 -8.170420019158819 +1508 -8.170420021997316 +1509 -8.17042002481322 +1510 -8.170420027606715 +1511 -8.170420030377976 +1512 -8.170420033127183 +1513 -8.170420035854509 +1514 -8.17042003856013 +1515 -8.17042004124422 +1516 -8.170420043906946 +1517 -8.170420046548482 +1518 -8.170420049168992 +1519 -8.170420051768652 +1520 -8.17042005434762 +1521 -8.17042005690606 +1522 -8.170420059444142 +1523 -8.170420061962027 +1524 -8.170420064459869 +1525 -8.170420066937833 +1526 -8.170420069396076 +1527 -8.170420071834755 +1528 -8.170420074254027 +1529 -8.170420076654043 +1530 -8.170420079034962 +1531 -8.170420081396928 +1532 -8.1704200837401 +1533 -8.170420086064622 +1534 -8.170420088370646 +1535 -8.170420090658315 +1536 -8.170420092927777 +1537 -8.17042009517918 +1538 -8.170420097412666 +1539 -8.170420099628375 +1540 -8.170420101826451 +1541 -8.170420104007034 +1542 -8.170420106170262 +1543 -8.170420108316275 +1544 -8.17042011044521 +1545 -8.1704201125572 +1546 -8.170420114652384 +1547 -8.17042011673089 +1548 -8.170420118792856 +1549 -8.170420120838411 +1550 -8.170420122867691 +1551 -8.170420124880819 +1552 -8.170420126877922 +1553 -8.170420128859135 +1554 -8.170420130824578 +1555 -8.170420132774382 +1556 -8.17042013470867 +1557 -8.170420136627559 +1558 -8.170420138531181 +1559 -8.170420140419651 +1560 -8.170420142293093 +1561 -8.170420144151624 +1562 -8.170420145995367 +1563 -8.170420147824434 +1564 -8.170420149638945 +1565 -8.170420151439014 +1566 -8.170420153224761 +1567 -8.170420154996295 +1568 -8.17042015675373 +1569 -8.17042015849718 +1570 -8.170420160226753 +1571 -8.170420161942562 +1572 -8.170420163644717 +1573 -8.170420165333326 +1574 -8.170420167008494 +1575 -8.170420168670333 +1576 -8.170420170318945 +1577 -8.170420171954436 +1578 -8.170420173576913 +1579 -8.170420175186477 +1580 -8.170420176783233 +1581 -8.17042017836728 +1582 -8.170420179938722 +1583 -8.170420181497656 +1584 -8.170420183044186 +1585 -8.170420184578406 +1586 -8.170420186100415 +1587 -8.170420187610315 +1588 -8.170420189108198 +1589 -8.170420190594161 +1590 -8.170420192068296 +1591 -8.170420193530699 +1592 -8.170420194981466 +1593 -8.170420196420686 +1594 -8.170420197848452 +1595 -8.170420199264857 +1596 -8.170420200669989 +1597 -8.170420202063939 +1598 -8.170420203446795 +1599 -8.170420204818646 +1600 -8.17042020617958 +1601 -8.170420207529684 +1602 -8.170420208869041 +1603 -8.170420210197742 +1604 -8.170420211515866 +1605 -8.170420212823503 +1606 -8.170420214120732 +1607 -8.170420215407638 +1608 -8.1704202166843 +1609 -8.170420217950804 +1610 -8.17042021920723 +1611 -8.170420220453655 +1612 -8.170420221690161 +1613 -8.170420222916828 +1614 -8.170420224133732 +1615 -8.170420225340953 +1616 -8.170420226538566 +1617 -8.170420227726646 +1618 -8.170420228905273 +1619 -8.170420230074521 +1620 -8.170420231234461 +1621 -8.170420232385172 +1622 -8.170420233526727 +1623 -8.170420234659193 +1624 -8.17042023578265 +1625 -8.170420236897167 +1626 -8.170420238002812 +1627 -8.17042023909966 +1628 -8.170420240187777 +1629 -8.170420241267237 +1630 -8.170420242338105 +1631 -8.17042024340045 +1632 -8.170420244454343 +1633 -8.170420245499848 +1634 -8.17042024653703 +1635 -8.17042024756596 +1636 -8.170420248586703 +1637 -8.170420249599323 +1638 -8.170420250603883 +1639 -8.17042025160045 +1640 -8.170420252589084 +1641 -8.170420253569851 +1642 -8.170420254542814 +1643 -8.170420255508034 +1644 -8.170420256465569 +1645 -8.170420257415488 +1646 -8.170420258357847 +1647 -8.170420259292705 +1648 -8.170420260220125 +1649 -8.170420261140162 +1650 -8.170420262052879 +1651 -8.170420262958332 +1652 -8.170420263856581 +1653 -8.17042026474768 +1654 -8.170420265631687 +1655 -8.17042026650866 +1656 -8.170420267378656 +1657 -8.170420268241724 +1658 -8.170420269097928 +1659 -8.170420269947314 +1660 -8.170420270789943 +1661 -8.170420271625867 +1662 -8.170420272455138 +1663 -8.17042027327781 +1664 -8.170420274093933 +1665 -8.170420274903563 +1666 -8.170420275706748 +1667 -8.170420276503544 +1668 -8.170420277293998 +1669 -8.170420278078161 +1670 -8.170420278856085 +1671 -8.170420279627816 +1672 -8.170420280393408 +1673 -8.170420281152907 +1674 -8.17042028190636 +1675 -8.170420282653817 +1676 -8.170420283395327 +1677 -8.170420284130936 +1678 -8.17042028486069 +1679 -8.170420285584637 +1680 -8.170420286302823 +1681 -8.170420287015293 +1682 -8.170420287722095 +1683 -8.170420288423271 +1684 -8.170420289118868 +1685 -8.170420289808927 +1686 -8.170420290493498 +1687 -8.170420291172618 +1688 -8.170420291846334 +1689 -8.17042029251469 +1690 -8.170420293177727 +1691 -8.170420293835488 +1692 -8.170420294488013 +1693 -8.170420295135346 +1694 -8.170420295777527 +1695 -8.170420296414598 +1696 -8.170420297046599 +1697 -8.17042029767357 +1698 -8.170420298295554 +1699 -8.170420298912587 +1700 -8.170420299524707 +1701 -8.17042030013196 +1702 -8.170420300734378 +1703 -8.170420301332001 +1704 -8.170420301924871 +1705 -8.170420302513019 +1706 -8.170420303096492 +1707 -8.170420303675318 +1708 -8.170420304249536 +1709 -8.170420304819189 +1710 -8.170420305384308 +1711 -8.170420305944926 +1712 -8.170420306501086 +1713 -8.170420307052819 +1714 -8.170420307600162 +1715 -8.170420308143148 +1716 -8.170420308681814 +1717 -8.170420309216194 +1718 -8.17042030974632 +1719 -8.17042031027223 +1720 -8.17042031079395 +1721 -8.170420311311522 +1722 -8.170420311824973 +1723 -8.17042031233434 +1724 -8.170420312839651 +1725 -8.170420313340943 +1726 -8.170420313838246 +1727 -8.17042031433159 +1728 -8.170420314821008 +1729 -8.170420315306531 +1730 -8.170420315788192 +1731 -8.170420316266018 +1732 -8.170420316740044 +1733 -8.170420317210295 +1734 -8.170420317676806 +1735 -8.170420318139602 +1736 -8.170420318598719 +1737 -8.17042031905418 +1738 -8.170420319506016 +1739 -8.170420319954257 +1740 -8.17042032039893 +1741 -8.170420320840066 +1742 -8.17042032127769 +1743 -8.170420321711832 +1744 -8.170420322142519 +1745 -8.17042032256978 +1746 -8.17042032299364 +1747 -8.170420323414127 +1748 -8.17042032383127 +1749 -8.170420324245088 +1750 -8.170420324655616 +1751 -8.170420325062876 +1752 -8.170420325466898 +1753 -8.170420325867703 +1754 -8.170420326265317 +1755 -8.17042032665977 +1756 -8.170420327051081 +1757 -8.17042032743928 +1758 -8.170420327824388 +1759 -8.170420328206433 +1760 -8.170420328585438 +1761 -8.170420328961423 +1762 -8.170420329334421 +1763 -8.170420329704449 +1764 -8.170420330071533 +1765 -8.170420330435693 +1766 -8.170420330796958 +1767 -8.170420331155348 +1768 -8.170420331510885 +1769 -8.170420331863593 +1770 -8.170420332213492 +1771 -8.17042033256061 +1772 -8.170420332904964 +1773 -8.170420333246577 +1774 -8.170420333585474 +1775 -8.170420333921673 +1776 -8.170420334255194 +1777 -8.170420334586064 +1778 -8.1704203349143 +1779 -8.170420335239925 +1780 -8.170420335562957 +1781 -8.170420335883419 +1782 -8.170420336201332 +1783 -8.170420336516715 +1784 -8.170420336829586 +1785 -8.170420337139968 +1786 -8.170420337447881 +1787 -8.170420337753344 +1788 -8.170420338056374 +1789 -8.170420338356994 +1790 -8.170420338655223 +1791 -8.170420338951077 +1792 -8.170420339244576 +1793 -8.170420339535742 +1794 -8.170420339824588 +1795 -8.170420340111137 +1796 -8.170420340395408 +1797 -8.170420340677413 +1798 -8.170420340957175 +1799 -8.170420341234712 +1800 -8.17042034151004 +1801 -8.170420341783174 +1802 -8.170420342054138 +1803 -8.170420342322945 +1804 -8.170420342589612 +1805 -8.170420342854158 +1806 -8.170420343116598 +1807 -8.17042034337695 +1808 -8.17042034363523 +1809 -8.170420343891456 +1810 -8.17042034414564 +1811 -8.170420344397803 +1812 -8.170420344647962 +1813 -8.170420344896126 +1814 -8.170420345142317 +1815 -8.170420345386548 +1816 -8.170420345628838 +1817 -8.170420345869196 +1818 -8.170420346107644 +1819 -8.170420346344194 +1820 -8.170420346578862 +1821 -8.170420346811662 +1822 -8.17042034704261 +1823 -8.170420347271719 +1824 -8.170420347499006 +1825 -8.17042034772448 +1826 -8.170420347948166 +1827 -8.17042034817007 +1828 -8.170420348390207 +1829 -8.170420348608593 +1830 -8.17042034882524 +1831 -8.170420349040164 +1832 -8.170420349253378 +1833 -8.170420349464896 +1834 -8.170420349674728 +1835 -8.170420349882892 +1836 -8.1704203500894 +1837 -8.170420350294265 +1838 -8.170420350497498 +1839 -8.170420350699114 +1840 -8.170420350899128 +1841 -8.170420351097547 +1842 -8.17042035129439 +1843 -8.170420351489664 +1844 -8.170420351683386 +1845 -8.170420351875565 +1846 -8.170420352066216 +1847 -8.170420352255348 +1848 -8.170420352442976 +1849 -8.170420352629112 +1850 -8.170420352813764 +1851 -8.170420352996949 +1852 -8.170420353178677 +1853 -8.170420353358958 +1854 -8.170420353537803 +1855 -8.170420353715226 +1856 -8.170420353891238 +1857 -8.170420354065847 +1858 -8.170420354239067 +1859 -8.17042035441091 +1860 -8.170420354581385 +1861 -8.170420354750503 +1862 -8.170420354918274 +1863 -8.170420355084712 +1864 -8.170420355249824 +1865 -8.170420355413626 +1866 -8.17042035557612 +1867 -8.170420355737324 +1868 -8.170420355897242 +1869 -8.17042035605589 +1870 -8.170420356213274 +1871 -8.170420356369405 +1872 -8.170420356524296 +1873 -8.170420356677955 +1874 -8.17042035683039 +1875 -8.17042035698161 +1876 -8.170420357131627 +1877 -8.170420357280454 +1878 -8.170420357428092 +1879 -8.170420357574557 +1880 -8.170420357719857 +1881 -8.170420357864002 +1882 -8.170420358006997 +1883 -8.170420358148855 +1884 -8.170420358289585 +1885 -8.170420358429194 +1886 -8.170420358567695 +1887 -8.170420358705089 +1888 -8.170420358841394 +1889 -8.17042035897661 +1890 -8.170420359110754 +1891 -8.170420359243831 +1892 -8.170420359375845 +1893 -8.170420359506812 +1894 -8.170420359636735 +1895 -8.170420359765625 +1896 -8.170420359893487 +1897 -8.170420360020334 +1898 -8.17042036014617 +1899 -8.170420360271008 +1900 -8.17042036039485 +1901 -8.170420360517706 +1902 -8.170420360639586 +1903 -8.170420360760495 +1904 -8.170420360880442 +1905 -8.170420360999435 +1906 -8.170420361117479 +1907 -8.170420361234585 +1908 -8.17042036135076 +1909 -8.170420361466011 +1910 -8.170420361580344 +1911 -8.170420361693767 +1912 -8.170420361806286 +1913 -8.170420361917913 +1914 -8.17042036202865 +1915 -8.170420362138506 +1916 -8.170420362247487 +1917 -8.1704203623556 +1918 -8.170420362462854 +1919 -8.170420362569255 +1920 -8.17042036267481 +1921 -8.170420362779522 +1922 -8.170420362883403 +1923 -8.170420362986457 +1924 -8.170420363088692 +1925 -8.170420363190111 +1926 -8.170420363290724 +1927 -8.170420363390535 +1928 -8.170420363489555 +1929 -8.170420363587784 +1930 -8.170420363685233 +1931 -8.170420363781908 +1932 -8.170420363877811 +1933 -8.170420363972951 +1934 -8.170420364067336 +1935 -8.17042036416097 +1936 -8.170420364253857 +1937 -8.170420364346004 +1938 -8.17042036443742 +1939 -8.170420364528107 +1940 -8.170420364618073 +1941 -8.170420364707322 +1942 -8.170420364795863 +1943 -8.170420364883698 +1944 -8.170420364970836 +1945 -8.170420365057279 +1946 -8.170420365143032 +1947 -8.170420365228107 +1948 -8.1704203653125 +1949 -8.170420365396225 +1950 -8.170420365479284 +1951 -8.17042036556168 +1952 -8.170420365643421 +1953 -8.170420365724514 +1954 -8.170420365804958 +1955 -8.170420365884764 +1956 -8.170420365963935 +1957 -8.170420366042475 +1958 -8.170420366120391 +1959 -8.170420366197686 +1960 -8.170420366274366 +1961 -8.170420366350436 +1962 -8.170420366425901 +1963 -8.170420366500764 +1964 -8.170420366575033 +1965 -8.17042036664871 +1966 -8.170420366721803 +1967 -8.17042036679431 +1968 -8.170420366866244 +1969 -8.170420366937604 +1970 -8.170420367008397 +1971 -8.170420367078627 +1972 -8.170420367148296 +1973 -8.170420367217412 +1974 -8.17042036728598 +1975 -8.170420367353998 +1976 -8.170420367421478 +1977 -8.170420367488418 +1978 -8.170420367554827 +1979 -8.170420367620709 +1980 -8.170420367686065 +1981 -8.170420367750902 +1982 -8.170420367815222 +1983 -8.17042036787903 +1984 -8.170420367942333 +1985 -8.170420368005129 +1986 -8.170420368067427 +1987 -8.170420368129228 +1988 -8.17042036819054 +1989 -8.17042036825136 +1990 -8.1704203683117 +1991 -8.170420368371557 +1992 -8.170420368430939 +1993 -8.170420368489848 +1994 -8.170420368548287 +1995 -8.170420368606262 +1996 -8.170420368663777 +1997 -8.170420368720835 +1998 -8.170420368777437 +1999 -8.17042036883359 +2000 -8.170420368889292 diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/log_param_by_sz=true,epochs=2000.log b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/log_param_by_sz=true,epochs=2000.log index 7f879e4e..208e3f00 100644 --- a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/log_param_by_sz=true,epochs=2000.log +++ b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/log_param_by_sz=true,epochs=2000.log @@ -1,4 +1,4 @@ -2024-01-12T20:04:08.711 +2024-01-12T20:37:48.710 == Config == INIT_SIZE: 2 GEN_TYP_SIZE: 1 @@ -8,24 +8,24 @@ DistNat: DistUInt32 TAG: entropy_approx_v01 Building (gen_expr(...)) computation graph... - 7.221540375 seconds + 7.970573458 seconds Initial adnodes_of_interest: Dict("sz1_succ_abs" => 0.5, "tysz1_gen_type_tbool" => 0.5, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.5, "sz2_succ_abs" => 0.5, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5, "sz1_succ_app" => 0.5) Saving samples... Saved samples to examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_before.txt. - 1.844304333 seconds + 1.90386225 seconds -Initial entropy: NaN +Initial entropy: 8.072558853466411 Training... - 2.905164583 seconds + 2.882528792 seconds -Final entropy: NaN +Final entropy: 8.170420368889292 Learned adnodes_of_interest: -Dict("sz1_succ_abs" => 0.5524501787278423, "tysz1_gen_type_tbool" => 0.5403919103189322, "sz0_zero_pr_var2" => 0.5254890263986366, "sz2_succ_app" => 0.4028255954724057, "sz2_succ_abs" => 0.5815814594956497, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.500007314162315, "sz1_succ_app" => 0.44144173842959433) +Dict("sz1_succ_abs" => 0.5598030152826101, "tysz1_gen_type_tbool" => 0.5395457933590109, "sz0_zero_pr_var2" => 0.5271444904668267, "sz2_succ_app" => 0.3185816526602986, "sz2_succ_abs" => 0.6350128152410152, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5000874628748793, "sz1_succ_app" => 0.43209667095380405) Saving samples... Saved samples to examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_trained_param_by_sz=true,epochs=2000.txt. - 0.139626708 seconds + 0.143245625 seconds diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_before.txt b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_before.txt index 6fb7b7aa..7c140f93 100644 --- a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_before.txt +++ b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_before.txt @@ -1,200 +1,200 @@ -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool. λy:Bool. false) true) -λx:Bool. x -λx:Bool. x -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) -(λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool. true) true) -λx:Bool. true -λx:Bool. (λy:Bool. true) x -true -true -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. true)) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) (λx:Bool. true) -false -(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) ((λx:Bool. true) true) -(λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool -> Bool. true) (λx:Bool. false)) +λx:Bool. (λy:Bool. false) true +(λx:Bool. λy:Bool -> Bool. false) false (λx:Bool. x) true -(λx:Bool. x) true -(λx:Bool. true) false -(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false)) -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. true) false) -false -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) false -(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. true) true) +λx:Bool. x +(λx:Bool. λy:Bool -> Bool. true) false ((λx:Bool. λy:Bool. false) false) +(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. true) false) +(λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool -> Bool. false) (λx:Bool. true)) +(λx:Bool -> Bool. x) (λx:Bool. x) true -λx:Bool. true -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) +(λx:Bool. λy:Bool. false) true +(λx:Bool. λy:Bool. false) false ((λx:Bool. true) false) +(λx:Bool. λy:Bool. false) false true +(λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool. false) true) λx:Bool. x -λx:Bool. false -λx:Bool. (λy:Bool. false) x -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false ((λx:Bool. λy:Bool. false) true) -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false (λx:Bool. x) -(λx:Bool. x) false -λx:Bool. true -(λx:Bool. λy:Bool. false) true ((λx:Bool -> Bool. false) (λx:Bool. true)) -λx:Bool. false -λx:Bool. (λy:Bool. true) x -false -false -(λx:Bool. true) true -false -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) (λx:Bool. false) λx:Bool. x +(λx:Bool -> Bool. true) (λx:Bool. x) λx:Bool. x -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. true) true) -(λx:Bool. false) true -false +λx:Bool. false true -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. false) false) -(λx:Bool -> Bool. false) (λx:Bool. x) +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) +(λx:Bool. λy:Bool -> Bool. true) false (λx:Bool. false) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) false -λx:Bool. true -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +(λx:Bool. x) ((λx:Bool -> Bool. false) (λx:Bool. false)) +λx:Bool. x +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) +true false -λx:Bool. (λy:Bool. true) x false +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) (λx:Bool. true) false -λx:Bool. false +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +(λx:Bool. λy:Bool -> Bool. true) true ((λx:Bool. λy:Bool. false) true) +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) true) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. true) true) +(λx:Bool. λy:Bool. true) true ((λx:Bool -> Bool. true) (λx:Bool. false)) λx:Bool. true -(λx:Bool. λy:Bool. false) true ((λx:Bool -> Bool. true) (λx:Bool. false)) -(λx:Bool. λy:Bool -> Bool. false) true (λx:Bool. false) -(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. false) true) -(λx:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. true)) -(λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool. false) true) -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) false -(λx:Bool. false) ((λx:Bool. false) true) -(λx:Bool. x) true -(λx:Bool. λy:Bool. λz:Bool. true) true ((λx:Bool -> Bool. false) (λx:Bool. true)) -λx:Bool. (λy:Bool. true) false -true -λx:Bool. (λy:Bool. true) x -true -(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -false -(λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) ((λx:Bool. false) true) +(λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool. false) true) +(λx:Bool -> Bool. x) (λx:Bool. x) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) false -false -(λx:Bool. λy:Bool. true) false false -true +λx:Bool. true (λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. x) -(λx:Bool. λy:Bool. true) true +(λx:Bool -> Bool. true) (λx:Bool. x) +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) +λx:Bool. (λy:Bool. false) x +(λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool. true) false) false -(λx:Bool. λy:Bool. true) ((λx:Bool. true) false) false -true false true -(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) -λx:Bool. x -(λx:Bool -> Bool. true) (λx:Bool. x) -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) true +(λx:Bool. λy:Bool. false) true true -λx:Bool. x -false -(λx:Bool. λy:Bool -> Bool. false) false (λx:Bool. x) -(λx:Bool -> Bool. x) (λx:Bool. x) -λx:Bool. x -λx:Bool. false -(λx:Bool. λy:Bool. true) false ((λx:Bool. false) false) -(λx:Bool. true) ((λx:Bool. false) false) -(λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) true) -(λx:Bool. λy:Bool. λz:Bool. true) false true -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) ((λx:Bool. true) true) -(λx:Bool. λy:Bool. false) false ((λx:Bool. true) true) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) (λx:Bool. x) (λx:Bool -> Bool. false) (λx:Bool. x) -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) +(λx:Bool. λy:Bool. false) false ((λx:Bool -> Bool. true) (λx:Bool. true)) +(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +(λx:Bool. λy:Bool. true) true true +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. x) +true +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool. true) false) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) (λx:Bool. x) +(λx:Bool. false) false +λx:Bool. x true λx:Bool. true +(λx:Bool. λy:Bool. false) false +true +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) (λx:Bool. false) λx:Bool. false -(λx:Bool. λy:Bool. true) true true -(λx:Bool. x) true -(λx:Bool. λy:Bool. true) ((λx:Bool. false) true) -λx:Bool. true -(λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +λx:Bool. false +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) false false -(λx:Bool. λy:Bool. true) true ((λx:Bool. false) true) -(λx:Bool. λy:Bool. true) false ((λx:Bool -> Bool. true) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) true +true +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) λx:Bool. x +λx:Bool. true +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false ((λx:Bool. λy:Bool. false) true) true -(λx:Bool. λy:Bool. true) ((λx:Bool. false) false) -(λx:Bool. λy:Bool. λz:Bool. false) true false -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool. true) true) +λx:Bool. true +(λx:Bool. λy:Bool. λz:Bool. true) true ((λx:Bool -> Bool. true) (λx:Bool. true)) +(λx:Bool -> Bool. false) (λx:Bool. x) +(λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. false) false) false -(λx:Bool -> Bool. x) (λx:Bool. x) +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) ((λx:Bool. λy:Bool. false) false) +(λx:Bool. λy:Bool. true) false +(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) λx:Bool. x -λx:Bool. true +(λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool -> Bool. false) (λx:Bool. true)) +(λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool. false) false) +(λx:Bool. λy:Bool. true) ((λx:Bool. true) false) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +(λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +λx:Bool. x +false +λx:Bool. (λy:Bool. true) true +(λx:Bool. x) false +false +false +false (λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +(λx:Bool. λy:Bool. false) ((λx:Bool. true) true) +true +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) (λx:Bool. x) +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. false) true) +(λx:Bool. λy:Bool. true) true true +true +true +(λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool. false) true) +λx:Bool. (λy:Bool. false) x +(λx:Bool -> Bool. x) (λx:Bool. x) +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) false) +(λx:Bool. λy:Bool. false) false +(λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool. true) true) λx:Bool. x -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +(λx:Bool -> Bool. false) (λx:Bool. false) +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool. true) false) true -(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +λx:Bool. x +false +(λx:Bool. x) true (λx:Bool. λy:Bool. false) false +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +λx:Bool. true λx:Bool. x -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) -(λx:Bool. λy:Bool. false) true ((λx:Bool -> Bool. false) (λx:Bool. true)) false -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false (λx:Bool. x) -(λx:Bool. λy:Bool. true) true -(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. false) true) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) (λx:Bool. x) -(λx:Bool. λy:Bool. true) true true -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true ((λx:Bool. λy:Bool. false) true) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) -(λx:Bool. λy:Bool. λz:Bool. false) false false -(λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. true)) false -true -(λx:Bool. true) true false -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. false) false) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +(λx:Bool. true) true +(λx:Bool. λy:Bool. λz:Bool. true) false false +λx:Bool. x false -λx:Bool. (λy:Bool. false) false +λx:Bool. true +(λx:Bool. λy:Bool. false) false +(λx:Bool -> Bool. false) (λx:Bool. x) +(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) true +(λx:Bool -> Bool. false) (λx:Bool. false) +λx:Bool. true +(λx:Bool. λy:Bool. false) false +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +λx:Bool. (λy:Bool. false) x +(λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +λx:Bool. false +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) false) λx:Bool. false +(λx:Bool. λy:Bool. λz:Bool. true) false false +false true -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) (λx:Bool. true) -(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -λx:Bool. x +λx:Bool. (λy:Bool. true) true +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) λx:Bool. x -(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) (λx:Bool. x) +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) +(λx:Bool. λy:Bool. true) false +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) false +(λx:Bool. x) ((λx:Bool -> Bool. true) (λx:Bool. true)) +λx:Bool. false +(λx:Bool. x) ((λx:Bool -> Bool. false) (λx:Bool. false)) +(λx:Bool. λy:Bool. true) ((λx:Bool. true) false) +(λx:Bool. λy:Bool. false) true +λx:Bool. (λy:Bool. true) x +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) (λx:Bool. false) +λx:Bool. true +false +(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +(λx:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. true)) (λx:Bool. λy:Bool. false) false -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool. false) false) -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true ((λx:Bool. λy:Bool. false) true) -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) -(λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool. false) false) -(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +λx:Bool. (λy:Bool. false) true +(λx:Bool -> Bool. x) (λx:Bool. true) +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) ((λx:Bool. true) true) +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +λx:Bool. x λx:Bool. x -(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. true) (λx:Bool. x) +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. false) true) +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) (λx:Bool. true) +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) (λx:Bool. true) +(λx:Bool. λy:Bool -> Bool. true) true (λx:Bool. x) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. x) true +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) true +λx:Bool. x true -(λx:Bool. λy:Bool. λz:Bool. true) true ((λx:Bool. false) false) -(λx:Bool. λy:Bool. true) true ((λx:Bool. true) false) -false -(λx:Bool. λy:Bool. false) true -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) -(λx:Bool. λy:Bool. λz:Bool. false) false ((λx:Bool -> Bool. true) (λx:Bool. true)) -λx:Bool. false -(λx:Bool. x) ((λx:Bool -> Bool. true) (λx:Bool. false)) -(λx:Bool. λy:Bool. true) false -λx:Bool. false -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. false) false) -false -(λx:Bool. false) ((λx:Bool. true) true) +(λx:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) +λx:Bool. (λy:Bool. true) x +λx:Bool. true +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) true true +λx:Bool. x +(λx:Bool. x) false +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) true -(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) false -(λx:Bool. λy:Bool. λz:Bool. false) false ((λx:Bool -> Bool. false) (λx:Bool. true)) -(λx:Bool. λy:Bool. true) true false -(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -λx:Bool. x +(λx:Bool. λy:Bool. true) true +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +true diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_trained_param_by_sz=true,epochs=2000.txt b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_trained_param_by_sz=true,epochs=2000.txt index 0be5bf08..5ac7346d 100644 --- a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_trained_param_by_sz=true,epochs=2000.txt +++ b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_trained_param_by_sz=true,epochs=2000.txt @@ -1,200 +1,200 @@ -(λx:Bool. false) ((λx:Bool. false) false) -λx:Bool. true -λx:Bool. x -(λx:Bool -> Bool. true) (λx:Bool. x) -λx:Bool. true -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. false) true) +false +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) false +false λx:Bool. (λy:Bool. false) x -(λx:Bool. λy:Bool. true) false ((λx:Bool -> Bool. false) (λx:Bool. true)) false -λx:Bool. x true -(λx:Bool. λy:Bool. false) false true -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) -(λx:Bool. false) ((λx:Bool. true) true) -(λx:Bool. λy:Bool -> Bool. false) true (λx:Bool. false) -(λx:Bool. λy:Bool. false) false -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) false +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. x) +(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) false +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) false +(λx:Bool. λy:Bool. false) true ((λx:Bool. true) false) false -λx:Bool. true true -(λx:Bool -> Bool. true) (λx:Bool. false) -λx:Bool. (λy:Bool. true) x -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -false +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) false) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) false +λx:Bool. true +λx:Bool. true +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true (λx:Bool. x) +(λx:Bool. x) ((λx:Bool. true) true) +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. true)) +(λx:Bool. λy:Bool. false) true false false -λx:Bool. false -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool. λy:Bool. true) true) +(λx:Bool. λy:Bool. false) false ((λx:Bool. false) false) +true λx:Bool. x +λx:Bool. (λy:Bool. true) true +true +(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) +λx:Bool. false +λx:Bool. true +false +false +(λx:Bool. λy:Bool. false) true true +λx:Bool. true false +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool. true) true) +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. true)) false false -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. true) false) +λx:Bool. false +false +λx:Bool. x +true +(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false)) true -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) false +(λx:Bool. true) false false -(λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) -(λx:Bool. λy:Bool. false) true false +(λx:Bool -> Bool. x) (λx:Bool. true) +true +λx:Bool. true false false -(λx:Bool. x) ((λx:Bool. true) true) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. false) false) -(λx:Bool -> Bool. false) (λx:Bool. true) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +(λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false)) +true +true +λx:Bool. x λx:Bool. x -(λx:Bool -> Bool. x) (λx:Bool. x) -λx:Bool. (λy:Bool. false) x -(λx:Bool -> Bool. x) (λx:Bool. false) -(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) (λx:Bool. x) false true +(λx:Bool. λy:Bool. true) false +true +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) false) +(λx:Bool. λy:Bool. true) false +λx:Bool. false λx:Bool. x true +(λx:Bool -> Bool. true) (λx:Bool. x) +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. false) false) true -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. x) -λx:Bool. true +false +(λx:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false)) false λx:Bool. x +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) λx:Bool. true true -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +true +true +true false -(λx:Bool. x) true -λx:Bool. true -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) false -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. true)) -(λx:Bool. λy:Bool. λz:Bool. true) true false -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) +false +(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) false false -true -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) false -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. false) true) -true -λx:Bool. (λy:Bool. false) false λx:Bool. x +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true ((λx:Bool. λy:Bool. false) false) +(λx:Bool -> Bool. false) (λx:Bool. false) +(λx:Bool. x) ((λx:Bool. false) true) +false +false +false true true +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) false true -(λx:Bool. λy:Bool -> Bool. true) false ((λx:Bool. λy:Bool. false) false) -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool. false) false) -λx:Bool. (λy:Bool. false) x -true -(λx:Bool -> Bool. true) (λx:Bool. x) -(λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) -(λx:Bool -> Bool. true) (λx:Bool. true) +λx:Bool. x true false -λx:Bool. false -(λx:Bool. λy:Bool -> Bool. false) true (λx:Bool. false) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. x) +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) true true -(λx:Bool. x) false λx:Bool. false -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) true -λx:Bool. true -(λx:Bool. x) true -false +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) true +λx:Bool. x false -(λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. true) (λx:Bool. x) false -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) false -(λx:Bool. λy:Bool -> Bool. false) true (λx:Bool. false) -true -λx:Bool. x -(λx:Bool. λy:Bool. true) true false -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) true +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true ((λx:Bool. λy:Bool. true) true) λx:Bool. true λx:Bool. true -(λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) -λx:Bool. true -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -λx:Bool. (λy:Bool. false) x false +(λx:Bool. λy:Bool. false) false false -λx:Bool. false -λx:Bool. x -(λx:Bool. λy:Bool. true) ((λx:Bool. false) false) +λx:Bool. true true +(λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +(λx:Bool. λy:Bool. true) true true +(λx:Bool. λy:Bool -> Bool. true) false (λx:Bool. true) +(λx:Bool -> Bool. false) (λx:Bool. false) false -λx:Bool. (λy:Bool. true) true -false -λx:Bool. (λy:Bool. false) x λx:Bool. true -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true ((λx:Bool. λy:Bool. false) false) -λx:Bool. x -(λx:Bool. λy:Bool. λz:Bool. false) false true -λx:Bool. (λy:Bool. true) x -true -(λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. true)) -(λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool. true) true) -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) (λx:Bool. x) -(λx:Bool. λy:Bool. false) ((λx:Bool. false) true) -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool. false) false) -(λx:Bool -> Bool. false) (λx:Bool. true) -false -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -λx:Bool. x -true -(λx:Bool. λy:Bool. true) true -λx:Bool. x -true -(λx:Bool. λy:Bool -> Bool. false) false ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) true -λx:Bool. x -λx:Bool. x -true true λx:Bool. x -true -false -(λx:Bool. λy:Bool. true) false ((λx:Bool. false) true) -(λx:Bool. false) false +(λx:Bool. λy:Bool -> Bool. true) true ((λx:Bool. λy:Bool. true) true) λx:Bool. true -(λx:Bool. λy:Bool. false) false ((λx:Bool -> Bool. false) (λx:Bool. true)) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) false +false +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) λx:Bool. true -(λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. true)) -true -(λx:Bool. λy:Bool -> Bool. false) false ((λx:Bool. λy:Bool. true) true) -(λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool -> Bool. false) (λx:Bool. false)) -(λx:Bool. λy:Bool -> Bool. true) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -(λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. false) true) -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. true)) false -true -(λx:Bool. λy:Bool -> Bool. false) false ((λx:Bool. λy:Bool. false) true) +false +(λx:Bool. false) false true true false -(λx:Bool -> Bool. x) (λx:Bool. false) -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +λx:Bool. false +false +(λx:Bool. λy:Bool. λz:Bool. false) true true +false +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) (λx:Bool. x) +λx:Bool. true +λx:Bool. (λy:Bool. false) true +(λx:Bool -> Bool. false) (λx:Bool. x) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. x) +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. true) false) false -(λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool. false) false) true -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) false +true +false +(λx:Bool. λy:Bool. false) true ((λx:Bool -> Bool. true) (λx:Bool. true)) λx:Bool. false -(λx:Bool. λy:Bool. false) true false -(λx:Bool. λy:Bool. true) false ((λx:Bool -> Bool. false) (λx:Bool. false)) -λx:Bool. false -(λx:Bool. λy:Bool. false) true true +false +λx:Bool. (λy:Bool. true) true (λx:Bool -> Bool. false) (λx:Bool. false) +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. false) false) false -λx:Bool. true -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) true) -(λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) true -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool. λy:Bool. true) true) -(λx:Bool -> Bool. false) (λx:Bool. false) true +true +(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +(λx:Bool. λy:Bool -> Bool. false) true (λx:Bool. true) +(λx:Bool. x) ((λx:Bool -> Bool. true) (λx:Bool. false)) +λx:Bool. false +(λx:Bool -> Bool. true) (λx:Bool. x) +(λx:Bool. λy:Bool. true) ((λx:Bool. false) true) +λx:Bool. true +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) λx:Bool. x +(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +(λx:Bool. λy:Bool -> Bool. false) false ((λx:Bool. λy:Bool. true) true) +(λx:Bool. λy:Bool -> Bool. false) false (λx:Bool. x) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +(λx:Bool. λy:Bool. λz:Bool. true) true ((λx:Bool. false) false) +true +(λx:Bool. λy:Bool -> Bool. true) true ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +false +(λx:Bool. x) false true -(λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +true +true +(λx:Bool. true) true +λx:Bool. (λy:Bool. true) true +(λx:Bool -> Bool. false) (λx:Bool. true) +false +λx:Bool. false +(λx:Bool. x) ((λx:Bool -> Bool. false) (λx:Bool. false)) +true +true +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv new file mode 100644 index 00000000..557228d7 --- /dev/null +++ b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv @@ -0,0 +1,2001 @@ +0 NaN +1 NaN +2 NaN +3 NaN +4 NaN +5 NaN +6 NaN +7 NaN +8 NaN +9 NaN +10 NaN +11 NaN +12 NaN +13 NaN +14 NaN +15 NaN +16 NaN +17 NaN +18 NaN +19 NaN +20 NaN +21 NaN +22 NaN +23 NaN +24 NaN +25 NaN +26 NaN +27 NaN +28 NaN +29 NaN +30 NaN +31 NaN +32 NaN +33 NaN +34 NaN +35 NaN +36 NaN +37 NaN +38 NaN +39 NaN +40 NaN +41 NaN +42 NaN +43 NaN +44 NaN +45 NaN +46 NaN +47 NaN +48 NaN +49 NaN +50 NaN +51 NaN +52 NaN +53 NaN +54 NaN +55 NaN +56 NaN +57 NaN +58 NaN +59 NaN +60 NaN +61 NaN +62 NaN +63 NaN +64 NaN +65 NaN +66 NaN +67 NaN +68 NaN +69 NaN +70 NaN +71 NaN +72 NaN +73 NaN +74 NaN +75 NaN +76 NaN +77 NaN +78 NaN +79 NaN +80 NaN +81 NaN +82 NaN +83 NaN +84 NaN +85 NaN +86 NaN +87 NaN +88 NaN +89 NaN +90 NaN +91 NaN +92 NaN +93 NaN +94 NaN +95 NaN +96 NaN +97 NaN +98 NaN +99 NaN +100 NaN +101 NaN +102 NaN +103 NaN +104 NaN +105 NaN +106 NaN +107 NaN +108 NaN +109 NaN +110 NaN +111 NaN +112 NaN +113 NaN +114 NaN +115 NaN +116 NaN +117 NaN +118 NaN +119 NaN +120 NaN +121 NaN +122 NaN +123 NaN +124 NaN +125 NaN +126 NaN +127 NaN +128 NaN +129 NaN +130 NaN +131 NaN +132 NaN +133 NaN +134 NaN +135 NaN +136 NaN +137 NaN +138 NaN +139 NaN +140 NaN +141 NaN +142 NaN +143 NaN +144 NaN +145 NaN +146 NaN +147 NaN +148 NaN +149 NaN +150 NaN +151 NaN +152 NaN +153 NaN +154 NaN +155 NaN +156 NaN +157 NaN +158 NaN +159 NaN +160 NaN +161 NaN +162 NaN +163 NaN +164 NaN +165 NaN +166 NaN +167 NaN +168 NaN +169 NaN +170 NaN +171 NaN +172 NaN +173 NaN +174 NaN +175 NaN +176 NaN +177 NaN +178 NaN +179 NaN +180 NaN +181 NaN +182 NaN +183 NaN +184 NaN +185 NaN +186 NaN +187 NaN +188 NaN +189 NaN +190 NaN +191 NaN +192 NaN +193 NaN +194 NaN +195 NaN +196 NaN +197 NaN +198 NaN +199 NaN +200 NaN +201 NaN +202 NaN +203 NaN +204 NaN +205 NaN +206 NaN +207 NaN +208 NaN +209 NaN +210 NaN +211 NaN +212 NaN +213 NaN +214 NaN +215 NaN +216 NaN +217 NaN +218 NaN +219 NaN +220 NaN +221 NaN +222 NaN +223 NaN +224 NaN +225 NaN +226 NaN +227 NaN +228 NaN +229 NaN +230 NaN +231 NaN +232 NaN +233 NaN +234 NaN +235 NaN +236 NaN +237 NaN +238 NaN +239 NaN +240 NaN +241 NaN +242 NaN +243 NaN +244 NaN +245 NaN +246 NaN +247 NaN +248 NaN +249 NaN +250 NaN +251 NaN +252 NaN +253 NaN +254 NaN +255 NaN +256 NaN +257 NaN +258 NaN +259 NaN +260 NaN +261 NaN +262 NaN +263 NaN +264 NaN +265 NaN +266 NaN +267 NaN +268 NaN +269 NaN +270 NaN +271 NaN +272 NaN +273 NaN +274 NaN +275 NaN +276 NaN +277 NaN +278 NaN +279 NaN +280 NaN +281 NaN +282 NaN +283 NaN +284 NaN +285 NaN +286 NaN +287 NaN +288 NaN +289 NaN +290 NaN +291 NaN +292 NaN +293 NaN +294 NaN +295 NaN +296 NaN +297 NaN +298 NaN +299 NaN +300 NaN +301 NaN +302 NaN +303 NaN +304 NaN +305 NaN +306 NaN +307 NaN +308 NaN +309 NaN +310 NaN +311 NaN +312 NaN +313 NaN +314 NaN +315 NaN +316 NaN +317 NaN +318 NaN +319 NaN +320 NaN +321 NaN +322 NaN +323 NaN +324 NaN +325 NaN +326 NaN +327 NaN +328 NaN +329 NaN +330 NaN +331 NaN +332 NaN +333 NaN +334 NaN +335 NaN +336 NaN +337 NaN +338 NaN +339 NaN +340 NaN +341 NaN +342 NaN +343 NaN +344 NaN +345 NaN +346 NaN +347 NaN +348 NaN +349 NaN +350 NaN +351 NaN +352 NaN +353 NaN +354 NaN +355 NaN +356 NaN +357 NaN +358 NaN +359 NaN +360 NaN +361 NaN +362 NaN +363 NaN +364 NaN +365 NaN +366 NaN +367 NaN +368 NaN +369 NaN +370 NaN +371 NaN +372 NaN +373 NaN +374 NaN +375 NaN +376 NaN +377 NaN +378 NaN +379 NaN +380 NaN +381 NaN +382 NaN +383 NaN +384 NaN +385 NaN +386 NaN +387 NaN +388 NaN +389 NaN +390 NaN +391 NaN +392 NaN +393 NaN +394 NaN +395 NaN +396 NaN +397 NaN +398 NaN +399 NaN +400 NaN +401 NaN +402 NaN +403 NaN +404 NaN +405 NaN +406 NaN +407 NaN +408 NaN +409 NaN +410 NaN +411 NaN +412 NaN +413 NaN +414 NaN +415 NaN +416 NaN +417 NaN +418 NaN +419 NaN +420 NaN +421 NaN +422 NaN +423 NaN +424 NaN +425 NaN +426 NaN +427 NaN +428 NaN +429 NaN +430 NaN +431 NaN +432 NaN +433 NaN +434 NaN +435 NaN +436 NaN +437 NaN +438 NaN +439 NaN +440 NaN +441 NaN +442 NaN +443 NaN +444 NaN +445 NaN +446 NaN +447 NaN +448 NaN +449 NaN +450 NaN +451 NaN +452 NaN +453 NaN +454 NaN +455 NaN +456 NaN +457 NaN +458 NaN +459 NaN +460 NaN +461 NaN +462 NaN +463 NaN +464 NaN +465 NaN +466 NaN +467 NaN +468 NaN +469 NaN +470 NaN +471 NaN +472 NaN +473 NaN +474 NaN +475 NaN +476 NaN +477 NaN +478 NaN +479 NaN +480 NaN +481 NaN +482 NaN +483 NaN +484 NaN +485 NaN +486 NaN +487 NaN +488 NaN +489 NaN +490 NaN +491 NaN +492 NaN +493 NaN +494 NaN +495 NaN +496 NaN +497 NaN +498 NaN +499 NaN +500 NaN +501 NaN +502 NaN +503 NaN +504 NaN +505 NaN +506 NaN +507 NaN +508 NaN +509 NaN +510 NaN +511 NaN +512 NaN +513 NaN +514 NaN +515 NaN +516 NaN +517 NaN +518 NaN +519 NaN +520 NaN +521 NaN +522 NaN +523 NaN +524 NaN +525 NaN +526 NaN +527 NaN +528 NaN +529 NaN +530 NaN +531 NaN +532 NaN +533 NaN +534 NaN +535 NaN +536 NaN +537 NaN +538 NaN +539 NaN +540 NaN +541 NaN +542 NaN +543 NaN +544 NaN +545 NaN +546 NaN +547 NaN +548 NaN +549 NaN +550 NaN +551 NaN +552 NaN +553 NaN +554 NaN +555 NaN +556 NaN +557 NaN +558 NaN +559 NaN +560 NaN +561 NaN +562 NaN +563 NaN +564 NaN +565 NaN +566 NaN +567 NaN +568 NaN +569 NaN +570 NaN +571 NaN +572 NaN +573 NaN +574 NaN +575 NaN +576 NaN +577 NaN +578 NaN +579 NaN +580 NaN +581 NaN +582 NaN +583 NaN +584 NaN +585 NaN +586 NaN +587 NaN +588 NaN +589 NaN +590 NaN +591 NaN +592 NaN +593 NaN +594 NaN +595 NaN +596 NaN +597 NaN +598 NaN +599 NaN +600 NaN +601 NaN +602 NaN +603 NaN +604 NaN +605 NaN +606 NaN +607 NaN +608 NaN +609 NaN +610 NaN +611 NaN +612 NaN +613 NaN +614 NaN +615 NaN +616 NaN +617 NaN +618 NaN +619 NaN +620 NaN +621 NaN +622 NaN +623 NaN +624 NaN +625 NaN +626 NaN +627 NaN +628 NaN +629 NaN +630 NaN +631 NaN +632 NaN +633 NaN +634 NaN +635 NaN +636 NaN +637 NaN +638 NaN +639 NaN +640 NaN +641 NaN +642 NaN +643 NaN +644 NaN +645 NaN +646 NaN +647 NaN +648 NaN +649 NaN +650 NaN +651 NaN +652 NaN +653 NaN +654 NaN +655 NaN +656 NaN +657 NaN +658 NaN +659 NaN +660 NaN +661 NaN +662 NaN +663 NaN +664 NaN +665 NaN +666 NaN +667 NaN +668 NaN +669 NaN +670 NaN +671 NaN +672 NaN +673 NaN +674 NaN +675 NaN +676 NaN +677 NaN +678 NaN +679 NaN +680 NaN +681 NaN +682 NaN +683 NaN +684 NaN +685 NaN +686 NaN +687 NaN +688 NaN +689 NaN +690 NaN +691 NaN +692 NaN +693 NaN +694 NaN +695 NaN +696 NaN +697 NaN +698 NaN +699 NaN +700 NaN +701 NaN +702 NaN +703 NaN +704 NaN +705 NaN +706 NaN +707 NaN +708 NaN +709 NaN +710 NaN +711 NaN +712 NaN +713 NaN +714 NaN +715 NaN +716 NaN +717 NaN +718 NaN +719 NaN +720 NaN +721 NaN +722 NaN +723 NaN +724 NaN +725 NaN +726 NaN +727 NaN +728 NaN +729 NaN +730 NaN +731 NaN +732 NaN +733 NaN +734 NaN +735 NaN +736 NaN +737 NaN +738 NaN +739 NaN +740 NaN +741 NaN +742 NaN +743 NaN +744 NaN +745 NaN +746 NaN +747 NaN +748 NaN +749 NaN +750 NaN +751 NaN +752 NaN +753 NaN +754 NaN +755 NaN +756 NaN +757 NaN +758 NaN +759 NaN +760 NaN +761 NaN +762 NaN +763 NaN +764 NaN +765 NaN +766 NaN +767 NaN +768 NaN +769 NaN +770 NaN +771 NaN +772 NaN +773 NaN +774 NaN +775 NaN +776 NaN +777 NaN +778 NaN +779 NaN +780 NaN +781 NaN +782 NaN +783 NaN +784 NaN +785 NaN +786 NaN +787 NaN +788 NaN +789 NaN +790 NaN +791 NaN +792 NaN +793 NaN +794 NaN +795 NaN +796 NaN +797 NaN +798 NaN +799 NaN +800 NaN +801 NaN +802 NaN +803 NaN +804 NaN +805 NaN +806 NaN +807 NaN +808 NaN +809 NaN +810 NaN +811 NaN +812 NaN +813 NaN +814 NaN +815 NaN +816 NaN +817 NaN +818 NaN +819 NaN +820 NaN +821 NaN +822 NaN +823 NaN +824 NaN +825 NaN +826 NaN +827 NaN +828 NaN +829 NaN +830 NaN +831 NaN +832 NaN +833 NaN +834 NaN +835 NaN +836 NaN +837 NaN +838 NaN +839 NaN +840 NaN +841 NaN +842 NaN +843 NaN +844 NaN +845 NaN +846 NaN +847 NaN +848 NaN +849 NaN +850 NaN +851 NaN +852 NaN +853 NaN +854 NaN +855 NaN +856 NaN +857 NaN +858 NaN +859 NaN +860 NaN +861 NaN +862 NaN +863 NaN +864 NaN +865 NaN +866 NaN +867 NaN +868 NaN +869 NaN +870 NaN +871 NaN +872 NaN +873 NaN +874 NaN +875 NaN +876 NaN +877 NaN +878 NaN +879 NaN +880 NaN +881 NaN +882 NaN +883 NaN +884 NaN +885 NaN +886 NaN +887 NaN +888 NaN +889 NaN +890 NaN +891 NaN +892 NaN +893 NaN +894 NaN +895 NaN +896 NaN +897 NaN +898 NaN +899 NaN +900 NaN +901 NaN +902 NaN +903 NaN +904 NaN +905 NaN +906 NaN +907 NaN +908 NaN +909 NaN +910 NaN +911 NaN +912 NaN +913 NaN +914 NaN +915 NaN +916 NaN +917 NaN +918 NaN +919 NaN +920 NaN +921 NaN +922 NaN +923 NaN +924 NaN +925 NaN +926 NaN +927 NaN +928 NaN +929 NaN +930 NaN +931 NaN +932 NaN +933 NaN +934 NaN +935 NaN +936 NaN +937 NaN +938 NaN +939 NaN +940 NaN +941 NaN +942 NaN +943 NaN +944 NaN +945 NaN +946 NaN +947 NaN +948 NaN +949 NaN +950 NaN +951 NaN +952 NaN +953 NaN +954 NaN +955 NaN +956 NaN +957 NaN +958 NaN +959 NaN +960 NaN +961 NaN +962 NaN +963 NaN +964 NaN +965 NaN +966 NaN +967 NaN +968 NaN +969 NaN +970 NaN +971 NaN +972 NaN +973 NaN +974 NaN +975 NaN +976 NaN +977 NaN +978 NaN +979 NaN +980 NaN +981 NaN +982 NaN +983 NaN +984 NaN +985 NaN +986 NaN +987 NaN +988 NaN +989 NaN +990 NaN +991 NaN +992 NaN +993 NaN +994 NaN +995 NaN +996 NaN +997 NaN +998 NaN +999 NaN +1000 NaN +1001 NaN +1002 NaN +1003 NaN +1004 NaN +1005 NaN +1006 NaN +1007 NaN +1008 NaN +1009 NaN +1010 NaN +1011 NaN +1012 NaN +1013 NaN +1014 NaN +1015 NaN +1016 NaN +1017 NaN +1018 NaN +1019 NaN +1020 NaN +1021 NaN +1022 NaN +1023 NaN +1024 NaN +1025 NaN +1026 NaN +1027 NaN +1028 NaN +1029 NaN +1030 NaN +1031 NaN +1032 NaN +1033 NaN +1034 NaN +1035 NaN +1036 NaN +1037 NaN +1038 NaN +1039 NaN +1040 NaN +1041 NaN +1042 NaN +1043 NaN +1044 NaN +1045 NaN +1046 NaN +1047 NaN +1048 NaN +1049 NaN +1050 NaN +1051 NaN +1052 NaN +1053 NaN +1054 NaN +1055 NaN +1056 NaN +1057 NaN +1058 NaN +1059 NaN +1060 NaN +1061 NaN +1062 NaN +1063 NaN +1064 NaN +1065 NaN +1066 NaN +1067 NaN +1068 NaN +1069 NaN +1070 NaN +1071 NaN +1072 NaN +1073 NaN +1074 NaN +1075 NaN +1076 NaN +1077 NaN +1078 NaN +1079 NaN +1080 NaN +1081 NaN +1082 NaN +1083 NaN +1084 NaN +1085 NaN +1086 NaN +1087 NaN +1088 NaN +1089 NaN +1090 NaN +1091 NaN +1092 NaN +1093 NaN +1094 NaN +1095 NaN +1096 NaN +1097 NaN +1098 NaN +1099 NaN +1100 NaN +1101 NaN +1102 NaN +1103 NaN +1104 NaN +1105 NaN +1106 NaN +1107 NaN +1108 NaN +1109 NaN +1110 NaN +1111 NaN +1112 NaN +1113 NaN +1114 NaN +1115 NaN +1116 NaN +1117 NaN +1118 NaN +1119 NaN +1120 NaN +1121 NaN +1122 NaN +1123 NaN +1124 NaN +1125 NaN +1126 NaN +1127 NaN +1128 NaN +1129 NaN +1130 NaN +1131 NaN +1132 NaN +1133 NaN +1134 NaN +1135 NaN +1136 NaN +1137 NaN +1138 NaN +1139 NaN +1140 NaN +1141 NaN +1142 NaN +1143 NaN +1144 NaN +1145 NaN +1146 NaN +1147 NaN +1148 NaN +1149 NaN +1150 NaN +1151 NaN +1152 NaN +1153 NaN +1154 NaN +1155 NaN +1156 NaN +1157 NaN +1158 NaN +1159 NaN +1160 NaN +1161 NaN +1162 NaN +1163 NaN +1164 NaN +1165 NaN +1166 NaN +1167 NaN +1168 NaN +1169 NaN +1170 NaN +1171 NaN +1172 NaN +1173 NaN +1174 NaN +1175 NaN +1176 NaN +1177 NaN +1178 NaN +1179 NaN +1180 NaN +1181 NaN +1182 NaN +1183 NaN +1184 NaN +1185 NaN +1186 NaN +1187 NaN +1188 NaN +1189 NaN +1190 NaN +1191 NaN +1192 NaN +1193 NaN +1194 NaN +1195 NaN +1196 NaN +1197 NaN +1198 NaN +1199 NaN +1200 NaN +1201 NaN +1202 NaN +1203 NaN +1204 NaN +1205 NaN +1206 NaN +1207 NaN +1208 NaN +1209 NaN +1210 NaN +1211 NaN +1212 NaN +1213 NaN +1214 NaN +1215 NaN +1216 NaN +1217 NaN +1218 NaN +1219 NaN +1220 NaN +1221 NaN +1222 NaN +1223 NaN +1224 NaN +1225 NaN +1226 NaN +1227 NaN +1228 NaN +1229 NaN +1230 NaN +1231 NaN +1232 NaN +1233 NaN +1234 NaN +1235 NaN +1236 NaN +1237 NaN +1238 NaN +1239 NaN +1240 NaN +1241 NaN +1242 NaN +1243 NaN +1244 NaN +1245 NaN +1246 NaN +1247 NaN +1248 NaN +1249 NaN +1250 NaN +1251 NaN +1252 NaN +1253 NaN +1254 NaN +1255 NaN +1256 NaN +1257 NaN +1258 NaN +1259 NaN +1260 NaN +1261 NaN +1262 NaN +1263 NaN +1264 NaN +1265 NaN +1266 NaN +1267 NaN +1268 NaN +1269 NaN +1270 NaN +1271 NaN +1272 NaN +1273 NaN +1274 NaN +1275 NaN +1276 NaN +1277 NaN +1278 NaN +1279 NaN +1280 NaN +1281 NaN +1282 NaN +1283 NaN +1284 NaN +1285 NaN +1286 NaN +1287 NaN +1288 NaN +1289 NaN +1290 NaN +1291 NaN +1292 NaN +1293 NaN +1294 NaN +1295 NaN +1296 NaN +1297 NaN +1298 NaN +1299 NaN +1300 NaN +1301 NaN +1302 NaN +1303 NaN +1304 NaN +1305 NaN +1306 NaN +1307 NaN +1308 NaN +1309 NaN +1310 NaN +1311 NaN +1312 NaN +1313 NaN +1314 NaN +1315 NaN +1316 NaN +1317 NaN +1318 NaN +1319 NaN +1320 NaN +1321 NaN +1322 NaN +1323 NaN +1324 NaN +1325 NaN +1326 NaN +1327 NaN +1328 NaN +1329 NaN +1330 NaN +1331 NaN +1332 NaN +1333 NaN +1334 NaN +1335 NaN +1336 NaN +1337 NaN +1338 NaN +1339 NaN +1340 NaN +1341 NaN +1342 NaN +1343 NaN +1344 NaN +1345 NaN +1346 NaN +1347 NaN +1348 NaN +1349 NaN +1350 NaN +1351 NaN +1352 NaN +1353 NaN +1354 NaN +1355 NaN +1356 NaN +1357 NaN +1358 NaN +1359 NaN +1360 NaN +1361 NaN +1362 NaN +1363 NaN +1364 NaN +1365 NaN +1366 NaN +1367 NaN +1368 NaN +1369 NaN +1370 NaN +1371 NaN +1372 NaN +1373 NaN +1374 NaN +1375 NaN +1376 NaN +1377 NaN +1378 NaN +1379 NaN +1380 NaN +1381 NaN +1382 NaN +1383 NaN +1384 NaN +1385 NaN +1386 NaN +1387 NaN +1388 NaN +1389 NaN +1390 NaN +1391 NaN +1392 NaN +1393 NaN +1394 NaN +1395 NaN +1396 NaN +1397 NaN +1398 NaN +1399 NaN +1400 NaN +1401 NaN +1402 NaN +1403 NaN +1404 NaN +1405 NaN +1406 NaN +1407 NaN +1408 NaN +1409 NaN +1410 NaN +1411 NaN +1412 NaN +1413 NaN +1414 NaN +1415 NaN +1416 NaN +1417 NaN +1418 NaN +1419 NaN +1420 NaN +1421 NaN +1422 NaN +1423 NaN +1424 NaN +1425 NaN +1426 NaN +1427 NaN +1428 NaN +1429 NaN +1430 NaN +1431 NaN +1432 NaN +1433 NaN +1434 NaN +1435 NaN +1436 NaN +1437 NaN +1438 NaN +1439 NaN +1440 NaN +1441 NaN +1442 NaN +1443 NaN +1444 NaN +1445 NaN +1446 NaN +1447 NaN +1448 NaN +1449 NaN +1450 NaN +1451 NaN +1452 NaN +1453 NaN +1454 NaN +1455 NaN +1456 NaN +1457 NaN +1458 NaN +1459 NaN +1460 NaN +1461 NaN +1462 NaN +1463 NaN +1464 NaN +1465 NaN +1466 NaN +1467 NaN +1468 NaN +1469 NaN +1470 NaN +1471 NaN +1472 NaN +1473 NaN +1474 NaN +1475 NaN +1476 NaN +1477 NaN +1478 NaN +1479 NaN +1480 NaN +1481 NaN +1482 NaN +1483 NaN +1484 NaN +1485 NaN +1486 NaN +1487 NaN +1488 NaN +1489 NaN +1490 NaN +1491 NaN +1492 NaN +1493 NaN +1494 NaN +1495 NaN +1496 NaN +1497 NaN +1498 NaN +1499 NaN +1500 NaN +1501 NaN +1502 NaN +1503 NaN +1504 NaN +1505 NaN +1506 NaN +1507 NaN +1508 NaN +1509 NaN +1510 NaN +1511 NaN +1512 NaN +1513 NaN +1514 NaN +1515 NaN +1516 NaN +1517 NaN +1518 NaN +1519 NaN +1520 NaN +1521 NaN +1522 NaN +1523 NaN +1524 NaN +1525 NaN +1526 NaN +1527 NaN +1528 NaN +1529 NaN +1530 NaN +1531 NaN +1532 NaN +1533 NaN +1534 NaN +1535 NaN +1536 NaN +1537 NaN +1538 NaN +1539 NaN +1540 NaN +1541 NaN +1542 NaN +1543 NaN +1544 NaN +1545 NaN +1546 NaN +1547 NaN +1548 NaN +1549 NaN +1550 NaN +1551 NaN +1552 NaN +1553 NaN +1554 NaN +1555 NaN +1556 NaN +1557 NaN +1558 NaN +1559 NaN +1560 NaN +1561 NaN +1562 NaN +1563 NaN +1564 NaN +1565 NaN +1566 NaN +1567 NaN +1568 NaN +1569 NaN +1570 NaN +1571 NaN +1572 NaN +1573 NaN +1574 NaN +1575 NaN +1576 NaN +1577 NaN +1578 NaN +1579 NaN +1580 NaN +1581 NaN +1582 NaN +1583 NaN +1584 NaN +1585 NaN +1586 NaN +1587 NaN +1588 NaN +1589 NaN +1590 NaN +1591 NaN +1592 NaN +1593 NaN +1594 NaN +1595 NaN +1596 NaN +1597 NaN +1598 NaN +1599 NaN +1600 NaN +1601 NaN +1602 NaN +1603 NaN +1604 NaN +1605 NaN +1606 NaN +1607 NaN +1608 NaN +1609 NaN +1610 NaN +1611 NaN +1612 NaN +1613 NaN +1614 NaN +1615 NaN +1616 NaN +1617 NaN +1618 NaN +1619 NaN +1620 NaN +1621 NaN +1622 NaN +1623 NaN +1624 NaN +1625 NaN +1626 NaN +1627 NaN +1628 NaN +1629 NaN +1630 NaN +1631 NaN +1632 NaN +1633 NaN +1634 NaN +1635 NaN +1636 NaN +1637 NaN +1638 NaN +1639 NaN +1640 NaN +1641 NaN +1642 NaN +1643 NaN +1644 NaN +1645 NaN +1646 NaN +1647 NaN +1648 NaN +1649 NaN +1650 NaN +1651 NaN +1652 NaN +1653 NaN +1654 NaN +1655 NaN +1656 NaN +1657 NaN +1658 NaN +1659 NaN +1660 NaN +1661 NaN +1662 NaN +1663 NaN +1664 NaN +1665 NaN +1666 NaN +1667 NaN +1668 NaN +1669 NaN +1670 NaN +1671 NaN +1672 NaN +1673 NaN +1674 NaN +1675 NaN +1676 NaN +1677 NaN +1678 NaN +1679 NaN +1680 NaN +1681 NaN +1682 NaN +1683 NaN +1684 NaN +1685 NaN +1686 NaN +1687 NaN +1688 NaN +1689 NaN +1690 NaN +1691 NaN +1692 NaN +1693 NaN +1694 NaN +1695 NaN +1696 NaN +1697 NaN +1698 NaN +1699 NaN +1700 NaN +1701 NaN +1702 NaN +1703 NaN +1704 NaN +1705 NaN +1706 NaN +1707 NaN +1708 NaN +1709 NaN +1710 NaN +1711 NaN +1712 NaN +1713 NaN +1714 NaN +1715 NaN +1716 NaN +1717 NaN +1718 NaN +1719 NaN +1720 NaN +1721 NaN +1722 NaN +1723 NaN +1724 NaN +1725 NaN +1726 NaN +1727 NaN +1728 NaN +1729 NaN +1730 NaN +1731 NaN +1732 NaN +1733 NaN +1734 NaN +1735 NaN +1736 NaN +1737 NaN +1738 NaN +1739 NaN +1740 NaN +1741 NaN +1742 NaN +1743 NaN +1744 NaN +1745 NaN +1746 NaN +1747 NaN +1748 NaN +1749 NaN +1750 NaN +1751 NaN +1752 NaN +1753 NaN +1754 NaN +1755 NaN +1756 NaN +1757 NaN +1758 NaN +1759 NaN +1760 NaN +1761 NaN +1762 NaN +1763 NaN +1764 NaN +1765 NaN +1766 NaN +1767 NaN +1768 NaN +1769 NaN +1770 NaN +1771 NaN +1772 NaN +1773 NaN +1774 NaN +1775 NaN +1776 NaN +1777 NaN +1778 NaN +1779 NaN +1780 NaN +1781 NaN +1782 NaN +1783 NaN +1784 NaN +1785 NaN +1786 NaN +1787 NaN +1788 NaN +1789 NaN +1790 NaN +1791 NaN +1792 NaN +1793 NaN +1794 NaN +1795 NaN +1796 NaN +1797 NaN +1798 NaN +1799 NaN +1800 NaN +1801 NaN +1802 NaN +1803 NaN +1804 NaN +1805 NaN +1806 NaN +1807 NaN +1808 NaN +1809 NaN +1810 NaN +1811 NaN +1812 NaN +1813 NaN +1814 NaN +1815 NaN +1816 NaN +1817 NaN +1818 NaN +1819 NaN +1820 NaN +1821 NaN +1822 NaN +1823 NaN +1824 NaN +1825 NaN +1826 NaN +1827 NaN +1828 NaN +1829 NaN +1830 NaN +1831 NaN +1832 NaN +1833 NaN +1834 NaN +1835 NaN +1836 NaN +1837 NaN +1838 NaN +1839 NaN +1840 NaN +1841 NaN +1842 NaN +1843 NaN +1844 NaN +1845 NaN +1846 NaN +1847 NaN +1848 NaN +1849 NaN +1850 NaN +1851 NaN +1852 NaN +1853 NaN +1854 NaN +1855 NaN +1856 NaN +1857 NaN +1858 NaN +1859 NaN +1860 NaN +1861 NaN +1862 NaN +1863 NaN +1864 NaN +1865 NaN +1866 NaN +1867 NaN +1868 NaN +1869 NaN +1870 NaN +1871 NaN +1872 NaN +1873 NaN +1874 NaN +1875 NaN +1876 NaN +1877 NaN +1878 NaN +1879 NaN +1880 NaN +1881 NaN +1882 NaN +1883 NaN +1884 NaN +1885 NaN +1886 NaN +1887 NaN +1888 NaN +1889 NaN +1890 NaN +1891 NaN +1892 NaN +1893 NaN +1894 NaN +1895 NaN +1896 NaN +1897 NaN +1898 NaN +1899 NaN +1900 NaN +1901 NaN +1902 NaN +1903 NaN +1904 NaN +1905 NaN +1906 NaN +1907 NaN +1908 NaN +1909 NaN +1910 NaN +1911 NaN +1912 NaN +1913 NaN +1914 NaN +1915 NaN +1916 NaN +1917 NaN +1918 NaN +1919 NaN +1920 NaN +1921 NaN +1922 NaN +1923 NaN +1924 NaN +1925 NaN +1926 NaN +1927 NaN +1928 NaN +1929 NaN +1930 NaN +1931 NaN +1932 NaN +1933 NaN +1934 NaN +1935 NaN +1936 NaN +1937 NaN +1938 NaN +1939 NaN +1940 NaN +1941 NaN +1942 NaN +1943 NaN +1944 NaN +1945 NaN +1946 NaN +1947 NaN +1948 NaN +1949 NaN +1950 NaN +1951 NaN +1952 NaN +1953 NaN +1954 NaN +1955 NaN +1956 NaN +1957 NaN +1958 NaN +1959 NaN +1960 NaN +1961 NaN +1962 NaN +1963 NaN +1964 NaN +1965 NaN +1966 NaN +1967 NaN +1968 NaN +1969 NaN +1970 NaN +1971 NaN +1972 NaN +1973 NaN +1974 NaN +1975 NaN +1976 NaN +1977 NaN +1978 NaN +1979 NaN +1980 NaN +1981 NaN +1982 NaN +1983 NaN +1984 NaN +1985 NaN +1986 NaN +1987 NaN +1988 NaN +1989 NaN +1990 NaN +1991 NaN +1992 NaN +1993 NaN +1994 NaN +1995 NaN +1996 NaN +1997 NaN +1998 NaN +1999 NaN +2000 NaN diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log new file mode 100644 index 00000000..b1762783 --- /dev/null +++ b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log @@ -0,0 +1,31 @@ +2024-01-12T20:07:24.785 +== Config == +INIT_SIZE: 3 +GEN_TYP_SIZE: 2 +PARAMETERIZE_FLIP_GROUPS_BY_SZ: true +EPOCHS: 2000 +DistNat: DistUInt32 +TAG: entropy_approx_v01 + +Building (gen_expr(...)) computation graph... + 9.185591083 seconds + +Initial adnodes_of_interest: +Dict("tysz2_gen_type_tbool" => 0.5, "tysz1_gen_type_tbool" => 0.5, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.5, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5, "sz1_succ_app" => 0.5, "sz1_succ_abs" => 0.5, "sz3_succ_abs" => 0.5, "sz3_succ_app" => 0.5, "sz2_succ_abs" => 0.5, "sz3_succ_var" => 0.5) +Saving samples... +Saved samples to examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/terms_before.txt. + 4.659673916 seconds + +Initial entropy: NaN + +Training... + 12.081615834 seconds + +Final entropy: NaN + +Learned adnodes_of_interest: +Dict("tysz2_gen_type_tbool" => 0.5978984273401428, "tysz1_gen_type_tbool" => 0.5600089054385535, "sz0_zero_pr_var2" => 0.6513030182610037, "sz2_succ_app" => 0.3795215977122936, "sz2_succ_var" => 0.5390004105904865, "sz1_succ_var" => 0.6204245802808753, "sz1_succ_app" => 0.34157715109058717, "sz1_succ_abs" => 0.5014908667859062, "sz3_succ_abs" => 0.5799456371963269, "sz3_succ_app" => 0.4051250446057422, "sz2_succ_abs" => 0.5643766075999167, "sz3_succ_var" => 0.5) +Saving samples... +Saved samples to examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt. + 2.370024833 seconds + diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/terms_before.txt b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/terms_before.txt new file mode 100644 index 00000000..48eadecd --- /dev/null +++ b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/terms_before.txt @@ -0,0 +1,200 @@ +λx:Bool -> Bool. x +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) false ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true) +(λx:Bool. false) false +(λx:Bool. (λy:Bool. false) true) ((λx:(Bool -> Bool) -> Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false))) +(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λx:Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. y) +λx:Bool. (λy:Bool. false) true +λx:Bool -> Bool. x +λx:Bool -> Bool. true +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) true +(λx:Bool -> Bool. false) (λx:Bool. (λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. false)) +(λx:Bool. x) false +true +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. false) ((λx:Bool. false) true) (λx:Bool -> Bool. (λy:Bool -> Bool. false) x) +λx:Bool. x +true +λx:Bool. λy:Bool. x +(λx:Bool. false) false +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true)) ((λx:Bool. x) true) +false +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. false) +(λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. false) false +(λx:Bool. λy:Bool -> Bool. false) true ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. y) (λx:Bool -> Bool. λy:Bool. true) +λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool -> Bool. true) ((λy:Bool. λz:Bool. false) false) +λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. true) false (λy:Bool -> Bool. x) +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) false (λx:Bool -> Bool. (λy:Bool. λz:Bool. false) true) +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true)) (λx:Bool -> Bool. true) +false +λx:Bool. (λy:Bool. λz:Bool. false) false false +λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. false) x ((λy:Bool. λz:Bool -> Bool. λw:Bool. true) x) +(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. λz:Bool. false)) true +(λx:Bool. λy:Bool -> Bool. y) true +(λx:Bool. (λy:Bool. false) false) ((λx:Bool. x) false) +(λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool. true)) true +(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. true) (λx:Bool -> Bool. x) false +λx:Bool. (λy:Bool -> Bool. y) ((λy:Bool -> Bool. λz:Bool. false) (λy:Bool. true)) +(λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool -> Bool. true) false (λx:Bool. false) (λx:Bool. true) +true +false +λx:Bool. x +(λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. x) +false +(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. λa:Bool. true) false ((λx:Bool. false) false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool. false) true)) +(λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. true)) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool. false) (λx:Bool. true) ((λx:Bool. λy:Bool -> Bool. false) false)) +λx:Bool -> Bool. (λy:Bool. λz:Bool -> Bool -> Bool. false) false ((λy:Bool. λz:Bool. λw:Bool. false) true) +(λx:Bool. λy:Bool. false) ((λx:Bool. false) false) ((λx:Bool. true) true) +λx:Bool. (λy:Bool. λz:Bool. λw:Bool. false) false false +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) true ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false))) +false +false +true +false +false +λx:Bool -> Bool. x +λx:Bool -> Bool. x +λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) ((λy:Bool. λz:Bool -> Bool. λw:Bool. false) true) +true +(λx:Bool. λy:Bool -> Bool. y) ((λx:Bool. λy:Bool. true) true true) +false +true +(λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. true) ((λx:Bool. λy:(Bool -> Bool) -> Bool. true) false (λx:Bool -> Bool. false)) +λx:Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. true) false +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool. false) (λy:Bool. false)) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true))) +λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. false) ((λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. λz:Bool. true)) +true +λx:Bool -> Bool. x +(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) (λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. true)) ((λx:Bool. λy:Bool. true) false) +(λx:(Bool -> Bool) -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. true))) +true +true +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. false) +λx:Bool. λy:Bool. true +λx:Bool -> Bool. (λy:Bool -> Bool. λz:Bool. false) x ((λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. true)) +λx:Bool. λy:Bool. y +λx:Bool -> Bool. λy:Bool. false +(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. false) (λx:Bool -> Bool. true) (λx:Bool. λy:Bool. y) +true +false +(λx:Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) +true +λx:Bool -> Bool. true +(λx:Bool. x) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false) (λx:Bool. λy:Bool. false)) +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) ((λx:Bool. false) false) (λx:Bool -> Bool. true) +λx:Bool. x +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. false) (λx:Bool -> Bool. x) (λx:Bool. λy:Bool. x) +(λx:Bool -> Bool. λy:Bool. x) (λx:Bool. x) +λx:Bool. λy:Bool. y +false +false +false +false +(λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true)) (λx:Bool. x) +(λx:(Bool -> Bool) -> Bool -> Bool. x) (λx:Bool -> Bool. x) +(λx:(Bool -> Bool) -> Bool. (λy:Bool. true) false) ((λx:Bool. λy:Bool. λz:Bool -> Bool. false) true ((λx:Bool. true) true)) +false +(λx:Bool -> Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool. false) (λx:Bool -> Bool. true) false) +false +(λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. true) false +(λx:(Bool -> Bool) -> Bool. (λy:Bool. false) true) (λx:Bool -> Bool. false) +(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. false) (λx:Bool -> Bool. (λy:Bool -> Bool. λz:Bool. true) (λy:Bool. false)) +λx:Bool -> Bool. true +λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) x (λy:Bool -> Bool. true) +true +λx:Bool. λy:Bool. x +(λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. true) true ((λx:Bool. false) true) (λx:Bool. λy:Bool. false) +(λx:Bool. true) false +false +(λx:Bool -> Bool -> Bool. false) ((λx:Bool. λy:Bool. λz:Bool. true) ((λx:Bool. true) false)) +(λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. true) (λx:Bool. x)) +(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. false) false ((λx:Bool. λy:Bool. λz:Bool. true) true) ((λx:Bool -> Bool. λy:Bool. λz:Bool. true) ((λx:Bool. λy:Bool. true) false)) +false +(λx:Bool -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false)) (λx:Bool -> Bool. (λy:Bool -> Bool. true) x) +false +(λx:(Bool -> Bool) -> Bool. (λy:Bool. true) false) (λx:Bool -> Bool. x false) +λx:Bool -> Bool. (λy:Bool. x) (x true) +(λx:Bool. λy:Bool -> Bool -> Bool. false) false (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) +(λx:Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. false) (λx:Bool. false) false ((λx:Bool. x) ((λx:Bool. true) false)) +true +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false) ((λx:Bool -> Bool -> Bool. x) ((λx:Bool. λy:Bool. λz:Bool. true) true)) +false +true +λx:Bool. (λy:Bool. x) ((λy:Bool -> Bool. true) (λy:Bool. true)) +(λx:Bool. λy:Bool. λz:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) false +λx:Bool -> Bool. λy:Bool. false +λx:Bool. λy:Bool. y +true +(λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. false) (λx:Bool. true) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true)) ((λx:Bool. λy:Bool. λz:Bool. true) false) +(λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true) +λx:Bool -> Bool. λy:Bool. true +λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. λz:Bool. true) x +false +(λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true) +(λx:Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. false) (λx:Bool. x) ((λx:Bool. λy:Bool. true) false ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true))) +(λx:Bool. λy:Bool -> Bool. false) false ((λx:Bool. λy:Bool. false) true) +true +false +λx:Bool -> Bool. λy:Bool. (λz:Bool -> Bool -> Bool. true) (λz:Bool. λw:Bool. false) +λx:Bool -> Bool. (λy:Bool. λz:Bool. false) ((λy:Bool. true) true) +(λx:Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) true true false +(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. λa:Bool. false) true ((λx:Bool. true) false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false))) +λx:Bool -> Bool. λy:Bool. false +λx:Bool -> Bool. false +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. true) true)) +(λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. false) (λx:Bool. true) ((λx:Bool. true) true) (λx:Bool. x) +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) true +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) false ((λx:Bool. λy:Bool -> Bool. false) false) ((λx:Bool. true) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true))) +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool. λy:Bool. false) (λx:Bool. x) true +(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. true) true true ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) false (λx:Bool -> Bool. λy:Bool. true)) +(λx:Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. true) true +(λx:Bool. (λy:Bool. false) x) ((λx:Bool. false) ((λx:Bool. true) false)) +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool -> Bool. true) +(λx:Bool. x) false +λx:Bool -> Bool. true +false +false +λx:Bool -> Bool. (λy:Bool. x) ((λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. true)) +(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) ((λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true)) (λx:Bool -> Bool. true) +false +(λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. false) ((λx:Bool. true) false) +λx:Bool -> Bool. λy:Bool. y +λx:Bool. x +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. true) false (λx:Bool -> Bool. false)) +false +false +false +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true))) +λx:Bool. x +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool. true) ((λx:Bool. λy:Bool -> Bool. false) true) true +false +(λx:Bool. λy:Bool. λz:Bool. false) false +true +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. y) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool -> Bool. false)) +λx:Bool. (λy:Bool. true) ((λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. true)) +(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) false true ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. false))) +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool. x) ((λx:Bool. true) true)) +λx:Bool -> Bool. false +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) +true +λx:Bool -> Bool. false +(λx:Bool. true) ((λx:(Bool -> Bool) -> Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. false))) +false +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. true) true ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. false)) (λx:Bool. x) +true +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. false) ((λy:Bool. λz:Bool -> Bool. false) false) +λx:Bool -> Bool. λy:Bool. true +false +(λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. false) true true (λx:Bool. x) +λx:Bool. λy:Bool. true +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. true)) ((λx:Bool. false) true) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false) true +(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool. λz:Bool. true)) false +λx:Bool -> Bool. λy:Bool. x y +(λx:Bool. λy:Bool -> Bool. true) false +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. false)) +λx:Bool. λy:Bool. true +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. true) +λx:Bool. λy:Bool. x +(λx:Bool. λy:Bool. x) true +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) x) (λx:Bool -> Bool. λy:Bool. y) diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt new file mode 100644 index 00000000..0c031c9f --- /dev/null +++ b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt @@ -0,0 +1,200 @@ +(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. true) (λx:Bool -> Bool. false) (λx:Bool. false) +(λx:Bool -> Bool. false) (λx:Bool. false) +true +(λx:Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. λy:Bool. false) (λx:Bool. x)) +true +(λx:Bool. x) ((λx:Bool. x) ((λx:Bool -> Bool. true) (λx:Bool. false))) +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. false) false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false) +λx:Bool -> Bool. (λy:Bool. x) false +true +(λx:Bool. λy:Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. true))) +true +λx:Bool. λy:Bool. false +false +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool. λy:Bool. false) (λx:Bool. λy:Bool. true) ((λx:Bool. λy:(Bool -> Bool) -> Bool. true) true (λx:Bool -> Bool. false)) +(λx:Bool -> Bool. (λy:Bool. false) false) ((λx:Bool -> Bool. x) (λx:Bool. false)) +false +(λx:Bool. (λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. false) false) +λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) ((λy:Bool. λz:Bool -> Bool. false) x) +true +(λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. true) true true (λx:Bool. x) +true +false +true +λx:Bool. x +false +(λx:Bool. λy:Bool. false) false ((λx:Bool. λy:Bool. true) false ((λx:Bool. true) true)) +true +(λx:Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. true) false +(λx:(Bool -> Bool) -> Bool. (λy:Bool. false) true) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) +(λx:Bool. λy:Bool -> Bool. true) ((λx:Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true))) +false +true +false +(λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true)) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true)) +λx:Bool. false +true +false +(λx:Bool. λy:Bool. false) false false +true +(λx:Bool. λy:Bool. true) ((λx:Bool. false) true) true +λx:Bool. true +(λx:Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. false) false false false +(λx:Bool. λy:Bool -> Bool. y) ((λx:Bool. x) true) +λx:Bool. false +false +λx:Bool -> Bool. x false +true +λx:Bool -> Bool. x ((λy:Bool. false) false) +λx:Bool -> Bool. x +(λx:Bool. λy:Bool. λz:Bool -> Bool. true) true ((λx:Bool. λy:Bool -> Bool. false) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true))) +(λx:Bool -> Bool. false) (λx:Bool. false) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. x) true +λx:Bool. true +false +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. true) false) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. true)) +false +false +false +true +λx:Bool. x +false +true +(λx:Bool. x) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false)) +(λx:Bool. (λy:Bool. false) x) true +false +λx:Bool -> Bool. (λy:Bool. λz:Bool. true) true true +(λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. λz:Bool. true) false false) +false +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) true ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true) ((λx:Bool. λy:Bool. false) ((λx:Bool. true) false)) +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool. true) true (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. false) true ((λx:Bool. λy:Bool. true) true)) +true +false +false +(λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool. true)) false +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. false) +true +false +false +(λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true) +λx:Bool. x +true +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:Bool. true) true) (λx:Bool. x) +(λx:Bool. (λy:Bool. true) x) false +(λx:Bool -> Bool. x) (λx:Bool. x) false +(λx:Bool. λy:Bool -> Bool. true) false (λx:Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. true)) +(λx:Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. false) true ((λx:Bool. true) true) ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. true) true) +false +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false) (λx:Bool -> Bool. true) +false +false +λx:Bool. true +true +λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. true) ((λy:Bool. λz:Bool. false) true) +λx:Bool -> Bool. x +(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool. true) true) false +true +λx:Bool -> Bool. x +(λx:Bool. λy:Bool -> Bool. false) ((λx:Bool. false) false) (λx:Bool. x) +(λx:Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) (λx:Bool. true) false (λx:Bool -> Bool. x true) +λx:Bool. false +false +λx:Bool. false +λx:Bool. false +true +false +false +(λx:Bool. (λy:Bool. true) true) ((λx:Bool -> Bool. λy:Bool -> Bool -> Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) true)) +(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. y) (λx:Bool -> Bool. false) +λx:Bool. false +(λx:Bool -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true)) ((λx:Bool. λy:Bool -> Bool. false) false) +(λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. false) false) false +(λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false) +(λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. x false) +false +(λx:Bool. true) false +λx:Bool -> Bool. λy:Bool. true +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. false) ((λy:Bool. λz:Bool -> Bool. true) true) +false +true +λx:Bool -> Bool. λy:Bool. y +true +false +true +(λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) true)) +λx:Bool -> Bool. λy:Bool. (λz:Bool. true) y +λx:Bool. true +(λx:Bool. λy:Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) false +λx:Bool. (λy:(Bool -> Bool) -> Bool. x) (λy:Bool -> Bool. x) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true) ((λx:Bool. x) false) +true +λx:Bool. λy:Bool. x +(λx:Bool. false) false +false +(λx:Bool. true) true +(λx:Bool. λy:Bool. λz:Bool. true) false +true +false +(λx:(Bool -> Bool) -> Bool. false) ((λx:Bool. λy:Bool. λz:Bool -> Bool. true) false ((λx:Bool. false) true)) +(λx:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false))) +(λx:Bool -> Bool. (λy:Bool. true) true) (λx:Bool. (λy:Bool. false) x) +false +true +true +(λx:Bool. λy:Bool. λz:Bool. true) false true true +false +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) false ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false) (λx:Bool. x) +(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) true true (λx:Bool -> Bool. (λy:Bool. λz:Bool. false) false) +false +false +true +λx:Bool -> Bool. false +false +(λx:(Bool -> Bool) -> Bool. (λy:Bool. true) true) (λx:Bool -> Bool. true) +(λx:Bool -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. false) (λx:Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool. λz:Bool -> Bool. false) false true) +λx:Bool. x +false +(λx:Bool. λy:Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. false) (λx:Bool -> Bool. true) ((λx:Bool. false) false)) +(λx:Bool. x) true +true +λx:Bool -> Bool. λy:Bool. false +true +false +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false) +(λx:Bool. λy:Bool -> Bool. false) ((λx:Bool. false) true) ((λx:Bool. λy:Bool. λz:Bool. true) false true) +false +(λx:Bool -> Bool. (λy:Bool. true) false) (λx:Bool. false) +false +false +true +false +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true (λx:Bool. x) false +(λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) true ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) +true +true +(λx:(Bool -> Bool) -> Bool. x) (λx:Bool -> Bool. false) +(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. true) ((λx:Bool. true) true) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) false (λx:Bool -> Bool. false)) +true +λx:Bool. (λy:Bool. true) ((λy:Bool -> Bool. true) (λy:Bool. true)) +true +true +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) (λx:Bool -> Bool. true) false ((λx:Bool. λy:Bool -> Bool. false) false) +λx:Bool. x +λx:Bool -> Bool. false +true +λx:Bool -> Bool. true +(λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. true) ((λx:Bool. x) false) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) (λx:Bool -> Bool. false) +λx:Bool. (λy:Bool. λz:Bool. false) ((λy:Bool -> Bool. true) (λy:Bool. true)) +false +λx:Bool. (λy:Bool. λz:Bool. true) x +λx:Bool. (λy:Bool. λz:Bool. false) x x +true +(λx:Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. false) true ((λx:Bool. false) false) ((λx:Bool. x) false) +(λx:Bool -> Bool. x true) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. x)) +(λx:Bool -> Bool -> Bool. λy:Bool. y) ((λx:Bool. λy:Bool. λz:Bool. λw:Bool. true) true false) +true +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false +(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. true) true (λx:Bool. λy:Bool. false) false +λx:Bool. x diff --git a/src/autodiff_pr/losses.jl b/src/autodiff_pr/losses.jl index d2ed9391..9ad94781 100644 --- a/src/autodiff_pr/losses.jl +++ b/src/autodiff_pr/losses.jl @@ -50,6 +50,11 @@ end function neg_entropy(p::Dist, domain::Set{<:Dist}) sum(domain) do x - LogPr(prob_equals(p, x)) * exp(LogPr(prob_equals(p, x))) + pe = prob_equals(p, x) + if pe isa Bool + Constant(0) + else + LogPr(pe) * exp(LogPr(pe)) + end end end From 43099e839ee2f31e70760082ec5ee1c84b50de05 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 13 Jan 2024 18:02:44 -0800 Subject: [PATCH 030/231] add entropy approx output --- examples/qc/stlc/entropy_approx.jl | 4 +- ...ing_curve_param_by_sz=true,epochs=2000.csv | 258 +-- .../log_param_by_sz=true,epochs=2000.log | 10 +- .../entropy/sz=2,tysz=1/terms_before.txt | 294 +-- ...s_trained_param_by_sz=true,epochs=2000.txt | 250 +- ...ing_curve_param_by_sz=true,epochs=2000.csv | 2001 +++++++++++++++++ .../log_param_by_sz=true,epochs=2000.log | 31 + .../entropy/sz=5,tysz=2/terms_before.txt | 200 ++ ...s_trained_param_by_sz=true,epochs=2000.txt | 200 ++ .../uniform/sz=5,tysz=3/dist_before.csv | 33 + .../log_param_by_sz=true,epochs=200.log | 19 + .../uniform/sz=5,tysz=3/terms_before.txt | 200 ++ 12 files changed, 3092 insertions(+), 408 deletions(-) create mode 100644 examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv create mode 100644 examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/log_param_by_sz=true,epochs=2000.log create mode 100644 examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/terms_before.txt create mode 100644 examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt create mode 100644 examples/qc/stlc/output/v1/num_apps/uniform/sz=5,tysz=3/dist_before.csv create mode 100644 examples/qc/stlc/output/v1/num_apps/uniform/sz=5,tysz=3/log_param_by_sz=true,epochs=200.log create mode 100644 examples/qc/stlc/output/v1/num_apps/uniform/sz=5,tysz=3/terms_before.txt diff --git a/examples/qc/stlc/entropy_approx.jl b/examples/qc/stlc/entropy_approx.jl index d35ca197..b65d94b1 100644 --- a/examples/qc/stlc/entropy_approx.jl +++ b/examples/qc/stlc/entropy_approx.jl @@ -14,8 +14,8 @@ include("lib/generator.jl") # Specify generator, initial & target distributions METRIC = "entropy" -INIT_SIZE = 2 # size passed to top call of gen_expr -GEN_TYP_SIZE = 1 # size passed to all calls of gen_type +INIT_SIZE = 5 # size passed to top call of gen_expr +GEN_TYP_SIZE = 2 # size passed to all calls of gen_type # Hyperparams PARAMETERIZE_FLIP_GROUPS_BY_SZ = true # whether flips at the same code location diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/learning_curve_param_by_sz=true,epochs=2000.csv b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/learning_curve_param_by_sz=true,epochs=2000.csv index 260516f7..21072c7a 100644 --- a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/learning_curve_param_by_sz=true,epochs=2000.csv +++ b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/learning_curve_param_by_sz=true,epochs=2000.csv @@ -26,7 +26,7 @@ 25 -8.10459612652169 26 -8.105456318100485 27 -8.106295923744682 -28 -8.107115795651932 +28 -8.10711579565193 29 -8.107916740831168 30 -8.108699523691415 31 -8.109464868480455 @@ -46,7 +46,7 @@ 45 -8.118676119961945 46 -8.119245507500525 47 -8.119805106924256 -48 -8.12035522233654 +48 -8.120355222336539 49 -8.120896143707437 50 -8.121428147651496 51 -8.121951498160252 @@ -56,29 +56,29 @@ 55 -8.123963241394648 56 -8.124446888902488 57 -8.12492323779292 -58 -8.125392480923665 +58 -8.125392480923667 59 -8.125854803048234 60 -8.126310381243913 61 -8.126759385315127 62 -8.127201978173618 63 -8.127638316196819 64 -8.128068549565718 -65 -8.128492822583404 +65 -8.128492822583402 66 -8.128911273975463 -67 -8.129324037173292 +67 -8.12932403717329 68 -8.129731240581302 69 -8.130133007829029 70 -8.130529458008965 71 -8.130920705901026 72 -8.131306862184374 -73 -8.131688033637401 +73 -8.1316880336374 74 -8.13206432332651 75 -8.132435830784415 76 -8.132802652178501 77 -8.13316488046991 78 -8.133522605563813 79 -8.133875914451453 -80 -8.134224891344392 +80 -8.13422489134439 81 -8.134569617801441 82 -8.1349101728487 83 -8.135246633093084 @@ -90,7 +90,7 @@ 89 -8.137183414767826 90 -8.137493174347794 91 -8.137799376649667 -92 -8.13810208071528 +92 -8.138102080715278 93 -8.138401344018266 94 -8.138697222526748 95 -8.138989770762759 @@ -100,7 +100,7 @@ 99 -8.140127703893747 100 -8.140404371782832 101 -8.140678009135653 -102 -8.1409486617842 +102 -8.140948661784199 103 -8.141216374494878 104 -8.141481191006251 105 -8.141743154064976 @@ -114,7 +114,7 @@ 113 -8.143740962228346 114 -8.143979019914228 115 -8.144214603867884 -116 -8.144447747873226 +116 -8.144447747873228 117 -8.144678485044635 118 -8.144906847846785 119 -8.145132868113665 @@ -130,7 +130,7 @@ 129 -8.147270818244307 130 -8.147473008145429 131 -8.147673194282708 -132 -8.147871401712374 +132 -8.147871401712376 133 -8.148067655059208 134 -8.148261978527135 135 -8.148454395909418 @@ -149,10 +149,10 @@ 148 -8.15079250378479 149 -8.150960525863052 150 -8.151126955468076 -151 -8.15129181096721 +151 -8.151291810967209 152 -8.151455110447788 153 -8.151616871722903 -154 -8.151777112336996 +154 -8.151777112336998 155 -8.15193584957132 156 -8.152093100449228 157 -8.15224888174133 @@ -182,19 +182,19 @@ 181 -8.155586372729157 182 -8.15571021672006 183 -8.155832952549682 -184 -8.155954591703933 +184 -8.155954591703935 185 -8.15607514551816 186 -8.156194625179692 187 -8.15631304173036 -188 -8.156430406068942 +188 -8.15643040606894 189 -8.156546728953561 -190 -8.156662021004042 +190 -8.15666202100404 191 -8.156776292704198 192 -8.156889554404101 193 -8.157001816322271 194 -8.157113088547849 195 -8.157223381042709 -196 -8.157332703643528 +196 -8.157332703643526 197 -8.157441066063821 198 -8.157548477895933 199 -8.157654948612985 @@ -217,11 +217,11 @@ 216 -8.15932959895898 217 -8.15942062430913 218 -8.159510868213347 -219 -8.159600338116126 +219 -8.159600338116125 220 -8.159689041375966 221 -8.159776985266658 222 -8.159864176978507 -223 -8.159950623619595 +223 -8.159950623619594 224 -8.160036332216949 225 -8.16012130971776 226 -8.160205562990512 @@ -246,7 +246,7 @@ 245 -8.161677367719488 246 -8.16174846708018 247 -8.16181897012511 -248 -8.161888882247236 +248 -8.16188888224724 249 -8.16195820878255 250 -8.162026955010818 251 -8.16209512615634 @@ -298,7 +298,7 @@ 297 -8.164689325870578 298 -8.164735485871486 299 -8.16478126834578 -300 -8.164826676505776 +300 -8.164826676505774 301 -8.164871713533739 302 -8.164916382582268 303 -8.164960686774595 @@ -316,7 +316,7 @@ 315 -8.165464976474702 316 -8.165504808968361 317 -8.165544317423501 -318 -8.16558350455976 +318 -8.165583504559761 319 -8.165622373072129 320 -8.165660925631219 321 -8.165699164883517 @@ -329,7 +329,7 @@ 328 -8.165958284414616 329 -8.165994109673814 330 -8.166029644399972 -331 -8.166064891011796 +331 -8.166064891011798 332 -8.166099851906504 333 -8.16613452946002 334 -8.166168926027211 @@ -337,7 +337,7 @@ 336 -8.16623688551805 337 -8.16627045304803 338 -8.166303748804761 -339 -8.166336775040955 +339 -8.166336775040957 340 -8.166369533989506 341 -8.166402027863695 342 -8.166434258857368 @@ -383,7 +383,7 @@ 382 -8.167530920088673 383 -8.167554046154121 384 -8.167576986220846 -385 -8.167599741803585 +385 -8.167599741803583 386 -8.167622314404325 387 -8.167644705512432 388 -8.167666916604748 @@ -396,7 +396,7 @@ 395 -8.167817475287805 396 -8.167838297955454 397 -8.167858953354127 -398 -8.167879442841585 +398 -8.167879442841583 399 -8.167899767764252 400 -8.167919929457337 401 -8.167939929244909 @@ -416,10 +416,10 @@ 415 -8.168203642025409 416 -8.16822136484847 417 -8.168238945515956 -418 -8.168256385177166 +418 -8.168256385177168 419 -8.168273684971926 420 -8.16829084603064 -421 -8.168307869474404 +421 -8.168307869474406 422 -8.168324756415066 423 -8.16834150795531 424 -8.168358125188737 @@ -449,7 +449,7 @@ 448 -8.168719338174744 449 -8.168732928131986 450 -8.168746409271106 -451 -8.168759782467893 +451 -8.168759782467895 452 -8.168773048590992 453 -8.168786208501965 454 -8.16879926305535 @@ -460,7 +460,7 @@ 459 -8.16886298488333 460 -8.168875424850746 461 -8.168887765250666 -462 -8.168900006883547 +462 -8.168900006883545 463 -8.16891215054333 464 -8.168924197017516 465 -8.168936147087194 @@ -478,12 +478,12 @@ 477 -8.16907230418538 478 -8.169083069259791 479 -8.16909374822222 -480 -8.169104341763934 +480 -8.169104341763935 481 -8.169114850570608 482 -8.169125275322354 483 -8.16913561669379 484 -8.16914587535407 -485 -8.169156051966931 +485 -8.16915605196693 486 -8.16916614719074 487 -8.169176161678546 488 -8.16918609607811 @@ -513,7 +513,7 @@ 512 -8.169402090833092 513 -8.169410218957886 514 -8.169418282117899 -515 -8.16942628083361 +515 -8.169426280833612 516 -8.169434215621305 517 -8.169442086993103 518 -8.169449895457008 @@ -558,19 +558,19 @@ 557 -8.169710341807415 558 -8.169716007065784 559 -8.16972162707602 -560 -8.16972720220009 -561 -8.169732732797058 +560 -8.169727202200091 +561 -8.16973273279706 562 -8.16973821922311 563 -8.169743661831566 564 -8.169749060972913 565 -8.169754416994834 -566 -8.169759730242218 +566 -8.16975973024222 567 -8.169765001057183 568 -8.169770229779113 -569 -8.16977541674466 +569 -8.169775416744661 570 -8.169780562287784 571 -8.169785666739758 -572 -8.169790730429208 +572 -8.169790730429206 573 -8.169795753682113 574 -8.169800736821855 575 -8.169805680169206 @@ -586,7 +586,7 @@ 585 -8.169852993820328 586 -8.169857519901898 587 -8.169862009845636 -588 -8.16986646394046 +588 -8.169866463940458 589 -8.169870882472964 590 -8.169875265727457 591 -8.169879613985962 @@ -615,20 +615,20 @@ 614 -8.16997058108021 615 -8.169974168430223 616 -8.169977727145682 -617 -8.169981257455403 +617 -8.169981257455401 618 -8.169984759586374 619 -8.169988233763771 620 -8.169991680210963 621 -8.16999509914953 622 -8.16999849079928 -623 -8.170001855378265 +623 -8.170001855378263 624 -8.170005193102782 625 -8.170008504187408 626 -8.170011788844995 627 -8.170015047286698 628 -8.170018279721976 629 -8.170021486358616 -630 -8.170024667402739 +630 -8.170024667402737 631 -8.170027823058817 632 -8.17003095352969 633 -8.170034059016569 @@ -636,14 +636,14 @@ 635 -8.170040195835167 636 -8.170043227561314 637 -8.170046235092348 -638 -8.170049218621566 +638 -8.170049218621568 639 -8.17005217834071 640 -8.170055114439991 641 -8.170058027108098 642 -8.170060916532211 643 -8.170063782898012 644 -8.1700666263897 -645 -8.170069447189992 +645 -8.170069447189993 646 -8.170072245480156 647 -8.170075021439999 648 -8.170077775247895 @@ -658,21 +658,21 @@ 657 -8.170101591415602 658 -8.170104133206234 659 -8.17010665471532 -660 -8.170109156104852 +660 -8.17010915610485 661 -8.170111637535513 662 -8.170114099166716 663 -8.170116541156588 664 -8.170118963661995 665 -8.170121366838549 666 -8.170123750840618 -667 -8.170126115821335 +667 -8.170126115821336 668 -8.170128461932608 669 -8.170130789325132 670 -8.170133098148394 671 -8.170135388550687 672 -8.170137660679123 673 -8.170139914679625 -674 -8.170142150696964 +674 -8.170142150696966 675 -8.170144368874748 676 -8.170146569355435 677 -8.17014875228034 @@ -722,7 +722,7 @@ 721 -8.170229377597947 722 -8.170230899966638 723 -8.170232410193499 -724 -8.170233908375442 +724 -8.17023390837544 725 -8.170235394608612 726 -8.170236868988384 727 -8.170238331609374 @@ -736,10 +736,10 @@ 735 -8.17024962036787 736 -8.17025098129461 737 -8.170252331368097 -738 -8.170253670674953 +738 -8.170253670674951 739 -8.170254999301106 740 -8.170256317331802 -741 -8.170257624851605 +741 -8.170257624851603 742 -8.170258921944395 743 -8.170260208693396 744 -8.170261485181156 @@ -760,7 +760,7 @@ 759 -8.17027945531041 760 -8.17028057832303 761 -8.170281692381069 -762 -8.17028279755598 +762 -8.170282797555982 763 -8.170283893918654 764 -8.1702849815394 765 -8.170286060487978 @@ -779,7 +779,7 @@ 778 -8.170299328396515 779 -8.17030029295511 780 -8.170301249823453 -781 -8.170302199062904 +781 -8.170302199062906 782 -8.17030314073433 783 -8.170304074898112 784 -8.17030500161415 @@ -788,7 +788,7 @@ 787 -8.170307737667624 788 -8.170308635182156 789 -8.170309525541343 -790 -8.170310408802262 +790 -8.17031040880226 791 -8.17031128502155 792 -8.170312154255377 793 -8.17031301655948 @@ -797,17 +797,17 @@ 796 -8.170315562444053 797 -8.170316397577686 798 -8.170317226053632 -799 -8.170318047925004 +799 -8.170318047925006 800 -8.17031886324449 801 -8.170319672064355 802 -8.17032047443645 803 -8.170321270412211 804 -8.170322060042661 -805 -8.17032284337842 +805 -8.170322843378422 806 -8.170323620469702 807 -8.170324391366318 808 -8.170325156117684 -809 -8.17032591477282 +809 -8.170325914772821 810 -8.170326667380355 811 -8.17032741398853 812 -8.1703281546452 @@ -823,13 +823,13 @@ 822 -8.170335244138132 823 -8.17033592237961 824 -8.17033659521491 -825 -8.170337262687147 +825 -8.170337262687148 826 -8.170337924839101 827 -8.170338581713203 828 -8.170339233351552 829 -8.170339879795906 830 -8.17034052108769 -831 -8.170341157268002 +831 -8.170341157268004 832 -8.170341788377609 833 -8.170342414456954 834 -8.170343035546153 @@ -843,7 +843,7 @@ 842 -8.170347829324413 843 -8.170348407255691 844 -8.17034898058082 -845 -8.170349549336537 +845 -8.170349549336539 846 -8.170350113559284 847 -8.170350673285208 848 -8.17035122855017 @@ -866,7 +866,7 @@ 865 -8.17036001892553 866 -8.170360499710052 867 -8.17036097666312 -868 -8.170361449815289 +868 -8.17036144981529 869 -8.170361919196868 870 -8.170362384837919 871 -8.17036284676827 @@ -879,9 +879,9 @@ 878 -8.170365978836976 879 -8.17036641212729 880 -8.17036684196485 -881 -8.170367268377188 +881 -8.170367268377186 882 -8.170367691391611 -883 -8.170368111035215 +883 -8.170368111035213 884 -8.170368527334873 885 -8.170368940317246 886 -8.170369350008784 @@ -893,7 +893,7 @@ 892 -8.170371740505226 893 -8.170372127883963 894 -8.170372512176 -895 -8.170372893405943 +895 -8.170372893405942 896 -8.170373271598201 897 -8.170373646777001 898 -8.17037401896636 @@ -903,7 +903,7 @@ 902 -8.170375478303217 903 -8.170375835899094 904 -8.170376190645708 -905 -8.170376542565775 +905 -8.170376542565773 906 -8.170376891681823 907 -8.17037723801621 908 -8.170377581591111 @@ -919,11 +919,11 @@ 918 -8.17038087032227 919 -8.170381184956794 920 -8.170381497084534 -921 -8.170381806725471 +921 -8.17038180672547 922 -8.170382113899427 923 -8.17038241862607 924 -8.17038272092491 -925 -8.170383020815292 +925 -8.17038302081529 926 -8.170383318316418 927 -8.170383613447335 928 -8.170383906226936 @@ -962,7 +962,7 @@ 961 -8.170392364078761 962 -8.170392587146377 963 -8.170392808437047 -964 -8.170393027964929 +964 -8.17039302796493 965 -8.170393245744075 966 -8.170393461788422 967 -8.170393676111791 @@ -972,8 +972,8 @@ 971 -8.17039451646819 972 -8.170394722390236 973 -8.17039492667198 -974 -8.170395129326485 -975 -8.170395330366725 +974 -8.170395129326486 +975 -8.170395330366723 976 -8.170395529805559 977 -8.170395727655752 978 -8.170395923929965 @@ -994,7 +994,7 @@ 993 -8.170398687231996 994 -8.170398859932293 995 -8.170399031257018 -996 -8.170399201217139 +996 -8.170399201217137 997 -8.17039936982352 998 -8.170399537086956 999 -8.170399703018145 @@ -1034,7 +1034,7 @@ 1033 -8.170404623046274 1034 -8.170404748470201 1035 -8.170404872895242 -1036 -8.170404996329356 +1036 -8.170404996329358 1037 -8.170405118780442 1038 -8.170405240256324 1039 -8.170405360764775 @@ -1056,7 +1056,7 @@ 1055 -8.170407163434742 1056 -8.17040726862743 1057 -8.17040737298241 -1058 -8.170407476506355 +1058 -8.170407476506353 1059 -8.170407579205882 1060 -8.17040768108756 1061 -8.170407782157907 @@ -1085,8 +1085,8 @@ 1084 -8.17040989708293 1085 -8.170409980506793 1086 -8.170410063266356 -1087 -8.170410145366908 -1088 -8.170410226813699 +1087 -8.170410145366906 +1088 -8.170410226813697 1089 -8.170410307611938 1090 -8.170410387766788 1091 -8.170410467283377 @@ -1095,7 +1095,7 @@ 1094 -8.170410702054204 1095 -8.170410779068176 1096 -8.170410855468905 -1097 -8.170410931261273 +1097 -8.170410931261275 1098 -8.170411006450129 1099 -8.170411081040276 1100 -8.170411155036485 @@ -1111,16 +1111,16 @@ 1110 -8.170411863354282 1111 -8.170411931121247 1112 -8.170411998348621 -1113 -8.1704120650407 +1113 -8.170412065040699 1114 -8.170412131201749 1115 -8.170412196835994 1116 -8.17041226194763 1117 -8.170412326540827 1118 -8.170412390619708 -1119 -8.170412454188368 +1119 -8.17041245418837 1120 -8.170412517250877 -1121 -8.170412579811261 -1122 -8.170412641873522 +1121 -8.17041257981126 +1122 -8.17041264187352 1123 -8.170412703441624 1124 -8.170412764519506 1125 -8.170412825111072 @@ -1141,7 +1141,7 @@ 1140 -8.17041367818837 1141 -8.170413731505212 1142 -8.170413784397548 -1143 -8.17041383686876 +1143 -8.170413836868759 1144 -8.170413888922198 1145 -8.170413940561195 1146 -8.170413991789045 @@ -1167,10 +1167,10 @@ 1166 -8.170414934862814 1167 -8.170414978174314 1168 -8.170415021140988 -1169 -8.170415063765581 +1169 -8.17041506376558 1170 -8.170415106050818 1171 -8.170415147999401 -1172 -8.170415189614012 +1172 -8.17041518961401 1173 -8.170415230897307 1174 -8.170415271851928 1175 -8.170415312480493 @@ -1191,7 +1191,7 @@ 1190 -8.170415884499393 1191 -8.170415920250473 1192 -8.170415955716932 -1193 -8.170415990901034 +1193 -8.170415990901033 1194 -8.17041602580503 1195 -8.170416060431151 1196 -8.170416094781608 @@ -1202,7 +1202,7 @@ 1201 -8.170416262475156 1202 -8.170416295217121 1203 -8.170416327698426 -1204 -8.170416359921143 +1204 -8.170416359921145 1205 -8.170416391887338 1206 -8.170416423599049 1207 -8.170416455058302 @@ -1217,7 +1217,7 @@ 1216 -8.170416727157484 1217 -8.170416756200131 1218 -8.170416785011572 -1219 -8.17041681359365 +1219 -8.170416813593652 1220 -8.170416841948194 1221 -8.170416870077009 1222 -8.170416897981898 @@ -1230,7 +1230,7 @@ 1229 -8.170417087194124 1230 -8.170417113370597 1231 -8.170417139338687 -1232 -8.170417165100051 +1232 -8.170417165100055 1233 -8.170417190656341 1234 -8.170417216009184 1235 -8.170417241160203 @@ -1253,7 +1253,7 @@ 1252 -8.17041763935697 1253 -8.170417661137911 1254 -8.170417682745466 -1255 -8.170417704181014 +1255 -8.170417704181013 1256 -8.170417725445928 1257 -8.170417746541567 1258 -8.170417767469273 @@ -1302,7 +1302,7 @@ 1301 -8.170418525983546 1302 -8.170418540706764 1303 -8.170418555312787 -1304 -8.170418569802548 +1304 -8.170418569802546 1305 -8.170418584176968 1306 -8.170418598436973 1307 -8.170418612583468 @@ -1322,7 +1322,7 @@ 1321 -8.170418799209232 1322 -8.170418811757614 1323 -8.170418824206115 -1324 -8.170418836555529 +1324 -8.170418836555527 1325 -8.170418848806644 1326 -8.170418860960243 1327 -8.170418873017104 @@ -1357,7 +1357,7 @@ 1356 -8.170419183861245 1357 -8.170419193347943 1358 -8.170419202759133 -1359 -8.170419212095414 +1359 -8.170419212095412 1360 -8.170419221357381 1361 -8.17041923054563 1362 -8.170419239660745 @@ -1379,8 +1379,8 @@ 1378 -8.170419376017637 1379 -8.170419383974886 1380 -8.170419391868801 -1381 -8.170419399699886 -1382 -8.170419407468641 +1381 -8.170419399699885 +1382 -8.17041940746864 1383 -8.17041941517556 1384 -8.17041942282114 1385 -8.170419430405865 @@ -1388,7 +1388,7 @@ 1387 -8.17041944539469 1388 -8.170419452799749 1389 -8.170419460145867 -1390 -8.170419467433517 +1390 -8.170419467433515 1391 -8.17041947466316 1392 -8.170419481835262 1393 -8.17041948895028 @@ -1402,7 +1402,7 @@ 1401 -8.17041954386916 1402 -8.17041955049044 1403 -8.170419557059018 -1404 -8.170419563575315 +1404 -8.170419563575317 1405 -8.170419570039751 1406 -8.170419576452733 1407 -8.170419582814674 @@ -1434,7 +1434,7 @@ 1433 -8.1704197315767 1434 -8.170419736704002 1435 -8.170419741790496 -1436 -8.170419746836506 +1436 -8.170419746836505 1437 -8.170419751842354 1438 -8.170419756808363 1439 -8.170419761734847 @@ -1467,7 +1467,7 @@ 1466 -8.170419880902129 1467 -8.170419884840967 1468 -8.170419888748457 -1469 -8.170419892624848 +1469 -8.170419892624846 1470 -8.170419896470387 1471 -8.170419900285323 1472 -8.170419904069893 @@ -1476,12 +1476,12 @@ 1475 -8.170419915243842 1476 -8.170419918909364 1477 -8.17041992254571 -1478 -8.170419926153116 +1478 -8.170419926153118 1479 -8.170419929731814 1480 -8.170419933282027 1481 -8.170419936803988 1482 -8.170419940297917 -1483 -8.17041994376404 +1483 -8.170419943764038 1484 -8.170419947202573 1485 -8.170419950613745 1486 -8.170419953997765 @@ -1490,7 +1490,7 @@ 1489 -8.170419963989092 1490 -8.170419967266662 1491 -8.17041997051815 -1492 -8.170419973743757 +1492 -8.170419973743758 1493 -8.170419976943695 1494 -8.170419980118163 1495 -8.17041998326737 @@ -1504,7 +1504,7 @@ 1503 -8.170420007575286 1504 -8.170420010505971 1505 -8.17042001341333 -1506 -8.17042001629755 +1506 -8.170420016297552 1507 -8.170420019158819 1508 -8.170420021997316 1509 -8.17042002481322 @@ -1513,12 +1513,12 @@ 1512 -8.170420033127183 1513 -8.170420035854509 1514 -8.17042003856013 -1515 -8.17042004124422 +1515 -8.170420041244219 1516 -8.170420043906946 1517 -8.170420046548482 1518 -8.170420049168992 1519 -8.170420051768652 -1520 -8.17042005434762 +1520 -8.170420054347618 1521 -8.17042005690606 1522 -8.170420059444142 1523 -8.170420061962027 @@ -1527,7 +1527,7 @@ 1526 -8.170420069396076 1527 -8.170420071834755 1528 -8.170420074254027 -1529 -8.170420076654043 +1529 -8.170420076654045 1530 -8.170420079034962 1531 -8.170420081396928 1532 -8.1704200837401 @@ -1535,7 +1535,7 @@ 1534 -8.170420088370646 1535 -8.170420090658315 1536 -8.170420092927777 -1537 -8.17042009517918 +1537 -8.170420095179182 1538 -8.170420097412666 1539 -8.170420099628375 1540 -8.170420101826451 @@ -1549,7 +1549,7 @@ 1548 -8.170420118792856 1549 -8.170420120838411 1550 -8.170420122867691 -1551 -8.170420124880819 +1551 -8.170420124880817 1552 -8.170420126877922 1553 -8.170420128859135 1554 -8.170420130824578 @@ -1587,7 +1587,7 @@ 1586 -8.170420186100415 1587 -8.170420187610315 1588 -8.170420189108198 -1589 -8.170420190594161 +1589 -8.17042019059416 1590 -8.170420192068296 1591 -8.170420193530699 1592 -8.170420194981466 @@ -1613,7 +1613,7 @@ 1612 -8.170420221690161 1613 -8.170420222916828 1614 -8.170420224133732 -1615 -8.170420225340953 +1615 -8.170420225340951 1616 -8.170420226538566 1617 -8.170420227726646 1618 -8.170420228905273 @@ -1632,7 +1632,7 @@ 1631 -8.17042024340045 1632 -8.170420244454343 1633 -8.170420245499848 -1634 -8.17042024653703 +1634 -8.170420246537033 1635 -8.17042024756596 1636 -8.170420248586703 1637 -8.170420249599323 @@ -1647,7 +1647,7 @@ 1646 -8.170420258357847 1647 -8.170420259292705 1648 -8.170420260220125 -1649 -8.170420261140162 +1649 -8.170420261140164 1650 -8.170420262052879 1651 -8.170420262958332 1652 -8.170420263856581 @@ -1655,7 +1655,7 @@ 1654 -8.170420265631687 1655 -8.17042026650866 1656 -8.170420267378656 -1657 -8.170420268241724 +1657 -8.170420268241726 1658 -8.170420269097928 1659 -8.170420269947314 1660 -8.170420270789943 @@ -1674,7 +1674,7 @@ 1673 -8.170420281152907 1674 -8.17042028190636 1675 -8.170420282653817 -1676 -8.170420283395327 +1676 -8.170420283395325 1677 -8.170420284130936 1678 -8.17042028486069 1679 -8.170420285584637 @@ -1691,15 +1691,15 @@ 1690 -8.170420293177727 1691 -8.170420293835488 1692 -8.170420294488013 -1693 -8.170420295135346 +1693 -8.170420295135347 1694 -8.170420295777527 1695 -8.170420296414598 1696 -8.170420297046599 -1697 -8.17042029767357 +1697 -8.170420297673571 1698 -8.170420298295554 1699 -8.170420298912587 1700 -8.170420299524707 -1701 -8.17042030013196 +1701 -8.170420300131958 1702 -8.170420300734378 1703 -8.170420301332001 1704 -8.170420301924871 @@ -1717,7 +1717,7 @@ 1716 -8.170420308681814 1717 -8.170420309216194 1718 -8.17042030974632 -1719 -8.17042031027223 +1719 -8.170420310272227 1720 -8.17042031079395 1721 -8.170420311311522 1722 -8.170420311824973 @@ -1729,7 +1729,7 @@ 1728 -8.170420314821008 1729 -8.170420315306531 1730 -8.170420315788192 -1731 -8.170420316266018 +1731 -8.17042031626602 1732 -8.170420316740044 1733 -8.170420317210295 1734 -8.170420317676806 @@ -1737,7 +1737,7 @@ 1736 -8.170420318598719 1737 -8.17042031905418 1738 -8.170420319506016 -1739 -8.170420319954257 +1739 -8.170420319954259 1740 -8.17042032039893 1741 -8.170420320840066 1742 -8.17042032127769 @@ -1754,7 +1754,7 @@ 1753 -8.170420325867703 1754 -8.170420326265317 1755 -8.17042032665977 -1756 -8.170420327051081 +1756 -8.170420327051083 1757 -8.17042032743928 1758 -8.170420327824388 1759 -8.170420328206433 @@ -1779,11 +1779,11 @@ 1778 -8.1704203349143 1779 -8.170420335239925 1780 -8.170420335562957 -1781 -8.170420335883419 +1781 -8.17042033588342 1782 -8.170420336201332 1783 -8.170420336516715 1784 -8.170420336829586 -1785 -8.170420337139968 +1785 -8.17042033713997 1786 -8.170420337447881 1787 -8.170420337753344 1788 -8.170420338056374 @@ -1792,7 +1792,7 @@ 1791 -8.170420338951077 1792 -8.170420339244576 1793 -8.170420339535742 -1794 -8.170420339824588 +1794 -8.17042033982459 1795 -8.170420340111137 1796 -8.170420340395408 1797 -8.170420340677413 @@ -1846,7 +1846,7 @@ 1845 -8.170420351875565 1846 -8.170420352066216 1847 -8.170420352255348 -1848 -8.170420352442976 +1848 -8.170420352442978 1849 -8.170420352629112 1850 -8.170420352813764 1851 -8.170420352996949 @@ -1861,13 +1861,13 @@ 1860 -8.170420354581385 1861 -8.170420354750503 1862 -8.170420354918274 -1863 -8.170420355084712 -1864 -8.170420355249824 +1863 -8.170420355084714 +1864 -8.170420355249826 1865 -8.170420355413626 1866 -8.17042035557612 -1867 -8.170420355737324 +1867 -8.170420355737322 1868 -8.170420355897242 -1869 -8.17042035605589 +1869 -8.170420356055889 1870 -8.170420356213274 1871 -8.170420356369405 1872 -8.170420356524296 @@ -1912,7 +1912,7 @@ 1911 -8.170420361693767 1912 -8.170420361806286 1913 -8.170420361917913 -1914 -8.17042036202865 +1914 -8.170420362028649 1915 -8.170420362138506 1916 -8.170420362247487 1917 -8.1704203623556 @@ -1942,7 +1942,7 @@ 1941 -8.170420364707322 1942 -8.170420364795863 1943 -8.170420364883698 -1944 -8.170420364970836 +1944 -8.170420364970834 1945 -8.170420365057279 1946 -8.170420365143032 1947 -8.170420365228107 @@ -1951,7 +1951,7 @@ 1950 -8.170420365479284 1951 -8.17042036556168 1952 -8.170420365643421 -1953 -8.170420365724514 +1953 -8.170420365724512 1954 -8.170420365804958 1955 -8.170420365884764 1956 -8.170420365963935 diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/log_param_by_sz=true,epochs=2000.log b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/log_param_by_sz=true,epochs=2000.log index 208e3f00..642b15d1 100644 --- a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/log_param_by_sz=true,epochs=2000.log +++ b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/log_param_by_sz=true,epochs=2000.log @@ -1,4 +1,4 @@ -2024-01-12T20:37:48.710 +2024-01-13T00:22:05.125 == Config == INIT_SIZE: 2 GEN_TYP_SIZE: 1 @@ -8,18 +8,18 @@ DistNat: DistUInt32 TAG: entropy_approx_v01 Building (gen_expr(...)) computation graph... - 7.970573458 seconds + 11.713465572 seconds Initial adnodes_of_interest: Dict("sz1_succ_abs" => 0.5, "tysz1_gen_type_tbool" => 0.5, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.5, "sz2_succ_abs" => 0.5, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5, "sz1_succ_app" => 0.5) Saving samples... Saved samples to examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_before.txt. - 1.90386225 seconds + 2.766468585 seconds Initial entropy: 8.072558853466411 Training... - 2.882528792 seconds + 3.115894258 seconds Final entropy: 8.170420368889292 @@ -27,5 +27,5 @@ Learned adnodes_of_interest: Dict("sz1_succ_abs" => 0.5598030152826101, "tysz1_gen_type_tbool" => 0.5395457933590109, "sz0_zero_pr_var2" => 0.5271444904668267, "sz2_succ_app" => 0.3185816526602986, "sz2_succ_abs" => 0.6350128152410152, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5000874628748793, "sz1_succ_app" => 0.43209667095380405) Saving samples... Saved samples to examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_trained_param_by_sz=true,epochs=2000.txt. - 0.143245625 seconds + 0.197855259 seconds diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_before.txt b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_before.txt index 7c140f93..be8492f2 100644 --- a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_before.txt +++ b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_before.txt @@ -1,200 +1,200 @@ -λx:Bool. (λy:Bool. false) true -(λx:Bool. λy:Bool -> Bool. false) false (λx:Bool. x) +λx:Bool. true +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) true -λx:Bool. x -(λx:Bool. λy:Bool -> Bool. true) false ((λx:Bool. λy:Bool. false) false) -(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. true) false) -(λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool -> Bool. false) (λx:Bool. true)) -(λx:Bool -> Bool. x) (λx:Bool. x) +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) (λx:Bool. true) +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) false) +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) +λx:Bool. true +false +(λx:Bool -> Bool. false) (λx:Bool. false) +false true -(λx:Bool. λy:Bool. false) true -(λx:Bool. λy:Bool. false) false ((λx:Bool. true) false) -(λx:Bool. λy:Bool. false) false true -(λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool. false) true) -λx:Bool. x -λx:Bool. x -(λx:Bool -> Bool. true) (λx:Bool. x) -λx:Bool. x +false λx:Bool. false +λx:Bool. true +(λx:Bool. λy:Bool. λz:Bool. true) true true +(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. true)) +(λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool. true) false) +(λx:Bool. λy:Bool. false) true ((λx:Bool -> Bool. false) (λx:Bool. true)) true -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) -(λx:Bool. λy:Bool -> Bool. true) false (λx:Bool. false) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool. λy:Bool. true) true) false -(λx:Bool. x) ((λx:Bool -> Bool. false) (λx:Bool. false)) -λx:Bool. x -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) +true +(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. false) false) +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true (λx:Bool. false) true false false -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) (λx:Bool. true) -false -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -(λx:Bool. λy:Bool -> Bool. true) true ((λx:Bool. λy:Bool. false) true) -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) true) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. true) true) -(λx:Bool. λy:Bool. true) true ((λx:Bool -> Bool. true) (λx:Bool. false)) -λx:Bool. true -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) ((λx:Bool. false) true) -(λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool. false) true) -(λx:Bool -> Bool. x) (λx:Bool. x) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) false -λx:Bool. true -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. x) (λx:Bool -> Bool. true) (λx:Bool. x) -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) -λx:Bool. (λy:Bool. false) x -(λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool. true) false) -false -false +(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. false) true) +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. false) false) +(λx:Bool. λy:Bool. true) false ((λx:Bool -> Bool. false) (λx:Bool. true)) false true -(λx:Bool. λy:Bool. false) true true -(λx:Bool -> Bool. false) (λx:Bool. x) -(λx:Bool. λy:Bool. false) false ((λx:Bool -> Bool. true) (λx:Bool. true)) -(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -(λx:Bool. λy:Bool. true) true true -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. x) -true -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool. true) false) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) (λx:Bool. x) -(λx:Bool. false) false λx:Bool. x -true λx:Bool. true -(λx:Bool. λy:Bool. false) false true -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) (λx:Bool. false) -λx:Bool. false -λx:Bool. false -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) false -false true -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) λx:Bool. x -λx:Bool. true -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false ((λx:Bool. λy:Bool. false) true) +(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. true) true) true -λx:Bool. true -(λx:Bool. λy:Bool. λz:Bool. true) true ((λx:Bool -> Bool. true) (λx:Bool. true)) -(λx:Bool -> Bool. false) (λx:Bool. x) -(λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. false) false) -false -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) ((λx:Bool. λy:Bool. false) false) -(λx:Bool. λy:Bool. true) false -(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -λx:Bool. x -(λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool -> Bool. false) (λx:Bool. true)) -(λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool. false) false) -(λx:Bool. λy:Bool. true) ((λx:Bool. true) false) -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -(λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. false) false) +true +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) +(λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool. false) true) λx:Bool. x false -λx:Bool. (λy:Bool. true) true +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool. λy:Bool. false) true) +λx:Bool. (λy:Bool. false) x +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) (λx:Bool. x) false -false -false -false -(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -(λx:Bool. λy:Bool. false) ((λx:Bool. true) true) +λx:Bool. (λy:Bool. true) x +λx:Bool. (λy:Bool. false) false +(λx:Bool. λy:Bool -> Bool. true) true ((λx:Bool. λy:Bool. false) false) +(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. false) false) +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) +λx:Bool. x +(λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool -> Bool. false) (λx:Bool. true)) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) true -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) (λx:Bool. x) -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. false) true) -(λx:Bool. λy:Bool. true) true true +(λx:Bool. λy:Bool. false) false ((λx:Bool -> Bool. true) (λx:Bool. false)) +(λx:Bool. λy:Bool. λz:Bool. false) false false +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool. λy:Bool. false) true) +(λx:Bool. x) true +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) true true +(λx:Bool. x) ((λx:Bool. true) true) +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) true +λx:Bool. true +λx:Bool. true +false +(λx:Bool. λy:Bool. false) true true +(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +λx:Bool. false +(λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool. true) false) +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool. true) true) true -(λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool. false) true) -λx:Bool. (λy:Bool. false) x (λx:Bool -> Bool. x) (λx:Bool. x) -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) false) -(λx:Bool. λy:Bool. false) false -(λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool. true) true) -λx:Bool. x -(λx:Bool -> Bool. false) (λx:Bool. false) -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool. true) false) +λx:Bool. false true +(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +λx:Bool. true +λx:Bool. true +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) true +(λx:Bool. λy:Bool. false) true true +(λx:Bool. λy:Bool. true) true true λx:Bool. x +(λx:Bool. λy:Bool. false) true +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) false -(λx:Bool. x) true -(λx:Bool. λy:Bool. false) false -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +(λx:Bool. λy:Bool. true) false ((λx:Bool. true) true) λx:Bool. true λx:Bool. x +λx:Bool. x +(λx:Bool. λy:Bool. false) false false +(λx:Bool. false) false false +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) false -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -(λx:Bool. true) true -(λx:Bool. λy:Bool. λz:Bool. true) false false -λx:Bool. x +true +(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. true)) +λx:Bool. true +λx:Bool. true +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. true)) false +λx:Bool. (λy:Bool. false) x +true +λx:Bool. x +λx:Bool. true λx:Bool. true -(λx:Bool. λy:Bool. false) false (λx:Bool -> Bool. false) (λx:Bool. x) -(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -true -(λx:Bool -> Bool. false) (λx:Bool. false) λx:Bool. true -(λx:Bool. λy:Bool. false) false -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -λx:Bool. (λy:Bool. false) x -(λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -λx:Bool. false -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) false) -λx:Bool. false -(λx:Bool. λy:Bool. λz:Bool. true) false false -false +(λx:Bool. λy:Bool. true) ((λx:Bool. false) false) true -λx:Bool. (λy:Bool. true) true +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. true) λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -λx:Bool. x -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +false +false (λx:Bool. λy:Bool. true) false -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) false -(λx:Bool. x) ((λx:Bool -> Bool. true) (λx:Bool. true)) +(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +false +false +false +(λx:Bool. true) true +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool. λy:Bool. false) true) +λx:Bool. true +(λx:Bool. λy:Bool. false) true +(λx:Bool. λy:Bool. true) false ((λx:Bool. true) false) +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) +(λx:Bool. λy:Bool. false) ((λx:Bool. true) false) λx:Bool. false -(λx:Bool. x) ((λx:Bool -> Bool. false) (λx:Bool. false)) -(λx:Bool. λy:Bool. true) ((λx:Bool. true) false) +(λx:Bool -> Bool. x) (λx:Bool. x) +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) (λx:Bool. λy:Bool. false) true +(λx:Bool. λy:Bool. true) true false +(λx:Bool. λy:Bool. true) false ((λx:Bool. true) false) +(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +λx:Bool. (λy:Bool. false) x +(λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool. false) true) +(λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) +false λx:Bool. (λy:Bool. true) x -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) (λx:Bool. false) -λx:Bool. true +(λx:Bool -> Bool. false) (λx:Bool. true) +(λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool. true) true) false -(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -(λx:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. true)) -(λx:Bool. λy:Bool. false) false -λx:Bool. (λy:Bool. false) true -(λx:Bool -> Bool. x) (λx:Bool. true) -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) ((λx:Bool. true) true) -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -λx:Bool. x -λx:Bool. x -(λx:Bool -> Bool. true) (λx:Bool. x) -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. false) true) -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) (λx:Bool. true) -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) (λx:Bool. true) -(λx:Bool. λy:Bool -> Bool. true) true (λx:Bool. x) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. x) +false +(λx:Bool -> Bool. false) (λx:Bool. x) +(λx:Bool -> Bool. false) (λx:Bool. x) true -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) true +(λx:Bool. λy:Bool -> Bool. true) true (λx:Bool. true) +λx:Bool. (λy:Bool. false) x +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) true +(λx:Bool. λy:Bool. true) false +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false ((λx:Bool. λy:Bool. true) true) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +(λx:Bool. λy:Bool. true) false true λx:Bool. x +λx:Bool. x +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +(λx:Bool. λy:Bool. false) ((λx:Bool. false) false) +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool. false) true) true -(λx:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) -λx:Bool. (λy:Bool. true) x -λx:Bool. true -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) true +false +(λx:Bool. λy:Bool. true) ((λx:Bool. true) true) +false +(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. true)) true +λx:Bool. (λy:Bool. false) x +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. false) true) λx:Bool. x -(λx:Bool. x) false +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) +λx:Bool. false +(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) +λx:Bool. x +λx:Bool. x +λx:Bool. false +(λx:Bool. λy:Bool. λz:Bool. true) false true +λx:Bool. x +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +true λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) true +true +λx:Bool. x +(λx:Bool. λy:Bool -> Bool. false) false ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) true +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) (λx:Bool. false) false -(λx:Bool. λy:Bool. true) true -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) true diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_trained_param_by_sz=true,epochs=2000.txt b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_trained_param_by_sz=true,epochs=2000.txt index 5ac7346d..e8dddd0d 100644 --- a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_trained_param_by_sz=true,epochs=2000.txt +++ b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_trained_param_by_sz=true,epochs=2000.txt @@ -1,200 +1,200 @@ -false -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) false -false -λx:Bool. (λy:Bool. false) x -false true -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. x) -(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +λx:Bool. x false -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +(λx:Bool. λy:Bool -> Bool. true) false ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) +(λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool. true) true) +λx:Bool. false false -(λx:Bool. λy:Bool. false) true ((λx:Bool. true) false) +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) false true -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) false) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) false -λx:Bool. true -λx:Bool. true -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true (λx:Bool. x) -(λx:Bool. x) ((λx:Bool. true) true) -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. true)) -(λx:Bool. λy:Bool. false) true false -false -(λx:Bool. λy:Bool. false) false ((λx:Bool. false) false) true -λx:Bool. x -λx:Bool. (λy:Bool. true) true true -(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) +false λx:Bool. false -λx:Bool. true +(λx:Bool. x) true +(λx:Bool. λy:Bool. false) false false +true +(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. false) true) +(λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) false) +true +true +λx:Bool. x +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool. false) false) +λx:Bool. (λy:Bool. true) x +(λx:Bool. x) ((λx:Bool. false) true) +(λx:Bool -> Bool. false) (λx:Bool. false) +λx:Bool. x +(λx:Bool. false) true false -(λx:Bool. λy:Bool. false) true true +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool. true) true) +(λx:Bool. λy:Bool. true) true λx:Bool. true +(λx:Bool. λy:Bool. false) false +λx:Bool. (λy:Bool. true) x false -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool. true) true) -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. true)) +true +λx:Bool. (λy:Bool. true) x +λx:Bool. x +true +(λx:Bool. λy:Bool. true) true +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +true false +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool. false) true) false +(λx:Bool -> Bool. false) (λx:Bool. x) +(λx:Bool. λy:Bool. false) false +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) (λx:Bool. true) +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false (λx:Bool. x) +λx:Bool. x +(λx:Bool. λy:Bool -> Bool. false) true (λx:Bool. false) λx:Bool. false +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +false +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) false +(λx:Bool. x) ((λx:Bool -> Bool. false) (λx:Bool. true)) +(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) false -λx:Bool. x true -(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false)) true -(λx:Bool. true) false +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool. false) false) +false +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) true) +λx:Bool. x +(λx:Bool. λy:Bool. true) true ((λx:Bool. true) false) +λx:Bool. (λy:Bool. true) x +(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) false false -(λx:Bool -> Bool. x) (λx:Bool. true) true -λx:Bool. true false +λx:Bool. false +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +(λx:Bool. x) false false -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -(λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false)) -true true λx:Bool. x -λx:Bool. x +(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) true) +false (λx:Bool. x) false true -(λx:Bool. λy:Bool. true) false -true -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) false) -(λx:Bool. λy:Bool. true) false -λx:Bool. false -λx:Bool. x true -(λx:Bool -> Bool. true) (λx:Bool. x) -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. false) false) true -false -(λx:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false)) -false -λx:Bool. x -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -λx:Bool. true +(λx:Bool. x) true true true +(λx:Bool. x) ((λx:Bool -> Bool. false) (λx:Bool. true)) +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. true)) +(λx:Bool. x) true +(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. false) false) true true false false -(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -false -false +true λx:Bool. x -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true ((λx:Bool. λy:Bool. false) false) -(λx:Bool -> Bool. false) (λx:Bool. false) -(λx:Bool. x) ((λx:Bool. false) true) -false -false -false true true -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) false true -λx:Bool. x +(λx:Bool. λy:Bool -> Bool. false) true (λx:Bool. x) true -false -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. x) -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) true true -λx:Bool. false -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +(λx:Bool. x) ((λx:Bool -> Bool. true) (λx:Bool. true)) true +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. true) true) +(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) λx:Bool. x -false -(λx:Bool -> Bool. true) (λx:Bool. x) -false -false +λx:Bool. x +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) true -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true ((λx:Bool. λy:Bool. true) true) -λx:Bool. true -λx:Bool. true +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) true +false false +(λx:Bool -> Bool. false) (λx:Bool. x) +(λx:Bool. x) true (λx:Bool. λy:Bool. false) false false -λx:Bool. true +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. false) true) true +λx:Bool. x +false (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -(λx:Bool. λy:Bool. true) true true -(λx:Bool. λy:Bool -> Bool. true) false (λx:Bool. true) -(λx:Bool -> Bool. false) (λx:Bool. false) false λx:Bool. true -true λx:Bool. x -(λx:Bool. λy:Bool -> Bool. true) true ((λx:Bool. λy:Bool. true) true) -λx:Bool. true -false +true false -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) -λx:Bool. true +λx:Bool. (λy:Bool. true) x +λx:Bool. (λy:Bool. false) false +λx:Bool. x +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. false) true) false false -(λx:Bool. false) false +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) +(λx:Bool. λy:Bool. true) false +λx:Bool. x true true -false +(λx:Bool. λy:Bool. true) true +true +(λx:Bool. λy:Bool. true) false λx:Bool. false +(λx:Bool -> Bool. true) (λx:Bool. true) false -(λx:Bool. λy:Bool. λz:Bool. false) true true -false -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) (λx:Bool. x) +(λx:Bool -> Bool. x) (λx:Bool. x) λx:Bool. true -λx:Bool. (λy:Bool. false) true -(λx:Bool -> Bool. false) (λx:Bool. x) -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. x) -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. true) false) +(λx:Bool. λy:Bool. true) true false true false true -false -(λx:Bool. λy:Bool. false) true ((λx:Bool -> Bool. true) (λx:Bool. true)) +(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +λx:Bool. x λx:Bool. false false -λx:Bool. (λy:Bool. true) true -(λx:Bool -> Bool. false) (λx:Bool. false) -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. false) false) -false -true -true -true -(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -(λx:Bool. λy:Bool -> Bool. false) true (λx:Bool. true) +(λx:Bool. false) false +(λx:Bool -> Bool. true) (λx:Bool. true) +(λx:Bool. λy:Bool. true) ((λx:Bool. true) false) (λx:Bool. x) ((λx:Bool -> Bool. true) (λx:Bool. false)) -λx:Bool. false -(λx:Bool -> Bool. true) (λx:Bool. x) -(λx:Bool. λy:Bool. true) ((λx:Bool. false) true) -λx:Bool. true -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -λx:Bool. x -(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -(λx:Bool. λy:Bool -> Bool. false) false ((λx:Bool. λy:Bool. true) true) -(λx:Bool. λy:Bool -> Bool. false) false (λx:Bool. x) -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -(λx:Bool. λy:Bool. λz:Bool. true) true ((λx:Bool. false) false) +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) +(λx:Bool. true) true true -(λx:Bool. λy:Bool -> Bool. true) true ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +(λx:Bool. λy:Bool. true) true +(λx:Bool. x) false +false +false +(λx:Bool -> Bool. false) (λx:Bool. x) +(λx:Bool. λy:Bool. λz:Bool. false) false ((λx:Bool. false) false) +false +(λx:Bool. false) false λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +λx:Bool. (λy:Bool. false) x +(λx:Bool. λy:Bool -> Bool. false) true ((λx:Bool. λy:Bool. false) false) +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) false +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool. λy:Bool. true) true) +(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. false) false) false -(λx:Bool. x) false -true +λx:Bool. true true true -(λx:Bool. true) true -λx:Bool. (λy:Bool. true) true -(λx:Bool -> Bool. false) (λx:Bool. true) +λx:Bool. x false -λx:Bool. false -(λx:Bool. x) ((λx:Bool -> Bool. false) (λx:Bool. false)) +false +false +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) true +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +(λx:Bool. λy:Bool. false) true true +false +(λx:Bool -> Bool. true) (λx:Bool. true) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) (λx:Bool. true) +(λx:Bool. λy:Bool. false) false +λx:Bool. x +(λx:Bool. x) true true -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv new file mode 100644 index 00000000..2b37e2b3 --- /dev/null +++ b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv @@ -0,0 +1,2001 @@ +0 -268.9974234499506 +1 -275.61368438169603 +2 -276.69326542744767 +3 -277.08857634639025 +4 -277.31535648957856 +5 -277.4705297445105 +6 -277.5871368391721 +7 -277.68026130109786 +8 -277.75777583928516 +9 -277.82413378018487 +10 -277.88202366782593 +11 -277.933174863397 +12 -277.9787734641662 +13 -278.0196842142628 +14 -278.05657165139684 +15 -278.08996784570695 +16 -278.12031152824 +17 -278.1479717450886 +18 -278.17326301429915 +19 -278.19645569285524 +20 -278.21778352935354 +21 -278.23744946573913 +22 -278.2556302730326 +23 -278.272480355396 +24 -278.28813492475075 +25 -278.3027126772456 +26 -278.31631806349526 +27 -278.32904322128303 +28 -278.3409696247989 +29 -278.35216949435664 +30 -278.3627070030896 +31 -278.372639311265 +32 -278.3820174540819 +33 -278.3908871048695 +34 -278.39928923224056 +35 -278.40726066695026 +36 -278.41483459179733 +37 -278.42204096586966 +38 -278.4289068927295 +39 -278.43545694063704 +40 -278.4417134217212 +41 -278.4476966359091 +42 -278.4534250845886 +43 -278.4589156581943 +44 -278.4641838013023 +45 -278.46924365827647 +46 -278.4741082020537 +47 -278.4787893482878 +48 -278.48329805674655 +49 -278.48764442157295 +50 -278.49183775181575 +51 -278.49588664341684 +52 -278.4997990436849 +53 -278.503582309161 +54 -278.50724325762155 +55 -278.51078821492 +56 -278.514223057221 +57 -278.51755324915524 +58 -278.52078387832796 +59 -278.5239196865777 +60 -278.5269650983246 +61 -278.5299242463061 +62 -278.5328009949784 +63 -278.53559896180354 +64 -278.5383215366478 +65 -278.5409718994587 +66 -278.54355303641046 +67 -278.54606775463816 +68 -278.54851869571536 +69 -278.55090834798466 +70 -278.55323905784036 +71 -278.55551304008003 +72 -278.5577323873802 +73 -278.5598990790068 +74 -278.56201498880256 +75 -278.564081892531 +76 -278.5661014746309 +77 -278.56807533442446 +78 -278.570004991844 +79 -278.5718918926939 +80 -278.57373741351773 +81 -278.5755428660742 +82 -278.57730950147686 +83 -278.579038514018 +84 -278.5807310447009 +85 -278.5823881845065 +86 -278.58401097742 +87 -278.585600423234 +88 -278.5871574801425 +89 -278.58868306715294 +90 -278.5901780663216 +91 -278.59164332482777 +92 -278.5930796569101 +93 -278.5944878456569 +94 -278.5958686446815 +95 -278.5972227796782 +96 -278.5985509498747 +97 -278.5998538293881 +98 -278.60113206848655 +99 -278.6023862947792 +100 -278.6036171143111 +101 -278.6048251126081 +102 -278.6060108556395 +103 -278.60717489072965 +104 -278.60831774741206 +105 -278.6094399382259 +106 -278.6105419594728 +107 -278.61162429192086 +108 -278.6126874014744 +109 -278.6137317397975 +110 -278.6147577449114 +111 -278.61576584174514 +112 -278.6167564426699 +113 -278.6177299479939 +114 -278.6186867464353 +115 -278.6196272155662 +116 -278.62055172224046 +117 -278.6214606229886 +118 -278.6223542644031 +119 -278.6232329834971 +120 -278.6240971080503 +121 -278.6249469569333 +122 -278.6257828404206 +123 -278.6266050604856 +124 -278.62741391108364 +125 -278.6282096784226 +126 -278.62899264121825 +127 -278.62976307094056 +128 -278.63052123205006 +129 -278.63126738222286 +130 -278.6320017725618 +131 -278.6327246478089 +132 -278.6334362465379 +133 -278.6341368013459 +134 -278.6348265390359 +135 -278.6355056807902 +136 -278.63617444233853 +137 -278.6368330341202 +138 -278.6374816614384 +139 -278.63812052461 +140 -278.6387498191093 +141 -278.63936973570725 +142 -278.63998046060266 +143 -278.6405821755558 +144 -278.64117505800715 +145 -278.6417592811999 +146 -278.6423350142962 +147 -278.6429024224889 +148 -278.6434616671083 +149 -278.6440129057273 +150 -278.64455629226444 +151 -278.6450919770765 +152 -278.6456201070598 +153 -278.6461408257376 +154 -278.6466542733485 +155 -278.64716058693386 +156 -278.6476599004228 +157 -278.6481523447082 +158 -278.64863804772784 +159 -278.6491171345428 +160 -278.64958972740584 +161 -278.6500559458352 +162 -278.6505159066859 +163 -278.6509697242133 +164 -278.6514175101426 +165 -278.6518593737282 +166 -278.65229542181686 +167 -278.65272575891095 +168 -278.6531504872213 +169 -278.65356970672684 +170 -278.6539835152284 +171 -278.654392008404 +172 -278.65479527985923 +173 -278.6551934211781 +174 -278.6555865219721 +175 -278.65597466992944 +176 -278.6563579508596 +177 -278.65673644874045 +178 -278.65711024576143 +179 -278.6574794223659 +180 -278.6578440572955 +181 -278.65820422762675 +182 -278.65856000881536 +183 -278.65891147473155 +184 -278.6592586976978 +185 -278.6596017485294 +186 -278.65994069656205 +187 -278.66027560969667 +188 -278.6606065544244 +189 -278.6609335958665 +190 -278.66125679780146 +191 -278.66157622269924 +192 -278.66189193175074 +193 -278.66220398489736 +194 -278.6625124408605 +195 -278.66281735717024 +196 -278.66311879019304 +197 -278.66341679515585 +198 -278.6637114261766 +199 -278.6640027362871 +200 -278.66429077745806 +201 -278.6645756006239 +202 -278.6648572557077 +203 -278.66513579164166 +204 -278.6654112563918 +205 -278.6656836969791 +206 -278.6659531595007 +207 -278.66621968915223 +208 -278.66648333024614 +209 -278.66674412623325 +210 -278.66700211972204 +211 -278.66725735249594 +212 -278.6675098655345 +213 -278.66775969902886 +214 -278.6680068924016 +215 -278.66825148432275 +216 -278.66849351272623 +217 -278.6687330148257 +218 -278.6689700271343 +219 -278.66920458547503 +220 -278.66943672499855 +221 -278.66966648020025 +222 -278.66989388492885 +223 -278.670118972407 +224 -278.670341775241 +225 -278.6705623254341 +226 -278.67078065440336 +227 -278.6709967929906 +228 -278.67121077147004 +229 -278.67142261956946 +230 -278.67163236647644 +231 -278.67184004085084 +232 -278.6720456708362 +233 -278.67224928407177 +234 -278.6724509077041 +235 -278.67265056839375 +236 -278.67284829233074 +237 -278.67304410524173 +238 -278.6732380323992 +239 -278.6734300986337 +240 -278.67362032834046 +241 -278.67380874549184 +242 -278.67399537364355 +243 -278.6741802359428 +244 -278.67436335514185 +245 -278.67454475360023 +246 -278.6747244532955 +247 -278.67490247583396 +248 -278.6750788424535 +249 -278.675253574034 +250 -278.67542669110424 +251 -278.67559821385083 +252 -278.6757681621219 +253 -278.6759365554365 +254 -278.6761034129905 +255 -278.6762687536651 +256 -278.67643259602886 +257 -278.6765949583494 +258 -278.67675585859615 +259 -278.6769153144467 +260 -278.6770733432934 +261 -278.67722996225075 +262 -278.6773851881563 +263 -278.67753903758125 +264 -278.6776915268332 +265 -278.6778426719623 +266 -278.67799248876463 +267 -278.6781409927897 +268 -278.67828819934437 +269 -278.67843412349663 +270 -278.6785787800831 +271 -278.6787221837085 +272 -278.67886434875606 +273 -278.6790052893885 +274 -278.67914501955164 +275 -278.67928355298204 +276 -278.6794209032077 +277 -278.6795570835535 +278 -278.6796921071441 +279 -278.6798259869111 +280 -278.679958735592 +281 -278.68009036573574 +282 -278.68022088970895 +283 -278.68035031969634 +284 -278.68047866770263 +285 -278.68060594556243 +286 -278.68073216493593 +287 -278.68085733731647 +288 -278.68098147403344 +289 -278.68110458625284 +290 -278.6812266849835 +291 -278.68134778107856 +292 -278.681467885237 +293 -278.68158700800814 +294 -278.6817051597957 +295 -278.68182235085567 +296 -278.68193859130514 +297 -278.682053891119 +298 -278.6821682601372 +299 -278.6822817080642 +300 -278.6823942444718 +301 -278.6825058788037 +302 -278.6826166203753 +303 -278.6827264783764 +304 -278.6828354618744 +305 -278.68294357981523 +306 -278.683050841027 +307 -278.683157254221 +308 -278.68326282799325 +309 -278.6833675708278 +310 -278.6834714910976 +311 -278.68357459706635 +312 -278.68367689689245 +313 -278.6837783986277 +314 -278.68387911022097 +315 -278.68397903952035 +316 -278.684078194272 +317 -278.6841765821259 +318 -278.6842742106349 +319 -278.68437108725743 +320 -278.68446721935715 +321 -278.6845626142058 +322 -278.684657278988 +323 -278.68475122079514 +324 -278.6848444466345 +325 -278.6849369634252 +326 -278.68502877800324 +327 -278.68511989712084 +328 -278.68521032744894 +329 -278.6853000755766 +330 -278.68538914801513 +331 -278.6854775511953 +332 -278.6855652914748 +333 -278.6856523751331 +334 -278.6857388083756 +335 -278.6858245973346 +336 -278.68590974807034 +337 -278.6859942665732 +338 -278.68607815876175 +339 -278.686161430487 +340 -278.68624408753107 +341 -278.68632613561095 +342 -278.68640758037526 +343 -278.6864884274116 +344 -278.6865686822411 +345 -278.68664835032155 +346 -278.6867274370518 +347 -278.6868059477661 +348 -278.6868838877422 +349 -278.68696126219606 +350 -278.68703807628566 +351 -278.6871143351134 +352 -278.687190043722 +353 -278.68726520710123 +354 -278.6873398301844 +355 -278.6874139178504 +356 -278.6874874749259 +357 -278.6875605061829 +358 -278.6876330163434 +359 -278.68770501007765 +360 -278.68777649200416 +361 -278.6878474666933 +362 -278.68791793866524 +363 -278.6879879123922 +364 -278.6880573922991 +365 -278.68812638276285 +366 -278.6881948881139 +367 -278.688262912638 +368 -278.6883304605742 +369 -278.68839753611843 +370 -278.68846414342175 +371 -278.6885302865914 +372 -278.6885959696929 +373 -278.6886611967485 +374 -278.68872597174027 +375 -278.6887902986068 +376 -278.68885418124796 +377 -278.68891762352297 +378 -278.6889806292517 +379 -278.68904320221435 +380 -278.68910534615213 +381 -278.6891670647706 +382 -278.6892283617358 +383 -278.6892892406762 +384 -278.6893497051854 +385 -278.6894097588196 +386 -278.68946940509943 +387 -278.68952864751134 +388 -278.68958748950524 +389 -278.6896459344981 +390 -278.689703985873 +391 -278.68976164697733 +392 -278.6898189211286 +393 -278.6898758116087 +394 -278.6899323216692 +395 -278.6899884545291 +396 -278.69004421337553 +397 -278.69009960136395 +398 -278.6901546216215 +399 -278.69020927724193 +400 -278.69026357129076 +401 -278.69031750680284 +402 -278.69037108678435 +403 -278.6904243142122 +404 -278.6904771920354 +405 -278.69052972317286 +406 -278.6905819105169 +407 -278.6906337569329 +408 -278.6906852652564 +409 -278.6907364382982 +410 -278.69078727884136 +411 -278.69083778964233 +412 -278.69088797343244 +413 -278.6909378329163 +414 -278.69098737077377 +415 -278.6910365896582 +416 -278.6910854921993 +417 -278.69113408100264 +418 -278.6911823586463 +419 -278.69123032768795 +420 -278.6912779906589 +421 -278.6913253500682 +422 -278.6913724084012 +423 -278.69141916811964 +424 -278.6914656316629 +425 -278.69151180144877 +426 -278.6915576798702 +427 -278.6916032693014 +428 -278.6916485720916 +429 -278.6916935905702 +430 -278.6917383270451 +431 -278.69178278380235 +432 -278.6918269631074 +433 -278.69187086720524 +434 -278.6919144983209 +435 -278.6919578586578 +436 -278.6920009503992 +437 -278.69204377571134 +438 -278.6920863367371 +439 -278.6921286356024 +440 -278.6921706744133 +441 -278.6922124552566 +442 -278.69225398020023 +443 -278.69229525129464 +444 -278.6923362705694 +445 -278.6923770400388 +446 -278.69241756169623 +447 -278.69245783752075 +448 -278.69249786946955 +449 -278.6925376594848 +450 -278.6925772094923 +451 -278.6926165213982 +452 -278.6926555970926 +453 -278.69269443844917 +454 -278.69273304732496 +455 -278.6927714255605 +456 -278.6928095749799 +457 -278.69284749739086 +458 -278.6928851945855 +459 -278.69292266833935 +460 -278.692959920414 +461 -278.6929969525536 +462 -278.6930337664886 +463 -278.69307036393275 +464 -278.69310674658533 +465 -278.69314291613136 +466 -278.69317887424006 +467 -278.693214622567 +468 -278.6932501627529 +469 -278.6932854964228 +470 -278.69332062519067 +471 -278.6933555506532 +472 -278.6933902743948 +473 -278.6934247979859 +474 -278.69345912298337 +475 -278.6934932509308 +476 -278.6935271833572 +477 -278.6935609217801 +478 -278.69359446770096 +479 -278.6936278226121 +480 -278.6936609879906 +481 -278.69369396530067 +482 -278.69372675599425 +483 -278.693759361512 +484 -278.6937917832803 +485 -278.69382402271464 +486 -278.6938560812169 +487 -278.69388796017813 +488 -278.69391966097754 +489 -278.69395118498215 +490 -278.693982533546 +491 -278.69401370801364 +492 -278.6940447097167 +493 -278.69407553997587 +494 -278.69410620010126 +495 -278.6941366913907 +496 -278.69416701513074 +497 -278.6941971725985 +498 -278.694227165058 +499 -278.6942569937654 +500 -278.6942866599636 +501 -278.694316164886 +502 -278.6943455097547 +503 -278.6943746957844 +504 -278.6944037241745 +505 -278.69443259611893 +506 -278.6944613127977 +507 -278.69448987538414 +508 -278.69451828504015 +509 -278.69454654291695 +510 -278.6945746501577 +511 -278.69460260789486 +512 -278.69463041725163 +513 -278.694658079341 +514 -278.6946855952686 +515 -278.6947129661283 +516 -278.6947401930068 +517 -278.6947672769794 +518 -278.6947942191153 +519 -278.6948210204724 +520 -278.69484768209986 +521 -278.6948742050396 +522 -278.6949005903237 +523 -278.6949268389757 +524 -278.6949529520092 +525 -278.69497893043297 +526 -278.6950047752443 +527 -278.6950304874311 +528 -278.695056067977 +529 -278.69508151785413 +530 -278.695106838029 +531 -278.6951320294568 +532 -278.69515709308774 +533 -278.6951820298629 +534 -278.6952068407148 +535 -278.69523152657 +536 -278.69525608834675 +537 -278.695280526954 +538 -278.69530484329545 +539 -278.69532903826547 +540 -278.69535311275206 +541 -278.6953770676357 +542 -278.6954009037899 +543 -278.69542462208 +544 -278.6954482233646 +545 -278.69547170849523 +546 -278.69549507831664 +547 -278.6955183336664 +548 -278.6955414753742 +549 -278.69556450426523 +550 -278.6955874211552 +551 -278.6956102268551 +552 -278.6956329221683 +553 -278.69565550789054 +554 -278.69567798481376 +555 -278.69570035372095 +556 -278.69572261538883 +557 -278.69574477058967 +558 -278.6957668200866 +559 -278.6957887646389 +560 -278.6958106049987 +561 -278.6958323419109 +562 -278.6958539761166 +563 -278.69587550834774 +564 -278.69589693933415 +565 -278.69591826979564 +566 -278.695939500449 +567 -278.6959606320038 +568 -278.6959816651636 +569 -278.69600260062737 +570 -278.6960234390877 +571 -278.6960441812319 +572 -278.6960648277403 +573 -278.69608537928957 +574 -278.69610583654986 +575 -278.6961262001854 +576 -278.6961464708556 +577 -278.6961666492151 +578 -278.6961867359121 +579 -278.6962067315893 +580 -278.69622663688597 +581 -278.6962464524346 +582 -278.69626617886314 +583 -278.6962858167932 +584 -278.6963053668433 +585 -278.69632482962663 +586 -278.69634420574954 +587 -278.6963634958149 +588 -278.6963827004213 +589 -278.696401820161 +590 -278.6964208556216 +591 -278.696439807388 +592 -278.69645867603737 +593 -278.696477462144 +594 -278.6964961662783 +595 -278.6965147890033 +596 -278.69653333087956 +597 -278.69655179246354 +598 -278.69657017430546 +599 -278.69658847695246 +600 -278.696606700947 +601 -278.6966248468258 +602 -278.69664291512305 +603 -278.69666090636827 +604 -278.6966788210861 +605 -278.69669665979757 +606 -278.6967144230188 +607 -278.6967321112621 +608 -278.6967497250358 +609 -278.69676726484454 +610 -278.69678473118825 +611 -278.6968021245623 +612 -278.6968194454597 +613 -278.6968366943681 +614 -278.69685387177213 +615 -278.6968709781515 +616 -278.6968880139837 +617 -278.6969049797408 +618 -278.69692187589135 +619 -278.6969387029016 +620 -278.69695546123137 +621 -278.69697215133993 +622 -278.69698877368086 +623 -278.6970053287047 +624 -278.6970218168576 +625 -278.6970382385833 +626 -278.69705459432197 +627 -278.6970708845092 +628 -278.6970871095784 +629 -278.6971032699581 +630 -278.6971193660748 +631 -278.69713539835146 +632 -278.6971513672061 +633 -278.6971672730545 +634 -278.6971831163096 +635 -278.6971988973818 +636 -278.6972146166751 +637 -278.69723027459327 +638 -278.69724587153627 +639 -278.69726140789925 +640 -278.69727688407687 +641 -278.6972923004579 +642 -278.69730765743026 +643 -278.69732295537733 +644 -278.69733819468064 +645 -278.697353375718 +646 -278.69736849886385 +647 -278.6973835644904 +648 -278.6973985729677 +649 -278.6974135246603 +650 -278.69742841993207 +651 -278.69744325914326 +652 -278.69745804265176 +653 -278.6974727708125 +654 -278.6974874439762 +655 -278.69750206249284 +656 -278.6975166267094 +657 -278.6975311369683 +658 -278.69754559361127 +659 -278.6975599969768 +660 -278.6975743474 +661 -278.69758864521384 +662 -278.69760289074964 +663 -278.69761708433407 +664 -278.69763122629234 +665 -278.6976453169479 +666 -278.69765935662133 +667 -278.6976733456293 +668 -278.6976872842867 +669 -278.69770117290733 +670 -278.69771501180134 +671 -278.6977288012761 +672 -278.69774254163656 +673 -278.69775623318725 +674 -278.6977698762275 +675 -278.69778347105614 +676 -278.69779701797006 +677 -278.6978105172613 +678 -278.6978239692227 +679 -278.6978373741431 +680 -278.6978507323091 +681 -278.697864044006 +682 -278.6978773095158 +683 -278.69789052911887 +684 -278.6979037030936 +685 -278.69791683171667 +686 -278.6979299152601 +687 -278.697942953997 +688 -278.69795594819686 +689 -278.6979688981263 +690 -278.69798180405184 +691 -278.69799466623715 +692 -278.69800748494305 +693 -278.69802026042845 +694 -278.6980329929516 +695 -278.69804568276766 +696 -278.69805833012947 +697 -278.6980709352891 +698 -278.6980834984961 +699 -278.69809601999873 +700 -278.6981085000409 +701 -278.69812093886816 +702 -278.69813333672204 +703 -278.6981456938423 +704 -278.69815801046786 +705 -278.69817028683394 +706 -278.6981825231765 +707 -278.6981947197286 +708 -278.69820687671944 +709 -278.69821899438045 +710 -278.69823107293826 +711 -278.6982431126183 +712 -278.6982551136454 +713 -278.6982670762412 +714 -278.69827900062813 +715 -278.69829088702267 +716 -278.6983027356445 +717 -278.69831454670765 +718 -278.6983263204274 +719 -278.69833805701546 +720 -278.69834975668243 +721 -278.69836141963873 +722 -278.6983730460913 +723 -278.6983846362462 +724 -278.6983961903078 +725 -278.6984077084787 +726 -278.69841919096183 +727 -278.6984306379559 +728 -278.6984420496599 +729 -278.6984534262701 +730 -278.69846476798244 +731 -278.6984760749911 +732 -278.6984873474883 +733 -278.6984985856647 +734 -278.6985097897107 +735 -278.6985209598142 +736 -278.69853209616144 +737 -278.6985431989391 +738 -278.69855426832964 +739 -278.69856530451693 +740 -278.69857630768223 +741 -278.6985872780045 +742 -278.698598215663 +743 -278.69860912083436 +744 -278.69861999369516 +745 -278.69863083442067 +746 -278.6986416431822 +747 -278.6986524201535 +748 -278.69866316550406 +749 -278.69867387940457 +750 -278.6986845620221 +751 -278.6986952135248 +752 -278.69870583407726 +753 -278.69871642384487 +754 -278.69872698298997 +755 -278.6987375116756 +756 -278.69874801006273 +757 -278.69875847831025 +758 -278.6987689165765 +759 -278.69877932501964 +760 -278.69878970379517 +761 -278.698800053059 +762 -278.6988103729645 +763 -278.69882066366415 +764 -278.69883092531 +765 -278.69884115805246 +766 -278.6988513620413 +767 -278.69886153742397 +768 -278.69887168434855 +769 -278.69888180296107 +770 -278.69889189340626 +771 -278.6989019558291 +772 -278.6989119903719 +773 -278.69892199717566 +774 -278.698931976383 +775 -278.6989419281331 +776 -278.6989518525648 +777 -278.6989617498159 +778 -278.69897162002366 +779 -278.6989814633231 +780 -278.69899127985065 +781 -278.69900106973904 +782 -278.6990108331209 +783 -278.69902057012933 +784 -278.699030280895 +785 -278.6990399655477 +786 -278.6990496242164 +787 -278.6990592570304 +788 -278.69906886411576 +789 -278.69907844559964 +790 -278.69908800160715 +791 -278.69909753226375 +792 -278.6991070376916 +793 -278.6991165180149 +794 -278.6991259733551 +795 -278.69913540383266 +796 -278.6991448095682 +797 -278.6991541906818 +798 -278.69916354729094 +799 -278.6991728795138 +800 -278.69918218746733 +801 -278.69919147126683 +802 -278.69920073102844 +803 -278.6992099668655 +804 -278.69921917889235 +805 -278.6992283672211 +806 -278.69923753196343 +807 -278.69924667323215 +808 -278.6992557911358 +809 -278.69926488578477 +810 -278.6992739572878 +811 -278.6992830057527 +812 -278.6992920312872 +813 -278.6993010339979 +814 -278.69931001398965 +815 -278.6993189713689 +816 -278.69932790623847 +817 -278.69933681870333 +818 -278.69934570886585 +819 -278.69935457682743 +820 -278.69936342268994 +821 -278.699372246555 +822 -278.6993810485211 +823 -278.6993898286895 +824 -278.69939858715736 +825 -278.6994073240233 +826 -278.69941603938383 +827 -278.6994247333359 +828 -278.6994334059766 +829 -278.6994420573995 +830 -278.6994506877003 +831 -278.699459296973 +832 -278.6994678853102 +833 -278.69947645280484 +834 -278.6994849995495 +835 -278.69949352563515 +836 -278.699502031153 +837 -278.6995105161928 +838 -278.69951898084423 +839 -278.69952742519655 +840 -278.69953584933654 +841 -278.69954425335504 +842 -278.69955263733596 +843 -278.6995610013685 +844 -278.69956934553676 +845 -278.69957766992684 +846 -278.69958597462386 +847 -278.69959425971126 +848 -278.699602525274 +849 -278.6996107713935 +850 -278.6996189981532 +851 -278.69962720563564 +852 -278.69963539392165 +853 -278.69964356309214 +854 -278.699651713228 +855 -278.69965984440773 +856 -278.6996679567115 +857 -278.69967605021867 +858 -278.699684125007 +859 -278.6996921811534 +860 -278.69970021873615 +861 -278.6997082378309 +862 -278.6997162385146 +863 -278.69972422086323 +864 -278.6997321849512 +865 -278.6997401308534 +866 -278.69974805864433 +867 -278.6997559683975 +868 -278.69976386018607 +869 -278.69977173408284 +870 -278.69977959015995 +871 -278.69978742848923 +872 -278.69979524914214 +873 -278.69980305218905 +874 -278.69981083770097 +875 -278.6998186057469 +876 -278.69982635639775 +877 -278.69983408972143 +878 -278.69984180578695 +879 -278.6998495046619 +880 -278.6998571864146 +881 -278.6998648511121 +882 -278.6998724988212 +883 -278.6998801296087 +884 -278.6998877435394 +885 -278.6998953406794 +886 -278.6999029210949 +887 -278.6999104848489 +888 -278.6999180320066 +889 -278.6999255626317 +890 -278.69993307678783 +891 -278.6999405745378 +892 -278.69994805594416 +893 -278.69995552107014 +894 -278.69996296997584 +895 -278.6999704027251 +896 -278.69997781937633 +897 -278.69998521999173 +898 -278.69999260463163 +899 -278.69999997335555 +900 -278.70000732622356 +901 -278.7000146632952 +902 -278.70002198462777 +903 -278.7000292902802 +904 -278.70003658031163 +905 -278.7000438547786 +906 -278.7000511137396 +907 -278.7000583572504 +908 -278.70006558536886 +909 -278.70007279815087 +910 -278.7000799956512 +911 -278.70008717792683 +912 -278.70009434503316 +913 -278.70010149702404 +914 -278.7001086339546 +915 -278.7001157558789 +916 -278.7001228628514 +917 -278.7001299549248 +918 -278.70013703215363 +919 -278.70014409459003 +920 -278.7001511422859 +921 -278.7001581752947 +922 -278.70016519366817 +923 -278.70017219745705 +924 -278.70017918671414 +925 -278.70018616148946 +926 -278.7001931218339 +927 -278.70020006779805 +928 -278.7002069994325 +929 -278.7002139167858 +930 -278.70022081990777 +931 -278.7002277088489 +932 -278.7002345836572 +933 -278.70024144438116 +934 -278.7002482910693 +935 -278.7002551237693 +936 -278.70026194253035 +937 -278.7002687473985 +938 -278.7002755384206 +939 -278.7002823156457 +940 -278.7002890791181 +941 -278.70029582888554 +942 -278.7003025649939 +943 -278.7003092874886 +944 -278.7003159964158 +945 -278.7003226918208 +946 -278.70032937374793 +947 -278.70033604224227 +948 -278.7003426973489 +949 -278.7003493391113 +950 -278.7003559675733 +951 -278.70036258278 +952 -278.70036918477393 +953 -278.700375773598 +954 -278.70038234929615 +955 -278.70038891191007 +956 -278.70039546148314 +957 -278.7004019980575 +958 -278.70040852167466 +959 -278.7004150323762 +960 -278.70042153020506 +961 -278.70042801520106 +962 -278.70043448740665 +963 -278.70044094686097 +964 -278.70044739360605 +965 -278.70045382768154 +966 -278.7004602491281 +967 -278.70046665798486 +968 -278.70047305429216 +969 -278.7004794380897 +970 -278.7004858094162 +971 -278.700492168311 +972 -278.7004985148127 +973 -278.7005048489597 +974 -278.7005111707911 +975 -278.7005174803452 +976 -278.7005237776588 +977 -278.70053006277055 +978 -278.7005363357179 +979 -278.70054259653784 +980 -278.70054884526786 +981 -278.700555081945 +982 -278.7005613066057 +983 -278.7005675192868 +984 -278.7005737200246 +985 -278.70057990885454 +986 -278.7005860858133 +987 -278.70059225093706 +988 -278.7005984042606 +989 -278.7006045458193 +990 -278.7006106756485 +991 -278.700616793783 +992 -278.7006229002585 +993 -278.7006289951088 +994 -278.70063507836835 +995 -278.7006411500713 +996 -278.7006472102524 +997 -278.70065325894524 +998 -278.700659296183 +999 -278.700665322 +1000 -278.70067133642846 +1001 -278.70067733950344 +1002 -278.7006833312561 +1003 -278.7006893117205 +1004 -278.70069528092847 +1005 -278.70070123891304 +1006 -278.7007071857062 +1007 -278.70071312134047 +1008 -278.7007190458471 +1009 -278.7007249592589 +1010 -278.7007308616074 +1011 -278.70073675292366 +1012 -278.70074263323903 +1013 -278.7007485025849 +1014 -278.70075436099177 +1015 -278.70076020849126 +1016 -278.70076604511394 +1017 -278.7007718708899 +1018 -278.7007776858499 +1019 -278.7007834900241 +1020 -278.7007892834421 +1021 -278.7007950661353 +1022 -278.70080083813167 +1023 -278.70080659946166 +1024 -278.70081235015584 +1025 -278.7008180902417 +1026 -278.7008238197492 +1027 -278.7008295387074 +1028 -278.70083524714505 +1029 -278.7008409450911 +1030 -278.7008466325746 +1031 -278.7008523096231 +1032 -278.70085797626575 +1033 -278.7008636325303 +1034 -278.7008692784449 +1035 -278.70087491403746 +1036 -278.70088053933597 +1037 -278.70088615436833 +1038 -278.70089175916115 +1039 -278.7008973537419 +1040 -278.70090293813917 +1041 -278.70090851237893 +1042 -278.70091407648846 +1043 -278.7009196304943 +1044 -278.7009251744237 +1045 -278.7009307083029 +1046 -278.70093623215877 +1047 -278.7009417460176 +1048 -278.70094724990446 +1049 -278.7009527438476 +1050 -278.70095822787175 +1051 -278.7009637020024 +1052 -278.700969166266 +1053 -278.70097462068804 +1054 -278.70098006529395 +1055 -278.70098550010874 +1056 -278.70099092515835 +1057 -278.7009963404675 +1058 -278.7010017460607 +1059 -278.7010071419642 +1060 -278.70101252820166 +1061 -278.7010179047985 +1062 -278.70102327177943 +1063 -278.70102862916747 +1064 -278.70103397698847 +1065 -278.70103931526614 +1066 -278.70104464402385 +1067 -278.70104996328706 +1068 -278.7010552730795 +1069 -278.70106057342355 +1070 -278.7010658643442 +1071 -278.7010711458648 +1072 -278.70107641800814 +1073 -278.7010816807989 +1074 -278.701086934259 +1075 -278.70109217841235 +1076 -278.7010974132812 +1077 -278.70110263889035 +1078 -278.7011078552605 +1079 -278.7011130624157 +1080 -278.70111826037805 +1081 -278.70112344917067 +1082 -278.7011286288159 +1083 -278.70113379933525 +1084 -278.70113896075236 +1085 -278.7011441130882 +1086 -278.7011492563649 +1087 -278.70115439060567 +1088 -278.7011595158314 +1089 -278.70116463206335 +1090 -278.7011697393248 +1091 -278.7011748376359 +1092 -278.7011799270186 +1093 -278.7011850074948 +1094 -278.70119007908534 +1095 -278.70119514181204 +1096 -278.70120019569464 +1097 -278.70120524075577 +1098 -278.7012102770158 +1099 -278.70121530449507 +1100 -278.7012203232148 +1101 -278.7012253331964 +1102 -278.7012303344595 +1103 -278.7012353270249 +1104 -278.70124031091297 +1105 -278.70124528614457 +1106 -278.7012502527393 +1107 -278.70125521071765 +1108 -278.70126016009993 +1109 -278.7012651009065 +1110 -278.701270033156 +1111 -278.7012749568693 +1112 -278.7012798720665 +1113 -278.7012847787663 +1114 -278.7012896769884 +1115 -278.7012945667539 +1116 -278.7012994480799 +1117 -278.70130432098756 +1118 -278.7013091854956 +1119 -278.7013140416233 +1120 -278.70131888938937 +1121 -278.70132372881443 +1122 -278.70132855991494 +1123 -278.7013333827126 +1124 -278.7013381972237 +1125 -278.70134300346814 +1126 -278.70134780146606 +1127 -278.70135259123384 +1128 -278.70135737279116 +1129 -278.7013621461562 +1130 -278.7013669113466 +1131 -278.70137166838293 +1132 -278.70137641728155 +1133 -278.70138115806066 +1134 -278.7013858907397 +1135 -278.70139061533536 +1136 -278.70139533186665 +1137 -278.70140004035085 +1138 -278.70140474080574 +1139 -278.7014094332498 +1140 -278.7014141176996 +1141 -278.7014187941743 +1142 -278.7014234626902 +1143 -278.7014281232661 +1144 -278.70143277591734 +1145 -278.70143742066364 +1146 -278.701442057521 +1147 -278.7014466865071 +1148 -278.70145130763837 +1149 -278.7014559209335 +1150 -278.7014605264079 +1151 -278.7014651240791 +1152 -278.7014697139644 +1153 -278.70147429608113 +1154 -278.70147887044504 +1155 -278.7014834370727 +1156 -278.7014879959824 +1157 -278.7014925471894 +1158 -278.70149709071075 +1159 -278.70150162656245 +1160 -278.7015061547612 +1161 -278.70151067532385 +1162 -278.70151518826594 +1163 -278.70151969360467 +1164 -278.7015241913555 +1165 -278.70152868153525 +1166 -278.7015331641595 +1167 -278.70153763924424 +1168 -278.7015421068054 +1169 -278.7015465668597 +1170 -278.70155101942163 +1171 -278.7015554645087 +1172 -278.7015599021353 +1173 -278.7015643323175 +1174 -278.70156875507126 +1175 -278.701573170412 +1176 -278.7015775783548 +1177 -278.701581978916 +1178 -278.70158637211046 +1179 -278.70159075795374 +1180 -278.70159513646104 +1181 -278.7015995076477 +1182 -278.7016038715283 +1183 -278.70160822811977 +1184 -278.70161257743473 +1185 -278.70161691949113 +1186 -278.7016212543017 +1187 -278.70162558188235 +1188 -278.7016299022471 +1189 -278.70163421541264 +1190 -278.7016385213919 +1191 -278.7016428202005 +1192 -278.7016471118531 +1193 -278.70165139636373 +1194 -278.7016556737485 +1195 -278.70165994402066 +1196 -278.70166420719477 +1197 -278.70166846328635 +1198 -278.70167271230844 +1199 -278.70167695427625 +1200 -278.70168118920395 +1201 -278.70168541710603 +1202 -278.70168963799534 +1203 -278.7016938518881 +1204 -278.7016980587986 +1205 -278.7017022587383 +1206 -278.7017064517236 +1207 -278.70171063776706 +1208 -278.7017148168837 +1209 -278.70171898908717 +1210 -278.701723154391 +1211 -278.7017273128098 +1212 -278.7017314643555 +1213 -278.7017356090441 +1214 -278.70173974688817 +1215 -278.70174387790127 +1216 -278.70174800209685 +1217 -278.7017521194897 +1218 -278.70175623009163 +1219 -278.70176033391726 +1220 -278.70176443097984 +1221 -278.70176852129254 +1222 -278.7017726048686 +1223 -278.701776681722 +1224 -278.7017807518651 +1225 -278.7017848153119 +1226 -278.7017888720747 +1227 -278.7017929221674 +1228 -278.70179696560365 +1229 -278.7018010023946 +1230 -278.7018050325548 +1231 -278.7018090560966 +1232 -278.70181307303335 +1233 -278.70181708337833 +1234 -278.7018210871437 +1235 -278.70182508434175 +1236 -278.7018290749872 +1237 -278.7018330590905 +1238 -278.7018370366656 +1239 -278.70184100772576 +1240 -278.7018449722819 +1241 -278.701848930348 +1242 -278.7018528819364 +1243 -278.70185682705915 +1244 -278.7018607657289 +1245 -278.70186469795794 +1246 -278.7018686237593 +1247 -278.70187254314567 +1248 -278.7018764561277 +1249 -278.70188036271935 +1250 -278.70188426293174 +1251 -278.7018881567773 +1252 -278.7018920442697 +1253 -278.7018959254187 +1254 -278.70189980023866 +1255 -278.70190366873993 +1256 -278.70190753093556 +1257 -278.70191138683714 +1258 -278.7019152364568 +1259 -278.701919079806 +1260 -278.70192291689796 +1261 -278.70192674774364 +1262 -278.70193057235485 +1263 -278.70193439074336 +1264 -278.7019382029211 +1265 -278.7019420089006 +1266 -278.70194580869224 +1267 -278.70194960230793 +1268 -278.7019533897598 +1269 -278.70195717105975 +1270 -278.70196094621923 +1271 -278.7019647152487 +1272 -278.70196847816067 +1273 -278.7019722349666 +1274 -278.7019759856779 +1275 -278.70197973030554 +1276 -278.7019834688614 +1277 -278.7019872013567 +1278 -278.701990927803 +1279 -278.7019946482111 +1280 -278.7019983625924 +1281 -278.7020020709589 +1282 -278.70200577332054 +1283 -278.7020094696896 +1284 -278.7020131600759 +1285 -278.70201684449165 +1286 -278.7020205229474 +1287 -278.702024195455 +1288 -278.7020278620252 +1289 -278.7020315226677 +1290 -278.7020351773955 +1291 -278.70203882621826 +1292 -278.70204246914733 +1293 -278.70204610619294 +1294 -278.70204973736696 +1295 -278.70205336267895 +1296 -278.7020569821405 +1297 -278.7020605957626 +1298 -278.70206420355515 +1299 -278.7020678055304 +1300 -278.7020714016975 +1301 -278.7020749920669 +1302 -278.7020785766509 +1303 -278.7020821554585 +1304 -278.7020857285007 +1305 -278.7020892957892 +1306 -278.7020928573321 +1307 -278.70209641314216 +1308 -278.70209996322876 +1309 -278.7021035076025 +1310 -278.70210704627385 +1311 -278.70211057925314 +1312 -278.7021141065506 +1313 -278.7021176281768 +1314 -278.70212114414215 +1315 -278.7021246544563 +1316 -278.70212815912987 +1317 -278.7021316581732 +1318 -278.7021351515963 +1319 -278.70213863940916 +1320 -278.7021421216227 +1321 -278.7021455982461 +1322 -278.70214906928993 +1323 -278.70215253476425 +1324 -278.70215599467855 +1325 -278.70215944904396 +1326 -278.7021628978692 +1327 -278.70216634116525 +1328 -278.7021697789414 +1329 -278.70217321120805 +1330 -278.7021766379744 +1331 -278.7021800592508 +1332 -278.7021834750473 +1333 -278.7021868853728 +1334 -278.70219029023843 +1335 -278.70219368965337 +1336 -278.70219708362663 +1337 -278.7022004721689 +1338 -278.7022038552891 +1339 -278.70220723299786 +1340 -278.7022106053037 +1341 -278.7022139722175 +1342 -278.7022173337482 +1343 -278.70222068990483 +1344 -278.702224040697 +1345 -278.7022273861362 +1346 -278.7022307262287 +1347 -278.70223406098734 +1348 -278.7022373904188 +1349 -278.70224071453435 +1350 -278.7022440333426 +1351 -278.7022473468532 +1352 -278.7022506550751 +1353 -278.7022539580182 +1354 -278.7022572556919 +1355 -278.7022605481047 +1356 -278.70226383526625 +1357 -278.7022671171862 +1358 -278.7022703938739 +1359 -278.7022736653377 +1360 -278.70227693158773 +1361 -278.7022801926323 +1362 -278.70228344848107 +1363 -278.70228669914343 +1364 -278.7022899446274 +1365 -278.70229318494376 +1366 -278.7022964200999 +1367 -278.70229965010645 +1368 -278.7023028749708 +1369 -278.7023060947028 +1370 -278.7023093093113 +1371 -278.70231251880534 +1372 -278.7023157231946 +1373 -278.7023189224863 +1374 -278.7023221166913 +1375 -278.7023253058169 +1376 -278.7023284898724 +1377 -278.70233166886715 +1378 -278.702334842809 +1379 -278.70233801170804 +1380 -278.702341175572 +1381 -278.7023443344098 +1382 -278.7023474882304 +1383 -278.7023506370432 +1384 -278.70235378085516 +1385 -278.7023569196765 +1386 -278.70236005351586 +1387 -278.7023631823806 +1388 -278.70236630628045 +1389 -278.7023694252237 +1390 -278.70237253921874 +1391 -278.7023756482745 +1392 -278.70237875239917 +1393 -278.7023818516013 +1394 -278.70238494589 +1395 -278.7023880352733 +1396 -278.7023911197592 +1397 -278.70239419935695 +1398 -278.70239727407477 +1399 -278.70240034392094 +1400 -278.70240340890336 +1401 -278.70240646903153 +1402 -278.7024095243132 +1403 -278.70241257475595 +1404 -278.7024156203692 +1405 -278.70241866116106 +1406 -278.70242169713924 +1407 -278.7024247283131 +1408 -278.7024277546899 +1409 -278.7024307762775 +1410 -278.7024337930859 +1411 -278.7024368051207 +1412 -278.7024398123934 +1413 -278.7024428149089 +1414 -278.7024458126769 +1415 -278.7024488057062 +1416 -278.70245179400365 +1417 -278.702454777577 +1418 -278.7024577564363 +1419 -278.7024607305878 +1420 -278.70246370004014 +1421 -278.7024666648012 +1422 -278.702469624879 +1423 -278.7024725802821 +1424 -278.70247553101746 +1425 -278.70247847709425 +1426 -278.7024814185191 +1427 -278.7024843553004 +1428 -278.7024872874463 +1429 -278.70249021496505 +1430 -278.7024931378634 +1431 -278.7024960561498 +1432 -278.7024989698328 +1433 -278.7025018789194 +1434 -278.702504783417 +1435 -278.70250768333415 +1436 -278.7025105786783 +1437 -278.7025134694574 +1438 -278.70251635567894 +1439 -278.7025192373513 +1440 -278.7025221144814 +1441 -278.70252498707686 +1442 -278.7025278551456 +1443 -278.7025307186953 +1444 -278.70253357773396 +1445 -278.7025364322688 +1446 -278.7025392823068 +1447 -278.7025421278572 +1448 -278.702544968926 +1449 -278.70254780552176 +1450 -278.70255063765114 +1451 -278.70255346532286 +1452 -278.7025562885431 +1453 -278.7025591073203 +1454 -278.70256192166187 +1455 -278.7025647315745 +1456 -278.7025675370666 +1457 -278.70257033814505 +1458 -278.70257313481756 +1459 -278.70257592709095 +1460 -278.70257871497296 +1461 -278.7025814984715 +1462 -278.7025842775933 +1463 -278.7025870523461 +1464 -278.70258982273674 +1465 -278.7025925887732 +1466 -278.7025953504611 +1467 -278.70259810781016 +1468 -278.70260086082624 +1469 -278.7026036095168 +1470 -278.70260635388945 +1471 -278.70260909395057 +1472 -278.70261182970813 +1473 -278.7026145611692 +1474 -278.70261728834026 +1475 -278.70262001122984 +1476 -278.70262272984377 +1477 -278.70262544419046 +1478 -278.70262815427554 +1479 -278.7026308601072 +1480 -278.70263356169244 +1481 -278.70263625903783 +1482 -278.70263895215044 +1483 -278.70264164103816 +1484 -278.7026443257077 +1485 -278.70264700616536 +1486 -278.7026496824189 +1487 -278.702652354475 +1488 -278.70265502234105 +1489 -278.7026576860235 +1490 -278.70266034553003 +1491 -278.70266300086615 +1492 -278.7026656520401 +1493 -278.70266829905887 +1494 -278.7026709419281 +1495 -278.70267358065547 +1496 -278.70267621524835 +1497 -278.7026788457132 +1498 -278.7026814720568 +1499 -278.7026840942854 +1500 -278.70268671240694 +1501 -278.70268932642756 +1502 -278.7026919363538 +1503 -278.7026945421938 +1504 -278.7026971439518 +1505 -278.70269974163716 +1506 -278.7027023352555 +1507 -278.7027049248132 +1508 -278.7027075103179 +1509 -278.70271009177554 +1510 -278.7027126691935 +1511 -278.7027152425774 +1512 -278.7027178119348 +1513 -278.70272037727165 +1514 -278.7027229385953 +1515 -278.70272549591226 +1516 -278.7027280492285 +1517 -278.7027305985511 +1518 -278.7027331438876 +1519 -278.70273568524294 +1520 -278.70273822262374 +1521 -278.70274075603817 +1522 -278.70274328549147 +1523 -278.7027458109903 +1524 -278.70274833254115 +1525 -278.70275085015084 +1526 -278.7027533638256 +1527 -278.7027558735726 +1528 -278.70275837939676 +1529 -278.7027608813064 +1530 -278.7027633793067 +1531 -278.7027658734039 +1532 -278.70276836360557 +1533 -278.7027708499174 +1534 -278.7027733323461 +1535 -278.70277581089704 +1536 -278.7027782855776 +1537 -278.70278075639385 +1538 -278.7027832233523 +1539 -278.7027856864594 +1540 -278.7027881457208 +1541 -278.70279060114376 +1542 -278.7027930527338 +1543 -278.702795500497 +1544 -278.70279794444076 +1545 -278.7028003845693 +1546 -278.70280282089146 +1547 -278.70280525341263 +1548 -278.7028076821374 +1549 -278.70281010707373 +1550 -278.702812528227 +1551 -278.7028149456038 +1552 -278.70281735920986 +1553 -278.70281976905284 +1554 -278.7028221751368 +1555 -278.70282457746885 +1556 -278.7028269760552 +1557 -278.70282937090127 +1558 -278.7028317620147 +1559 -278.70283414940036 +1560 -278.70283653306427 +1561 -278.70283891301295 +1562 -278.7028412892527 +1563 -278.7028436617885 +1564 -278.7028460306275 +1565 -278.70284839577516 +1566 -278.7028507572379 +1567 -278.70285311502187 +1568 -278.70285546913163 +1569 -278.702857819575 +1570 -278.702860166357 +1571 -278.7028625094832 +1572 -278.7028648489613 +1573 -278.7028671847953 +1574 -278.702869516992 +1575 -278.70287184555775 +1576 -278.70287417049684 +1577 -278.7028764918164 +1578 -278.7028788095224 +1579 -278.70288112362095 +1580 -278.7028834341171 +1581 -278.7028857410168 +1582 -278.70288804432624 +1583 -278.7028903440513 +1584 -278.7028926401975 +1585 -278.70289493277056 +1586 -278.70289722177677 +1587 -278.7028995072215 +1588 -278.70290178911085 +1589 -278.7029040674507 +1590 -278.7029063422456 +1591 -278.70290861350304 +1592 -278.7029108812278 +1593 -278.70291314542544 +1594 -278.7029154061021 +1595 -278.7029176632637 +1596 -278.7029199169154 +1597 -278.7029221670627 +1598 -278.70292441371197 +1599 -278.70292665686844 +1600 -278.7029288965383 +1601 -278.70293113272606 +1602 -278.70293336543887 +1603 -278.7029355946809 +1604 -278.7029378204589 +1605 -278.70294004277804 +1606 -278.70294226164305 +1607 -278.7029444770612 +1608 -278.70294668903693 +1609 -278.7029488975758 +1610 -278.7029511026842 +1611 -278.70295330436664 +1612 -278.70295550262955 +1613 -278.70295769747725 +1614 -278.70295988891684 +1615 -278.70296207695253 +1616 -278.7029642615904 +1617 -278.7029664428357 +1618 -278.7029686206945 +1619 -278.7029707951716 +1620 -278.70297296627234 +1621 -278.70297513400254 +1622 -278.70297729836795 +1623 -278.70297945937284 +1624 -278.7029816170242 +1625 -278.7029837713256 +1626 -278.7029859222848 +1627 -278.7029880699048 +1628 -278.7029902141921 +1629 -278.7029923551526 +1630 -278.70299449279105 +1631 -278.7029966271122 +1632 -278.70299875812213 +1633 -278.7030008858263 +1634 -278.70300301022985 +1635 -278.70300513133725 +1636 -278.70300724915523 +1637 -278.70300936368875 +1638 -278.70301147494166 +1639 -278.703013582921 +1640 -278.70301568763085 +1641 -278.7030177890777 +1642 -278.7030198872659 +1643 -278.70302198220065 +1644 -278.70302407388755 +1645 -278.70302616233187 +1646 -278.70302824753753 +1647 -278.7030303295118 +1648 -278.70303240825865 +1649 -278.70303448378303 +1650 -278.7030365560911 +1651 -278.70303862518665 +1652 -278.7030406910766 +1653 -278.7030427537646 +1654 -278.70304481325684 +1655 -278.70304686955774 +1656 -278.70304892267234 +1657 -278.7030509726055 +1658 -278.7030530193641 +1659 -278.7030550629514 +1660 -278.7030571033728 +1661 -278.7030591406339 +1662 -278.70306117473956 +1663 -278.70306320569426 +1664 -278.7030652335037 +1665 -278.7030672581736 +1666 -278.70306927970745 +1667 -278.70307129811135 +1668 -278.7030733133891 +1669 -278.7030753255478 +1670 -278.70307733459026 +1671 -278.7030793405223 +1672 -278.7030813433498 +1673 -278.7030833430765 +1674 -278.7030853397077 +1675 -278.7030873332483 +1676 -278.7030893237036 +1677 -278.7030913110783 +1678 -278.70309329537713 +1679 -278.7030952766053 +1680 -278.70309725476756 +1681 -278.70309922986905 +1682 -278.70310120191374 +1683 -278.70310317090843 +1684 -278.7031051368556 +1685 -278.70310709976263 +1686 -278.7031090596323 +1687 -278.70311101647 +1688 -278.7031129702815 +1689 -278.70311492107055 +1690 -278.7031168688422 +1691 -278.7031188136015 +1692 -278.70312075535355 +1693 -278.70312269410255 +1694 -278.70312462985345 +1695 -278.7031265626111 +1696 -278.7031284923796 +1697 -278.7031304191657 +1698 -278.7031323429725 +1699 -278.7031342638043 +1700 -278.70313618166705 +1701 -278.7031380965652 +1702 -278.70314000850385 +1703 -278.7031419174861 +1704 -278.7031438235186 +1705 -278.70314572660465 +1706 -278.7031476267497 +1707 -278.70314952395864 +1708 -278.7031514182349 +1709 -278.70315330958505 +1710 -278.70315519801187 +1711 -278.7031570835211 +1712 -278.7031589661171 +1713 -278.70316084580503 +1714 -278.70316272258805 +1715 -278.7031645964726 +1716 -278.70316646746176 +1717 -278.703168335561 +1718 -278.7031702007747 +1719 -278.7031720631079 +1720 -278.7031739225642 +1721 -278.7031757791492 +1722 -278.70317763286704 +1723 -278.7031794837222 +1724 -278.70318133171855 +1725 -278.70318317686207 +1726 -278.7031850191566 +1727 -278.70318685860616 +1728 -278.70318869521617 +1729 -278.7031905289904 +1730 -278.7031923599337 +1731 -278.70319418805065 +1732 -278.7031960133453 +1733 -278.7031978358231 +1734 -278.7031996554872 +1735 -278.7032014723429 +1736 -278.7032032863947 +1737 -278.70320509764707 +1738 -278.70320690610384 +1739 -278.70320871176983 +1740 -278.7032105146498 +1741 -278.70321231474765 +1742 -278.7032141120681 +1743 -278.7032159066149 +1744 -278.7032176983937 +1745 -278.7032194874074 +1746 -278.7032212736622 +1747 -278.70322305716076 +1748 -278.7032248379083 +1749 -278.7032266159085 +1750 -278.7032283911667 +1751 -278.7032301636869 +1752 -278.7032319334733 +1753 -278.70323370052984 +1754 -278.70323546486156 +1755 -278.70323722647265 +1756 -278.7032389853662 +1757 -278.7032407415487 +1758 -278.7032424950224 +1759 -278.7032442457933 +1760 -278.70324599386424 +1761 -278.70324773924034 +1762 -278.70324948192587 +1763 -278.7032512219248 +1764 -278.7032529592407 +1765 -278.703254693879 +1766 -278.70325642584334 +1767 -278.70325815513814 +1768 -278.7032598817678 +1769 -278.70326160573643 +1770 -278.70326332704786 +1771 -278.70326504570664 +1772 -278.70326676171646 +1773 -278.7032684750828 +1774 -278.70327018580804 +1775 -278.70327189389775 +1776 -278.7032735993553 +1777 -278.7032753021855 +1778 -278.70327700239164 +1779 -278.7032786999794 +1780 -278.70328039495155 +1781 -278.70328208731223 +1782 -278.7032837770661 +1783 -278.703285464217 +1784 -278.7032871487692 +1785 -278.7032888307266 +1786 -278.7032905100937 +1787 -278.7032921868744 +1788 -278.7032938610721 +1789 -278.70329553269175 +1790 -278.7032972017376 +1791 -278.7032988682126 +1792 -278.7033005321221 +1793 -278.7033021934694 +1794 -278.7033038522588 +1795 -278.70330550849405 +1796 -278.70330716217967 +1797 -278.70330881331887 +1798 -278.70331046191575 +1799 -278.703312107976 +1800 -278.70331375150107 +1801 -278.7033153924972 +1802 -278.7033170309664 +1803 -278.7033186669143 +1804 -278.70332030034467 +1805 -278.70332193126 +1806 -278.70332355966616 +1807 -278.70332518556563 +1808 -278.7033268089635 +1809 -278.7033284298629 +1810 -278.70333004826824 +1811 -278.70333166418305 +1812 -278.70333327761097 +1813 -278.70333488855783 +1814 -278.7033364970244 +1815 -278.70333810301724 +1816 -278.7033397065402 +1817 -278.7033413075948 +1818 -278.7033429061869 +1819 -278.7033445023201 +1820 -278.70334609599803 +1821 -278.7033476872241 +1822 -278.70334927600334 +1823 -278.7033508623388 +1824 -278.703352446234 +1825 -278.70335402769314 +1826 -278.70335560672027 +1827 -278.70335718331984 +1828 -278.7033587574942 +1829 -278.70336032924797 +1830 -278.703361898585 +1831 -278.70336346550835 +1832 -278.7033650300236 +1833 -278.7033665921324 +1834 -278.70336815184015 +1835 -278.7033697091494 +1836 -278.7033712640649 +1837 -278.7033728165897 +1838 -278.7033743667281 +1839 -278.7033759144832 +1840 -278.70337745985955 +1841 -278.70337900286086 +1842 -278.7033805434892 +1843 -278.7033820817506 +1844 -278.70338361764817 +1845 -278.70338515118505 +1846 -278.7033866823645 +1847 -278.703388211191 +1848 -278.70338973766815 +1849 -278.70339126179977 +1850 -278.7033927835895 +1851 -278.70339430304085 +1852 -278.70339582015737 +1853 -278.7033973349425 +1854 -278.70339884740065 +1855 -278.7034003575351 +1856 -278.7034018653501 +1857 -278.70340337084787 +1858 -278.703404874033 +1859 -278.7034063749093 +1860 -278.7034078734799 +1861 -278.70340936974844 +1862 -278.7034108637189 +1863 -278.7034123553945 +1864 -278.703413844779 +1865 -278.7034153318767 +1866 -278.70341681668987 +1867 -278.70341829922296 +1868 -278.7034197794789 +1869 -278.70342125746254 +1870 -278.70342273317556 +1871 -278.70342420662314 +1872 -278.7034256778085 +1873 -278.7034271467338 +1874 -278.7034286134047 +1875 -278.7034300778237 +1876 -278.7034315399943 +1877 -278.70343299992004 +1878 -278.7034344576039 +1879 -278.70343591305067 +1880 -278.70343736626336 +1881 -278.70343881724443 +1882 -278.7034402659993 +1883 -278.70344171252947 +1884 -278.70344315683974 +1885 -278.70344459893295 +1886 -278.70344603881347 +1887 -278.70344747648363 +1888 -278.703448911947 +1889 -278.70345034520784 +1890 -278.7034517762687 +1891 -278.70345320513405 +1892 -278.70345463180723 +1893 -278.70345605629063 +1894 -278.7034574785878 +1895 -278.703458898703 +1896 -278.70346031663945 +1897 -278.70346173240034 +1898 -278.7034631459891 +1899 -278.70346455740844 +1900 -278.70346596666343 +1901 -278.7034673737565 +1902 -278.7034687786907 +1903 -278.70347018146924 +1904 -278.7034715820971 +1905 -278.70347298057584 +1906 -278.7034743769092 +1907 -278.7034757711012 +1908 -278.7034771631547 +1909 -278.7034785530737 +1910 -278.70347994086035 +1911 -278.7034813265187 +1912 -278.7034827100529 +1913 -278.7034840914647 +1914 -278.70348547075764 +1915 -278.7034868479366 +1916 -278.70348822300275 +1917 -278.7034895959609 +1918 -278.70349096681423 +1919 -278.7034923355657 +1920 -278.703493702218 +1921 -278.70349506677474 +1922 -278.70349642924026 +1923 -278.70349778961685 +1924 -278.70349914790785 +1925 -278.7035005041169 +1926 -278.70350185824617 +1927 -278.70350321030037 +1928 -278.7035045602814 +1929 -278.70350590819385 +1930 -278.70350725404006 +1931 -278.70350859782343 +1932 -278.70350993954713 +1933 -278.7035112792146 +1934 -278.7035126168291 +1935 -278.703513952393 +1936 -278.7035152859109 +1937 -278.70351661738476 +1938 -278.7035179468182 +1939 -278.7035192742151 +1940 -278.7035205995774 +1941 -278.70352192290903 +1942 -278.7035232442127 +1943 -278.70352456349235 +1944 -278.70352588075116 +1945 -278.7035271959913 +1946 -278.7035285092159 +1947 -278.7035298204286 +1948 -278.7035311296336 +1949 -278.7035324368328 +1950 -278.70353374202887 +1951 -278.7035350452258 +1952 -278.7035363464264 +1953 -278.7035376456341 +1954 -278.7035389428516 +1955 -278.70354023808244 +1956 -278.7035415313291 +1957 -278.703542822595 +1958 -278.70354411188384 +1959 -278.70354539919833 +1960 -278.7035466845405 +1961 -278.7035479679146 +1962 -278.70354924932377 +1963 -278.7035505287699 +1964 -278.70355180625745 +1965 -278.7035530817886 +1966 -278.7035543553667 +1967 -278.7035556269951 +1968 -278.7035568966758 +1969 -278.7035581644131 +1970 -278.70355943020905 +1971 -278.70356069406745 +1972 -278.70356195599066 +1973 -278.7035632159821 +1974 -278.7035644740445 +1975 -278.7035657301812 +1976 -278.70356698439537 +1977 -278.7035682366891 +1978 -278.7035694870664 +1979 -278.7035707355292 +1980 -278.7035719820819 +1981 -278.70357322672544 +1982 -278.703574469465 +1983 -278.7035757103027 +1984 -278.7035769492407 +1985 -278.70357818628236 +1986 -278.7035794214315 +1987 -278.70358065469054 +1988 -278.7035818860621 +1989 -278.7035831155493 +1990 -278.70358434315455 +1991 -278.7035855688824 +1992 -278.70358679273426 +1993 -278.70358801471355 +1994 -278.70358923482337 +1995 -278.70359045306583 +1996 -278.70359166944496 +1997 -278.70359288396276 +1998 -278.703594096623 +1999 -278.7035953074276 +2000 -278.7035965163802 diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/log_param_by_sz=true,epochs=2000.log b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/log_param_by_sz=true,epochs=2000.log new file mode 100644 index 00000000..ea51af85 --- /dev/null +++ b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/log_param_by_sz=true,epochs=2000.log @@ -0,0 +1,31 @@ +2024-01-13T00:22:54.907 +== Config == +INIT_SIZE: 5 +GEN_TYP_SIZE: 2 +PARAMETERIZE_FLIP_GROUPS_BY_SZ: true +EPOCHS: 2000 +DistNat: DistUInt32 +TAG: entropy_approx_v01 + +Building (gen_expr(...)) computation graph... + 19.248910882 seconds + +Initial adnodes_of_interest: +Dict("tysz2_gen_type_tbool" => 0.5, "sz4_succ_var" => 0.5, "tysz1_gen_type_tbool" => 0.5, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.5, "sz4_succ_abs" => 0.5, "sz5_succ_var" => 0.5, "sz5_succ_abs" => 0.5, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5, "sz1_succ_app" => 0.5, "sz1_succ_abs" => 0.5, "sz3_succ_abs" => 0.5, "sz3_succ_app" => 0.5, "sz5_succ_app" => 0.5, "sz4_succ_app" => 0.5, "sz2_succ_abs" => 0.5, "sz3_succ_var" => 0.5) +Saving samples... +Saved samples to examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/terms_before.txt. + 106.794707683 seconds + +Initial entropy: 268.9974234499506 + +Training... + 172.545444082 seconds + +Final entropy: 278.7035965163802 + +Learned adnodes_of_interest: +Dict("tysz2_gen_type_tbool" => 0.6406501979548713, "sz4_succ_var" => 0.6674255144274396, "tysz1_gen_type_tbool" => 0.5518244186781357, "sz0_zero_pr_var2" => 0.6074364937924714, "sz2_succ_app" => 0.2924748841302053, "sz4_succ_abs" => 0.46214510333327624, "sz5_succ_var" => 0.5, "sz5_succ_abs" => 0.6296817679421843, "sz2_succ_var" => 0.692442569329581, "sz1_succ_var" => 0.6690399301775136, "sz1_succ_app" => 0.3164272452618666, "sz1_succ_abs" => 0.44933794966818746, "sz3_succ_abs" => 0.43541600818707565, "sz3_succ_app" => 0.2995197540262324, "sz5_succ_app" => 0.32780288605621516, "sz4_succ_app" => 0.30132673109175784, "sz2_succ_abs" => 0.42233005579465066, "sz3_succ_var" => 0.6824377595027068) +Saving samples... +Saved samples to examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt. + 109.846797327 seconds + diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/terms_before.txt b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/terms_before.txt new file mode 100644 index 00000000..a37505b4 --- /dev/null +++ b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/terms_before.txt @@ -0,0 +1,200 @@ +λx:Bool. (λy:Bool. true) x +λx:Bool -> Bool. λy:Bool. (λz:Bool -> Bool. true) (λz:Bool. z) +(λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) true true ((λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. λa:Bool. true) (λy:Bool. λz:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. x) (λx:Bool -> Bool. λy:Bool. true)) ((λx:Bool. x) true)) +(λx:Bool. λy:Bool. y) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool -> Bool. true) false false) (λx:Bool. (λy:Bool -> Bool. y) (λy:Bool. false))) +(λx:Bool. (λy:Bool. (λz:(Bool -> Bool) -> Bool. false) (λz:Bool -> Bool. true)) false) false +false +(λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. λw:(Bool -> Bool) -> Bool. false) x) ((λx:Bool. x) false) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) ((λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. false))) ((λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. true) ((λx:Bool. λy:Bool. false) true) false (λx:Bool. (λy:Bool. false) false)) +false +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. (λw:(Bool -> Bool) -> Bool. false) (λw:Bool -> Bool. false)) ((λx:Bool. (λy:Bool. λz:Bool. λw:Bool. λa:Bool. false) false true) true) +λx:Bool -> Bool. false +false +λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. y) +false +false +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool. x) ((λx:Bool. λy:Bool -> Bool. false) true)) ((λx:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool. false) false)) (λx:Bool -> Bool. false) +(λx:Bool -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) true)) false ((λx:Bool. λy:Bool -> Bool. (λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λz:Bool -> Bool. λw:Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. true)) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool. λy:Bool -> Bool. true) false)))) +λx:Bool -> Bool. λy:Bool. (λz:Bool. λw:Bool. true) (x y) false +false +(λx:Bool -> Bool. λy:Bool -> Bool. (λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. λa:Bool. true) (λz:Bool -> Bool. λw:Bool. false) (x true)) (λx:Bool. false) +(λx:Bool. λy:Bool. (λz:Bool. false) false) false true +(λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool. λz:Bool. false) false false ((λx:Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. false)) false)) +λx:Bool. x +(λx:Bool. x) true +λx:Bool -> Bool. x +true +λx:Bool -> Bool. x +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. false) true) (λx:Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. false) true) true +λx:Bool. (λy:Bool. x) x +(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. λa:Bool -> Bool. λb:Bool. false) false x) ((λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool -> Bool. false) (λx:Bool. true)) true) ((λx:(Bool -> Bool) -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. (λy:Bool. λz:Bool. true) false))) +false +true +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. x) false (λx:Bool -> Bool. (λy:Bool. x) ((λy:Bool -> Bool. λz:Bool. false) (λy:Bool. true) ((λy:Bool. false) true))) +λx:Bool -> Bool. λy:Bool. (λz:Bool -> Bool. λw:(Bool -> Bool) -> Bool -> Bool. λa:Bool. false) x (λz:Bool -> Bool. λw:Bool. true) y +(λx:Bool -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. false) true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. y) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. x))) ((λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. false) false)) (λx:Bool. x)) +(λx:Bool. false) false +λx:Bool -> Bool. λy:Bool. y +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) false ((λx:Bool. (λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool. true)) ((λx:Bool. false) ((λx:Bool. true) false))) false +false +λx:Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool -> Bool. false) (x false) false ((λy:Bool. λz:Bool. λw:Bool. false) ((λy:Bool -> Bool. true) (λy:Bool. false)) false) +false +λx:Bool. λy:Bool. false +λx:Bool -> Bool. true +true +λx:Bool -> Bool. x +false +λx:Bool -> Bool. false +false +(λx:Bool -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool. x) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool. λy:Bool. true) true)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool. true) ((λx:Bool. λy:Bool -> Bool. false) false))) ((λx:Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. false) true ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true)) false true) +(λx:Bool -> Bool -> Bool. λy:Bool. y) (λx:Bool. λy:Bool. (λz:Bool -> Bool. λw:Bool. false) (λz:Bool. false) ((λz:Bool. false) x)) +(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. false) x false ((λy:Bool. y) x)) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) false (λx:Bool -> Bool. false) (λx:Bool -> Bool. x) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool. λy:Bool. true) true false))) +λx:Bool. (λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool. λa:(Bool -> Bool) -> Bool. λb:Bool. false) false ((λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. true)) ((λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. false) x ((λy:Bool. λz:Bool. false) true)) ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. x) (λy:Bool -> Bool. (λz:Bool. λw:Bool. true) true)) +true +(λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool. (λz:(Bool -> Bool) -> Bool -> Bool. false) (λz:Bool -> Bool. λw:Bool. true)) (λy:Bool. (λz:Bool -> Bool. true) (λz:Bool. true))) ((λx:Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool -> Bool. λa:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false)) ((λx:Bool. λy:Bool -> Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. true))) (λx:Bool. λy:Bool. (λz:Bool. false) false)) +(λx:Bool -> Bool -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. false) false ((λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) true ((λy:Bool. λz:Bool. true) false))) (λx:Bool. λy:Bool. (λz:Bool. true) true) +(λx:Bool. false) ((λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. false)) (λx:Bool. (λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. true)) (λx:Bool -> Bool. x)) +λx:Bool -> Bool. λy:Bool. true +(λx:Bool. (λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. false) (λy:Bool. false)) false ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. false) true false)) ((λx:(Bool -> Bool) -> Bool. (λy:Bool. y) ((λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. false))) ((λx:Bool. λy:Bool -> Bool. x) ((λx:Bool. true) ((λx:Bool. true) false)))) +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) ((λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) ((λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. λz:Bool. false))) (λy:Bool -> Bool. λz:Bool. true) +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. x) (λy:Bool -> Bool. x) false +λx:Bool -> Bool. x +(λx:Bool. λy:Bool -> Bool. x) true +(λx:Bool -> Bool -> Bool. x) (λx:Bool. λy:Bool. x) +(λx:Bool. λy:Bool. (λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool -> Bool. λa:Bool. true) (λz:Bool -> Bool. false) (λz:Bool. λw:Bool. false)) false +(λx:Bool -> Bool. false) (λx:Bool. (λy:(Bool -> Bool) -> Bool. x) ((λy:Bool -> Bool. λz:Bool. λw:Bool -> Bool. false) (λy:Bool. false) false)) +λx:Bool. (λy:Bool -> Bool -> Bool. x) ((λy:Bool. λz:Bool. λw:Bool. false) ((λy:Bool. x) ((λy:Bool. true) false))) +true +λx:Bool -> Bool. x false +(λx:Bool. false) ((λx:Bool -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) false (λy:Bool -> Bool. x)) (λx:Bool. (λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. false) (λy:Bool. false) ((λy:Bool. λz:Bool -> Bool. true) false))) +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. y) ((λx:(Bool -> Bool) -> Bool. λy:Bool. (λz:Bool. λw:Bool. false) true) (λx:Bool -> Bool. true)) +(λx:Bool. x) ((λx:Bool. (λy:Bool -> Bool -> Bool. x) ((λy:Bool. λz:Bool. λw:Bool. true) true)) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) true ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. true) true)))) +false +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:Bool. true) false)) false true +true +λx:Bool. λy:Bool. y +λx:Bool -> Bool. false +(λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:(Bool -> Bool) -> Bool. λa:Bool -> Bool. false) (λy:Bool. λz:Bool. true)) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) true (λx:Bool -> Bool. false) +λx:Bool -> Bool. (λy:Bool. y) false +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. true)) ((λx:Bool. x) ((λx:Bool. λy:Bool. true) false ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)))) (λx:Bool. λy:Bool. (λz:(Bool -> Bool) -> Bool -> Bool. x) ((λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) (λz:Bool. λw:Bool. false))) +λx:Bool. λy:Bool. false +λx:Bool -> Bool. true +true +λx:Bool. x +(λx:Bool. λy:Bool. λz:Bool. false) ((λx:Bool. true) ((λx:Bool. x) true)) ((λx:(Bool -> Bool) -> Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool. λy:Bool. λz:Bool. true) false)))) +λx:Bool -> Bool. x true +(λx:Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. λb:Bool -> Bool. λc:Bool. true) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true)) (λx:Bool. λy:Bool. false) true false +true +λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. (λz:Bool -> Bool. λw:(Bool -> Bool) -> Bool. λa:Bool. false) (λz:Bool. true)) (λy:Bool -> Bool. λz:Bool. true) ((λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool -> Bool. true) (λy:Bool -> Bool. false) x (λy:Bool. (λz:Bool. true) true)) +(λx:Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool -> Bool -> Bool. λb:Bool. λc:Bool. true) true true true ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. true) (λx:Bool -> Bool. x) ((λx:Bool. false) true)) (λx:Bool. (λy:Bool. λz:Bool. y) false) +false +(λx:Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. y) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. false)))) +λx:Bool. x +λx:Bool -> Bool. x ((λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool -> Bool. true) (λy:Bool -> Bool. false) x x) +λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) ((λy:Bool -> Bool -> Bool. (λz:Bool. λw:Bool -> Bool. λa:Bool. true) true) ((λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. true) false (λy:Bool -> Bool. x))) +λx:Bool -> Bool. x +true +(λx:Bool. λy:Bool. (λz:Bool. λw:Bool. false) false) false +λx:Bool -> Bool. false +(λx:Bool. (λy:Bool. λz:Bool -> Bool. false) x) false (λx:Bool. (λy:Bool. λz:Bool. false) x ((λy:Bool. true) ((λy:Bool. true) x))) +(λx:Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. true) false ((λy:Bool. false) false)) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false)) +true +false +λx:Bool. true +(λx:Bool. λy:Bool -> Bool. (λz:Bool. λw:Bool. true) x ((λz:Bool. false) x)) false +(λx:Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. false) ((λx:(Bool -> Bool) -> Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. false))) ((λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. λz:Bool. false)) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:Bool. true) true))) ((λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. true) ((λy:Bool. λz:Bool -> Bool. false) false)) false) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. (λz:Bool. false) y) ((λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool. λy:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)))) true +true +λx:Bool. false +true +λx:Bool. (λy:Bool. true) x +(λx:Bool -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:(Bool -> Bool) -> Bool. λa:Bool. false) true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. true) false)) (λx:Bool -> Bool. x) (λx:Bool -> Bool. false) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. false)) ((λx:Bool -> Bool. λy:Bool. λz:Bool. true) ((λx:Bool. λy:Bool. false) false)) ((λx:Bool. λy:Bool. false) false ((λx:Bool. λy:Bool. false) true ((λx:Bool. false) true))) (λx:Bool. x) +(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) false (λy:Bool. x)) false ((λx:Bool -> Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. false) (λx:Bool. true) (λx:Bool. false) (λx:Bool -> Bool. (λy:Bool -> Bool. λz:Bool. false) x) ((λx:Bool. λy:Bool -> Bool -> Bool. false) ((λx:Bool. true) false) (λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool -> Bool. false)))) +false +false +(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. λa:Bool. λb:Bool. true) x ((λy:Bool. true) false) true) false +(λx:Bool -> Bool -> Bool. λy:Bool. y) (λx:Bool. λy:Bool. false) +(λx:Bool. x) false +false +λx:Bool. (λy:(Bool -> Bool) -> Bool. (λz:Bool. λw:Bool. false) x) (λy:Bool -> Bool. true) ((λy:Bool. x) true) +(λx:(Bool -> Bool) -> Bool -> Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. (λy:Bool. λz:Bool. true) true) true) +λx:Bool -> Bool. true +true +λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. (λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. λa:Bool. true) x ((λz:Bool. λw:Bool -> Bool. λa:Bool. false) x)) (λy:Bool -> Bool. y) +(λx:Bool. λy:Bool -> Bool. λz:Bool. y z) ((λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool -> Bool. false) false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool. λy:Bool. false) (λx:Bool. λy:Bool. true)) ((λx:Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. λa:Bool. false) (λx:Bool. true) ((λx:Bool. true) true) ((λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) false (λx:Bool. false)))) +(λx:Bool -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) ((λy:Bool -> Bool. true) (λy:Bool. false))) (λx:Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. λa:Bool. false) ((λx:Bool. λy:Bool -> Bool. false) false) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool. false) false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) ((λx:Bool. false) false)))) +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. true) ((λy:Bool -> Bool. true) (λy:Bool. true)) ((λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. true) (λy:Bool. true) (λy:Bool -> Bool. true))) (λx:Bool -> Bool. λy:Bool. y) +(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. true) (λy:Bool. λz:Bool. false)) false (λx:Bool. λy:Bool. false) +false +true +false +λx:Bool -> Bool. (λy:Bool. (λz:Bool. x) ((λz:Bool. false) y)) ((λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. true) ((λy:Bool. λz:Bool. λw:Bool. true) false) ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false) (λy:Bool. y))) +λx:Bool -> Bool. x true +false +(λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) false ((λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) false ((λy:Bool. false) false))) false +(λx:Bool. λy:(Bool -> Bool) -> Bool. x) ((λx:Bool. λy:Bool. λz:Bool. true) true ((λx:Bool. false) false) true) (λx:Bool -> Bool. false) +(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λx:Bool. x) ((λx:Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) false ((λx:Bool. true) true) true) +(λx:Bool -> Bool -> Bool. λy:Bool. (λz:Bool -> Bool. false) (λz:Bool. true)) (λx:Bool. λy:Bool. (λz:Bool -> Bool -> Bool. true) (λz:Bool. λw:Bool. false)) true +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. (λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. λa:Bool. true) (λz:Bool -> Bool. λw:Bool. true)) false ((λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λy:Bool -> Bool. λz:Bool. false) false) true) +(λx:Bool. true) ((λx:Bool. λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool. true) true ((λx:Bool. true) true) ((λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) false)) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. false) true (λx:Bool -> Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. false)))) +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool -> Bool -> Bool. false) true (λx:Bool -> Bool. λy:Bool. true) (λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool -> Bool. false)) ((λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool. false) true) false) ((λx:Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool. false) ((λx:Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. false)))) +λx:Bool. λy:Bool. x +λx:Bool -> Bool. λy:Bool. y +λx:Bool. (λy:Bool. (λz:Bool -> Bool. λw:Bool -> Bool -> Bool. false) (λz:Bool. true)) false (λy:Bool. (λz:Bool. λw:Bool -> Bool -> Bool. λa:Bool. false) true (λz:Bool. λw:Bool. true)) +(λx:Bool. λy:Bool. (λz:Bool -> Bool -> Bool. λw:Bool. false) (λz:Bool. λw:Bool. true) ((λz:Bool -> Bool. true) (λz:Bool. false))) false +true +(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. true) x) true (λx:Bool. λy:Bool. (λz:(Bool -> Bool) -> Bool. false) (λz:Bool -> Bool. y)) +(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. true) ((λy:Bool. λz:Bool -> Bool. λw:Bool. true) false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. false) (λx:Bool -> Bool. λy:Bool. true) false false) ((λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool. true) ((λy:Bool. true) false)) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. false) (λx:Bool -> Bool. false) true))) +false +(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. (λz:(Bool -> Bool) -> Bool. true) (λz:Bool -> Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true))) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool -> Bool. λa:Bool -> Bool. λb:Bool. true) true ((λx:Bool. λy:Bool -> Bool. true) false) false ((λx:Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. true) false ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true)) false)) +(λx:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) (λy:Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. true)) false) +λx:Bool. x +false +(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool -> Bool. true) (λx:Bool. λy:Bool. false) true ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. false)) ((λx:Bool. false) true) (λx:Bool. (λy:Bool. (λz:Bool. false) y) x) +true +(λx:Bool -> Bool. λy:Bool. (λz:Bool. λw:Bool -> Bool. λa:Bool. true) y) (λx:Bool. x) false +(λx:Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool -> Bool -> Bool. true) true ((λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. false)) ((λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. true) (λy:Bool -> Bool. false))) (λx:Bool. x) +λx:Bool. x +true +(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. λw:(Bool -> Bool) -> Bool. false) false) ((λx:Bool. λy:Bool -> Bool. false) false) ((λx:Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. false) true true true) (λx:Bool -> Bool. (λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. false) ((λy:Bool -> Bool. λz:Bool. false) (λy:Bool. false)) (λy:Bool -> Bool. (λz:Bool. true) true)) +λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. (λw:Bool. false) z) (λy:Bool -> Bool. x) +(λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. (λz:Bool. λw:Bool -> Bool. λa:Bool. false) false) (λy:Bool. x)) (λx:Bool. x) +(λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. false))) false (λx:Bool. λy:Bool. (λz:Bool. z) x) +λx:Bool. λy:Bool. (λz:Bool -> Bool. λw:Bool -> Bool. false) (λz:Bool. z) (λz:Bool. true) +λx:Bool. (λy:Bool. λz:Bool. true) false x +true +true +false +true +(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool -> Bool. false)) (λx:Bool. (λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. true) x (λy:Bool. λz:Bool. true)) true +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. λb:Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. false)) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. (λy:Bool. false) false) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) (λx:Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. true))) ((λx:Bool -> Bool. (λy:Bool. λz:Bool -> Bool -> Bool. true) true) (λx:Bool. x) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) ((λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool. λz:Bool. false)))) +false +true +(λx:Bool. x) ((λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. false) false ((λx:Bool. λy:Bool. λz:Bool. false) true) (λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. true)) ((λx:Bool -> Bool. false) (λx:Bool. true)))) +false +(λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. y) (λy:Bool -> Bool. y)) +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool. λa:Bool. false) true) (λx:Bool -> Bool. x) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. false)) true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) ((λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. false)) ((λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) (λx:Bool. x)))) +λx:Bool. (λy:Bool. (λz:Bool. λw:Bool. λa:Bool. false) true) x x +(λx:Bool. (λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool. true) true false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false) ((λx:Bool. λy:(Bool -> Bool) -> Bool. false) false ((λx:Bool. λy:Bool -> Bool. true) true))) (λx:Bool -> Bool. (λy:Bool -> Bool. (λz:Bool. false) false) ((λy:Bool. λz:Bool. λw:Bool. true) true ((λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. true)))) +(λx:Bool -> Bool. x false) (λx:Bool. x) +λx:Bool -> Bool. true +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. y) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. y) ((λx:Bool. λy:Bool. λz:Bool. true) ((λx:Bool. λy:Bool -> Bool. true) false (λx:Bool. x)))) +(λx:Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool. true) false false) (λx:Bool. x) +(λx:Bool. x) false +(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. (λz:Bool. λw:Bool. true) false) ((λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) false ((λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. false)))) ((λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool -> Bool. true) true) (λx:Bool -> Bool. λy:Bool. false) false) +(λx:Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:(Bool -> Bool) -> Bool. λa:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) ((λx:Bool. λy:Bool. λz:Bool. true) ((λx:Bool. true) true)) true ((λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. true)) ((λx:Bool. λy:Bool. false) false) true) +(λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. true)) (λx:Bool. x) false (λx:Bool. true) +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool. λa:Bool -> Bool. false) (λy:Bool. false) ((λy:Bool. true) true) true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. z) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. true) (λx:Bool -> Bool. true) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true))))) +true +(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. false) ((λx:Bool. false) false) ((λx:Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. false) (λx:Bool. true) true) false (λx:Bool. false) +false +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool -> Bool -> Bool. λb:Bool. true) (λy:Bool -> Bool. false) ((λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. λz:Bool. true)) ((λy:Bool. y) (x true)) (λy:Bool. λz:Bool. (λw:Bool. false) z) +(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. y) (λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. true) (λy:Bool -> Bool. false) ((λy:Bool. true) x)) false +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. (λz:(Bool -> Bool) -> Bool. false) y) ((λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. false) ((λy:Bool. λz:Bool. λw:Bool. true) false) (λy:Bool -> Bool. x)) +(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool. (λy:Bool -> Bool. λz:Bool. false) (λy:Bool. false)) false (λx:Bool. λy:Bool. y) +true +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. λa:Bool. true) (λx:Bool. λy:Bool. x) ((λx:Bool -> Bool. λy:Bool. y) ((λx:Bool. λy:Bool. true) true)) ((λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. true) true ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. true))) ((λx:Bool. x) false)) +(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. λa:Bool. λb:Bool. true) x x) ((λx:Bool. λy:Bool. false) true false) ((λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) true true ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) false ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. λy:Bool. true)) ((λx:Bool -> Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool. λz:Bool. true) false)))) +false +(λx:(Bool -> Bool) -> Bool. x ((λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. true))) ((λx:Bool. λy:Bool. λz:Bool -> Bool. false) false true) +false diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt new file mode 100644 index 00000000..9160ed61 --- /dev/null +++ b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt @@ -0,0 +1,200 @@ +true +true +false +λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. true) ((λy:Bool. λz:Bool. λw:Bool. false) false) ((λy:Bool. λz:Bool. λw:Bool. false) false) +(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) x ((λy:Bool -> Bool. true) ((λy:Bool. λz:Bool. false) true))) (λx:Bool. λy:Bool. false) +true +λx:Bool. (λy:Bool. λz:Bool -> Bool. z) x ((λy:Bool -> Bool -> Bool. (λz:Bool -> Bool. λw:Bool. false) (λz:Bool. true)) (λy:Bool. λz:Bool. y)) +false +false +λx:Bool. (λy:Bool. y) x +false +λx:Bool -> Bool. x +(λx:Bool. (λy:Bool. x) x) false +(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. true) x ((λy:Bool -> Bool. true) (λy:Bool. false))) false false +false +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. true) true) true ((λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. false) false false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:Bool. x) false))) +λx:Bool -> Bool. (λy:Bool -> Bool. (λz:Bool. z) ((λz:Bool. false) true)) x +true +λx:Bool -> Bool. false +false +(λx:Bool. (λy:Bool. λz:Bool. true) x) ((λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. false) false true (λx:Bool. (λy:Bool. λz:Bool. true) x)) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true) false true (λx:Bool. (λy:Bool. λz:Bool. false) ((λy:Bool. false) x))) +λx:Bool. λy:Bool. (λz:Bool. true) false +false +true +λx:Bool -> Bool. x +false +(λx:Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool -> Bool -> Bool. false) true ((λy:Bool. false) false) (λy:Bool. x)) ((λx:Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. (λz:Bool. true) x)) +(λx:Bool. x) true +true +(λx:Bool -> Bool -> Bool. false) ((λx:Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. λb:Bool. false) true ((λx:Bool. true) true) true ((λx:Bool -> Bool. λy:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) true) (λx:Bool. x))) +true +false +(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. y) ((λx:Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool. false) false) (λx:Bool. false)) ((λx:Bool. x) true) +false +(λx:Bool. true) false +false +false +(λx:Bool. (λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) ((λy:Bool -> Bool. false) (λy:Bool. false))) true true +true +(λx:Bool. x) false +λx:Bool. (λy:Bool. (λz:Bool -> Bool -> Bool. y) ((λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. true) (λz:Bool. λw:Bool. false))) true +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. true) ((λy:Bool. y) ((λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. true)))) (λx:Bool -> Bool. λy:Bool. true) +false +true +(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool. λw:Bool. true) true) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. y) (λx:Bool -> Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. true) false)) +true +true +false +(λx:Bool. x) ((λx:Bool -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) ((λx:Bool. false) ((λx:Bool. false) false)) ((λx:Bool. λy:Bool. x) false)) +true +true +false +false +λx:Bool. (λy:Bool. λz:Bool. false) ((λy:Bool. λz:Bool. true) x ((λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. false))) x +true +false +(λx:Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool. y) ((λx:Bool. λy:Bool. λz:Bool. false) ((λx:Bool. x) false))) +(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool -> Bool. true) true) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) true ((λx:(Bool -> Bool) -> Bool. λy:Bool. (λz:Bool -> Bool. true) (λz:Bool. true)) (λx:Bool -> Bool. false)) +λx:Bool -> Bool. (λy:Bool. x) true +λx:Bool -> Bool. (λy:Bool. y) false +(λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. true) ((λx:Bool. false) false) true (λx:Bool. λy:Bool. y) +true +(λx:Bool. (λy:Bool -> Bool. λz:Bool. true) (λy:Bool. x)) false ((λx:Bool. (λy:Bool -> Bool. x) ((λy:Bool -> Bool. λz:Bool. true) (λy:Bool. false))) true) +(λx:Bool. (λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool. λa:Bool. true) x) true false ((λx:Bool. λy:Bool. λz:Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. true) true (λx:Bool. true)) ((λx:Bool. x) false)) +(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. false) false false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. λy:Bool. true) false (λx:Bool -> Bool. false)) false +true +true +λx:Bool. false +λx:Bool. false +(λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. x) ((λy:Bool. λz:Bool. λw:Bool. true) ((λy:Bool -> Bool. true) x))) (λx:Bool. false) +true +(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. λw:(Bool -> Bool) -> Bool. true) true (λy:Bool -> Bool. false) x) (λx:Bool -> Bool. true) +(λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool. true) ((λx:Bool. false) false) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. true)) (λx:Bool. x) false +(λx:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. x)) +(λx:Bool. true) false +false +true +λx:Bool. x +λx:Bool. (λy:Bool. λz:Bool. false) true +λx:Bool -> Bool. x ((λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. true) true ((λy:Bool. λz:Bool. λw:Bool. true) false) ((λy:Bool -> Bool. λz:Bool. false) (λy:Bool. false) ((λy:Bool -> Bool. false) (λy:Bool. true)))) +false +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. false) false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. false) false)) ((λx:Bool. (λy:Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool. true)) true)) +false +false +(λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. true) x (λy:Bool -> Bool. x) x) false +true +λx:Bool. x +(λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. false) (λy:Bool -> Bool. x)) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. true) true) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true))) false +true +(λx:Bool. λy:Bool. true) ((λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. (λy:Bool. true) x))) +λx:Bool -> Bool. true +(λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. false) false ((λx:Bool -> Bool. λy:Bool. λz:Bool. false) ((λx:Bool. λy:Bool. false) false) ((λx:Bool. x) true)) +λx:Bool -> Bool. x +(λx:Bool. x) false +(λx:Bool. λy:Bool -> Bool. x) true ((λx:Bool. λy:Bool. x) false) +true +λx:Bool. λy:Bool. y +true +false +(λx:Bool. λy:Bool. y) ((λx:Bool -> Bool. (λy:Bool. true) true) (λx:Bool. x)) false +true +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. true) true) true +λx:Bool -> Bool. (λy:Bool. y) true +λx:Bool. (λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. true) true (λy:Bool. λz:Bool. y) +true +(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool. true) (λy:Bool. true)) (λx:Bool. λy:Bool. true) +(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. y) (λx:Bool -> Bool. (λy:Bool. x y) ((λy:Bool. y) (x true))) +λx:Bool -> Bool. (λy:Bool. x) ((λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) true (λy:Bool -> Bool. y)) false +true +false +false +false +λx:Bool -> Bool. x true +λx:Bool -> Bool. x +(λx:Bool. x) false +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. (λz:Bool. λw:Bool. true) false) (λy:Bool -> Bool. true)) +true +(λx:Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. true) false ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. true) false (λx:Bool -> Bool. false)) ((λx:Bool -> Bool -> Bool. (λy:Bool. true) true) (λx:Bool. λy:Bool. false)) false +(λx:Bool. (λy:Bool. (λz:Bool -> Bool. true) (λz:Bool. true)) x) ((λx:Bool. x) false) +false +λx:Bool. λy:Bool. y +(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. true) x) ((λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool. true) ((λy:Bool. λz:Bool. false) true)) (λx:Bool -> Bool. x ((λy:Bool. true) true))) +(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool. λw:Bool -> Bool. true) false) (λx:Bool -> Bool. true) false (λx:Bool. x) +(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool. x) (λx:Bool -> Bool. false)) (λx:Bool -> Bool. x) true +false +true +(λx:Bool. λy:Bool. λz:Bool -> Bool. y) false false +true +(λx:Bool. λy:Bool -> Bool. (λz:Bool. true) true) false +λx:Bool -> Bool. λy:Bool. y +(λx:Bool. λy:(Bool -> Bool) -> Bool. true) true ((λx:Bool -> Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) ((λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) x)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. x))) +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool -> Bool. λb:Bool -> Bool. λc:Bool. false) (λx:Bool -> Bool. true) ((λx:Bool. true) true) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true)) false ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. (λy:Bool. x) true)) +λx:Bool -> Bool. λy:Bool. y +λx:Bool -> Bool. (λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) ((λy:Bool. false) true) ((λy:Bool. λz:Bool. λw:Bool. false) false) x +λx:Bool. (λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. λa:Bool. false) true ((λy:Bool. y) false) (λy:Bool -> Bool. y) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false)) (λx:Bool -> Bool. false) false false +(λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true) +false +λx:Bool -> Bool. λy:Bool. false +false +λx:Bool -> Bool. false +(λx:Bool. λy:Bool. λz:Bool. λw:Bool. λa:(Bool -> Bool) -> Bool. λb:Bool -> Bool. λc:Bool. false) true false ((λx:Bool -> Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool. false) false)) true ((λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool. true) false) (λx:Bool -> Bool. (λy:Bool. x) ((λy:Bool -> Bool. false) x))) +false +λx:Bool -> Bool. (λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. true) ((λy:Bool -> Bool -> Bool. λz:Bool. false) (λy:Bool. λz:Bool. true)) (λy:Bool -> Bool. (λz:Bool -> Bool -> Bool. false) (λz:Bool. λw:Bool. false)) true +λx:Bool -> Bool. false +λx:Bool. λy:Bool. (λz:Bool -> Bool. λw:Bool. λa:Bool. false) (λz:Bool. false) false false +(λx:Bool. λy:Bool. (λz:Bool. false) y) ((λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) false)) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. y)) +λx:Bool. (λy:Bool -> Bool. y true) (λy:Bool. x) +(λx:Bool. λy:Bool. λz:Bool. true) true false +(λx:Bool. λy:Bool. false) ((λx:Bool. true) true) +(λx:Bool -> Bool. (λy:Bool. (λz:Bool. λw:Bool -> Bool. true) false) ((λy:Bool. y) (x false))) (λx:Bool. true) +λx:Bool -> Bool. true +true +λx:Bool. λy:Bool. x +true +false +λx:Bool. λy:Bool. false +false +(λx:Bool. λy:Bool. y) false +false +(λx:Bool. (λy:Bool -> Bool -> Bool. x) ((λy:Bool. λz:Bool. λw:Bool. true) x)) ((λx:Bool. (λy:Bool. x) true) ((λx:Bool. x) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) true))) +λx:Bool -> Bool. λy:Bool. x y +true +false +(λx:Bool. true) true +true +λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. z) (λy:Bool -> Bool. y x) ((λy:Bool. true) false) +true +false +λx:Bool. λy:Bool. false +λx:Bool. λy:Bool. y +λx:Bool -> Bool. x true +false +true +(λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:(Bool -> Bool) -> Bool -> Bool. true) false ((λx:Bool. λy:Bool. λz:Bool. false) false ((λx:Bool. true) true)) (λx:Bool. (λy:Bool. y) x) (λx:Bool -> Bool. x) +(λx:Bool. x) true +(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool. λw:Bool. true) false) ((λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. x)) true true +λx:Bool. (λy:Bool. λz:Bool. z) true ((λy:Bool. y) x) +true +(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. λa:Bool. true) x x) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. x)) true +false +false +true +false +true +false +λx:Bool. x +(λx:Bool. (λy:Bool. λz:Bool. λw:Bool -> Bool -> Bool. λa:Bool. λb:Bool. true) true x ((λy:Bool. λz:Bool. λw:Bool. false) ((λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. true)))) true +true +true +(λx:Bool. λy:Bool. y) true ((λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. true)) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) (λx:Bool. λy:Bool. true)) +(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool. λy:Bool. true) false false +true +(λx:Bool. false) false +(λx:Bool. λy:Bool. (λz:Bool. λw:Bool. λa:Bool. false) x) ((λx:Bool -> Bool -> Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) false)) false +(λx:Bool. x) true +true +(λx:Bool. x) ((λx:Bool. x) false) +λx:Bool. x +λx:Bool -> Bool. λy:Bool. y diff --git a/examples/qc/stlc/output/v1/num_apps/uniform/sz=5,tysz=3/dist_before.csv b/examples/qc/stlc/output/v1/num_apps/uniform/sz=5,tysz=3/dist_before.csv new file mode 100644 index 00000000..8c807d57 --- /dev/null +++ b/examples/qc/stlc/output/v1/num_apps/uniform/sz=5,tysz=3/dist_before.csv @@ -0,0 +1,33 @@ +num_apps probability +0 0.3606409143518519 +1 0.05641611384429723 +2 0.0399178471129322 +3 0.055718450264983205 +4 0.06286475115099321 +5 0.0631891571636481 +6 0.06071199853595934 +7 0.0565407960849159 +8 0.05054355325902638 +9 0.04387031939921337 +10 0.03697202597048562 +11 0.030115291214431832 +12 0.02375575081312689 +13 0.01820884823263876 +14 0.013531338456830815 +15 0.00970514812432869 +16 0.006685952619927052 +17 0.004401808954585001 +18 0.002757227398669732 +19 0.0016375421268298557 +20 0.0009185495742082724 +21 0.0004837929658476374 +22 0.0002373891708356682 +23 0.00010745762985484615 +24 4.432393462737166e-5 +25 1.6404615757182087e-5 +26 5.342839248391098e-6 +27 1.4917861865144543e-6 +28 3.4339839904973283e-7 +29 6.108911732027998e-8 +30 7.450580596923903e-9 +31 4.656612873077455e-10 diff --git a/examples/qc/stlc/output/v1/num_apps/uniform/sz=5,tysz=3/log_param_by_sz=true,epochs=200.log b/examples/qc/stlc/output/v1/num_apps/uniform/sz=5,tysz=3/log_param_by_sz=true,epochs=200.log new file mode 100644 index 00000000..996274db --- /dev/null +++ b/examples/qc/stlc/output/v1/num_apps/uniform/sz=5,tysz=3/log_param_by_sz=true,epochs=200.log @@ -0,0 +1,19 @@ +2023-06-22T21:37:05.829 +== Config == +INIT_SIZE: 5 +GEN_TYP_SIZE: 3 +PARAMETERIZE_FLIP_GROUPS_BY_SZ: true +EPOCHS: 200 +DistNat: DistUInt32 +TAG: v1 + +Building num_apps(gen_expr(...)) computation graph... + 19.497588255 seconds + +Initial adnodes_of_interest: +Dict("tysz2_gen_type_tbool" => 0.5, "sz4_succ_var" => 0.5, "tysz1_gen_type_tbool" => 0.5, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.5, "sz4_succ_abs" => 0.5, "sz5_succ_var" => 0.5, "sz5_succ_abs" => 0.5, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5, "sz1_succ_app" => 0.5, "sz1_succ_abs" => 0.5, "sz3_succ_abs" => 0.5, "sz3_succ_app" => 0.5, "sz5_succ_app" => 0.5, "sz4_succ_app" => 0.5, "sz2_succ_abs" => 0.5, "sz3_succ_var" => 0.5, "tysz3_gen_type_tbool" => 0.5) +Inferring initial distribution... + 9472.909234143 seconds +Saved num_apps dist to examples/qc/stlc/output/v1/num_apps/uniform/sz=5,tysz=3/dist_before.csv. + +Saving samples... diff --git a/examples/qc/stlc/output/v1/num_apps/uniform/sz=5,tysz=3/terms_before.txt b/examples/qc/stlc/output/v1/num_apps/uniform/sz=5,tysz=3/terms_before.txt new file mode 100644 index 00000000..af5a44e4 --- /dev/null +++ b/examples/qc/stlc/output/v1/num_apps/uniform/sz=5,tysz=3/terms_before.txt @@ -0,0 +1,200 @@ +(λx:Bool -> Bool. λy:Bool -> Bool -> Bool. x true) ((λx:Bool -> Bool. λy:Bool. y) ((λx:Bool. λy:((Bool -> Bool) -> Bool) -> (Bool -> Bool) -> Bool. λz:Bool. true) true (λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. false))) ((λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. true) true ((λx:((Bool -> Bool) -> Bool) -> Bool. λy:Bool. false) (λx:(Bool -> Bool) -> Bool. true)) ((λx:Bool. λy:Bool. λz:Bool. λw:Bool. false) false true)) +λx:Bool. (λy:Bool. λz:Bool. λw:Bool. λa:Bool. true) true false ((λy:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool. λz:Bool -> Bool. true) (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool. true)) false +λx:Bool -> Bool -> Bool. λy:Bool -> Bool. (λz:Bool. (λw:(Bool -> Bool) -> Bool. false) (λw:Bool -> Bool. true)) ((λz:Bool. z) false) +(λx:Bool. λy:Bool -> Bool. (λz:Bool. λw:(Bool -> Bool -> Bool) -> Bool -> Bool. λa:Bool. λb:Bool. false) x ((λz:(Bool -> Bool -> Bool) -> Bool. λw:Bool -> Bool -> Bool. λa:Bool. true) (λz:Bool -> Bool -> Bool. false))) true +(λx:Bool. (λy:(Bool -> Bool -> Bool) -> Bool. λz:Bool. λw:Bool. λa:Bool. false) (λy:Bool -> Bool -> Bool. false) true) true true +λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. λb:Bool -> Bool. λc:Bool. true) x (λy:Bool -> Bool. true) false true +λx:Bool -> Bool -> Bool. (λy:Bool -> Bool. (λz:Bool. λw:((Bool -> Bool) -> Bool -> Bool) -> Bool -> Bool -> Bool. λa:Bool -> Bool. false) true) ((λy:Bool -> Bool -> Bool. λz:(Bool -> Bool -> Bool) -> Bool. λw:Bool. false) (λy:Bool. λz:Bool. false) ((λy:Bool. λz:Bool -> Bool -> Bool. false) true)) (λy:(Bool -> Bool) -> Bool -> Bool. x) +true +λx:Bool -> Bool. λy:Bool. y +(λx:((Bool -> Bool) -> Bool) -> Bool. λy:Bool -> Bool. (λz:((Bool -> Bool) -> Bool) -> Bool -> Bool -> Bool. λw:Bool -> Bool -> Bool -> Bool. false) (λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. true) ((λz:Bool. λw:Bool. λa:Bool. λb:Bool. true) true)) (λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool. λw:Bool. false) false ((λy:Bool. false) false) false) +λx:Bool. (λy:Bool -> (Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. λb:Bool. false) ((λy:((Bool -> Bool) -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. true) (λy:(Bool -> Bool) -> Bool. true)) (λy:Bool -> Bool. true) false +λx:Bool. (λy:Bool. λz:((Bool -> Bool) -> Bool -> Bool) -> Bool. true) ((λy:Bool. x) ((λy:Bool -> Bool. true) (λy:Bool. true))) (λy:(Bool -> Bool) -> Bool -> Bool. x) +(λx:Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. false) ((λx:((Bool -> Bool) -> Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. true)) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true)) (λx:Bool. (λy:Bool. λz:((Bool -> Bool) -> Bool -> Bool) -> Bool. λw:Bool -> (Bool -> Bool) -> Bool -> Bool. false) x (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool. λz:Bool -> Bool. z)) +λx:Bool -> Bool. true +(λx:Bool. λy:Bool -> Bool -> Bool. y) ((λx:Bool. true) true) +(λx:((Bool -> Bool) -> Bool -> Bool) -> Bool. λy:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. (λz:Bool -> Bool. λw:Bool -> Bool. true) (λz:Bool. false)) (λx:(Bool -> Bool) -> Bool -> Bool. true) ((λx:((Bool -> Bool) -> Bool) -> Bool. (λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. λa:Bool -> Bool. λb:Bool. true) true) (λx:(Bool -> Bool) -> Bool. true) false) +(λx:((Bool -> Bool) -> Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. (λz:((Bool -> Bool) -> Bool -> Bool) -> Bool -> Bool. false) x) (λx:(Bool -> Bool) -> Bool -> Bool. (λy:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false)) ((λx:Bool. λy:Bool. λz:Bool -> Bool. false) false false) +λx:Bool -> Bool -> Bool. λy:Bool -> Bool. true +true +(λx:Bool. λy:Bool -> Bool. y true) ((λx:((Bool -> Bool) -> Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> (Bool -> Bool) -> Bool -> Bool. true) (λx:(Bool -> Bool) -> Bool -> Bool. true) false ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false)))) (λx:Bool. false) +(λx:Bool -> (Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. λa:(Bool -> Bool -> Bool) -> Bool. λb:(Bool -> Bool) -> Bool. true) (λx:Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) ((λx:Bool. λy:(Bool -> Bool) -> Bool. true) true (λx:Bool -> Bool. false)) (λx:Bool. (λy:((Bool -> Bool) -> Bool) -> Bool -> Bool -> Bool. x) (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false)) (λx:Bool -> Bool -> Bool. (λy:Bool. y) ((λy:((Bool -> Bool) -> Bool -> Bool) -> Bool. λz:((Bool -> Bool) -> Bool -> Bool) -> Bool -> Bool. true) (λy:(Bool -> Bool) -> Bool -> Bool. false) ((λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) false))) +(λx:(Bool -> Bool -> Bool) -> Bool -> Bool -> Bool. false) (λx:Bool -> Bool -> Bool. x) +(λx:Bool -> (Bool -> Bool) -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. true) ((λx:(Bool -> Bool -> Bool) -> Bool -> Bool. λy:((Bool -> Bool) -> Bool) -> Bool. λz:Bool. λw:Bool. λa:Bool -> Bool. true) (λx:Bool -> Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. false) (λx:Bool. λy:Bool. λz:Bool. true)) ((λx:Bool. false) ((λx:Bool. true) false))) ((λx:Bool -> (Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. λw:(Bool -> Bool) -> Bool. true) (λx:Bool. λy:Bool -> Bool. true) false (λx:Bool. (λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. false)) (λx:Bool -> Bool. x false)) +(λx:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. true) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) ((λx:Bool. true) true)) ((λx:Bool -> Bool. λy:Bool -> Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool -> Bool. false) (λx:Bool. true) ((λx:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true)) false) (λx:Bool. λy:Bool. x) +true +(λx:Bool. (λy:(Bool -> Bool -> Bool) -> Bool -> Bool. (λz:Bool -> Bool -> Bool. true) (λz:Bool. λw:Bool. false)) ((λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. true) ((λy:(Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. false)))) true +(λx:Bool. λy:Bool. λz:Bool. λw:((Bool -> Bool) -> Bool) -> (Bool -> Bool) -> Bool. λa:Bool. true) false true ((λx:((Bool -> Bool) -> Bool) -> Bool. λy:Bool. λz:Bool. false) (λx:(Bool -> Bool) -> Bool. false) ((λx:Bool. false) true) false) ((λx:Bool -> Bool. λy:((Bool -> Bool) -> Bool) -> Bool. λz:(Bool -> Bool -> Bool) -> Bool -> Bool -> Bool. λw:(Bool -> Bool) -> Bool. λa:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. true)) ((λx:Bool. λy:(Bool -> Bool) -> Bool. false) true) ((λx:Bool. λy:Bool -> Bool -> Bool. y) ((λx:(Bool -> Bool) -> Bool. λy:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool. false))))) +(λx:Bool. λy:((Bool -> Bool) -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λz:Bool -> (Bool -> Bool) -> Bool -> Bool. λw:((Bool -> Bool) -> Bool -> Bool) -> Bool. true) false ((λx:Bool -> (Bool -> Bool) -> Bool. λy:((Bool -> Bool) -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool. λy:Bool -> Bool. true) (λx:(Bool -> Bool) -> Bool. λy:Bool. false)) (λx:Bool. λy:Bool -> Bool. y) ((λx:((Bool -> Bool) -> Bool) -> Bool. (λy:(Bool -> Bool -> Bool) -> Bool -> Bool. λz:((Bool -> Bool) -> Bool -> Bool) -> Bool. λw:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool -> Bool. λz:Bool. false)) ((λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. false) true true) (λx:(Bool -> Bool) -> Bool -> Bool. false)) +(λx:Bool -> Bool -> Bool -> Bool. λy:Bool -> Bool. y true) (λx:Bool. λy:Bool. (λz:Bool -> Bool -> Bool -> Bool. λw:Bool. false) (λz:Bool. λw:Bool. λa:Bool. false)) ((λx:Bool. (λy:Bool. λz:Bool -> (Bool -> Bool) -> Bool. λw:Bool. true) x (λy:Bool. λz:Bool -> Bool. false)) ((λx:((Bool -> Bool) -> Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. true) (λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. λy:Bool. x))) +λx:Bool -> Bool -> Bool. λy:Bool. false +(λx:(Bool -> Bool -> Bool) -> Bool -> Bool. (λy:Bool. false) ((λy:Bool -> Bool. false) ((λy:Bool -> Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. λw:Bool. false)))) ((λx:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool -> Bool. λa:Bool. false) false ((λy:Bool. λz:Bool -> Bool. false) true)) (λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. (λz:(Bool -> Bool -> Bool) -> Bool. true) (λz:Bool -> Bool -> Bool. false))) +(λx:Bool. λy:Bool. (λz:Bool. λw:Bool. λa:Bool. false) y) true true +(λx:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. (λy:((Bool -> Bool) -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. λa:Bool. false) ((λy:Bool. λz:(Bool -> Bool) -> Bool. true) false)) ((λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool -> Bool. λa:Bool -> Bool. λb:Bool. false) false (λx:Bool. λy:Bool. false) false) ((λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true)) ((λx:((Bool -> Bool) -> Bool -> Bool) -> Bool. λy:Bool. true) (λx:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. true) false))) +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:((Bool -> Bool) -> Bool) -> Bool -> Bool -> Bool. λa:Bool. false) (λy:Bool -> Bool. λz:Bool. λw:Bool. false)) ((λx:Bool. x) false) ((λx:Bool -> Bool -> Bool. x) (λx:Bool. λy:Bool. false)) ((λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. true) x) true) +false +false +(λx:Bool. true) false +(λx:Bool -> Bool. λy:Bool. y) ((λx:((Bool -> Bool) -> Bool) -> Bool. λy:((Bool -> Bool) -> Bool -> Bool) -> Bool. λz:Bool. false) ((λx:Bool. λy:(Bool -> Bool) -> Bool. false) true) ((λx:Bool -> Bool -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool. λy:Bool. λz:Bool. true) false)) ((λx:(Bool -> Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> (Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool -> Bool. λy:Bool. false) ((λx:Bool -> (Bool -> Bool) -> Bool. true) ((λx:(Bool -> Bool) -> (Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool -> Bool. true))) ((λx:(Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λy:Bool -> (Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. λy:Bool -> Bool. false))) +(λx:Bool. true) false +(λx:Bool -> (Bool -> Bool) -> Bool -> Bool. (λy:Bool. (λz:Bool -> Bool -> Bool -> Bool. true) (λz:Bool. λw:Bool. λa:Bool. false)) true) (λx:Bool. λy:Bool -> Bool. (λz:Bool. λw:Bool. λa:Bool. false) x x) +(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool -> Bool) -> Bool. λz:Bool. λw:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool. λa:((Bool -> Bool) -> Bool) -> (Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool -> Bool. false) true) false (λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. y) +λx:Bool. (λy:Bool. λz:Bool. λw:(Bool -> Bool -> Bool) -> Bool. true) true ((λy:Bool. λz:Bool. false) false false) ((λy:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool. λz:(Bool -> Bool -> Bool) -> Bool. λw:Bool -> Bool -> Bool. true) ((λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. false) false) (λy:Bool -> Bool -> Bool. x)) +λx:(Bool -> Bool) -> Bool. false +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. λa:Bool. λb:Bool -> Bool -> Bool. false) true ((λx:((Bool -> Bool) -> Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) (λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool -> Bool. true) (λx:Bool -> Bool. true) (λx:Bool. λy:Bool. λz:Bool. false)) true ((λx:Bool -> Bool. false) ((λx:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. true) false) (λx:Bool -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) false))) +(λx:(Bool -> Bool) -> Bool. x) (λx:Bool -> Bool. false) +true +(λx:Bool. λy:Bool. λz:(Bool -> Bool -> Bool) -> Bool. λw:Bool. λa:Bool. true) false true ((λx:Bool -> Bool. λy:Bool -> Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false))) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. false) false ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. λy:Bool. true)) (λx:Bool. (λy:((Bool -> Bool) -> Bool) -> Bool. false) (λy:(Bool -> Bool) -> Bool. false))) ((λx:Bool. (λy:Bool. λz:Bool. false) x) ((λx:(Bool -> Bool -> Bool) -> Bool. true) (λx:Bool -> Bool -> Bool. false)) ((λx:Bool. x) false)) +(λx:(Bool -> Bool) -> Bool. (λy:Bool -> (Bool -> Bool) -> Bool. false) ((λy:Bool. λz:Bool. λw:Bool. λa:Bool -> Bool. true) true ((λy:(Bool -> Bool -> Bool) -> Bool. false) (λy:Bool -> Bool -> Bool. true)))) (λx:Bool -> Bool. true) +false +true +(λx:(Bool -> Bool) -> Bool. λy:((Bool -> Bool) -> Bool) -> Bool. λz:Bool. λw:Bool. λa:Bool. false) (λx:Bool -> Bool. false) (λx:(Bool -> Bool) -> Bool. true) +λx:Bool -> Bool. (λy:(Bool -> Bool -> Bool) -> Bool. (λz:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λw:Bool. λa:Bool -> Bool. λb:Bool. true) (λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) ((λz:Bool -> Bool. true) (λz:Bool. false))) ((λy:Bool. (λz:Bool -> Bool. λw:Bool -> Bool -> Bool. true) x) ((λy:Bool. y) (x false))) +true +(λx:Bool -> Bool. λy:((Bool -> Bool) -> Bool) -> Bool. x false) (λx:Bool. false) ((λx:(Bool -> Bool -> Bool) -> Bool. (λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool. true) false) ((λx:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. false) (λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:Bool -> Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. λz:Bool. true))) ((λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false)) true)) +(λx:Bool -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. x) (x false)) (λx:Bool. (λy:((Bool -> Bool) -> Bool) -> Bool. λz:Bool. λw:Bool. true) (λy:(Bool -> Bool) -> Bool. true) x ((λy:(Bool -> Bool -> Bool) -> Bool. x) (λy:Bool -> Bool -> Bool. false))) +false +(λx:Bool -> Bool -> Bool. (λy:Bool. λz:Bool. λw:((Bool -> Bool) -> Bool -> Bool) -> Bool. true) false ((λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. true))) ((λx:Bool. (λy:Bool -> (Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. λz:Bool -> Bool. true)) ((λx:Bool. x) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true)))) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. (λy:Bool. λz:Bool. true) x) ((λx:((Bool -> Bool) -> Bool -> Bool) -> Bool. true) (λx:(Bool -> Bool) -> Bool -> Bool. true)))) +(λx:((Bool -> Bool) -> Bool -> Bool) -> Bool. λy:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. false) ((λx:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. true) (λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true)) ((λx:Bool -> (Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:Bool. false) false))) ((λx:Bool. λy:Bool. λz:Bool. false) false true) +(λx:Bool -> Bool. x) (λx:Bool. x) +true +(λx:Bool -> (Bool -> Bool) -> Bool. λy:Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. true) ((λx:Bool -> (Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. λy:Bool -> Bool. λz:Bool. true)) ((λx:((Bool -> Bool) -> Bool) -> (Bool -> Bool) -> Bool -> Bool. false) ((λx:((Bool -> Bool) -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true)))) ((λx:Bool -> Bool. λy:Bool. λz:((Bool -> Bool) -> Bool) -> Bool. λw:Bool. λa:Bool. true) (λx:Bool. true) true ((λx:Bool. λy:(Bool -> Bool) -> Bool. false) true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) ((λx:Bool. x) ((λx:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true))))) +λx:Bool. (λy:Bool -> Bool -> Bool. x) ((λy:Bool. (λz:Bool. λw:Bool. λa:Bool. true) true) ((λy:Bool -> Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. λw:Bool. true))) +(λx:Bool -> Bool -> Bool -> Bool. (λy:Bool -> Bool. (λz:Bool. false) true) (x false ((λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. false)))) (λx:Bool. (λy:((Bool -> Bool) -> Bool) -> Bool. λz:Bool. λw:Bool. true) (λy:(Bool -> Bool) -> Bool. x)) +λx:Bool. (λy:(Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. (λz:Bool. λw:Bool. true) true ((λz:(Bool -> Bool) -> (Bool -> Bool) -> Bool. false) (λz:Bool -> Bool. λw:Bool -> Bool. false))) ((λy:((Bool -> Bool) -> Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool -> Bool. λb:Bool. true) (λy:(Bool -> Bool) -> Bool -> Bool. x) false) +(λx:Bool. true) false +true +(λx:Bool -> Bool. λy:((Bool -> Bool) -> Bool) -> Bool. λz:Bool. z) (λx:Bool. (λy:Bool -> Bool. x) (λy:Bool. x)) ((λx:Bool. (λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool. true) false true) ((λx:Bool -> Bool. x) ((λx:Bool -> Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. λz:Bool. true)) ((λx:Bool. λy:Bool. false) true ((λx:Bool. false) true)))) +λx:Bool -> Bool. (λy:Bool -> (Bool -> Bool) -> Bool -> Bool. (λz:Bool. λw:Bool -> Bool. λa:Bool. false) false) ((λy:Bool. λz:Bool. λw:((Bool -> Bool) -> Bool -> Bool) -> Bool. λa:Bool. λb:Bool -> Bool. λc:Bool. true) true ((λy:Bool. true) false) (λy:(Bool -> Bool) -> Bool -> Bool. x true)) +λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool -> Bool) -> Bool -> Bool. λz:Bool. (λw:Bool. false) z) (λy:Bool -> Bool -> Bool. λz:Bool. true) +λx:Bool. λy:Bool -> Bool. (λz:Bool -> (Bool -> Bool) -> Bool. λw:Bool. λa:Bool. true) (λz:Bool. λw:Bool -> Bool. false) true +(λx:Bool. λy:Bool -> (Bool -> Bool) -> Bool. λz:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool. λw:Bool. λa:Bool. λb:Bool. λc:Bool. true) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true)) (λx:Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool -> Bool. λy:Bool -> Bool. (λz:((Bool -> Bool) -> Bool -> Bool) -> Bool. true) (λz:(Bool -> Bool) -> Bool -> Bool. false)) ((λx:Bool -> Bool. x ((λy:Bool -> Bool. true) (λy:Bool. false))) (λx:Bool. (λy:(Bool -> Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool -> Bool. true) ((λy:Bool. false) false))) +(λx:Bool -> Bool. λy:Bool. y) ((λx:Bool. λy:Bool. true) true) +λx:Bool. x +true +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> (Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. λz:Bool -> Bool. true)) (λx:Bool -> Bool. x) ((λx:Bool. true) false) +(λx:Bool. true) false +(λx:Bool -> Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. λa:Bool. false) x ((λy:Bool -> Bool. λz:Bool. false) (λy:Bool. false))) ((λx:Bool. x) false) +true +true +false +λx:Bool. (λy:Bool -> (Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool -> Bool. false) ((λy:Bool -> (Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λy:Bool. λz:Bool -> Bool. λw:Bool. false)) (λy:Bool. (λz:((Bool -> Bool) -> Bool -> Bool) -> Bool. λw:((Bool -> Bool) -> Bool) -> (Bool -> Bool) -> Bool. false) (λz:(Bool -> Bool) -> Bool -> Bool. true) ((λz:Bool -> Bool. λw:(Bool -> Bool) -> Bool. λa:Bool -> Bool. true) (λz:Bool. false))) +(λx:Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. false) ((λx:Bool -> (Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool. λz:Bool. true) (λy:Bool. false)) ((λx:Bool. λy:((Bool -> Bool) -> Bool) -> (Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) false (λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true))) false +λx:Bool. (λy:Bool. false) x +(λx:(Bool -> Bool -> Bool) -> Bool. (λy:Bool. false) true) ((λx:Bool. λy:Bool -> Bool -> Bool. false) false) +(λx:Bool. (λy:Bool. λz:((Bool -> Bool) -> Bool) -> (Bool -> Bool) -> Bool. λw:Bool. true) false) false (λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. (λz:((Bool -> Bool) -> Bool -> Bool) -> Bool. true) (λz:(Bool -> Bool) -> Bool -> Bool. true)) ((λx:Bool -> Bool. (λy:Bool -> Bool. λz:Bool. true) x true) (λx:Bool. (λy:Bool. λz:(Bool -> Bool -> Bool) -> Bool. true) true ((λy:Bool. λz:Bool -> Bool -> Bool. false) x))) +(λx:Bool. λy:Bool. λz:Bool. λw:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool. λa:Bool. λb:Bool -> Bool. false) true ((λx:Bool. x) ((λx:Bool. false) true)) ((λx:Bool -> (Bool -> Bool) -> Bool. false) ((λx:Bool -> Bool -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. true) (λx:Bool. λy:Bool. λz:Bool. true) false)) ((λx:Bool -> (Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. (λz:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. true) (λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true)) (λx:Bool. λy:Bool -> Bool. false)) +λx:Bool. x +false +λx:Bool. (λy:((Bool -> Bool) -> Bool -> Bool) -> Bool -> Bool. (λz:Bool. λw:Bool -> (Bool -> Bool) -> Bool -> Bool. λa:Bool. false) x) (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) ((λy:((Bool -> Bool) -> Bool) -> Bool. λz:Bool. λw:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λa:Bool. λb:Bool -> Bool. λc:Bool. false) (λy:(Bool -> Bool) -> Bool. false) ((λy:(Bool -> Bool) -> (Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. λz:Bool -> Bool. false)) (λy:(Bool -> Bool) -> Bool -> Bool. y)) +(λx:Bool -> Bool -> Bool -> Bool. λy:Bool. (λz:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λw:(Bool -> Bool) -> Bool -> Bool. true) (λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false)) ((λx:Bool -> (Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. false) (λx:Bool. λy:Bool -> Bool. y)) ((λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool. λz:Bool. false) (λy:Bool. true)) ((λx:Bool -> Bool. λy:(Bool -> Bool -> Bool) -> Bool -> Bool -> Bool. λz:Bool -> Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) false)) false) +(λx:(Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool. (λy:Bool -> Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool -> Bool. λb:Bool. true) (λy:Bool. λz:Bool. λw:Bool. false) x) true) +(λx:Bool. λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. true) true) ((λx:Bool. λy:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. true) false ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) true)) ((λx:(Bool -> Bool) -> (Bool -> Bool) -> Bool. λy:Bool -> Bool. false) ((λx:Bool -> (Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. true) (λx:Bool. λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool -> (Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. λy:Bool -> Bool. true) true)) ((λx:((Bool -> Bool) -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) (λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. (λy:Bool. false) true) false) +false +(λx:Bool. (λy:Bool. (λz:Bool. λw:Bool. false) false) ((λy:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) x)) ((λx:Bool. false) true) +(λx:Bool -> (Bool -> Bool) -> Bool. (λy:((Bool -> Bool) -> Bool) -> Bool. λz:Bool. true) (λy:(Bool -> Bool) -> Bool. (λz:Bool. false) false)) ((λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. false) (λx:Bool. true) ((λx:Bool. false) true) ((λx:Bool. λy:Bool. true) false ((λx:Bool. false) true)))) +λx:Bool -> Bool -> Bool. (λy:Bool. (λz:Bool. λw:(Bool -> Bool -> Bool) -> Bool. true) y) ((λy:Bool -> (Bool -> Bool) -> Bool -> Bool. false) (λy:Bool. λz:Bool -> Bool. λw:Bool. true)) (λy:Bool -> Bool -> Bool. (λz:Bool. z) ((λz:Bool -> Bool. true) (λz:Bool. false))) +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. (λz:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool. λw:(Bool -> Bool) -> Bool -> Bool -> Bool. false) (λz:Bool -> Bool -> Bool. λw:Bool -> Bool. true) ((λz:Bool. λw:Bool -> Bool. λa:Bool. λb:Bool. true) x)) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. false) (λx:Bool. λy:Bool. false) (λx:Bool. x) true false) +(λx:((Bool -> Bool) -> Bool) -> Bool. (λy:(Bool -> Bool -> Bool) -> Bool. λz:Bool. true) ((λy:Bool -> Bool. λz:Bool -> Bool -> Bool. true) (λy:Bool. true)) ((λy:Bool -> Bool. true) ((λy:Bool -> (Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool. λz:Bool -> Bool. λw:Bool. true)))) ((λx:Bool -> Bool -> Bool -> Bool. (λy:Bool -> Bool. λz:Bool. λw:(Bool -> Bool) -> Bool. false) (λy:Bool. false) ((λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. false))) (λx:Bool. (λy:Bool -> Bool -> Bool. y) (λy:Bool. λz:Bool. true))) +λx:Bool. x +false +λx:Bool. false +(λx:Bool. false) ((λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) ((λx:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. λy:Bool. λz:Bool. false))))) +λx:(Bool -> Bool) -> Bool -> Bool. true +(λx:Bool. λy:Bool -> Bool. λz:(Bool -> Bool -> Bool) -> Bool -> Bool -> Bool. λw:Bool -> (Bool -> Bool) -> Bool. λa:Bool. false) false (λx:Bool. x) ((λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. true) false (λx:Bool. true)) ((λx:Bool -> Bool -> Bool -> Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool -> Bool. false) (λy:Bool. true)) (λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. true) (λy:Bool -> Bool. true))) ((λx:((Bool -> Bool) -> Bool) -> Bool -> Bool -> Bool. λy:Bool -> Bool. true) (λx:(Bool -> Bool) -> Bool. (λy:Bool -> (Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. λz:Bool -> Bool. λw:Bool. false)) ((λx:Bool -> (Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. true) false) (λx:Bool. λy:Bool -> Bool. y))) +true +λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool -> Bool. (λz:Bool. λw:Bool. λa:Bool. true) true ((λz:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. true) (λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true))) ((λy:Bool -> Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. λb:Bool. true) ((λy:Bool -> (Bool -> Bool) -> Bool. λz:Bool. λw:Bool. λa:Bool. false) (λy:Bool. λz:Bool -> Bool. true)) false) +false +(λx:Bool. (λy:Bool -> (Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. λa:Bool -> Bool. λb:Bool. λc:Bool. true) (λy:Bool. λz:Bool -> Bool. λw:Bool. true)) false true ((λx:Bool. (λy:Bool. λz:Bool -> Bool. false) false) false ((λx:Bool. λy:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) true ((λx:(Bool -> Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool -> Bool. true)) true)) +λx:(Bool -> Bool) -> Bool -> Bool. true +false +λx:(Bool -> Bool) -> Bool -> Bool. false +λx:(Bool -> Bool) -> Bool. true +true +true +(λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. x) +(λx:Bool -> Bool. λy:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool -> Bool. λa:Bool -> Bool. false) ((λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false))) ((λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) true true) false +false +(λx:Bool. (λy:Bool. true) ((λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. true))) false +false +(λx:Bool. (λy:((Bool -> Bool) -> Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. false) (λy:(Bool -> Bool) -> Bool -> Bool. true)) true true ((λx:Bool -> Bool. (λy:((Bool -> Bool) -> Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λy:(Bool -> Bool) -> Bool -> Bool. false)) ((λx:((Bool -> Bool) -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:(Bool -> Bool) -> Bool. false) false) false) +false +(λx:Bool. λy:Bool -> Bool. (λz:(Bool -> Bool -> Bool) -> Bool. y) (λz:Bool -> Bool -> Bool. x)) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:(Bool -> Bool -> Bool) -> Bool. true) false ((λx:Bool. true) false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) ((λx:(Bool -> Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. true) ((λx:Bool. λy:(Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. false) false ((λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) false)))) +(λx:Bool -> (Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool. true) true ((λy:Bool -> Bool. false) (λy:Bool. true)) false) ((λx:Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. λb:Bool -> Bool. λc:Bool. true) true true ((λx:Bool. x) true) ((λx:Bool. (λy:Bool -> Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. λw:Bool. true)) ((λx:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool. λy:Bool. false) (λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) false))) +(λx:Bool. (λy:Bool -> (Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. true) (λy:Bool. λz:Bool -> Bool. true) ((λy:Bool. false) false)) false ((λx:Bool -> (Bool -> Bool) -> Bool. λy:Bool -> (Bool -> Bool) -> Bool. λz:Bool. true) (λx:Bool. λy:Bool -> Bool. x) ((λx:Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. true) false true)) +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool -> Bool. λz:Bool. λw:Bool. λa:Bool -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. λw:Bool. true) true ((λy:Bool -> Bool. λz:Bool. false) x false) (λy:Bool. (λz:Bool. λw:Bool. λa:Bool. true) false true) +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. false) true ((λx:Bool. λy:Bool. true) true) true) true +(λx:Bool -> Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. z) ((λx:(Bool -> Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool -> Bool. false)) +(λx:(Bool -> Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. x) ((λx:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. λw:Bool. false)) ((λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) false))) +(λx:Bool. λy:Bool -> (Bool -> Bool) -> Bool. λz:((Bool -> Bool) -> Bool -> Bool) -> Bool -> Bool. false) true (λx:Bool. λy:Bool -> Bool. x) (λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. y) +λx:Bool. false +(λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. x) ((λx:Bool. λy:(Bool -> Bool) -> (Bool -> Bool) -> Bool. λz:(Bool -> Bool -> Bool) -> Bool. false) true ((λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. true) true) (λx:Bool -> Bool -> Bool. (λy:((Bool -> Bool) -> Bool) -> (Bool -> Bool) -> Bool -> Bool. true) (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true))) ((λx:Bool. λy:Bool -> Bool. x) ((λx:Bool. true) ((λx:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. true) (λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true))) (λx:Bool. x)) +(λx:Bool. (λy:(Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) ((λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. true))) true ((λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) false (λx:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true (λx:Bool. x)) true) +(λx:Bool -> Bool. λy:Bool. λz:Bool. λw:((Bool -> Bool) -> Bool -> Bool) -> Bool -> Bool. λa:Bool. λb:Bool. λc:Bool. true) ((λx:Bool. λy:Bool. true) true) false true (λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. y) +λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. (λw:(Bool -> Bool) -> Bool. z) ((λw:Bool. λa:Bool -> Bool. true) true) +λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. false +(λx:Bool -> (Bool -> Bool) -> Bool. (λy:Bool -> Bool -> Bool -> Bool. λz:(Bool -> Bool -> Bool) -> Bool. false) (λy:Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool -> Bool. (λz:((Bool -> Bool) -> Bool) -> Bool -> Bool -> Bool. true) (λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. true))) (λx:Bool. (λy:Bool -> Bool -> Bool. (λz:Bool. λw:Bool -> Bool. true) true) (λy:Bool. (λz:Bool -> Bool. λw:Bool. true) (λz:Bool. false))) +λx:(Bool -> Bool) -> Bool -> Bool. false +λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λw:Bool. false) ((λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) (λy:Bool. false) ((λy:((Bool -> Bool) -> Bool) -> Bool. λz:Bool. false) (λy:(Bool -> Bool) -> Bool. false))) ((λy:Bool. (λz:((Bool -> Bool) -> Bool -> Bool) -> Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool -> Bool. λb:Bool. false) (λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. λa:Bool. false)) ((λy:Bool -> (Bool -> Bool) -> Bool. false) ((λy:Bool. λz:Bool. λw:Bool -> Bool. false) true))) +λx:(Bool -> Bool) -> Bool. λy:Bool. (λz:Bool. (λw:Bool. false) y) false +false +(λx:Bool. (λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool -> Bool -> Bool. false) true ((λy:Bool -> (Bool -> Bool) -> Bool. true) (λy:Bool. λz:Bool -> Bool. true)) (λy:Bool. (λz:Bool. true) x)) true +(λx:Bool. true) ((λx:Bool -> (Bool -> Bool) -> Bool. λy:Bool. y) (λx:Bool. (λy:Bool. λz:Bool -> Bool. false) x) ((λx:Bool. (λy:((Bool -> Bool) -> Bool -> Bool) -> Bool -> Bool. false) (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false)) ((λx:Bool. λy:Bool. false) true true))) +(λx:Bool -> (Bool -> Bool) -> Bool. λy:Bool. λz:((Bool -> Bool) -> Bool -> Bool) -> Bool. false) (λx:Bool. (λy:Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool. false)) ((λx:Bool. x) ((λx:Bool. λy:Bool -> Bool. true) false ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. false)))) ((λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool. false) ((λx:Bool. true) false)) false) +(λx:(Bool -> Bool -> Bool) -> Bool. λy:Bool -> (Bool -> Bool) -> Bool. (λz:Bool. true) true) ((λx:Bool -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool -> Bool. false) true) (λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool -> Bool. false))) ((λx:Bool. (λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool -> Bool. true) true) true (λx:Bool. (λy:Bool. λz:((Bool -> Bool) -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λw:Bool. true) x (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true))) +λx:Bool. λy:Bool -> Bool. y +(λx:((Bool -> Bool) -> Bool) -> Bool. (λy:Bool -> Bool. λz:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool. true) ((λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool. false)) ((λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. true) ((λy:(Bool -> Bool -> Bool) -> Bool. true) (λy:Bool -> Bool -> Bool. true)))) (λx:(Bool -> Bool) -> Bool. true) +(λx:((Bool -> Bool) -> Bool -> Bool) -> Bool. x) ((λx:Bool -> Bool. λy:Bool -> (Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool. λy:Bool. true) ((λx:Bool. false) true)) (λx:Bool. (λy:((Bool -> Bool) -> Bool) -> Bool. λz:Bool -> Bool. true) (λy:(Bool -> Bool) -> Bool. x))) +(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> (Bool -> Bool) -> Bool. λw:Bool. λa:Bool. false) true ((λx:((Bool -> Bool) -> Bool) -> Bool. false) (λx:(Bool -> Bool) -> Bool. true)) ((λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. false) false) true ((λx:Bool. λy:Bool. true) ((λx:((Bool -> Bool) -> Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) true)) ((λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true)) true)) +λx:Bool. λy:Bool -> Bool. (λz:(Bool -> Bool -> Bool) -> Bool. λw:Bool -> Bool -> Bool -> Bool. λa:Bool. false) ((λz:Bool. λw:Bool -> Bool -> Bool. true) x) (λz:Bool. λw:Bool. λa:Bool. false) +λx:Bool. false +λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> (Bool -> Bool) -> Bool. λz:Bool. (λw:Bool -> Bool -> Bool -> Bool. λa:Bool. false) (λw:Bool. λa:Bool. λb:Bool. true)) (λy:Bool -> Bool. λz:Bool -> Bool. (λw:Bool -> Bool -> Bool. false) (λw:Bool. λa:Bool. true)) +(λx:Bool. (λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) ((λy:Bool -> (Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool. λz:Bool -> Bool. true)) (λy:Bool. true)) ((λx:(Bool -> Bool -> Bool) -> Bool. (λy:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool. λz:((Bool -> Bool) -> Bool -> Bool) -> Bool. true) (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) ((λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) false)) ((λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. true) ((λx:((Bool -> Bool) -> Bool -> Bool) -> Bool -> Bool -> Bool. λy:Bool. false) (λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true)) false)) +(λx:((Bool -> Bool) -> Bool) -> Bool. λy:Bool. λz:((Bool -> Bool) -> Bool) -> Bool. λw:Bool. λa:Bool. false) (λx:(Bool -> Bool) -> Bool. true) false (λx:(Bool -> Bool) -> Bool. (λy:Bool. false) false) ((λx:(Bool -> Bool) -> Bool -> Bool -> Bool. λy:(Bool -> Bool -> Bool) -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. λz:Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool -> Bool. true) (λx:Bool. false)) true) true +(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool -> Bool) -> Bool. (λz:((Bool -> Bool) -> Bool -> Bool) -> Bool. false) (λz:(Bool -> Bool) -> Bool -> Bool. false)) (λy:Bool -> Bool -> Bool. (λz:Bool. true) true)) (λx:Bool. λy:Bool. (λz:(Bool -> Bool -> Bool) -> Bool. x) (λz:Bool -> Bool -> Bool. x)) +λx:Bool. true +(λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. x) +(λx:Bool. λy:Bool. λz:Bool -> Bool. λw:((Bool -> Bool) -> Bool -> Bool) -> Bool. λa:Bool. λb:Bool. false) true ((λx:Bool -> (Bool -> Bool) -> Bool. true) (λx:Bool. λy:Bool -> Bool. true)) ((λx:Bool -> Bool -> Bool -> Bool. λy:((Bool -> Bool) -> Bool) -> Bool. λz:Bool. true) (λx:Bool. λy:Bool. λz:Bool. false) ((λx:Bool. λy:(Bool -> Bool) -> Bool. false) false)) ((λx:Bool. λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. false) true true ((λx:Bool. λy:(Bool -> Bool -> Bool) -> Bool. true) true (λx:Bool -> Bool -> Bool. false))) true +λx:Bool -> Bool. x +(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool -> Bool. false) x ((λy:Bool. false) true)) ((λx:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λy:((Bool -> Bool) -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool -> Bool. true) (λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:((Bool -> Bool) -> Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. false) (λx:(Bool -> Bool) -> Bool -> Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. x))) ((λx:Bool -> Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:((Bool -> Bool) -> Bool) -> (Bool -> Bool) -> Bool. λw:Bool. λa:Bool. false) (λx:Bool. λy:Bool. true) true (λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool -> Bool) -> Bool. λz:Bool -> Bool. true) (λy:Bool -> Bool -> Bool. false)))) +(λx:Bool. λy:Bool. λz:Bool -> Bool. λw:(Bool -> Bool -> Bool) -> Bool -> Bool -> Bool. true) ((λx:Bool. false) true) false ((λx:Bool -> Bool -> Bool -> Bool. λy:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool. λz:Bool. true) ((λx:Bool. λy:Bool. λz:Bool. λw:Bool. true) true) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) ((λx:Bool. true) true))) ((λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool -> Bool. λa:Bool. λb:Bool. false) x (λy:Bool. x)) true) +λx:(Bool -> Bool) -> Bool. λy:Bool. (λz:Bool -> Bool. λw:Bool. λa:(Bool -> Bool) -> Bool. false) (λz:Bool. false) y (λz:Bool -> Bool. false) +λx:Bool. false +(λx:((Bool -> Bool) -> Bool) -> Bool. (λy:Bool. (λz:Bool -> Bool -> Bool. λw:Bool. false) (λz:Bool. λw:Bool. true)) false) ((λx:((Bool -> Bool) -> Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. y)) ((λx:Bool -> Bool -> Bool -> Bool. (λy:((Bool -> Bool) -> Bool -> Bool) -> Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false)) (λx:Bool. (λy:Bool -> Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. λz:Bool. λw:Bool. true)))) +(λx:Bool. λy:Bool -> (Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. λa:Bool. false) ((λx:(Bool -> Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false)) true) ((λx:Bool -> (Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) ((λx:Bool. (λy:Bool. λz:Bool. λw:Bool -> Bool. false) x) true)) +(λx:((Bool -> Bool) -> Bool) -> Bool. (λy:Bool -> Bool -> Bool. λz:((Bool -> Bool) -> Bool) -> Bool. λw:Bool -> (Bool -> Bool) -> Bool -> Bool. λa:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool. λz:Bool. false)) ((λx:Bool. λy:(Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. true) true ((λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) false)) ((λx:Bool. (λy:(Bool -> Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool -> Bool. λz:Bool. true)) ((λx:Bool. x) true)) ((λx:(Bool -> Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. z) (λx:Bool -> Bool -> Bool. (λy:((Bool -> Bool) -> Bool) -> Bool -> Bool -> Bool. λz:Bool. true) (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) ((λy:Bool. true) true))) +true +(λx:Bool. (λy:Bool. (λz:Bool. λw:Bool -> Bool. false) x) true) false +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. true) ((λy:Bool. y) false)) (λx:Bool -> Bool. (λy:Bool. λz:Bool. z) false) +(λx:Bool -> Bool -> Bool -> Bool. (λy:Bool. false) ((λy:Bool. false) false)) (λx:Bool. λy:Bool. λz:Bool. false) +λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. true) false +(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. λa:Bool. λb:Bool. false) false) (λx:Bool -> Bool. false) (λx:Bool. x) false +(λx:((Bool -> Bool) -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool. false) (λx:(Bool -> Bool) -> Bool. true) ((λx:Bool. λy:Bool -> Bool -> Bool -> Bool. true) true ((λx:Bool. λy:Bool. λz:Bool. λw:Bool. false) true)) ((λx:Bool -> Bool -> Bool -> Bool. false) ((λx:Bool. λy:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool. λz:Bool. λw:Bool. λa:Bool. true) true (λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true))) true +false +(λx:Bool -> (Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. (λw:Bool. λa:Bool. false) z) ((λx:Bool. λy:Bool. λz:Bool -> (Bool -> Bool) -> Bool. λw:Bool. λa:Bool -> Bool. λb:Bool. true) ((λx:Bool. false) false) false ((λx:Bool -> (Bool -> Bool) -> Bool. λy:(Bool -> Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool -> Bool. false) true) ((λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. false) false false))) +(λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) ((λx:Bool. false) false) (λx:Bool. false) (λx:Bool. (λy:((Bool -> Bool) -> Bool -> Bool) -> Bool. x) ((λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool. λz:Bool. true))) +λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool. λw:Bool. false) true ((λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool. false) ((λy:Bool. λz:Bool. false) false) ((λy:Bool. y) ((λy:Bool -> (Bool -> Bool) -> Bool. true) (λy:Bool. λz:Bool -> Bool. false)))) +true +(λx:Bool. false) false +(λx:Bool. (λy:((Bool -> Bool) -> Bool) -> Bool. λz:Bool -> Bool -> Bool. true) ((λy:Bool -> Bool. λz:Bool -> Bool. λw:(Bool -> Bool) -> Bool. false) (λy:Bool. false) ((λy:Bool. λz:Bool. true) x))) ((λx:((Bool -> Bool) -> Bool) -> Bool. λy:Bool. true) (λx:(Bool -> Bool) -> Bool. (λy:Bool. false) false) false) +(λx:((Bool -> Bool) -> Bool) -> Bool. (λy:Bool. λz:((Bool -> Bool) -> Bool -> Bool) -> Bool. λw:Bool -> Bool. λa:Bool. λb:Bool. true) false) ((λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. true) true) true) (λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool -> Bool. (λz:(Bool -> Bool -> Bool) -> Bool. false) (λz:Bool -> Bool -> Bool. true)) (λy:Bool. λz:Bool. y)) +(λx:Bool. λy:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. λa:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. true)) (λx:Bool -> Bool -> Bool. λy:Bool -> Bool. y) false ((λx:Bool -> Bool -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool. true) false) (λx:Bool. λy:Bool. λz:Bool. true) (λx:Bool. true)) +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. false) ((λx:Bool. λy:Bool. λz:Bool -> Bool. true) true false) ((λx:(Bool -> Bool -> Bool) -> Bool. (λy:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. false) (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false)) ((λx:Bool -> (Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool -> Bool. true) (λx:Bool. x))) false +(λx:(Bool -> Bool) -> Bool. (λy:Bool. false) true) (λx:Bool -> Bool. false) +λx:Bool. λy:Bool -> Bool. λz:Bool. false +(λx:Bool. λy:Bool. (λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. λa:Bool -> Bool. false) x) true ((λx:Bool. (λy:((Bool -> Bool) -> Bool) -> Bool -> Bool. false) ((λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) x)) true) +(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool -> Bool. true) (λx:Bool -> Bool. (λy:((Bool -> Bool) -> Bool -> Bool) -> Bool. false) ((λy:((Bool -> Bool) -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true))) (λx:Bool -> Bool -> Bool. (λy:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool. λz:Bool. λw:Bool. λa:Bool -> Bool. λb:Bool. false) (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) ((λy:((Bool -> Bool) -> Bool -> Bool) -> Bool. true) (λy:(Bool -> Bool) -> Bool -> Bool. false)) true) +true +true +false +(λx:Bool. λy:Bool. λz:Bool -> Bool. y) true +true +λx:Bool. (λy:Bool. (λz:Bool. λw:Bool. λa:Bool -> Bool. λb:Bool. true) false ((λz:Bool -> Bool. false) (λz:Bool. false))) x +true +(λx:(Bool -> Bool) -> Bool. λy:Bool. (λz:((Bool -> Bool) -> Bool -> Bool) -> Bool. λw:Bool -> Bool -> Bool. λa:Bool. false) (λz:(Bool -> Bool) -> Bool -> Bool. false) ((λz:(Bool -> Bool -> Bool) -> Bool. λw:Bool. λa:Bool. true) (λz:Bool -> Bool -> Bool. false))) ((λx:((Bool -> Bool) -> Bool -> Bool) -> Bool. (λy:Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool. y)) ((λx:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) true) ((λx:((Bool -> Bool) -> Bool) -> Bool -> Bool. true) (λx:(Bool -> Bool) -> Bool. λy:Bool. true)))) +λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. (λz:Bool. λw:Bool. true) y ((λz:Bool. λw:Bool -> (Bool -> Bool) -> Bool. false) y ((λz:Bool. λw:Bool. λa:Bool -> Bool. false) y)) +(λx:Bool. (λy:((Bool -> Bool) -> Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. false) (λy:(Bool -> Bool) -> Bool -> Bool. (λz:Bool. false) true)) ((λx:((Bool -> Bool) -> Bool) -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool. λz:Bool. true) ((λy:Bool. λz:Bool. true) true)) (λx:(Bool -> Bool) -> Bool. (λy:Bool. true) false)) +false +λx:Bool. x +λx:Bool. x +λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. z) ((λy:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool. λz:Bool. true) (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) false) false From c3460b44823a4fde58fa59ac52262154421ec085 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 14 Jan 2024 19:05:50 -0800 Subject: [PATCH 031/231] refactor benchmark infra --- examples/qc/{stlc => benchmarks}/README.md | 0 examples/qc/benchmarks/benchmarks.jl | 144 ++ examples/qc/{stlc => benchmarks}/lib/dist.jl | 16 + .../qc/{stlc => benchmarks}/lib/generator.jl | 0 examples/qc/{stlc => benchmarks}/lib/util.jl | 6 +- examples/qc/benchmarks/main.jl | 168 ++ .../learning_curve.csv} | 356 +-- .../epochs=2000,learning_rate=0.03/log.log} | 28 +- .../terms_before.txt | 200 ++ .../terms_trained.txt | 200 ++ .../dist_before.csv | 5 + .../dist_trained.csv | 5 + .../learning_curve.csv | 2001 +++++++++++++++++ .../epochs=2000,learning_rate=0.003/log.log | 40 + .../terms_before.txt | 200 ++ .../terms_trained.txt | 200 ++ .../epochs=2000,learning_rate=0.03/log.log | 10 + examples/qc/{ => examples}/README.md | 0 examples/qc/{ => examples}/demo_bst.jl | 0 examples/qc/{ => examples}/demo_natlist.jl | 0 .../qc/{ => examples}/demo_sortednatlist.jl | 0 examples/qc/{ => examples}/demo_utlc.jl | 0 examples/qc/{ => examples}/lib/dist_tree.jl | 0 examples/qc/{ => examples}/lib/dist_utlc.jl | 0 examples/qc/{ => examples}/samples/bst.txt | 0 examples/qc/{ => examples}/samples/utlc.txt | 0 examples/qc/{ => examples}/tour_1_core.jl | 0 examples/qc/{ => examples}/tour_2_learning.jl | 0 examples/qc/stlc/entropy.jl | 178 -- examples/qc/stlc/entropy_approx.jl | 209 -- examples/qc/stlc/main.jl | 170 -- .../entropy/sz=2,tysz=1/terms_before.txt | 200 -- ...s_trained_param_by_sz=true,epochs=2000.txt | 200 -- ...ing_curve_param_by_sz=true,epochs=2000.csv | 2001 ----------------- .../log_param_by_sz=true,epochs=2000.log | 31 - .../entropy/sz=3,tysz=2/terms_before.txt | 200 -- ...s_trained_param_by_sz=true,epochs=2000.txt | 200 -- ...ing_curve_param_by_sz=true,epochs=2000.csv | 2001 ----------------- .../log_param_by_sz=true,epochs=2000.log | 31 - .../entropy/sz=5,tysz=2/terms_before.txt | 200 -- ...s_trained_param_by_sz=true,epochs=2000.txt | 200 -- .../uniform/sz=3,tysz=2/dist_before.csv | 9 - ...t_trained_param_by_sz=true,epochs=2000.csv | 9 - ...ing_curve_param_by_sz=true,epochs=2000.csv | 2001 ----------------- .../log_param_by_sz=true,epochs=2000.log | 39 - .../uniform/sz=3,tysz=2/terms_before.txt | 200 -- ...s_trained_param_by_sz=true,epochs=2000.txt | 200 -- .../uniform/sz=5,tysz=3/dist_before.csv | 33 - .../log_param_by_sz=true,epochs=200.log | 19 - .../uniform/sz=5,tysz=3/terms_before.txt | 200 -- .../uniform/sz=3,tysz=2/dist_before.csv | 9 - ...st_trained_param_by_sz=true,epochs=100.csv | 9 - ...t_trained_param_by_sz=true,epochs=2000.csv | 9 - ...ning_curve_param_by_sz=true,epochs=100.csv | 101 - ...ing_curve_param_by_sz=true,epochs=2000.csv | 2001 ----------------- .../log_param_by_sz=true,epochs=100.log | 39 - .../log_param_by_sz=true,epochs=2000.log | 39 - .../uniform/sz=3,tysz=2/terms_before.txt | 200 -- ...ms_trained_param_by_sz=true,epochs=100.txt | 200 -- ...s_trained_param_by_sz=true,epochs=2000.txt | 200 -- ...ing_curve_param_by_sz=true,epochs=2000.csv | 2001 ----------------- .../log_param_by_sz=true,epochs=2000.log | 31 - .../entropy/sz=2,tysz=1/terms_before.txt | 200 -- ...s_trained_param_by_sz=true,epochs=2000.txt | 200 -- .../uniform/sz=3,tysz=2/dist_before.csv | 9 - ...st_trained_param_by_sz=true,epochs=100.csv | 9 - ...t_trained_param_by_sz=true,epochs=2000.csv | 9 - ...ning_curve_param_by_sz=true,epochs=100.csv | 101 - ...ing_curve_param_by_sz=true,epochs=2000.csv | 2001 ----------------- .../log_param_by_sz=true,epochs=100.log | 39 - .../log_param_by_sz=true,epochs=2000.log | 39 - .../uniform/sz=3,tysz=2/terms_before.txt | 200 -- ...ms_trained_param_by_sz=true,epochs=100.txt | 200 -- ...s_trained_param_by_sz=true,epochs=2000.txt | 200 -- .../log_param_by_sz=true,epochs=2000.log | 15 - 75 files changed, 3384 insertions(+), 16787 deletions(-) rename examples/qc/{stlc => benchmarks}/README.md (100%) create mode 100644 examples/qc/benchmarks/benchmarks.jl rename examples/qc/{stlc => benchmarks}/lib/dist.jl (93%) rename examples/qc/{stlc => benchmarks}/lib/generator.jl (100%) rename examples/qc/{stlc => benchmarks}/lib/util.jl (95%) create mode 100644 examples/qc/benchmarks/main.jl rename examples/qc/{stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/learning_curve_param_by_sz=true,epochs=2000.csv => benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/learning_curve.csv} (91%) rename examples/qc/{stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/log_param_by_sz=true,epochs=2000.log => benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/log.log} (52%) create mode 100644 examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/terms_before.txt create mode 100644 examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/terms_trained.txt create mode 100644 examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/dist_before.csv create mode 100644 examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/dist_trained.csv create mode 100644 examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/learning_curve.csv create mode 100644 examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/log.log create mode 100644 examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/terms_before.txt create mode 100644 examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/terms_trained.txt create mode 100644 examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/log.log rename examples/qc/{ => examples}/README.md (100%) rename examples/qc/{ => examples}/demo_bst.jl (100%) rename examples/qc/{ => examples}/demo_natlist.jl (100%) rename examples/qc/{ => examples}/demo_sortednatlist.jl (100%) rename examples/qc/{ => examples}/demo_utlc.jl (100%) rename examples/qc/{ => examples}/lib/dist_tree.jl (100%) rename examples/qc/{ => examples}/lib/dist_utlc.jl (100%) rename examples/qc/{ => examples}/samples/bst.txt (100%) rename examples/qc/{ => examples}/samples/utlc.txt (100%) rename examples/qc/{ => examples}/tour_1_core.jl (100%) rename examples/qc/{ => examples}/tour_2_learning.jl (100%) delete mode 100644 examples/qc/stlc/entropy.jl delete mode 100644 examples/qc/stlc/entropy_approx.jl delete mode 100644 examples/qc/stlc/main.jl delete mode 100644 examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_before.txt delete mode 100644 examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_trained_param_by_sz=true,epochs=2000.txt delete mode 100644 examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv delete mode 100644 examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log delete mode 100644 examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/terms_before.txt delete mode 100644 examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt delete mode 100644 examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv delete mode 100644 examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/log_param_by_sz=true,epochs=2000.log delete mode 100644 examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/terms_before.txt delete mode 100644 examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt delete mode 100644 examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/dist_before.csv delete mode 100644 examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=2000.csv delete mode 100644 examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv delete mode 100644 examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log delete mode 100644 examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/terms_before.txt delete mode 100644 examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt delete mode 100644 examples/qc/stlc/output/v1/num_apps/uniform/sz=5,tysz=3/dist_before.csv delete mode 100644 examples/qc/stlc/output/v1/num_apps/uniform/sz=5,tysz=3/log_param_by_sz=true,epochs=200.log delete mode 100644 examples/qc/stlc/output/v1/num_apps/uniform/sz=5,tysz=3/terms_before.txt delete mode 100644 examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_before.csv delete mode 100644 examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=100.csv delete mode 100644 examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=2000.csv delete mode 100644 examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=100.csv delete mode 100644 examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv delete mode 100644 examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=100.log delete mode 100644 examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log delete mode 100644 examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_before.txt delete mode 100644 examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=100.txt delete mode 100644 examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt delete mode 100644 examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/learning_curve_param_by_sz=true,epochs=2000.csv delete mode 100644 examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/log_param_by_sz=true,epochs=2000.log delete mode 100644 examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/terms_before.txt delete mode 100644 examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/terms_trained_param_by_sz=true,epochs=2000.txt delete mode 100644 examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_before.csv delete mode 100644 examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=100.csv delete mode 100644 examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=2000.csv delete mode 100644 examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=100.csv delete mode 100644 examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv delete mode 100644 examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=100.log delete mode 100644 examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log delete mode 100644 examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_before.txt delete mode 100644 examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=100.txt delete mode 100644 examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt delete mode 100644 examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=5,tysz=3/log_param_by_sz=true,epochs=2000.log diff --git a/examples/qc/stlc/README.md b/examples/qc/benchmarks/README.md similarity index 100% rename from examples/qc/stlc/README.md rename to examples/qc/benchmarks/README.md diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl new file mode 100644 index 00000000..ad12d3b3 --- /dev/null +++ b/examples/qc/benchmarks/benchmarks.jl @@ -0,0 +1,144 @@ +abstract type Benchmark end +abstract type GenerationParams{T} end +abstract type LossParams{T} end + +abstract type Generation{T} end + +abstract type STLC <: Benchmark end + +# STLC generation + +struct STLCGenerationParams <: GenerationParams{STLC} + param_vars_by_size::Bool + size::Integer + ty_size::Integer + STLCGenerationParams(;param_vars_by_size, size, ty_size) = new(param_vars_by_size, size, ty_size) +end +struct STLCGeneration <: Generation{STLC} + e::DistI{Opt{DistI{Expr}}} + constructors_overapproximation::Vector{DistInt32} +end +function to_subpath(p::STLCGenerationParams) + [ + "STLC", + if p.param_vars_by_size "by_sz" else "not_by_sz" end, + "sz=$(p.size),tysz=$(p.ty_size)", + ] +end +function generate(p::STLCGenerationParams) + constructors_overapproximation = [] + function add_ctor(v::DistI{Opt{DistI{Expr}}}) + push!(constructors_overapproximation, opt_ctor_to_id(v)) + v + end + e = gen_expr( + DistNil(DistI{Typ}), + gen_type(p.ty_size, p.param_vars_by_size), + p.size, + p.ty_size, + p.param_vars_by_size, + add_ctor, + ) + STLCGeneration(e, constructors_overapproximation) +end + +# Approx STLC constructor entropy loss + +struct ApproxSTLCConstructorEntropy <: LossParams{STLC} end +to_subpath(p::ApproxSTLCConstructorEntropy) = ["approx_entropy"] +function build_loss(::ApproxSTLCConstructorEntropy, generation::STLCGeneration) + function neg_entropy2(p::Dist, domain::Set{<:Dist}) + sum(domain) do x + pe = prob_equals(p, x) + if length(support_mixed(pe)) == 1 + Dice.Constant(0) + else + LogPr(pe) * exp(LogPr(pe)) + end + end + end + loss = sum( + neg_entropy2(ctor, Set([DistInt32(i) for i in 0:3])) + for ctor in generation.constructors_overapproximation + if begin + sup = support_mixed(ctor) + ct = sum(1 for i in 0:3 if i in sup) + ct > 1 + end + ) + loss, nothing +end + +# MLE loss +abstract type Metric{T} end +abstract type TargetDist end + +struct MLELossParams{T} <: LossParams{T} + metric::Metric{T} + target_dist::TargetDist + MLELossParams(; metric::Metric{T}, target_dist) where T = new{T}(metric, target_dist) +end +to_subpath(p::MLELossParams) = [name(p.metric), name(p.target_dist)] +function build_loss(loss_params::MLELossParams{STLC}, generation::STLCGeneration) + metric = compute_metric(loss_params.metric, generation) + metric_loss(metric, loss_params.target_dist), metric +end + +struct NumApps <: Metric{STLC} end +compute_metric(::NumApps, gen::STLCGeneration) = num_apps(gen.e) +name(::NumApps) = "num_apps" + +struct TermSize <: Metric{STLC} end +compute_metric(::TermSize, gen::STLCGeneration) = term_size(gen.e) +name(::TermSize) = "term_size" + +struct Uniform <: TargetDist end +name(::Uniform) = "uniform" +function metric_loss(metric::Dist, ::Uniform) + mle_loss([ + BoolToMax(prob_equals(metric, DistUInt32(i))) + for i in support_mixed(metric) + ]) +end + +struct Linear <: TargetDist end +name(::Linear) = "linear" +function metric_loss(metric::Dist, ::Linear) + mle_loss([ + BoolToMax(prob_equals(metric, DistUInt32(i)), weight=i) + for i in support_mixed(metric) + ]) +end + +#== +starter code for STLC exact entropy loss: + +to_id = Dict( + "Var" => DistUInt32(1), + "Boolean" => DistUInt32(2), + "App" => DistUInt32(3), + "Abs" => DistUInt32(4), +) + +# 99% \x. x ["Var", "Abs"] +# 1% (\x. x) y ["Var", "Var", "Abs", "App"] + +# dist(collect_constructors(e)) +# Var => 0.99 * 1/2 + 0.01 * 2/4 +# Abs => 0.99 * 1/2 + 0.01 * 1/4 +# App => 0.01 * 1/4 + +function collect_constructors(e) + match(e, [ + "Var" => (i) -> DistVector([to_id["Var"]]), + "Boolean" => (b) -> DistVector([to_id["Boolean"]]), + "App" => (f, x) -> prob_append(prob_extend(collect_constructors(f), collect_constructors(x)), to_id["App"]), + "Abs" => (ty, e′) -> prob_append(collect_constructors(e′), to_id["Abs"]), + ]) +end +random_term = match(e, [ + "None" => () -> DistNone(DistUInt32), + "Some" => e -> DistSome(choice(collect_constructors(e))) +]) +loss = neg_entropy(random_term, Set([DistSome(i) for i in values(to_id)])) +==# \ No newline at end of file diff --git a/examples/qc/stlc/lib/dist.jl b/examples/qc/benchmarks/lib/dist.jl similarity index 93% rename from examples/qc/stlc/lib/dist.jl rename to examples/qc/benchmarks/lib/dist.jl index af3b58a1..cc429cc8 100644 --- a/examples/qc/stlc/lib/dist.jl +++ b/examples/qc/benchmarks/lib/dist.jl @@ -56,6 +56,22 @@ function num_apps(e::DistI{Expr}) ]) end +function ctor_to_id(ctor) + match(ctor, [ + "Var" => _ -> DistInt32(0) + "Boolean" => _ -> DistInt32(1) + "App" => (_, _) -> DistInt32(2) + "Abs" => (_, _) -> DistInt32(3) + ]) +end + +function opt_ctor_to_id(opt_ctor) + match(opt_ctor, [ + "Some" => ctor_to_id, + "None" => () -> DistInt32(-1), + ]) +end + # https://stackoverflow.com/questions/59338968/printing-lambda-expressions-in-haskell parens(b, s) = if b "($(s))" else s end diff --git a/examples/qc/stlc/lib/generator.jl b/examples/qc/benchmarks/lib/generator.jl similarity index 100% rename from examples/qc/stlc/lib/generator.jl rename to examples/qc/benchmarks/lib/generator.jl diff --git a/examples/qc/stlc/lib/util.jl b/examples/qc/benchmarks/lib/util.jl similarity index 95% rename from examples/qc/stlc/lib/util.jl rename to examples/qc/benchmarks/lib/util.jl index 6e506a9a..f43cea95 100644 --- a/examples/qc/stlc/lib/util.jl +++ b/examples/qc/benchmarks/lib/util.jl @@ -106,14 +106,14 @@ function opt_stlc_str(ast) end end -function save_metric_dist(filename, metric_name, dist; io=stdout) +function save_metric_dist(filename, dist; io) open(filename, "w") do file - println(file, "$(metric_name)\tprobability") + println(file, "val\tprobability") for i in key_range(dist) println(file, "$(i)\t$(dist[i])") end end - println(io, "Saved $(metric_name) dist to $(filename).") + println(io, "Saved metric dist to $(filename).") end key_range(d) = minimum(keys(d)):maximum(keys(d)) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl new file mode 100644 index 00000000..9406787d --- /dev/null +++ b/examples/qc/benchmarks/main.jl @@ -0,0 +1,168 @@ +# Train an STLC generator to have some property (term size or num apps) match a +# specific distribution (linear or uniform). +# +# Saves the distributions and sampled terms before and after training. + +using Dice +include("lib/dist.jl") +include("lib/util.jl") +include("lib/generator.jl") +include("benchmarks.jl") + +############################ +# Config +############################ + +generation_params = STLCGenerationParams( + param_vars_by_size=true, + size=5, + ty_size=2, +) +loss_params = MLELossParams( + metric=NumApps(), + target_dist=Uniform(), +) +loss_params = ApproxSTLCConstructorEntropy() + +EPOCHS = 2000 +LEARNING_RATE = if loss_params isa ApproxSTLCConstructorEntropy 0.03 else 0.003 end + +TAG = "v4_infra" + +LOG_TO_FILE = true + +############################ + +path = joinpath( + vcat( + [TAG], + to_subpath(generation_params), + to_subpath(loss_params), + ["epochs=$(EPOCHS),learning_rate=$(LEARNING_RATE)"], + ) +) +OUT_DIR = "examples/qc/benchmarks/stlc/output/$(path)" + +########################### + +LOG_PATH = joinpath(OUT_DIR, "log.log") +LEARNING_CURVE_PATH = joinpath(OUT_DIR, "learning_curve.csv") + +mkpath(OUT_DIR) +io = if LOG_TO_FILE open(LOG_PATH, "w") else stdout end + +using Dates +t = now() +for io′ in Set([io, stdout]) + println(io′, t) + println(io′, "== Config ==") + println(io′, "TAG: $(TAG)") + println(io′, generation_params) + println(io′, loss_params) + println(io′, "EPOCHS: $(EPOCHS)") + println(io′, "LEARNING_RATE: $(LEARNING_RATE)") + println(io′, "DistNat: $(DistNat)") + println(io′) +end +if LOG_TO_FILE + println("Logging to $(LOG_PATH)") + println() +end + +var_vals = Valuation() +adnodes_of_interest = Dict{String, ADNode}() +function register_weight!(s) + var = Var("$(s)_before_sigmoid") + var_vals[var] = 0 + weight = sigmoid(var) + adnodes_of_interest[s] = weight + weight +end + +println_flush(io, "Building computation graph...") +time_build = @elapsed begin + generation = generate(generation_params) + loss, extra = build_loss(loss_params, generation) +end +println(io, " $(time_build) seconds") +println(io) + + +############################ +# Before +############################ + +println(io, "Initial adnodes_of_interest:") +vals = compute(var_vals, values(adnodes_of_interest)) +show(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) +println(io) + +if loss_params isa MLELossParams{STLC} + println_flush(io, "Inferring initial distribution...") + time_infer_init = @elapsed metric_dist = pr_mixed(var_vals)(extra) + println(io, " $(time_infer_init) seconds") + save_metric_dist(joinpath(OUT_DIR, "dist_before.csv"), metric_dist; io) + println(io) +end + +if generation isa STLCGeneration + println_flush(io, "Saving samples...") + time_sample_init = @elapsed with_concrete_ad_flips(var_vals, generation.e) do + save_samples(joinpath(OUT_DIR, "terms_before.txt"), generation.e; io=io) + end + println(io, " $(time_sample_init) seconds") + println(io) +end + +initial_loss = compute_mixed(var_vals, loss) +println(io, "Initial loss: $(initial_loss)") +println(io) + +############################ +# Train +############################ + +println_flush(io, "Training...") +time_train = @elapsed learning_curve = train!(var_vals, loss; epochs=EPOCHS, learning_rate=LEARNING_RATE) +println(io, " $(time_train) seconds") +println(io) + +open(LEARNING_CURVE_PATH, "w") do file + for (epoch, logpr) in zip(0:EPOCHS, learning_curve) + println(file, "$(epoch)\t$(logpr)") + end +end + +############################ +# After +############################ + +final_loss = compute_mixed(var_vals, loss) +println(io, "Final loss: $(final_loss)") +if loss_params isa MLELossParams + approx_improvement = round(exp(initial_loss - final_loss), digits=2) + println(io, "Drawing the target dataset is $(approx_improvement)x more likely") +end +println(io) + +println(io, "Learned adnodes_of_interest:") +vals = compute(var_vals, values(adnodes_of_interest)) +show(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) +println(io) + +if loss_params isa MLELossParams{STLC} + println(io, "Inferring trained distribution...") + time_infer_final = @elapsed metric_dist_after = pr_mixed(var_vals)(extra) + save_metric_dist(joinpath(OUT_DIR, "dist_trained.csv"), metric_dist_after; io) + println(io, " $(time_infer_final) seconds") + println(io) +end + +if generation isa STLCGeneration + println(io, "Saving samples...") + time_sample_final = @elapsed with_concrete_ad_flips(var_vals, generation.e) do + save_samples(joinpath(OUT_DIR, "terms_trained.txt"), generation.e; io) + end + println(io, " $(time_sample_final) seconds") + println(io) +end diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/learning_curve_param_by_sz=true,epochs=2000.csv b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/learning_curve.csv similarity index 91% rename from examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/learning_curve_param_by_sz=true,epochs=2000.csv rename to examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/learning_curve.csv index 21072c7a..1aa65fc9 100644 --- a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/learning_curve_param_by_sz=true,epochs=2000.csv +++ b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/learning_curve.csv @@ -2,7 +2,7 @@ 1 -8.074420028242267 2 -8.07621267169211 3 -8.077940280375184 -4 -8.079606156892172 +4 -8.079606156892174 5 -8.081213420458718 6 -8.082765016963194 7 -8.084263728525322 @@ -20,13 +20,13 @@ 19 -8.098948526519827 20 -8.099953028736167 21 -8.100930716624923 -22 -8.101882777476126 +22 -8.101882777476124 23 -8.102810334170485 24 -8.10371444887407 25 -8.10459612652169 26 -8.105456318100485 27 -8.106295923744682 -28 -8.10711579565193 +28 -8.107115795651932 29 -8.107916740831168 30 -8.108699523691415 31 -8.109464868480455 @@ -46,7 +46,7 @@ 45 -8.118676119961945 46 -8.119245507500525 47 -8.119805106924256 -48 -8.120355222336539 +48 -8.12035522233654 49 -8.120896143707437 50 -8.121428147651496 51 -8.121951498160252 @@ -56,16 +56,16 @@ 55 -8.123963241394648 56 -8.124446888902488 57 -8.12492323779292 -58 -8.125392480923667 +58 -8.125392480923665 59 -8.125854803048234 60 -8.126310381243913 61 -8.126759385315127 62 -8.127201978173618 63 -8.127638316196819 64 -8.128068549565718 -65 -8.128492822583402 +65 -8.128492822583404 66 -8.128911273975463 -67 -8.12932403717329 +67 -8.129324037173292 68 -8.129731240581302 69 -8.130133007829029 70 -8.130529458008965 @@ -78,7 +78,7 @@ 77 -8.13316488046991 78 -8.133522605563813 79 -8.133875914451453 -80 -8.13422489134439 +80 -8.134224891344392 81 -8.134569617801441 82 -8.1349101728487 83 -8.135246633093084 @@ -88,9 +88,9 @@ 87 -8.136552979365568 88 -8.136870037233718 89 -8.137183414767826 -90 -8.137493174347794 +90 -8.137493174347792 91 -8.137799376649667 -92 -8.138102080715278 +92 -8.13810208071528 93 -8.138401344018266 94 -8.138697222526748 95 -8.138989770762759 @@ -100,7 +100,7 @@ 99 -8.140127703893747 100 -8.140404371782832 101 -8.140678009135653 -102 -8.140948661784199 +102 -8.1409486617842 103 -8.141216374494878 104 -8.141481191006251 105 -8.141743154064976 @@ -110,11 +110,11 @@ 109 -8.142763293864185 110 -8.143011598453594 111 -8.14325728705133 -112 -8.143500396336064 +112 -8.143500396336066 113 -8.143740962228346 114 -8.143979019914228 115 -8.144214603867884 -116 -8.144447747873228 +116 -8.144447747873226 117 -8.144678485044635 118 -8.144906847846785 119 -8.145132868113665 @@ -130,8 +130,8 @@ 129 -8.147270818244307 130 -8.147473008145429 131 -8.147673194282708 -132 -8.147871401712376 -133 -8.148067655059208 +132 -8.147871401712374 +133 -8.14806765505921 134 -8.148261978527135 135 -8.148454395909418 136 -8.14864493059855 @@ -149,10 +149,10 @@ 148 -8.15079250378479 149 -8.150960525863052 150 -8.151126955468076 -151 -8.151291810967209 +151 -8.15129181096721 152 -8.151455110447788 153 -8.151616871722903 -154 -8.151777112336998 +154 -8.151777112336996 155 -8.15193584957132 156 -8.152093100449228 157 -8.15224888174133 @@ -166,7 +166,7 @@ 165 -8.153444159910276 166 -8.153587430286482 167 -8.15372938592318 -168 -8.153870041114715 +168 -8.153870041114713 169 -8.154009409955027 170 -8.154147506341348 171 -8.154284343977796 @@ -186,15 +186,15 @@ 185 -8.15607514551816 186 -8.156194625179692 187 -8.15631304173036 -188 -8.15643040606894 +188 -8.156430406068942 189 -8.156546728953561 -190 -8.15666202100404 +190 -8.156662021004042 191 -8.156776292704198 192 -8.156889554404101 193 -8.157001816322271 194 -8.157113088547849 195 -8.157223381042709 -196 -8.157332703643526 +196 -8.157332703643528 197 -8.157441066063821 198 -8.157548477895933 199 -8.157654948612985 @@ -217,11 +217,11 @@ 216 -8.15932959895898 217 -8.15942062430913 218 -8.159510868213347 -219 -8.159600338116125 +219 -8.159600338116126 220 -8.159689041375966 221 -8.159776985266658 222 -8.159864176978507 -223 -8.159950623619594 +223 -8.159950623619595 224 -8.160036332216949 225 -8.16012130971776 226 -8.160205562990512 @@ -229,7 +229,7 @@ 228 -8.160371923939188 229 -8.160454044968802 230 -8.160535468479925 -231 -8.1606162009643 +231 -8.160616200964302 232 -8.160696248841525 233 -8.160775618460065 234 -8.160854316098277 @@ -246,7 +246,7 @@ 245 -8.161677367719488 246 -8.16174846708018 247 -8.16181897012511 -248 -8.16188888224724 +248 -8.161888882247236 249 -8.16195820878255 250 -8.162026955010818 251 -8.16209512615634 @@ -284,7 +284,7 @@ 283 -8.164001572197897 284 -8.164053372520687 285 -8.164104746991555 -286 -8.164155699281363 +286 -8.16415569928136 287 -8.164206233025673 288 -8.164256351825188 289 -8.164306059246131 @@ -298,9 +298,9 @@ 297 -8.164689325870578 298 -8.164735485871486 299 -8.16478126834578 -300 -8.164826676505774 +300 -8.164826676505776 301 -8.164871713533739 -302 -8.164916382582268 +302 -8.16491638258227 303 -8.164960686774595 304 -8.165004629204923 305 -8.165048212938744 @@ -316,7 +316,7 @@ 315 -8.165464976474702 316 -8.165504808968361 317 -8.165544317423501 -318 -8.165583504559761 +318 -8.16558350455976 319 -8.165622373072129 320 -8.165660925631219 321 -8.165699164883517 @@ -329,7 +329,7 @@ 328 -8.165958284414616 329 -8.165994109673814 330 -8.166029644399972 -331 -8.166064891011798 +331 -8.166064891011796 332 -8.166099851906504 333 -8.16613452946002 334 -8.166168926027211 @@ -337,7 +337,7 @@ 336 -8.16623688551805 337 -8.16627045304803 338 -8.166303748804761 -339 -8.166336775040957 +339 -8.166336775040955 340 -8.166369533989506 341 -8.166402027863695 342 -8.166434258857368 @@ -370,20 +370,20 @@ 369 -8.167212642206445 370 -8.16723833011567 371 -8.167263811119382 -372 -8.167289086909204 +372 -8.167289086909205 373 -8.167314159162377 374 -8.167339029541896 375 -8.167363699696644 376 -8.16738817126152 377 -8.167412445857575 -378 -8.167436525092134 +378 -8.167436525092132 379 -8.167460410558926 380 -8.16748410383821 381 -8.167507606496894 382 -8.167530920088673 383 -8.167554046154121 384 -8.167576986220846 -385 -8.167599741803583 +385 -8.167599741803585 386 -8.167622314404325 387 -8.167644705512432 388 -8.167666916604748 @@ -396,7 +396,7 @@ 395 -8.167817475287805 396 -8.167838297955454 397 -8.167858953354127 -398 -8.167879442841583 +398 -8.167879442841585 399 -8.167899767764252 400 -8.167919929457337 401 -8.167939929244909 @@ -407,7 +407,7 @@ 406 -8.168037545176368 407 -8.168056600725777 408 -8.16807550333487 -409 -8.168094254242202 +409 -8.168094254242204 410 -8.168112854676057 411 -8.168131305854534 412 -8.168149608985642 @@ -416,22 +416,22 @@ 415 -8.168203642025409 416 -8.16822136484847 417 -8.168238945515956 -418 -8.168256385177168 +418 -8.168256385177166 419 -8.168273684971926 420 -8.16829084603064 -421 -8.168307869474406 +421 -8.168307869474404 422 -8.168324756415066 423 -8.16834150795531 424 -8.168358125188737 425 -8.16837460919995 -426 -8.168390961064624 +426 -8.168390961064622 427 -8.168407181849581 428 -8.168423272612875 429 -8.168439234403866 430 -8.16845506826329 431 -8.16847077522333 432 -8.168486356307701 -433 -8.16850181253172 +433 -8.168501812531717 434 -8.168517144902363 435 -8.168532354418364 436 -8.168547442070256 @@ -448,9 +448,9 @@ 447 -8.168705638516398 448 -8.168719338174744 449 -8.168732928131986 -450 -8.168746409271106 -451 -8.168759782467895 -452 -8.168773048590992 +450 -8.168746409271105 +451 -8.168759782467893 +452 -8.168773048590994 453 -8.168786208501965 454 -8.16879926305535 455 -8.168812213098729 @@ -460,7 +460,7 @@ 459 -8.16886298488333 460 -8.168875424850746 461 -8.168887765250666 -462 -8.168900006883545 +462 -8.168900006883547 463 -8.16891215054333 464 -8.168924197017516 465 -8.168936147087194 @@ -478,12 +478,12 @@ 477 -8.16907230418538 478 -8.169083069259791 479 -8.16909374822222 -480 -8.169104341763935 +480 -8.169104341763934 481 -8.169114850570608 482 -8.169125275322354 483 -8.16913561669379 484 -8.16914587535407 -485 -8.16915605196693 +485 -8.169156051966931 486 -8.16916614719074 487 -8.169176161678546 488 -8.16918609607811 @@ -506,14 +506,14 @@ 505 -8.169343330329221 506 -8.169351928140294 507 -8.169360457222929 -508 -8.169368918127931 +508 -8.16936891812793 509 -8.169377311401664 510 -8.169385637586096 511 -8.169393897218816 512 -8.169402090833092 513 -8.169410218957886 514 -8.169418282117899 -515 -8.169426280833612 +515 -8.16942628083361 516 -8.169434215621305 517 -8.169442086993103 518 -8.169449895457008 @@ -558,19 +558,19 @@ 557 -8.169710341807415 558 -8.169716007065784 559 -8.16972162707602 -560 -8.169727202200091 -561 -8.16973273279706 +560 -8.16972720220009 +561 -8.169732732797058 562 -8.16973821922311 563 -8.169743661831566 564 -8.169749060972913 565 -8.169754416994834 -566 -8.16975973024222 +566 -8.169759730242218 567 -8.169765001057183 568 -8.169770229779113 -569 -8.169775416744661 +569 -8.16977541674466 570 -8.169780562287784 571 -8.169785666739758 -572 -8.169790730429206 +572 -8.169790730429208 573 -8.169795753682113 574 -8.169800736821855 575 -8.169805680169206 @@ -586,7 +586,7 @@ 585 -8.169852993820328 586 -8.169857519901898 587 -8.169862009845636 -588 -8.169866463940458 +588 -8.16986646394046 589 -8.169870882472964 590 -8.169875265727457 591 -8.169879613985962 @@ -606,7 +606,7 @@ 605 -8.169936967693605 606 -8.169940823361237 607 -8.16994464825001 -608 -8.169948442605913 +608 -8.16994844260591 609 -8.169952206672964 610 -8.169955940693228 611 -8.169959644906832 @@ -615,20 +615,20 @@ 614 -8.16997058108021 615 -8.169974168430223 616 -8.169977727145682 -617 -8.169981257455401 +617 -8.169981257455403 618 -8.169984759586374 619 -8.169988233763771 620 -8.169991680210963 621 -8.16999509914953 622 -8.16999849079928 -623 -8.170001855378263 +623 -8.170001855378265 624 -8.170005193102782 625 -8.170008504187408 626 -8.170011788844995 627 -8.170015047286698 628 -8.170018279721976 629 -8.170021486358616 -630 -8.170024667402737 +630 -8.170024667402739 631 -8.170027823058817 632 -8.17003095352969 633 -8.170034059016569 @@ -636,14 +636,14 @@ 635 -8.170040195835167 636 -8.170043227561314 637 -8.170046235092348 -638 -8.170049218621568 +638 -8.170049218621566 639 -8.17005217834071 640 -8.170055114439991 641 -8.170058027108098 642 -8.170060916532211 643 -8.170063782898012 644 -8.1700666263897 -645 -8.170069447189993 +645 -8.170069447189992 646 -8.170072245480156 647 -8.170075021439999 648 -8.170077775247895 @@ -658,26 +658,26 @@ 657 -8.170101591415602 658 -8.170104133206234 659 -8.17010665471532 -660 -8.17010915610485 +660 -8.170109156104852 661 -8.170111637535513 662 -8.170114099166716 663 -8.170116541156588 664 -8.170118963661995 665 -8.170121366838549 666 -8.170123750840618 -667 -8.170126115821336 +667 -8.170126115821335 668 -8.170128461932608 669 -8.170130789325132 670 -8.170133098148394 671 -8.170135388550687 672 -8.170137660679123 673 -8.170139914679625 -674 -8.170142150696966 +674 -8.170142150696964 675 -8.170144368874748 676 -8.170146569355435 677 -8.17014875228034 678 -8.170150917789657 -679 -8.170153066022458 +679 -8.170153066022456 680 -8.170155197116694 681 -8.170157311209223 682 -8.170159408435804 @@ -692,7 +692,7 @@ 691 -8.170177546377445 692 -8.170179482176843 693 -8.170181402533904 -694 -8.17018330757192 +694 -8.170183307571918 695 -8.170185197413199 696 -8.170187072179075 697 -8.170188931989912 @@ -722,7 +722,7 @@ 721 -8.170229377597947 722 -8.170230899966638 723 -8.170232410193499 -724 -8.17023390837544 +724 -8.170233908375442 725 -8.170235394608612 726 -8.170236868988384 727 -8.170238331609374 @@ -736,10 +736,10 @@ 735 -8.17024962036787 736 -8.17025098129461 737 -8.170252331368097 -738 -8.170253670674951 +738 -8.170253670674953 739 -8.170254999301106 740 -8.170256317331802 -741 -8.170257624851603 +741 -8.170257624851605 742 -8.170258921944395 743 -8.170260208693396 744 -8.170261485181156 @@ -760,12 +760,12 @@ 759 -8.17027945531041 760 -8.17028057832303 761 -8.170281692381069 -762 -8.170282797555982 +762 -8.17028279755598 763 -8.170283893918654 764 -8.1702849815394 765 -8.170286060487978 766 -8.17028713083359 -767 -8.170288192644877 +767 -8.170288192644875 768 -8.17028924598994 769 -8.170290290936332 770 -8.170291327551073 @@ -779,7 +779,7 @@ 778 -8.170299328396515 779 -8.17030029295511 780 -8.170301249823453 -781 -8.170302199062906 +781 -8.170302199062904 782 -8.17030314073433 783 -8.170304074898112 784 -8.17030500161415 @@ -787,8 +787,8 @@ 786 -8.170306832940193 787 -8.170307737667624 788 -8.170308635182156 -789 -8.170309525541343 -790 -8.17031040880226 +789 -8.170309525541342 +790 -8.170310408802262 791 -8.17031128502155 792 -8.170312154255377 793 -8.17031301655948 @@ -797,17 +797,17 @@ 796 -8.170315562444053 797 -8.170316397577686 798 -8.170317226053632 -799 -8.170318047925006 +799 -8.170318047925004 800 -8.17031886324449 801 -8.170319672064355 802 -8.17032047443645 803 -8.170321270412211 804 -8.170322060042661 -805 -8.170322843378422 +805 -8.17032284337842 806 -8.170323620469702 807 -8.170324391366318 808 -8.170325156117684 -809 -8.170325914772821 +809 -8.17032591477282 810 -8.170326667380355 811 -8.17032741398853 812 -8.1703281546452 @@ -823,13 +823,13 @@ 822 -8.170335244138132 823 -8.17033592237961 824 -8.17033659521491 -825 -8.170337262687148 +825 -8.170337262687147 826 -8.170337924839101 827 -8.170338581713203 828 -8.170339233351552 829 -8.170339879795906 830 -8.17034052108769 -831 -8.170341157268004 +831 -8.170341157268002 832 -8.170341788377609 833 -8.170342414456954 834 -8.170343035546153 @@ -843,7 +843,7 @@ 842 -8.170347829324413 843 -8.170348407255691 844 -8.17034898058082 -845 -8.170349549336539 +845 -8.170349549336537 846 -8.170350113559284 847 -8.170350673285208 848 -8.17035122855017 @@ -866,7 +866,7 @@ 865 -8.17036001892553 866 -8.170360499710052 867 -8.17036097666312 -868 -8.17036144981529 +868 -8.170361449815289 869 -8.170361919196868 870 -8.170362384837919 871 -8.17036284676827 @@ -879,9 +879,9 @@ 878 -8.170365978836976 879 -8.17036641212729 880 -8.17036684196485 -881 -8.170367268377186 +881 -8.170367268377188 882 -8.170367691391611 -883 -8.170368111035213 +883 -8.170368111035215 884 -8.170368527334873 885 -8.170368940317246 886 -8.170369350008784 @@ -893,19 +893,19 @@ 892 -8.170371740505226 893 -8.170372127883963 894 -8.170372512176 -895 -8.170372893405942 +895 -8.17037289340594 896 -8.170373271598201 897 -8.170373646777001 898 -8.17037401896636 899 -8.170374388190112 900 -8.170374754471899 -901 -8.170375117835178 +901 -8.170375117835182 902 -8.170375478303217 903 -8.170375835899094 904 -8.170376190645708 -905 -8.170376542565773 +905 -8.170376542565775 906 -8.170376891681823 -907 -8.17037723801621 +907 -8.170377238016211 908 -8.170377581591111 909 -8.170377922428527 910 -8.170378260550276 @@ -918,12 +918,12 @@ 917 -8.170380553160816 918 -8.17038087032227 919 -8.170381184956794 -920 -8.170381497084534 -921 -8.17038180672547 +920 -8.170381497084533 +921 -8.170381806725471 922 -8.170382113899427 923 -8.17038241862607 924 -8.17038272092491 -925 -8.17038302081529 +925 -8.170383020815292 926 -8.170383318316418 927 -8.170383613447335 928 -8.170383906226936 @@ -945,7 +945,7 @@ 944 -8.170388285767803 945 -8.170388541324183 946 -8.170388794844683 -947 -8.17038904634553 +947 -8.170389046345528 948 -8.170389295842817 949 -8.170389543352513 950 -8.170389788890466 @@ -962,7 +962,7 @@ 961 -8.170392364078761 962 -8.170392587146377 963 -8.170392808437047 -964 -8.17039302796493 +964 -8.170393027964929 965 -8.170393245744075 966 -8.170393461788422 967 -8.170393676111791 @@ -972,8 +972,8 @@ 971 -8.17039451646819 972 -8.170394722390236 973 -8.17039492667198 -974 -8.170395129326486 -975 -8.170395330366723 +974 -8.170395129326485 +975 -8.170395330366725 976 -8.170395529805559 977 -8.170395727655752 978 -8.170395923929965 @@ -983,7 +983,7 @@ 982 -8.170396693516679 983 -8.170396882097377 984 -8.17039706917596 -985 -8.1703972547644 +985 -8.170397254764401 986 -8.170397438874572 987 -8.170397621518253 988 -8.17039780270713 @@ -994,7 +994,7 @@ 993 -8.170398687231996 994 -8.170398859932293 995 -8.170399031257018 -996 -8.170399201217137 +996 -8.170399201217139 997 -8.17039936982352 998 -8.170399537086956 999 -8.170399703018145 @@ -1002,7 +1002,7 @@ 1001 -8.17040003092616 1002 -8.170400192923962 1003 -8.170400353631479 -1004 -8.170400513058985 +1004 -8.170400513058983 1005 -8.170400671216681 1006 -8.170400828114687 1007 -8.170400983763036 @@ -1017,7 +1017,7 @@ 1016 -8.170402329980789 1017 -8.170402473667354 1018 -8.170402616209527 -1019 -8.17040275761643 +1019 -8.170402757616431 1020 -8.170402897897109 1021 -8.170403037060535 1022 -8.17040317511561 @@ -1027,14 +1027,14 @@ 1026 -8.17040371642797 1027 -8.170403849072354 1028 -8.170403980660328 -1029 -8.170404111200305 +1029 -8.170404111200307 1030 -8.17040424070064 1031 -8.170404369169614 1032 -8.17040449661544 1033 -8.170404623046274 1034 -8.170404748470201 1035 -8.170404872895242 -1036 -8.170404996329358 +1036 -8.170404996329356 1037 -8.170405118780442 1038 -8.170405240256324 1039 -8.170405360764775 @@ -1056,7 +1056,7 @@ 1055 -8.170407163434742 1056 -8.17040726862743 1057 -8.17040737298241 -1058 -8.170407476506353 +1058 -8.170407476506355 1059 -8.170407579205882 1060 -8.17040768108756 1061 -8.170407782157907 @@ -1085,8 +1085,8 @@ 1084 -8.17040989708293 1085 -8.170409980506793 1086 -8.170410063266356 -1087 -8.170410145366906 -1088 -8.170410226813697 +1087 -8.170410145366908 +1088 -8.170410226813699 1089 -8.170410307611938 1090 -8.170410387766788 1091 -8.170410467283377 @@ -1094,8 +1094,8 @@ 1093 -8.17041062442206 1094 -8.170410702054204 1095 -8.170410779068176 -1096 -8.170410855468905 -1097 -8.170410931261275 +1096 -8.170410855468907 +1097 -8.170410931261273 1098 -8.170411006450129 1099 -8.170411081040276 1100 -8.170411155036485 @@ -1111,16 +1111,16 @@ 1110 -8.170411863354282 1111 -8.170411931121247 1112 -8.170411998348621 -1113 -8.170412065040699 +1113 -8.1704120650407 1114 -8.170412131201749 1115 -8.170412196835994 1116 -8.17041226194763 1117 -8.170412326540827 1118 -8.170412390619708 -1119 -8.17041245418837 +1119 -8.170412454188368 1120 -8.170412517250877 -1121 -8.17041257981126 -1122 -8.17041264187352 +1121 -8.170412579811261 +1122 -8.170412641873522 1123 -8.170412703441624 1124 -8.170412764519506 1125 -8.170412825111072 @@ -1141,7 +1141,7 @@ 1140 -8.17041367818837 1141 -8.170413731505212 1142 -8.170413784397548 -1143 -8.170413836868759 +1143 -8.17041383686876 1144 -8.170413888922198 1145 -8.170413940561195 1146 -8.170413991789045 @@ -1167,10 +1167,10 @@ 1166 -8.170414934862814 1167 -8.170414978174314 1168 -8.170415021140988 -1169 -8.17041506376558 +1169 -8.170415063765581 1170 -8.170415106050818 1171 -8.170415147999401 -1172 -8.17041518961401 +1172 -8.170415189614012 1173 -8.170415230897307 1174 -8.170415271851928 1175 -8.170415312480493 @@ -1191,7 +1191,7 @@ 1190 -8.170415884499393 1191 -8.170415920250473 1192 -8.170415955716932 -1193 -8.170415990901033 +1193 -8.170415990901034 1194 -8.17041602580503 1195 -8.170416060431151 1196 -8.170416094781608 @@ -1202,7 +1202,7 @@ 1201 -8.170416262475156 1202 -8.170416295217121 1203 -8.170416327698426 -1204 -8.170416359921145 +1204 -8.170416359921143 1205 -8.170416391887338 1206 -8.170416423599049 1207 -8.170416455058302 @@ -1217,7 +1217,7 @@ 1216 -8.170416727157484 1217 -8.170416756200131 1218 -8.170416785011572 -1219 -8.170416813593652 +1219 -8.17041681359365 1220 -8.170416841948194 1221 -8.170416870077009 1222 -8.170416897981898 @@ -1227,10 +1227,10 @@ 1226 -8.170417007397617 1227 -8.170417034209327 1228 -8.170417060807598 -1229 -8.170417087194124 +1229 -8.170417087194126 1230 -8.170417113370597 1231 -8.170417139338687 -1232 -8.170417165100055 +1232 -8.170417165100051 1233 -8.170417190656341 1234 -8.170417216009184 1235 -8.170417241160203 @@ -1253,7 +1253,7 @@ 1252 -8.17041763935697 1253 -8.170417661137911 1254 -8.170417682745466 -1255 -8.170417704181013 +1255 -8.170417704181014 1256 -8.170417725445928 1257 -8.170417746541567 1258 -8.170417767469273 @@ -1302,7 +1302,7 @@ 1301 -8.170418525983546 1302 -8.170418540706764 1303 -8.170418555312787 -1304 -8.170418569802546 +1304 -8.170418569802548 1305 -8.170418584176968 1306 -8.170418598436973 1307 -8.170418612583468 @@ -1322,7 +1322,7 @@ 1321 -8.170418799209232 1322 -8.170418811757614 1323 -8.170418824206115 -1324 -8.170418836555527 +1324 -8.170418836555529 1325 -8.170418848806644 1326 -8.170418860960243 1327 -8.170418873017104 @@ -1333,7 +1333,7 @@ 1332 -8.170418931877059 1333 -8.170418943369443 1334 -8.170418954770351 -1335 -8.170418966080515 +1335 -8.170418966080513 1336 -8.17041897730065 1337 -8.170418988431479 1338 -8.17041899947371 @@ -1357,7 +1357,7 @@ 1356 -8.170419183861245 1357 -8.170419193347943 1358 -8.170419202759133 -1359 -8.170419212095412 +1359 -8.170419212095414 1360 -8.170419221357381 1361 -8.17041923054563 1362 -8.170419239660745 @@ -1379,8 +1379,8 @@ 1378 -8.170419376017637 1379 -8.170419383974886 1380 -8.170419391868801 -1381 -8.170419399699885 -1382 -8.17041940746864 +1381 -8.170419399699886 +1382 -8.170419407468641 1383 -8.17041941517556 1384 -8.17041942282114 1385 -8.170419430405865 @@ -1388,7 +1388,7 @@ 1387 -8.17041944539469 1388 -8.170419452799749 1389 -8.170419460145867 -1390 -8.170419467433515 +1390 -8.170419467433517 1391 -8.17041947466316 1392 -8.170419481835262 1393 -8.17041948895028 @@ -1399,10 +1399,10 @@ 1398 -8.170419523684883 1399 -8.17041953046681 1400 -8.17041953719476 -1401 -8.17041954386916 +1401 -8.170419543869162 1402 -8.17041955049044 1403 -8.170419557059018 -1404 -8.170419563575317 +1404 -8.170419563575315 1405 -8.170419570039751 1406 -8.170419576452733 1407 -8.170419582814674 @@ -1434,9 +1434,9 @@ 1433 -8.1704197315767 1434 -8.170419736704002 1435 -8.170419741790496 -1436 -8.170419746836505 +1436 -8.170419746836506 1437 -8.170419751842354 -1438 -8.170419756808363 +1438 -8.170419756808364 1439 -8.170419761734847 1440 -8.170419766622121 1441 -8.170419771470497 @@ -1467,16 +1467,16 @@ 1466 -8.170419880902129 1467 -8.170419884840967 1468 -8.170419888748457 -1469 -8.170419892624846 +1469 -8.170419892624848 1470 -8.170419896470387 1471 -8.170419900285323 -1472 -8.170419904069893 +1472 -8.170419904069892 1473 -8.170419907824344 1474 -8.170419911548915 1475 -8.170419915243842 1476 -8.170419918909364 1477 -8.17041992254571 -1478 -8.170419926153118 +1478 -8.170419926153116 1479 -8.170419929731814 1480 -8.170419933282027 1481 -8.170419936803988 @@ -1490,7 +1490,7 @@ 1489 -8.170419963989092 1490 -8.170419967266662 1491 -8.17041997051815 -1492 -8.170419973743758 +1492 -8.170419973743757 1493 -8.170419976943695 1494 -8.170419980118163 1495 -8.17041998326737 @@ -1513,13 +1513,13 @@ 1512 -8.170420033127183 1513 -8.170420035854509 1514 -8.17042003856013 -1515 -8.170420041244219 +1515 -8.17042004124422 1516 -8.170420043906946 1517 -8.170420046548482 1518 -8.170420049168992 1519 -8.170420051768652 -1520 -8.170420054347618 -1521 -8.17042005690606 +1520 -8.17042005434762 +1521 -8.170420056906062 1522 -8.170420059444142 1523 -8.170420061962027 1524 -8.170420064459869 @@ -1527,7 +1527,7 @@ 1526 -8.170420069396076 1527 -8.170420071834755 1528 -8.170420074254027 -1529 -8.170420076654045 +1529 -8.170420076654043 1530 -8.170420079034962 1531 -8.170420081396928 1532 -8.1704200837401 @@ -1535,7 +1535,7 @@ 1534 -8.170420088370646 1535 -8.170420090658315 1536 -8.170420092927777 -1537 -8.170420095179182 +1537 -8.17042009517918 1538 -8.170420097412666 1539 -8.170420099628375 1540 -8.170420101826451 @@ -1546,13 +1546,13 @@ 1545 -8.1704201125572 1546 -8.170420114652384 1547 -8.17042011673089 -1548 -8.170420118792856 +1548 -8.170420118792855 1549 -8.170420120838411 1550 -8.170420122867691 -1551 -8.170420124880817 +1551 -8.170420124880819 1552 -8.170420126877922 1553 -8.170420128859135 -1554 -8.170420130824578 +1554 -8.170420130824581 1555 -8.170420132774382 1556 -8.17042013470867 1557 -8.170420136627559 @@ -1587,7 +1587,7 @@ 1586 -8.170420186100415 1587 -8.170420187610315 1588 -8.170420189108198 -1589 -8.17042019059416 +1589 -8.170420190594161 1590 -8.170420192068296 1591 -8.170420193530699 1592 -8.170420194981466 @@ -1595,7 +1595,7 @@ 1594 -8.170420197848452 1595 -8.170420199264857 1596 -8.170420200669989 -1597 -8.170420202063939 +1597 -8.17042020206394 1598 -8.170420203446795 1599 -8.170420204818646 1600 -8.17042020617958 @@ -1609,11 +1609,11 @@ 1608 -8.1704202166843 1609 -8.170420217950804 1610 -8.17042021920723 -1611 -8.170420220453655 +1611 -8.170420220453657 1612 -8.170420221690161 1613 -8.170420222916828 1614 -8.170420224133732 -1615 -8.170420225340951 +1615 -8.170420225340953 1616 -8.170420226538566 1617 -8.170420227726646 1618 -8.170420228905273 @@ -1632,8 +1632,8 @@ 1631 -8.17042024340045 1632 -8.170420244454343 1633 -8.170420245499848 -1634 -8.170420246537033 -1635 -8.17042024756596 +1634 -8.17042024653703 +1635 -8.170420247565962 1636 -8.170420248586703 1637 -8.170420249599323 1638 -8.170420250603883 @@ -1647,7 +1647,7 @@ 1646 -8.170420258357847 1647 -8.170420259292705 1648 -8.170420260220125 -1649 -8.170420261140164 +1649 -8.170420261140162 1650 -8.170420262052879 1651 -8.170420262958332 1652 -8.170420263856581 @@ -1655,11 +1655,11 @@ 1654 -8.170420265631687 1655 -8.17042026650866 1656 -8.170420267378656 -1657 -8.170420268241726 +1657 -8.170420268241724 1658 -8.170420269097928 1659 -8.170420269947314 1660 -8.170420270789943 -1661 -8.170420271625867 +1661 -8.170420271625868 1662 -8.170420272455138 1663 -8.17042027327781 1664 -8.170420274093933 @@ -1674,7 +1674,7 @@ 1673 -8.170420281152907 1674 -8.17042028190636 1675 -8.170420282653817 -1676 -8.170420283395325 +1676 -8.170420283395327 1677 -8.170420284130936 1678 -8.17042028486069 1679 -8.170420285584637 @@ -1691,22 +1691,22 @@ 1690 -8.170420293177727 1691 -8.170420293835488 1692 -8.170420294488013 -1693 -8.170420295135347 +1693 -8.170420295135346 1694 -8.170420295777527 1695 -8.170420296414598 1696 -8.170420297046599 -1697 -8.170420297673571 +1697 -8.17042029767357 1698 -8.170420298295554 1699 -8.170420298912587 1700 -8.170420299524707 -1701 -8.170420300131958 +1701 -8.17042030013196 1702 -8.170420300734378 1703 -8.170420301332001 1704 -8.170420301924871 1705 -8.170420302513019 1706 -8.170420303096492 1707 -8.170420303675318 -1708 -8.170420304249536 +1708 -8.170420304249538 1709 -8.170420304819189 1710 -8.170420305384308 1711 -8.170420305944926 @@ -1717,7 +1717,7 @@ 1716 -8.170420308681814 1717 -8.170420309216194 1718 -8.17042030974632 -1719 -8.170420310272227 +1719 -8.17042031027223 1720 -8.17042031079395 1721 -8.170420311311522 1722 -8.170420311824973 @@ -1729,7 +1729,7 @@ 1728 -8.170420314821008 1729 -8.170420315306531 1730 -8.170420315788192 -1731 -8.17042031626602 +1731 -8.170420316266018 1732 -8.170420316740044 1733 -8.170420317210295 1734 -8.170420317676806 @@ -1737,7 +1737,7 @@ 1736 -8.170420318598719 1737 -8.17042031905418 1738 -8.170420319506016 -1739 -8.170420319954259 +1739 -8.170420319954257 1740 -8.17042032039893 1741 -8.170420320840066 1742 -8.17042032127769 @@ -1747,14 +1747,14 @@ 1746 -8.17042032299364 1747 -8.170420323414127 1748 -8.17042032383127 -1749 -8.170420324245088 +1749 -8.17042032424509 1750 -8.170420324655616 1751 -8.170420325062876 1752 -8.170420325466898 1753 -8.170420325867703 1754 -8.170420326265317 1755 -8.17042032665977 -1756 -8.170420327051083 +1756 -8.170420327051081 1757 -8.17042032743928 1758 -8.170420327824388 1759 -8.170420328206433 @@ -1779,11 +1779,11 @@ 1778 -8.1704203349143 1779 -8.170420335239925 1780 -8.170420335562957 -1781 -8.17042033588342 +1781 -8.170420335883419 1782 -8.170420336201332 1783 -8.170420336516715 1784 -8.170420336829586 -1785 -8.17042033713997 +1785 -8.170420337139968 1786 -8.170420337447881 1787 -8.170420337753344 1788 -8.170420338056374 @@ -1792,18 +1792,18 @@ 1791 -8.170420338951077 1792 -8.170420339244576 1793 -8.170420339535742 -1794 -8.17042033982459 +1794 -8.170420339824588 1795 -8.170420340111137 1796 -8.170420340395408 1797 -8.170420340677413 1798 -8.170420340957175 1799 -8.170420341234712 1800 -8.17042034151004 -1801 -8.170420341783174 +1801 -8.170420341783176 1802 -8.170420342054138 1803 -8.170420342322945 1804 -8.170420342589612 -1805 -8.170420342854158 +1805 -8.17042034285416 1806 -8.170420343116598 1807 -8.17042034337695 1808 -8.17042034363523 @@ -1817,11 +1817,11 @@ 1816 -8.170420345628838 1817 -8.170420345869196 1818 -8.170420346107644 -1819 -8.170420346344194 +1819 -8.170420346344192 1820 -8.170420346578862 1821 -8.170420346811662 1822 -8.17042034704261 -1823 -8.170420347271719 +1823 -8.170420347271717 1824 -8.170420347499006 1825 -8.17042034772448 1826 -8.170420347948166 @@ -1846,28 +1846,28 @@ 1845 -8.170420351875565 1846 -8.170420352066216 1847 -8.170420352255348 -1848 -8.170420352442978 +1848 -8.170420352442976 1849 -8.170420352629112 1850 -8.170420352813764 1851 -8.170420352996949 1852 -8.170420353178677 1853 -8.170420353358958 1854 -8.170420353537803 -1855 -8.170420353715226 +1855 -8.170420353715228 1856 -8.170420353891238 1857 -8.170420354065847 1858 -8.170420354239067 -1859 -8.17042035441091 +1859 -8.170420354410911 1860 -8.170420354581385 1861 -8.170420354750503 1862 -8.170420354918274 -1863 -8.170420355084714 -1864 -8.170420355249826 +1863 -8.170420355084712 +1864 -8.170420355249824 1865 -8.170420355413626 1866 -8.17042035557612 -1867 -8.170420355737322 +1867 -8.170420355737324 1868 -8.170420355897242 -1869 -8.170420356055889 +1869 -8.17042035605589 1870 -8.170420356213274 1871 -8.170420356369405 1872 -8.170420356524296 @@ -1889,7 +1889,7 @@ 1888 -8.170420358841394 1889 -8.17042035897661 1890 -8.170420359110754 -1891 -8.170420359243831 +1891 -8.17042035924383 1892 -8.170420359375845 1893 -8.170420359506812 1894 -8.170420359636735 @@ -1912,7 +1912,7 @@ 1911 -8.170420361693767 1912 -8.170420361806286 1913 -8.170420361917913 -1914 -8.170420362028649 +1914 -8.17042036202865 1915 -8.170420362138506 1916 -8.170420362247487 1917 -8.1704203623556 @@ -1942,7 +1942,7 @@ 1941 -8.170420364707322 1942 -8.170420364795863 1943 -8.170420364883698 -1944 -8.170420364970834 +1944 -8.170420364970836 1945 -8.170420365057279 1946 -8.170420365143032 1947 -8.170420365228107 @@ -1951,7 +1951,7 @@ 1950 -8.170420365479284 1951 -8.17042036556168 1952 -8.170420365643421 -1953 -8.170420365724512 +1953 -8.170420365724514 1954 -8.170420365804958 1955 -8.170420365884764 1956 -8.170420365963935 @@ -1963,7 +1963,7 @@ 1962 -8.170420366425901 1963 -8.170420366500764 1964 -8.170420366575033 -1965 -8.17042036664871 +1965 -8.170420366648711 1966 -8.170420366721803 1967 -8.17042036679431 1968 -8.170420366866244 diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/log_param_by_sz=true,epochs=2000.log b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/log.log similarity index 52% rename from examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/log_param_by_sz=true,epochs=2000.log rename to examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/log.log index 642b15d1..96c9a547 100644 --- a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/log_param_by_sz=true,epochs=2000.log +++ b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/log.log @@ -1,31 +1,31 @@ -2024-01-13T00:22:05.125 +2024-01-14T19:01:50.834 == Config == -INIT_SIZE: 2 -GEN_TYP_SIZE: 1 -PARAMETERIZE_FLIP_GROUPS_BY_SZ: true +TAG: v4_infra +STLCGenerationParams(true, 2, 1) +ApproxSTLCConstructorEntropy() EPOCHS: 2000 +LEARNING_RATE: 0.03 DistNat: DistUInt32 -TAG: entropy_approx_v01 -Building (gen_expr(...)) computation graph... - 11.713465572 seconds +Building computation graph... + 13.642789785 seconds Initial adnodes_of_interest: Dict("sz1_succ_abs" => 0.5, "tysz1_gen_type_tbool" => 0.5, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.5, "sz2_succ_abs" => 0.5, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5, "sz1_succ_app" => 0.5) Saving samples... -Saved samples to examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_before.txt. - 2.766468585 seconds +Saved samples to examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/terms_before.txt. + 2.850190577 seconds -Initial entropy: 8.072558853466411 +Initial loss: -8.072558853466411 Training... - 3.115894258 seconds + 3.10815305 seconds -Final entropy: 8.170420368889292 +Final loss: -8.170420368889292 Learned adnodes_of_interest: Dict("sz1_succ_abs" => 0.5598030152826101, "tysz1_gen_type_tbool" => 0.5395457933590109, "sz0_zero_pr_var2" => 0.5271444904668267, "sz2_succ_app" => 0.3185816526602986, "sz2_succ_abs" => 0.6350128152410152, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5000874628748793, "sz1_succ_app" => 0.43209667095380405) Saving samples... -Saved samples to examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_trained_param_by_sz=true,epochs=2000.txt. - 0.197855259 seconds +Saved samples to examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/terms_trained.txt. + 0.17076016 seconds diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/terms_before.txt b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/terms_before.txt new file mode 100644 index 00000000..e75b73ed --- /dev/null +++ b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/terms_before.txt @@ -0,0 +1,200 @@ +true +(λx:Bool. λy:Bool. true) ((λx:Bool. true) false) +(λx:Bool. x) true +true +(λx:Bool. λy:Bool. false) false true +true +(λx:Bool. false) ((λx:Bool. true) false) +λx:Bool. x +λx:Bool. true +λx:Bool. x +(λx:Bool -> Bool. x) (λx:Bool. x) +(λx:Bool. λy:Bool -> Bool. false) false ((λx:Bool. λy:Bool. false) false) +false +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +(λx:Bool. λy:Bool. λz:Bool. false) true false +λx:Bool. false +λx:Bool. x +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) (λx:Bool. x) +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false (λx:Bool. true) +λx:Bool. x +λx:Bool. (λy:Bool. true) x +λx:Bool. true +false +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) true) +(λx:Bool. x) ((λx:Bool. true) true) +(λx:Bool -> Bool. true) (λx:Bool. true) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) (λx:Bool. true) +λx:Bool. true +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true (λx:Bool. x) +(λx:Bool. x) true +λx:Bool. x +false +false +λx:Bool. false +(λx:Bool. λy:Bool. true) true true +(λx:Bool -> Bool. true) (λx:Bool. false) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) ((λx:Bool. true) false) +λx:Bool. x +λx:Bool. true +(λx:Bool. x) true +λx:Bool. true +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) false +(λx:Bool. true) true +λx:Bool. true +(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. false) true) +(λx:Bool. true) ((λx:Bool. true) false) +λx:Bool. (λy:Bool. true) x +λx:Bool. x +λx:Bool. x +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) +false +λx:Bool. true +λx:Bool. x +false +(λx:Bool. x) ((λx:Bool -> Bool. false) (λx:Bool. false)) +(λx:Bool. x) true +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) +false +(λx:Bool. λy:Bool. false) false +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) ((λx:Bool. true) false) +true +(λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +λx:Bool. x +true +λx:Bool. x +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +true +(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) +false +λx:Bool. x +(λx:Bool. true) ((λx:Bool. true) true) +λx:Bool. true +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +true +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) true +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) true +λx:Bool. true +true +(λx:Bool. λy:Bool. λz:Bool. true) false true +(λx:Bool. λy:Bool. false) ((λx:Bool. true) false) +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) +(λx:Bool. λy:Bool. true) false true +(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. true) true) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. true)) +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) (λx:Bool. x) +(λx:Bool. λy:Bool -> Bool. true) false ((λx:Bool. λy:Bool. true) true) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +false +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool. false) false) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool. true) false) +(λx:Bool -> Bool. x) (λx:Bool. x) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +(λx:Bool. λy:Bool. false) ((λx:Bool. true) false) +λx:Bool. x +λx:Bool. true +λx:Bool. x +true +false +(λx:Bool. λy:Bool. λz:Bool. true) true ((λx:Bool. false) false) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) (λx:Bool. true) +true +(λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +(λx:Bool. λy:Bool. false) true true +false +(λx:Bool. x) false +λx:Bool. x +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) (λx:Bool. x) +λx:Bool. true +(λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool -> Bool. true) (λx:Bool. false)) +false +(λx:Bool. λy:Bool -> Bool. true) false ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +true +λx:Bool. false +(λx:Bool -> Bool. false) (λx:Bool. false) +(λx:Bool. λy:Bool. false) ((λx:Bool. true) true) +true +false +(λx:Bool -> Bool. false) (λx:Bool. true) +(λx:Bool -> Bool. false) (λx:Bool. x) +λx:Bool. x +(λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool -> Bool. true) (λx:Bool. false)) +λx:Bool. (λy:Bool. true) false +(λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool. true) true) +(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false (λx:Bool. x) +λx:Bool. true +true +λx:Bool. true +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false)) +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. false) false) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) ((λx:Bool. true) true) +(λx:Bool. λy:Bool. true) false +(λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) true) +true +true +true +λx:Bool. true +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. true)) +λx:Bool. false +(λx:Bool. λy:Bool. true) false ((λx:Bool -> Bool. true) (λx:Bool. true)) +λx:Bool. (λy:Bool. true) x +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. x) +false +(λx:Bool. λy:Bool. true) false true +false +λx:Bool. x +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +λx:Bool. (λy:Bool. true) false +λx:Bool. (λy:Bool. true) true +λx:Bool. x +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) false +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) ((λx:Bool. true) false) +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) +true +false +true +(λx:Bool. x) ((λx:Bool -> Bool. true) (λx:Bool. true)) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +false +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +(λx:Bool. true) true +(λx:Bool -> Bool. true) (λx:Bool. x) +λx:Bool. false +true +true +true +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) (λx:Bool. false) +true +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) true +λx:Bool. false +(λx:Bool. λy:Bool. false) ((λx:Bool. false) false) +false +true +true +(λx:Bool. λy:Bool. false) false false +λx:Bool. x +(λx:Bool. λy:Bool. true) true false +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) (λx:Bool. false) +(λx:Bool. λy:Bool. false) true +true +λx:Bool. x +λx:Bool. true +(λx:Bool. λy:Bool. false) false true +λx:Bool. true +true +false +λx:Bool. (λy:Bool. false) x +true +true +(λx:Bool. false) true +(λx:Bool. λy:Bool. true) true +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) true +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) ((λx:Bool. true) true) +(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +λx:Bool. false +false +true diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/terms_trained.txt b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/terms_trained.txt new file mode 100644 index 00000000..9e4757aa --- /dev/null +++ b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/terms_trained.txt @@ -0,0 +1,200 @@ +(λx:Bool. λy:Bool. false) false +λx:Bool. true +λx:Bool. true +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) true) +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. true) false) +false +λx:Bool. x +λx:Bool. true +λx:Bool. false +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) (λx:Bool. x) +(λx:Bool -> Bool. false) (λx:Bool. x) +λx:Bool. (λy:Bool. true) x +true +λx:Bool. x +false +true +true +(λx:Bool. λy:Bool. λz:Bool. false) true false +λx:Bool. x +true +false +λx:Bool. false +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) true +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) (λx:Bool. x) +λx:Bool. x +true +λx:Bool. (λy:Bool. false) x +λx:Bool. x +(λx:Bool. λy:Bool. λz:Bool. true) true true +λx:Bool. x +(λx:Bool. λy:Bool. true) true false +true +true +λx:Bool. x +λx:Bool. false +true +false +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) +false +(λx:Bool -> Bool. false) (λx:Bool. x) +(λx:Bool. false) ((λx:Bool. true) false) +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) true +λx:Bool. false +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. x) +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool. λy:Bool. false) true) +true +false +(λx:Bool. x) false +false +(λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. true)) +λx:Bool. x +true +false +true +λx:Bool. x +true +false +true +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +true +λx:Bool. x +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) +λx:Bool. true +λx:Bool. x +λx:Bool. true +(λx:Bool -> Bool. x) (λx:Bool. true) +true +(λx:Bool. λy:Bool. λz:Bool. false) false true +λx:Bool. x +true +true +true +true +λx:Bool. false +true +λx:Bool. true +λx:Bool. false +(λx:Bool -> Bool. false) (λx:Bool. x) +false +true +false +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) ((λx:Bool. true) true) +λx:Bool. x +λx:Bool. false +(λx:Bool. λy:Bool. false) false ((λx:Bool -> Bool. true) (λx:Bool. true)) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. x) +true +false +(λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool. true) false) +false +λx:Bool. false +false +false +false +λx:Bool. (λy:Bool. true) x +λx:Bool. true +λx:Bool. x +(λx:Bool. x) false +λx:Bool. true +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +false +λx:Bool. true +(λx:Bool. x) ((λx:Bool. true) true) +false +true +(λx:Bool. false) ((λx:Bool. false) false) +λx:Bool. x +λx:Bool. x +(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +false +false +false +true +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) (λx:Bool. true) +λx:Bool. (λy:Bool. false) true +false +false +λx:Bool. true +true +λx:Bool. (λy:Bool. false) false +false +true +λx:Bool. false +λx:Bool. x +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) +(λx:Bool. false) false +(λx:Bool. x) ((λx:Bool. true) true) +(λx:Bool. x) false +(λx:Bool. x) true +λx:Bool. (λy:Bool. false) false +(λx:Bool. true) false +(λx:Bool. λy:Bool. false) ((λx:Bool. true) true) +λx:Bool. true +(λx:Bool. true) ((λx:Bool. true) false) +λx:Bool. x +(λx:Bool. λy:Bool -> Bool. true) false (λx:Bool. false) +(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false)) +(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +λx:Bool. x +(λx:Bool. x) true +(λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +λx:Bool. (λy:Bool. true) x +false +false +false +(λx:Bool -> Bool. true) (λx:Bool. true) +(λx:Bool. x) false +false +λx:Bool. x +λx:Bool. x +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +λx:Bool. x +(λx:Bool. λy:Bool. false) true false +false +true +false +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) +λx:Bool. true +λx:Bool. true +(λx:Bool. λy:Bool. true) false false +false +true +λx:Bool. (λy:Bool. true) true +false +false +λx:Bool. x +(λx:Bool -> Bool. true) (λx:Bool. x) +true +λx:Bool. x +(λx:Bool. x) ((λx:Bool. true) true) +λx:Bool. x +λx:Bool. x +(λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool -> Bool. true) (λx:Bool. true)) +true +true +true +(λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) true) +(λx:Bool. x) true +(λx:Bool. λy:Bool. λz:Bool. true) true false +true +(λx:Bool -> Bool. true) (λx:Bool. x) +true +λx:Bool. (λy:Bool. true) true +(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +λx:Bool. x +false +true +λx:Bool. true +(λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) true) +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) +true +(λx:Bool -> Bool. x) (λx:Bool. true) +false +λx:Bool. x +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) +true +true +false +λx:Bool. x diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/dist_before.csv b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/dist_before.csv new file mode 100644 index 00000000..601b3e1c --- /dev/null +++ b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/dist_before.csv @@ -0,0 +1,5 @@ +val probability +0 0.41666666666666674 +1 0.20833333333333343 +2 0.25000000000000017 +3 0.12500000000000008 diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/dist_trained.csv b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/dist_trained.csv new file mode 100644 index 00000000..5b503139 --- /dev/null +++ b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/dist_trained.csv @@ -0,0 +1,5 @@ +val probability +0 0.27861431390698005 +1 0.19367217254954094 +2 0.3002327295320593 +3 0.2274807840114198 diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/learning_curve.csv b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/learning_curve.csv new file mode 100644 index 00000000..46d55d18 --- /dev/null +++ b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/learning_curve.csv @@ -0,0 +1,2001 @@ +0 5.909820558067469 +1 5.90887137151752 +2 5.907925432640779 +3 5.906982729167141 +4 5.906043248880616 +5 5.905106979619048 +6 5.904173909273823 +7 5.903244025789578 +8 5.902317317163921 +9 5.901393771447134 +10 5.900473376741902 +11 5.899556121203027 +12 5.898641993037145 +13 5.897730980502459 +14 5.89682307190845 +15 5.895918255615616 +16 5.895016520035183 +17 5.894117853628856 +18 5.893222244908531 +19 5.8923296824360385 +20 5.8914401548228765 +21 5.89055365072994 +22 5.88967015886727 +23 5.888789667993786 +24 5.887912166917028 +25 5.887037644492897 +26 5.886166089625409 +27 5.88529749126643 +28 5.884431838415429 +29 5.883569120119228 +30 5.882709325471752 +31 5.881852443613777 +32 5.880998463732695 +33 5.8801473750622595 +34 5.879299166882342 +35 5.878453828518696 +36 5.877611349342722 +37 5.876771718771215 +38 5.875934926266142 +39 5.875100961334393 +40 5.874269813527558 +41 5.873441472441694 +42 5.872615927717085 +43 5.871793169038023 +44 5.870973186132572 +45 5.8701559687723455 +46 5.8693415067722805 +47 5.868529789990415 +48 5.867720808327664 +49 5.866914551727595 +50 5.866111010176217 +51 5.865310173701751 +52 5.864512032374424 +53 5.863716576306247 +54 5.8629237956508025 +55 5.86213368060303 +56 5.861346221399016 +57 5.860561408315781 +58 5.859779231671079 +59 5.858999681823177 +60 5.858222749170659 +61 5.857448424152214 +62 5.856676697246435 +63 5.855907558971619 +64 5.855140999885563 +65 5.854377010585356 +66 5.8536155817071975 +67 5.852856703926186 +68 5.852100367956122 +69 5.851346564549325 +70 5.850595284496425 +71 5.84984651862618 +72 5.8491002578052775 +73 5.848356492938147 +74 5.847615214966773 +75 5.8468764148705015 +76 5.846140083665855 +77 5.845406212406349 +78 5.8446747921823 +79 5.843945814120653 +80 5.843219269384793 +81 5.842495149174351 +82 5.841773444725052 +83 5.841054147308512 +84 5.840337248232063 +85 5.839622738838588 +86 5.83891061050633 +87 5.838200854648729 +88 5.8374934627142405 +89 5.836788426186166 +90 5.8360857365824765 +91 5.835385385455652 +92 5.834687364392498 +93 5.833991665013988 +94 5.833298278975089 +95 5.832607197964601 +96 5.83191841370498 +97 5.831231917952188 +98 5.830547702495518 +99 5.8298657591574345 +100 5.829186079793414 +101 5.828508656291778 +102 5.827833480573544 +103 5.827160544592252 +104 5.826489840333821 +105 5.825821359816379 +106 5.825155095090116 +107 5.824491038237124 +108 5.82382918137125 +109 5.823169516637929 +110 5.822512036214044 +111 5.821856732307769 +112 5.821203597158414 +113 5.8205526230362885 +114 5.819903802242539 +115 5.81925712710901 +116 5.818612589998088 +117 5.817970183302564 +118 5.8173298994454825 +119 5.816691730880002 +120 5.816055670089243 +121 5.815421709586152 +122 5.81478984191336 +123 5.81416005964303 +124 5.813532355376739 +125 5.8129067217453105 +126 5.812283151408702 +127 5.811661637055844 +128 5.81104217140452 +129 5.810424747201223 +130 5.8098093572210185 +131 5.809195994267413 +132 5.80858465117222 +133 5.807975320795425 +134 5.807367996025051 +135 5.806762669777029 +136 5.8061593349950735 +137 5.805557984650539 +138 5.804958611742303 +139 5.804361209296626 +140 5.803765770367036 +141 5.803172288034189 +142 5.8025807554057565 +143 5.801991165616277 +144 5.801403511827061 +145 5.800817787226044 +146 5.800233985027667 +147 5.799652098472762 +148 5.799072120828422 +149 5.79849404538788 +150 5.797917865470394 +151 5.7973435744211175 +152 5.79677116561099 +153 5.796200632436614 +154 5.795631968320129 +155 5.795065166709109 +156 5.794500221076436 +157 5.793937124920187 +158 5.793375871763513 +159 5.792816455154533 +160 5.792258868666217 +161 5.791703105896266 +162 5.791149160467008 +163 5.790597026025281 +164 5.790046696242322 +165 5.789498164813657 +166 5.78895142545899 +167 5.788406471922091 +168 5.787863297970692 +169 5.787321897396376 +170 5.786782264014464 +171 5.78624439166392 +172 5.785708274207226 +173 5.785173905530297 +174 5.78464127954236 +175 5.784110390175853 +176 5.783581231386324 +177 5.783053797152324 +178 5.782528081475305 +179 5.782004078379517 +180 5.7814817819119035 +181 5.7809611861420045 +182 5.780442285161857 +183 5.779925073085883 +184 5.7794095440508055 +185 5.778895692215534 +186 5.7783835117610804 +187 5.777872996890451 +188 5.7773641418285475 +189 5.776856940822079 +190 5.776351388139457 +191 5.775847478070704 +192 5.775345204927354 +193 5.774844563042365 +194 5.7743455467700135 +195 5.7738481504858115 +196 5.773352368586405 +197 5.772858195489482 +198 5.772365625633684 +199 5.771874653478517 +200 5.771385273504243 +201 5.770897480211813 +202 5.770411268122757 +203 5.769926631779106 +204 5.769443565743295 +205 5.768962064598078 +206 5.768482122946439 +207 5.768003735411499 +208 5.767526896636442 +209 5.7670516012844075 +210 5.766577844038423 +211 5.766105619601306 +212 5.765634922695583 +213 5.765165748063404 +214 5.764698090466453 +215 5.7642319446858705 +216 5.763767305522167 +217 5.7633041677951375 +218 5.76284252634378 +219 5.7623823760262125 +220 5.761923711719595 +221 5.761466528320036 +222 5.761010820742529 +223 5.760556583920851 +224 5.760103812807501 +225 5.7596525023736085 +226 5.75920264760886 +227 5.7587542435214125 +228 5.758307285137822 +229 5.757861767502962 +230 5.757417685679945 +231 5.756975034750045 +232 5.756533809812629 +233 5.7560940059850605 +234 5.755655618402643 +235 5.755218642218536 +236 5.754783072603675 +237 5.754348904746708 +238 5.753916133853907 +239 5.753484755149106 +240 5.753054763873616 +241 5.752626155286164 +242 5.752198924662805 +243 5.751773067296865 +244 5.751348578498851 +245 5.750925453596398 +246 5.750503687934182 +247 5.75008327687385 +248 5.749664215793967 +249 5.749246500089917 +250 5.748830125173857 +251 5.748415086474635 +252 5.748001379437719 +253 5.747588999525135 +254 5.747177942215398 +255 5.746768203003436 +256 5.746359777400528 +257 5.745952660934234 +258 5.745546849148331 +259 5.745142337602737 +260 5.744739121873456 +261 5.744337197552506 +262 5.743936560247846 +263 5.743537205583326 +264 5.743139129198609 +265 5.742742326749108 +266 5.742346793905922 +267 5.741952526355775 +268 5.7415595198009495 +269 5.7411677699592225 +270 5.740777272563797 +271 5.740388023363252 +272 5.740000018121467 +273 5.739613252617565 +274 5.739227722645847 +275 5.738843424015734 +276 5.738460352551703 +277 5.738078504093233 +278 5.737697874494728 +279 5.7373184596254685 +280 5.7369402553695545 +281 5.73656325762583 +282 5.736187462307842 +283 5.735812865343766 +284 5.735439462676354 +285 5.735067250262873 +286 5.734696224075048 +287 5.734326380099003 +288 5.733957714335206 +289 5.733590222798405 +290 5.733223901517574 +291 5.732858746535858 +292 5.732494753910512 +293 5.732131919712846 +294 5.731770240028169 +295 5.7314097109557345 +296 5.731050328608681 +297 5.73069208911398 +298 5.730334988612376 +299 5.7299790232583385 +300 5.729624189220004 +301 5.729270482679112 +302 5.728917899830976 +303 5.728566436884396 +304 5.728216090061634 +305 5.727866855598344 +306 5.727518729743523 +307 5.727171708759462 +308 5.726825788921689 +309 5.726480966518913 +310 5.726137237852981 +311 5.725794599238826 +312 5.725453047004399 +313 5.725112577490639 +314 5.724773187051408 +315 5.724434872053448 +316 5.724097628876324 +317 5.723761453912376 +318 5.723426343566672 +319 5.723092294256951 +320 5.722759302413582 +321 5.722427364479507 +322 5.7220964769101945 +323 5.721766636173593 +324 5.721437838750077 +325 5.721110081132403 +326 5.7207833598256626 +327 5.720457671347226 +328 5.720133012226701 +329 5.719809379005887 +330 5.719486768238719 +331 5.719165176491231 +332 5.718844600341499 +333 5.718525036379604 +334 5.718206481207576 +335 5.717888931439356 +336 5.717572383700743 +337 5.717256834629353 +338 5.716942280874572 +339 5.716628719097506 +340 5.716316145970943 +341 5.716004558179305 +342 5.715693952418603 +343 5.715384325396389 +344 5.715075673831717 +345 5.714767994455098 +346 5.7144612840084505 +347 5.7141555392450645 +348 5.713850756929551 +349 5.713546933837804 +350 5.713244066756955 +351 5.712942152485327 +352 5.712641187832398 +353 5.712341169618751 +354 5.712042094676041 +355 5.711743959846936 +356 5.711446761985104 +357 5.711150497955137 +358 5.710855164632534 +359 5.710560758903648 +360 5.710267277665648 +361 5.709974717826482 +362 5.709683076304822 +363 5.709392350030045 +364 5.709102535942172 +365 5.70881363099184 +366 5.708525632140258 +367 5.708238536359163 +368 5.707952340630788 +369 5.707667041947816 +370 5.707382637313348 +371 5.707099123740852 +372 5.706816498254131 +373 5.70653475788729 +374 5.706253899684686 +375 5.705973920700894 +376 5.705694818000671 +377 5.705416588658912 +378 5.705139229760621 +379 5.704862738400859 +380 5.704587111684726 +381 5.704312346727303 +382 5.704038440653627 +383 5.703765390598649 +384 5.703493193707203 +385 5.70322184713396 +386 5.702951348043397 +387 5.702681693609758 +388 5.70241288101702 +389 5.702144907458855 +390 5.701877770138597 +391 5.701611466269197 +392 5.7013459930732004 +393 5.701081347782698 +394 5.700817527639304 +395 5.700554529894105 +396 5.70029235180764 +397 5.700030990649861 +398 5.699770443700087 +399 5.699510708246986 +400 5.6992517815885275 +401 5.698993661031955 +402 5.698736343893755 +403 5.698479827499606 +404 5.698224109184367 +405 5.6979691862920285 +406 5.697715056175686 +407 5.697461716197498 +408 5.697209163728665 +409 5.696957396149382 +410 5.6967064108488215 +411 5.696456205225086 +412 5.696206776685182 +413 5.69595812264499 +414 5.695710240529221 +415 5.695463127771401 +416 5.695216781813821 +417 5.694971200107515 +418 5.69472638011223 +419 5.694482319296384 +420 5.6942390151370486 +421 5.693996465119897 +422 5.693754666739199 +423 5.6935136174977625 +424 5.693273314906927 +425 5.693033756486511 +426 5.692794939764794 +427 5.692556862278486 +428 5.692319521572688 +429 5.692082915200871 +430 5.691847040724838 +431 5.6916118957147 +432 5.691377477748841 +433 5.691143784413891 +434 5.690910813304693 +435 5.690678562024278 +436 5.690447028183831 +437 5.690216209402664 +438 5.689986103308181 +439 5.689756707535861 +440 5.689528019729216 +441 5.689300037539766 +442 5.6890727586270184 +443 5.68884618065842 +444 5.688620301309351 +445 5.688395118263082 +446 5.688170629210748 +447 5.687946831851319 +448 5.6877237238915805 +449 5.687501303046097 +450 5.68727956703718 +451 5.687058513594875 +452 5.686838140456915 +453 5.686618445368715 +454 5.686399426083321 +455 5.686181080361397 +456 5.6859634059712 +457 5.685746400688537 +458 5.68553006229676 +459 5.685314388586715 +460 5.68509937735674 +461 5.684885026412611 +462 5.684671333567543 +463 5.684458296642145 +464 5.684245913464399 +465 5.684034181869633 +466 5.683823099700499 +467 5.683612664806937 +468 5.68340287504616 +469 5.683193728282624 +470 5.682985222388 +471 5.6827773552411465 +472 5.682570124728098 +473 5.682363528742017 +474 5.6821575651831875 +475 5.681952231958976 +476 5.681747526983824 +477 5.681543448179202 +478 5.6813399934736 +479 5.6811371608024945 +480 5.680934948108328 +481 5.6807333533404805 +482 5.680532374455252 +483 5.680332009415825 +484 5.680132256192257 +485 5.679933112761445 +486 5.679734577107096 +487 5.67953664721972 +488 5.679339321096599 +489 5.679142596741748 +490 5.678946472165916 +491 5.678750945386546 +492 5.6785560144277545 +493 5.678361677320311 +494 5.678167932101612 +495 5.677974776815658 +496 5.6777822095130315 +497 5.677590228250873 +498 5.677398831092858 +499 5.677208016109173 +500 5.6770177813764935 +501 5.676828124977964 +502 5.676639045003171 +503 5.676450539548119 +504 5.676262606715215 +505 5.676075244613241 +506 5.6758884513573316 +507 5.675702225068953 +508 5.675516563875884 +509 5.675331465912185 +510 5.675146929318185 +511 5.674962952240455 +512 5.674779532831789 +513 5.674596669251181 +514 5.6744143596638 +515 5.674232602240971 +516 5.67405139516016 +517 5.673870736604938 +518 5.673690624764977 +519 5.673511057836015 +520 5.673332034019836 +521 5.673153551524263 +522 5.672975608563119 +523 5.672798203356214 +524 5.672621334129327 +525 5.67244499911418 +526 5.672269196548421 +527 5.672093924675602 +528 5.671919181745157 +529 5.6717449660123815 +530 5.671571275738419 +531 5.671398109190229 +532 5.671225464640578 +533 5.671053340368013 +534 5.67088173465684 +535 5.6707106457971115 +536 5.670540072084598 +537 5.670370011820777 +538 5.6702004633128045 +539 5.670031424873498 +540 5.669862894821323 +541 5.669694871480368 +542 5.66952735318032 +543 5.669360338256457 +544 5.669193825049619 +545 5.669027811906196 +546 5.668862297178101 +547 5.668697279222757 +548 5.668532756403077 +549 5.668368727087444 +550 5.668205189649687 +551 5.6680421424690755 +552 5.6678795839302865 +553 5.6677175124233985 +554 5.66755592634386 +555 5.6673948240924785 +556 5.667234204075405 +557 5.667074064704107 +558 5.666914404395359 +559 5.666755221571217 +560 5.666596514659005 +561 5.666438282091294 +562 5.666280522305886 +563 5.666123233745795 +564 5.6659664148592315 +565 5.665810064099579 +566 5.665654179925385 +567 5.665498760800327 +568 5.665343805193224 +569 5.665189311577982 +570 5.665035278433608 +571 5.664881704244174 +572 5.66472858749881 +573 5.664575926691678 +574 5.6644237203219605 +575 5.664271966893842 +576 5.664120664916492 +577 5.663969812904048 +578 5.663819409375598 +579 5.663669452855162 +580 5.6635199418716775 +581 5.663370874958986 +582 5.663222250655805 +583 5.663074067505725 +584 5.662926324057183 +585 5.662779018863452 +586 5.6626321504826205 +587 5.662485717477575 +588 5.662339718415993 +589 5.662194151870311 +590 5.6620490164177255 +591 5.661904310640162 +592 5.661760033124268 +593 5.6616161824613975 +594 5.661472757247582 +595 5.661329756083534 +596 5.661187177574617 +597 5.661045020330834 +598 5.660903282966811 +599 5.660761964101785 +600 5.660621062359581 +601 5.660480576368606 +602 5.660340504761821 +603 5.660200846176738 +604 5.660061599255398 +605 5.6599227626443565 +606 5.659784334994667 +607 5.659646314961868 +608 5.659508701205969 +609 5.659371492391429 +610 5.659234687187151 +611 5.659098284266453 +612 5.658962282307074 +613 5.658826679991135 +614 5.658691476005143 +615 5.658556669039964 +616 5.658422257790814 +617 5.658288240957251 +618 5.65815461724314 +619 5.658021385356659 +620 5.657888544010276 +621 5.657756091920735 +622 5.657624027809037 +623 5.6574923504004335 +624 5.65736105842441 +625 5.657230150614671 +626 5.657099625709117 +627 5.656969482449849 +628 5.6568397195831395 +629 5.656710335859419 +630 5.65658133003327 +631 5.656452700863409 +632 5.656324447112667 +633 5.656196567547986 +634 5.656069060940399 +635 5.655941926065013 +636 5.655815161701005 +637 5.655688766631598 +638 5.655562739644054 +639 5.6554370795296585 +640 5.655311785083704 +641 5.655186855105484 +642 5.655062288398268 +643 5.654938083769302 +644 5.654814240029783 +645 5.654690755994855 +646 5.654567630483584 +647 5.654444862318956 +648 5.654322450327866 +649 5.654200393341088 +650 5.6540786901932805 +651 5.653957339722964 +652 5.6538363407725045 +653 5.653715692188111 +654 5.653595392819817 +655 5.653475441521467 +656 5.653355837150703 +657 5.653236578568955 +658 5.653117664641427 +659 5.652999094237082 +660 5.652880866228633 +661 5.652762979492527 +662 5.652645432908939 +663 5.6525282253617455 +664 5.652411355738529 +665 5.652294822930555 +666 5.652178625832761 +667 5.652062763343746 +668 5.651947234365765 +669 5.651832037804697 +670 5.651717172570054 +671 5.651602637574957 +672 5.651488431736128 +673 5.651374553973878 +674 5.651261003212089 +675 5.651147778378215 +676 5.651034878403255 +677 5.65092230222175 +678 5.650810048771772 +679 5.650698116994906 +680 5.6505865058362446 +681 5.65047521424437 +682 5.650364241171346 +683 5.650253585572711 +684 5.650143246407456 +685 5.650033222638019 +686 5.649923513230274 +687 5.649814117153518 +688 5.649705033380462 +689 5.649596260887212 +690 5.6494877986532686 +691 5.649379645661508 +692 5.649271800898173 +693 5.649164263352861 +694 5.649057032018515 +695 5.648950105891407 +696 5.648843483971136 +697 5.648737165260609 +698 5.648631148766032 +699 5.648525433496898 +700 5.648420018465982 +701 5.6483149026893225 +702 5.6482100851862125 +703 5.648105564979193 +704 5.648001341094036 +705 5.647897412559741 +706 5.647793778408513 +707 5.647690437675763 +708 5.647587389400096 +709 5.6474846326232875 +710 5.647382166390293 +711 5.647279989749226 +712 5.647178101751339 +713 5.647076501451035 +714 5.646975187905834 +715 5.64687416017638 +716 5.646773417326425 +717 5.646672958422808 +718 5.646572782535467 +719 5.646472888737404 +720 5.646373276104695 +721 5.646273943716465 +722 5.646174890654892 +723 5.64607611600518 +724 5.645977618855564 +725 5.645879398297292 +726 5.6457814534246165 +727 5.645683783334787 +728 5.6455863871280325 +729 5.6454892639075664 +730 5.645392412779554 +731 5.645295832853126 +732 5.645199523240356 +733 5.645103483056252 +734 5.645007711418746 +735 5.644912207448689 +736 5.644816970269838 +737 5.644721999008846 +738 5.644627292795247 +739 5.6445328507614665 +740 5.644438672042783 +741 5.644344755777341 +742 5.644251101106134 +743 5.644157707172991 +744 5.644064573124572 +745 5.64397169811036 +746 5.643879081282648 +747 5.643786721796526 +748 5.643694618809882 +749 5.643602771483385 +750 5.64351117898048 +751 5.643419840467371 +752 5.643328755113026 +753 5.643237922089149 +754 5.643147340570188 +755 5.643057009733319 +756 5.642966928758435 +757 5.642877096828139 +758 5.642787513127735 +759 5.6426981768452205 +760 5.642609087171273 +761 5.642520243299247 +762 5.642431644425161 +763 5.642343289747691 +764 5.642255178468162 +765 5.642167309790529 +766 5.642079682921388 +767 5.641992297069951 +768 5.641905151448043 +769 5.641818245270093 +770 5.641731577753125 +771 5.641645148116755 +772 5.641558955583169 +773 5.641472999377123 +774 5.641387278725941 +775 5.641301792859494 +776 5.6412165410101975 +777 5.641131522413005 +778 5.6410467363053955 +779 5.640962181927367 +780 5.640877858521427 +781 5.640793765332587 +782 5.640709901608349 +783 5.6406262665987095 +784 5.64054285955613 +785 5.640459679735548 +786 5.640376726394361 +787 5.640293998792421 +788 5.640211496192022 +789 5.640129217857891 +790 5.640047163057193 +791 5.639965331059506 +792 5.639883721136825 +793 5.6398023325635425 +794 5.639721164616454 +795 5.63964021657474 +796 5.639559487719967 +797 5.639478977336065 +798 5.6393986847093345 +799 5.639318609128436 +800 5.639238749884372 +801 5.63915910627049 +802 5.639079677582474 +803 5.639000463118327 +804 5.6389214621783745 +805 5.6388426740652555 +806 5.638764098083904 +807 5.638685733541557 +808 5.638607579747733 +809 5.638529636014235 +810 5.638451901655137 +811 5.638374375986777 +812 5.638297058327751 +813 5.6382199479989055 +814 5.63814304432333 +815 5.63806634662635 +816 5.637989854235514 +817 5.637913566480594 +818 5.63783748269358 +819 5.637761602208657 +820 5.637685924362216 +821 5.63761044849284 +822 5.637535173941289 +823 5.637460100050504 +824 5.637385226165601 +825 5.6373105516338455 +826 5.637236075804668 +827 5.637161798029643 +828 5.637087717662487 +829 5.637013834059051 +830 5.636940146577311 +831 5.636866654577363 +832 5.636793357421418 +833 5.636720254473787 +834 5.63664734510089 +835 5.636574628671224 +836 5.636502104555383 +837 5.636429772126036 +838 5.636357630757919 +839 5.636285679827839 +840 5.636213918714654 +841 5.636142346799279 +842 5.636070963464661 +843 5.6359997680957985 +844 5.635928760079713 +845 5.635857938805449 +846 5.6357873036640695 +847 5.635716854048647 +848 5.635646589354261 +849 5.635576508977982 +850 5.635506612318874 +851 5.635436898777987 +852 5.635367367758343 +853 5.6352980186649395 +854 5.635228850904736 +855 5.635159863886648 +856 5.635091057021547 +857 5.635022429722241 +858 5.634953981403488 +859 5.634885711481967 +860 5.634817619376287 +861 5.63474970450698 +862 5.634681966296483 +863 5.634614404169143 +864 5.634547017551211 +865 5.634479805870823 +866 5.634412768558015 +867 5.634345905044691 +868 5.634279214764641 +869 5.634212697153517 +870 5.634146351648836 +871 5.634080177689973 +872 5.634014174718153 +873 5.633948342176444 +874 5.633882679509753 +875 5.633817186164819 +876 5.633751861590209 +877 5.633686705236307 +878 5.633621716555313 +879 5.633556895001233 +880 5.633492240029882 +881 5.633427751098862 +882 5.63336342766757 +883 5.633299269197186 +884 5.63323527515067 +885 5.633171444992756 +886 5.633107778189936 +887 5.633044274210476 +888 5.632980932524385 +889 5.632917752603431 +890 5.632854733921118 +891 5.632791875952687 +892 5.632729178175124 +893 5.6326666400671215 +894 5.632604261109112 +895 5.6325420407832265 +896 5.632479978573315 +897 5.63241807396493 +898 5.632356326445316 +899 5.632294735503418 +900 5.632233300629861 +901 5.632172021316956 +902 5.632110897058686 +903 5.632049927350705 +904 5.6319891116903325 +905 5.631928449576547 +906 5.631867940509979 +907 5.6318075839929085 +908 5.631747379529258 +909 5.631687326624585 +910 5.631627424786082 +911 5.631567673522568 +912 5.631508072344479 +913 5.631448620763872 +914 5.631389318294408 +915 5.6313301644513585 +916 5.631271158751592 +917 5.631212300713574 +918 5.631153589857355 +919 5.631095025704575 +920 5.631036607778443 +921 5.630978335603753 +922 5.630920208706863 +923 5.63086222661569 +924 5.630804388859713 +925 5.630746694969963 +926 5.630689144479019 +927 5.630631736921002 +928 5.6305744718315704 +929 5.6305173487479125 +930 5.630460367208749 +931 5.6304035267543195 +932 5.630346826926384 +933 5.630290267268206 +934 5.63023384732457 +935 5.630177566641749 +936 5.6301214247675215 +937 5.630065421251157 +938 5.630009555643411 +939 5.6299538274965215 +940 5.6298982363642045 +941 5.629842781801649 +942 5.629787463365514 +943 5.629732280613917 +944 5.629677233106434 +945 5.629622320404097 +946 5.629567542069388 +947 5.629512897666229 +948 5.62945838675998 +949 5.629404008917441 +950 5.629349763706836 +951 5.6292956506978165 +952 5.629241669461452 +953 5.629187819570231 +954 5.629134100598049 +955 5.629080512120206 +956 5.6290270537134095 +957 5.6289737249557605 +958 5.628920525426751 +959 5.62886745470726 +960 5.628814512379556 +961 5.628761698027274 +962 5.628709011235437 +963 5.628656451590426 +964 5.628604018679988 +965 5.628551712093238 +966 5.628499531420642 +967 5.628447476254012 +968 5.628395546186516 +969 5.628343740812658 +970 5.628292059728284 +971 5.628240502530572 +972 5.628189068818024 +973 5.628137758190476 +974 5.62808657024908 +975 5.628035504596301 +976 5.62798456083592 +977 5.627933738573023 +978 5.6278830374140005 +979 5.627832456966539 +980 5.627781996839624 +981 5.627731656643527 +982 5.627681435989803 +983 5.627631334491297 +984 5.6275813517621245 +985 5.627531487417675 +986 5.627481741074611 +987 5.627432112350855 +988 5.627382600865591 +989 5.62733320623926 +990 5.627283928093556 +991 5.627234766051421 +992 5.627185719737042 +993 5.62713678877584 +994 5.627087972794481 +995 5.627039271420852 +996 5.626990684284079 +997 5.626942211014503 +998 5.626893851243688 +999 5.62684560460441 +1000 5.626797470730665 +1001 5.626749449257646 +1002 5.626701539821756 +1003 5.626653742060597 +1004 5.626606055612962 +1005 5.626558480118842 +1006 5.6265110152194096 +1007 5.626463660557025 +1008 5.626416415775228 +1009 5.626369280518734 +1010 5.626322254433425 +1011 5.626275337166363 +1012 5.626228528365761 +1013 5.626181827681004 +1014 5.626135234762624 +1015 5.62608874926231 +1016 5.626042370832904 +1017 5.625996099128386 +1018 5.62594993380388 +1019 5.625903874515648 +1020 5.625857920921088 +1021 5.625812072678725 +1022 5.625766329448212 +1023 5.625720690890322 +1024 5.625675156666951 +1025 5.625629726441106 +1026 5.625584399876908 +1027 5.625539176639588 +1028 5.6254940563954765 +1029 5.625449038812006 +1030 5.6254041235577095 +1031 5.6253593103022075 +1032 5.625314598716216 +1033 5.62526998847153 +1034 5.625225479241033 +1035 5.625181070698689 +1036 5.625136762519528 +1037 5.625092554379664 +1038 5.625048445956266 +1039 5.625004436927579 +1040 5.624960526972904 +1041 5.6249167157726 +1042 5.62487300300808 +1043 5.6248293883618095 +1044 5.624785871517298 +1045 5.6247424521591025 +1046 5.624699129972818 +1047 5.624655904645078 +1048 5.624612775863545 +1049 5.624569743316917 +1050 5.624526806694917 +1051 5.624483965688288 +1052 5.624441219988798 +1053 5.6243985692892275 +1054 5.624356013283373 +1055 5.624313551666038 +1056 5.624271184133033 +1057 5.624228910381174 +1058 5.624186730108274 +1059 5.624144643013141 +1060 5.624102648795583 +1061 5.624060747156388 +1062 5.6240189377973415 +1063 5.623977220421205 +1064 5.623935594731719 +1065 5.623894060433608 +1066 5.623852617232563 +1067 5.6238112648352505 +1068 5.623770002949298 +1069 5.623728831283307 +1070 5.623687749546828 +1071 5.623646757450374 +1072 5.623605854705419 +1073 5.62356504102438 +1074 5.623524316120623 +1075 5.623483679708464 +1076 5.623443131503153 +1077 5.623402671220885 +1078 5.623362298578791 +1079 5.623322013294933 +1080 5.623281815088298 +1081 5.623241703678804 +1082 5.623201678787295 +1083 5.62316174013553 +1084 5.623121887446187 +1085 5.623082120442859 +1086 5.6230424388500495 +1087 5.62300284239317 +1088 5.622963330798537 +1089 5.622923903793371 +1090 5.622884561105787 +1091 5.622845302464805 +1092 5.622806127600326 +1093 5.622767036243154 +1094 5.622728028124971 +1095 5.622689102978347 +1096 5.622650260536735 +1097 5.622611500534461 +1098 5.622572822706735 +1099 5.62253422678963 +1100 5.622495712520099 +1101 5.622457279635952 +1102 5.622418927875872 +1103 5.622380656979399 +1104 5.622342466686931 +1105 5.622304356739719 +1106 5.622266326879876 +1107 5.622228376850353 +1108 5.62219050639496 +1109 5.622152715258341 +1110 5.6221150031859874 +1111 5.622077369924226 +1112 5.622039815220225 +1113 5.622002338821979 +1114 5.621964940478313 +1115 5.621927619938891 +1116 5.6218903769541875 +1117 5.621853211275507 +1118 5.621816122654971 +1119 5.6217791108455195 +1120 5.621742175600906 +1121 5.621705316675692 +1122 5.621668533825256 +1123 5.621631826805771 +1124 5.6215951953742245 +1125 5.621558639288397 +1126 5.62152215830687 +1127 5.621485752189021 +1128 5.621449420695018 +1129 5.621413163585823 +1130 5.621376980623176 +1131 5.621340871569616 +1132 5.621304836188456 +1133 5.621268874243786 +1134 5.621232985500483 +1135 5.621197169724187 +1136 5.621161426681317 +1137 5.621125756139062 +1138 5.621090157865372 +1139 5.621054631628967 +1140 5.62101917719933 +1141 5.620983794346696 +1142 5.620948482842062 +1143 5.6209132424571795 +1144 5.62087807296455 +1145 5.620842974137425 +1146 5.620807945749801 +1147 5.620772987576423 +1148 5.620738099392774 +1149 5.620703280975077 +1150 5.620668532100295 +1151 5.6206338525461215 +1152 5.620599242090985 +1153 5.620564700514041 +1154 5.620530227595175 +1155 5.620495823114997 +1156 5.620461486854834 +1157 5.620427218596743 +1158 5.620393018123492 +1159 5.620358885218565 +1160 5.6203248196661555 +1161 5.620290821251177 +1162 5.620256889759244 +1163 5.620223024976677 +1164 5.620189226690503 +1165 5.620155494688451 +1166 5.620121828758942 +1167 5.620088228691101 +1168 5.620054694274742 +1169 5.620021225300378 +1170 5.619987821559203 +1171 5.619954482843102 +1172 5.619921208944648 +1173 5.619887999657093 +1174 5.619854854774372 +1175 5.619821774091095 +1176 5.619788757402551 +1177 5.619755804504704 +1178 5.619722915194185 +1179 5.619690089268299 +1180 5.619657326525013 +1181 5.619624626762964 +1182 5.619591989781453 +1183 5.619559415380431 +1184 5.619526903360521 +1185 5.619494453522993 +1186 5.619462065669772 +1187 5.61942973960344 +1188 5.619397475127226 +1189 5.619365272045002 +1190 5.6193331301612925 +1191 5.61930104928126 +1192 5.619269029210709 +1193 5.619237069756087 +1194 5.619205170724473 +1195 5.619173331923582 +1196 5.619141553161767 +1197 5.619109834248004 +1198 5.619078174991899 +1199 5.619046575203691 +1200 5.619015034694234 +1201 5.618983553275009 +1202 5.618952130758122 +1203 5.618920766956284 +1204 5.618889461682835 +1205 5.618858214751723 +1206 5.618827025977511 +1207 5.618795895175364 +1208 5.618764822161065 +1209 5.618733806750999 +1210 5.618702848762153 +1211 5.618671948012119 +1212 5.618641104319088 +1213 5.618610317501847 +1214 5.618579587379779 +1215 5.618548913772866 +1216 5.618518296501676 +1217 5.61848773538737 +1218 5.618457230251694 +1219 5.618426780916987 +1220 5.618396387206166 +1221 5.6183660489427325 +1222 5.618335765950767 +1223 5.61830553805493 +1224 5.618275365080457 +1225 5.618245246853158 +1226 5.618215183199421 +1227 5.618185173946198 +1228 5.618155218921008 +1229 5.6181253179519475 +1230 5.618095470867669 +1231 5.61806567749739 +1232 5.618035937670893 +1233 5.618006251218517 +1234 5.617976617971158 +1235 5.61794703776027 +1236 5.617917510417859 +1237 5.6178880357764855 +1238 5.617858613669258 +1239 5.617829243929833 +1240 5.6177999263924185 +1241 5.617770660891761 +1242 5.617741447263155 +1243 5.617712285342432 +1244 5.617683174965967 +1245 5.617654115970669 +1246 5.6176251081939865 +1247 5.617596151473901 +1248 5.617567245648923 +1249 5.617538390558096 +1250 5.617509586040997 +1251 5.617480831937722 +1252 5.617452128088896 +1253 5.617423474335668 +1254 5.617394870519711 +1255 5.617366316483208 +1256 5.617337812068875 +1257 5.617309357119936 +1258 5.617280951480129 +1259 5.61725259499371 +1260 5.617224287505444 +1261 5.617196028860603 +1262 5.617167818904974 +1263 5.617139657484845 +1264 5.6171115444470106 +1265 5.617083479638769 +1266 5.617055462907917 +1267 5.617027494102755 +1268 5.616999573072081 +1269 5.6169716996651875 +1270 5.616943873731861 +1271 5.616916095122386 +1272 5.616888363687532 +1273 5.616860679278565 +1274 5.616833041747235 +1275 5.616805450945778 +1276 5.61677790672692 +1277 5.616750408943867 +1278 5.616722957450306 +1279 5.616695552100406 +1280 5.616668192748814 +1281 5.616640879250655 +1282 5.616613611461528 +1283 5.616586389237505 +1284 5.616559212435137 +1285 5.616532080911437 +1286 5.6165049945238925 +1287 5.616477953130455 +1288 5.616450956589546 +1289 5.6164240047600495 +1290 5.616397097501315 +1291 5.616370234673148 +1292 5.6163434161358206 +1293 5.616316641750059 +1294 5.616289911377047 +1295 5.6162632248784226 +1296 5.616236582116283 +1297 5.616209982953172 +1298 5.6161834272520865 +1299 5.616156914876472 +1300 5.616130445690226 +1301 5.616104019557687 +1302 5.616077636343638 +1303 5.616051295913312 +1304 5.616024998132379 +1305 5.6159987428669496 +1306 5.615972529983573 +1307 5.615946359349239 +1308 5.615920230831373 +1309 5.615894144297831 +1310 5.61586809961691 +1311 5.615842096657331 +1312 5.61581613528825 +1313 5.615790215379247 +1314 5.615764336800336 +1315 5.615738499421955 +1316 5.615712703114964 +1317 5.6156869477506515 +1318 5.615661233200721 +1319 5.6156355593373 +1320 5.61560992603294 +1321 5.6155843331606 +1322 5.615558780593666 +1323 5.6155332682059305 +1324 5.615507795871602 +1325 5.615482363465307 +1326 5.615456970862073 +1327 5.615431617937345 +1328 5.615406304566972 +1329 5.615381030627211 +1330 5.6153557959947245 +1331 5.615330600546581 +1332 5.615305444160244 +1333 5.615280326713592 +1334 5.615255248084887 +1335 5.615230208152804 +1336 5.615205206796411 +1337 5.615180243895169 +1338 5.615155319328933 +1339 5.615130432977958 +1340 5.615105584722885 +1341 5.615080774444751 +1342 5.615056002024976 +1343 5.615031267345376 +1344 5.615006570288149 +1345 5.61498191073588 +1346 5.614957288571537 +1347 5.614932703678475 +1348 5.614908155940428 +1349 5.614883645241509 +1350 5.614859171466215 +1351 5.614834734499414 +1352 5.61481033422636 +1353 5.614785970532678 +1354 5.614761643304366 +1355 5.614737352427796 +1356 5.614713097789714 +1357 5.614688879277235 +1358 5.614664696777842 +1359 5.614640550179388 +1360 5.614616439370094 +1361 5.614592364238545 +1362 5.614568324673689 +1363 5.6145443205648435 +1364 5.61452035180168 +1365 5.614496418274238 +1366 5.614472519872912 +1367 5.614448656488455 +1368 5.614424828011984 +1369 5.614401034334962 +1370 5.6143772753492165 +1371 5.614353550946921 +1372 5.614329861020609 +1373 5.614306205463157 +1374 5.614282584167803 +1375 5.614258997028122 +1376 5.6142354439380435 +1377 5.614211924791844 +1378 5.6141884394841455 +1379 5.6141649879099145 +1380 5.614141569964455 +1381 5.614118185543424 +1382 5.614094834542811 +1383 5.614071516858952 +1384 5.614048232388514 +1385 5.614024981028509 +1386 5.6140017626762795 +1387 5.613978577229512 +1388 5.6139554245862175 +1389 5.613932304644746 +1390 5.61390921730378 +1391 5.613886162462332 +1392 5.61386314001974 +1393 5.613840149875681 +1394 5.613817191930153 +1395 5.613794266083476 +1396 5.613771372236308 +1397 5.613748510289621 +1398 5.613725680144715 +1399 5.613702881703212 +1400 5.613680114867056 +1401 5.613657379538509 +1402 5.613634675620152 +1403 5.61361200301489 +1404 5.613589361625937 +1405 5.61356675135683 +1406 5.613544172111413 +1407 5.613521623793854 +1408 5.613499106308626 +1409 5.613476619560515 +1410 5.613454163454625 +1411 5.613431737896359 +1412 5.613409342791435 +1413 5.613386978045882 +1414 5.613364643566024 +1415 5.613342339258505 +1416 5.613320065030264 +1417 5.613297820788546 +1418 5.613275606440901 +1419 5.61325342189518 +1420 5.613231267059531 +1421 5.613209141842406 +1422 5.6131870461525555 +1423 5.613164979899023 +1424 5.613142942991155 +1425 5.613120935338591 +1426 5.613098956851262 +1427 5.6130770074394025 +1428 5.613055087013526 +1429 5.613033195484448 +1430 5.613011332763275 +1431 5.612989498761395 +1432 5.612967693390494 +1433 5.612945916562541 +1434 5.612924168189794 +1435 5.612902448184797 +1436 5.6128807564603775 +1437 5.61285909292965 +1438 5.612837457506009 +1439 5.612815850103134 +1440 5.612794270634984 +1441 5.612772719015801 +1442 5.612751195160101 +1443 5.612729698982687 +1444 5.612708230398633 +1445 5.612686789323293 +1446 5.612665375672296 +1447 5.6126439893615405 +1448 5.612622630307211 +1449 5.612601298425756 +1450 5.612579993633895 +1451 5.612558715848628 +1452 5.612537464987216 +1453 5.612516240967193 +1454 5.6124950437063665 +1455 5.6124738731228 +1456 5.612452729134835 +1457 5.6124316116610755 +1458 5.612410520620387 +1459 5.612389455931906 +1460 5.612368417515026 +1461 5.612347405289404 +1462 5.612326419174963 +1463 5.612305459091882 +1464 5.612284524960601 +1465 5.612263616701821 +1466 5.612242734236499 +1467 5.612221877485851 +1468 5.612201046371348 +1469 5.612180240814714 +1470 5.612159460737935 +1471 5.612138706063243 +1472 5.612117976713132 +1473 5.612097272610336 +1474 5.612076593677851 +1475 5.61205593983892 +1476 5.612035311017035 +1477 5.612014707135937 +1478 5.611994128119614 +1479 5.611973573892308 +1480 5.611953044378494 +1481 5.6119325395029085 +1482 5.611912059190519 +1483 5.611891603366548 +1484 5.611871171956453 +1485 5.611850764885939 +1486 5.6118303820809485 +1487 5.611810023467667 +1488 5.611789688972523 +1489 5.61176937852218 +1490 5.611749092043537 +1491 5.611728829463737 +1492 5.61170859071016 +1493 5.611688375710418 +1494 5.611668184392357 +1495 5.611648016684063 +1496 5.61162787251385 +1497 5.611607751810274 +1498 5.6115876545021095 +1499 5.611567580518374 +1500 5.611547529788309 +1501 5.61152750224139 +1502 5.611507497807322 +1503 5.6114875164160285 +1504 5.611467557997676 +1505 5.611447622482649 +1506 5.611427709801555 +1507 5.611407819885235 +1508 5.611387952664749 +1509 5.611368108071383 +1510 5.611348286036646 +1511 5.6113284864922655 +1512 5.611308709370199 +1513 5.6112889546026175 +1514 5.611269222121914 +1515 5.611249511860702 +1516 5.611229823751812 +1517 5.6112101577283 +1518 5.6111905137234235 +1519 5.611170891670673 +1520 5.611151291503745 +1521 5.6111317131565555 +1522 5.611112156563232 +1523 5.611092621658118 +1524 5.611073108375768 +1525 5.611053616650951 +1526 5.611034146418646 +1527 5.611014697614046 +1528 5.610995270172545 +1529 5.610975864029759 +1530 5.610956479121505 +1531 5.610937115383809 +1532 5.610917772752907 +1533 5.610898451165239 +1534 5.610879150557452 +1535 5.610859870866401 +1536 5.61084061202914 +1537 5.610821373982931 +1538 5.6108021566652395 +1539 5.610782960013732 +1540 5.61076378396628 +1541 5.61074462846095 +1542 5.610725493436017 +1543 5.610706378829951 +1544 5.610687284581422 +1545 5.610668210629301 +1546 5.610649156912652 +1547 5.610630123370743 +1548 5.610611109943035 +1549 5.610592116569184 +1550 5.610573143189043 +1551 5.610554189742661 +1552 5.61053525617028 +1553 5.610516342412335 +1554 5.610497448409453 +1555 5.610478574102457 +1556 5.610459719432354 +1557 5.610440884340353 +1558 5.610422068767843 +1559 5.610403272656409 +1560 5.610384495947823 +1561 5.610365738584045 +1562 5.610347000507223 +1563 5.610328281659695 +1564 5.610309581983978 +1565 5.610290901422784 +1566 5.610272239919004 +1567 5.610253597415721 +1568 5.6102349738561905 +1569 5.6102163691838625 +1570 5.610197783342365 +1571 5.610179216275508 +1572 5.6101606679272855 +1573 5.610142138241871 +1574 5.610123627163617 +1575 5.610105134637061 +1576 5.610086660606915 +1577 5.610068205018068 +1578 5.610049767815597 +1579 5.610031348944746 +1580 5.61001294835094 +1581 5.609994565979781 +1582 5.6099762017770445 +1583 5.6099578556886875 +1584 5.60993952766083 +1585 5.609921217639779 +1586 5.6099029255720065 +1587 5.60988465140416 +1588 5.609866395083062 +1589 5.6098481565556995 +1590 5.609829935769236 +1591 5.609811732671009 +1592 5.609793547208519 +1593 5.609775379329438 +1594 5.6097572289816116 +1595 5.6097390961130476 +1596 5.609720980671924 +1597 5.609702882606588 +1598 5.609684801865551 +1599 5.60966673839749 +1600 5.609648692151254 +1601 5.609630663075846 +1602 5.609612651120443 +1603 5.609594656234385 +1604 5.60957667836717 +1605 5.609558717468463 +1606 5.60954077348809 +1607 5.6095228463760405 +1608 5.609504936082465 +1609 5.6094870425576735 +1610 5.609469165752136 +1611 5.609451305616485 +1612 5.6094334621015065 +1613 5.609415635158155 +1614 5.609397824737531 +1615 5.609380030790904 +1616 5.609362253269691 +1617 5.609344492125473 +1618 5.609326747309983 +1619 5.609309018775112 +1620 5.609291306472901 +1621 5.609273610355556 +1622 5.609255930375424 +1623 5.609238266485016 +1624 5.609220618636989 +1625 5.609202986784157 +1626 5.609185370879486 +1627 5.609167770876089 +1628 5.609150186727234 +1629 5.60913261838634 +1630 5.6091150658069715 +1631 5.60909752894285 +1632 5.609080007747838 +1633 5.609062502175952 +1634 5.609045012181354 +1635 5.6090275377183545 +1636 5.609010078741411 +1637 5.608992635205128 +1638 5.608975207064256 +1639 5.608957794273687 +1640 5.608940396788467 +1641 5.60892301456378 +1642 5.6089056475549555 +1643 5.608888295717467 +1644 5.608870959006931 +1645 5.608853637379108 +1646 5.608836330789899 +1647 5.608819039195349 +1648 5.608801762551642 +1649 5.608784500815105 +1650 5.608767253942204 +1651 5.608750021889546 +1652 5.608732804613878 +1653 5.608715602072082 +1654 5.608698414221184 +1655 5.608681241018346 +1656 5.608664082420866 +1657 5.608646938386184 +1658 5.608629808871872 +1659 5.60861269383564 +1660 5.608595593235332 +1661 5.608578507028934 +1662 5.608561435174558 +1663 5.608544377630457 +1664 5.608527334355017 +1665 5.608510305306753 +1666 5.6084932904443185 +1667 5.608476289726504 +1668 5.60845930311222 +1669 5.608442330560515 +1670 5.608425372030574 +1671 5.608408427481707 +1672 5.608391496873356 +1673 5.608374580165094 +1674 5.608357677316624 +1675 5.608340788287775 +1676 5.608323913038509 +1677 5.608307051528916 +1678 5.608290203719213 +1679 5.608273369569744 +1680 5.608256549040981 +1681 5.608239742093524 +1682 5.608222948688097 +1683 5.608206168785551 +1684 5.608189402346864 +1685 5.608172649333138 +1686 5.608155909705601 +1687 5.6081391834256 +1688 5.608122470454614 +1689 5.608105770754241 +1690 5.6080890842862 +1691 5.608072411012338 +1692 5.608055750894622 +1693 5.608039103895139 +1694 5.608022469976101 +1695 5.608005849099836 +1696 5.607989241228799 +1697 5.607972646325562 +1698 5.607956064352816 +1699 5.607939495273373 +1700 5.607922939050168 +1701 5.607906395646243 +1702 5.607889865024773 +1703 5.607873347149039 +1704 5.607856841982447 +1705 5.607840349488518 +1706 5.60782386963089 +1707 5.607807402373314 +1708 5.607790947679664 +1709 5.607774505513923 +1710 5.607758075840193 +1711 5.60774165862269 +1712 5.607725253825744 +1713 5.607708861413801 +1714 5.607692481351416 +1715 5.607676113603265 +1716 5.607659758134132 +1717 5.607643414908911 +1718 5.607627083892615 +1719 5.607610765050367 +1720 5.607594458347399 +1721 5.607578163749053 +1722 5.607561881220787 +1723 5.607545610728165 +1724 5.607529352236866 +1725 5.607513105712673 +1726 5.607496871121482 +1727 5.607480648429297 +1728 5.60746443760223 +1729 5.607448238606505 +1730 5.607432051408447 +1731 5.607415875974495 +1732 5.607399712271193 +1733 5.607383560265191 +1734 5.607367419923246 +1735 5.607351291212224 +1736 5.607335174099091 +1737 5.6073190685509235 +1738 5.6073029745349015 +1739 5.607286892018312 +1740 5.607270820968543 +1741 5.607254761353085 +1742 5.60723871313954 +1743 5.607222676295605 +1744 5.607206650789088 +1745 5.60719063658789 +1746 5.6071746336600246 +1747 5.607158641973603 +1748 5.607142661496836 +1749 5.607126692198042 +1750 5.60711073404563 +1751 5.60709478700812 +1752 5.607078851054132 +1753 5.607062926152378 +1754 5.607047012271675 +1755 5.6070311093809435 +1756 5.607015217449193 +1757 5.606999336445543 +1758 5.606983466339202 +1759 5.606967607099484 +1760 5.606951758695795 +1761 5.606935921097643 +1762 5.606920094274628 +1763 5.606904278196456 +1764 5.606888472832918 +1765 5.606872678153911 +1766 5.6068568941294235 +1767 5.606841120729538 +1768 5.606825357924437 +1769 5.606809605684394 +1770 5.606793863979778 +1771 5.606778132781057 +1772 5.606762412058784 +1773 5.6067467017836154 +1774 5.606731001926294 +1775 5.606715312457657 +1776 5.60669963334864 +1777 5.606683964570264 +1778 5.6066683060936455 +1779 5.6066526578899945 +1780 5.6066370199306075 +1781 5.606621392186881 +1782 5.606605774630294 +1783 5.606590167232416 +1784 5.606574569964917 +1785 5.606558982799546 +1786 5.606543405708151 +1787 5.606527838662659 +1788 5.606512281635096 +1789 5.606496734597574 +1790 5.606481197522292 +1791 5.606465670381538 +1792 5.606450153147689 +1793 5.606434645793209 +1794 5.60641914829065 +1795 5.606403660612653 +1796 5.606388182731942 +1797 5.606372714621332 +1798 5.6063572562537205 +1799 5.606341807602094 +1800 5.6063263686395235 +1801 5.606310939339165 +1802 5.606295519674263 +1803 5.606280109618141 +1804 5.606264709144217 +1805 5.606249318225979 +1806 5.606233936837016 +1807 5.6062185649509875 +1808 5.606203202541643 +1809 5.606187849582812 +1810 5.606172506048413 +1811 5.606157171912443 +1812 5.606141847148977 +1813 5.6061265317321824 +1814 5.606111225636301 +1815 5.606095928835661 +1816 5.606080641304668 +1817 5.6060653630178106 +1818 5.60605009394966 +1819 5.606034834074865 +1820 5.606019583368157 +1821 5.606004341804349 +1822 5.60598910935833 +1823 5.605973886005068 +1824 5.605958671719617 +1825 5.605943466477106 +1826 5.60592827025274 +1827 5.605913083021808 +1828 5.605897904759673 +1829 5.605882735441779 +1830 5.605867575043648 +1831 5.605852423540876 +1832 5.605837280909139 +1833 5.605822147124194 +1834 5.605807022161864 +1835 5.6057919059980605 +1836 5.6057767986087645 +1837 5.605761699970035 +1838 5.605746610058008 +1839 5.6057315288488905 +1840 5.605716456318971 +1841 5.605701392444606 +1842 5.605686337202236 +1843 5.605671290568369 +1844 5.605656252519591 +1845 5.605641223032556 +1846 5.605626202084004 +1847 5.605611189650734 +1848 5.605596185709629 +1849 5.6055811902376425 +1850 5.605566203211798 +1851 5.605551224609196 +1852 5.605536254407008 +1853 5.605521292582475 +1854 5.605506339112914 +1855 5.60549139397571 +1856 5.605476457148322 +1857 5.605461528608282 +1858 5.605446608333187 +1859 5.6054316963007125 +1860 5.605416792488601 +1861 5.60540189687466 +1862 5.605387009436776 +1863 5.6053721301529045 +1864 5.605357259001065 +1865 5.6053423959593465 +1866 5.605327541005915 +1867 5.605312694118998 +1868 5.605297855276895 +1869 5.605283024457975 +1870 5.605268201640672 +1871 5.605253386803492 +1872 5.605238579925004 +1873 5.6052237809838505 +1874 5.605208989958738 +1875 5.6051942068284415 +1876 5.605179431571799 +1877 5.605164664167722 +1878 5.605149904595185 +1879 5.6051351528332285 +1880 5.6051204088609605 +1881 5.6051056726575545 +1882 5.605090944202248 +1883 5.605076223474347 +1884 5.605061510453222 +1885 5.605046805118306 +1886 5.605032107449102 +1887 5.60501741742517 +1888 5.605002735026144 +1889 5.604988060231715 +1890 5.60497339302164 +1891 5.604958733375742 +1892 5.604944081273904 +1893 5.604929436696077 +1894 5.604914799622269 +1895 5.604900170032556 +1896 5.604885547907078 +1897 5.604870933226032 +1898 5.604856325969681 +1899 5.604841726118352 +1900 5.604827133652428 +1901 5.60481254855236 +1902 5.60479797079866 +1903 5.604783400371895 +1904 5.604768837252701 +1905 5.604754281421771 +1906 5.6047397328598585 +1907 5.604725191547781 +1908 5.604710657466414 +1909 5.604696130596691 +1910 5.604681610919611 +1911 5.604667098416227 +1912 5.604652593067657 +1913 5.604638094855075 +1914 5.604623603759714 +1915 5.60460911976287 +1916 5.6045946428458935 +1917 5.604580172990196 +1918 5.604565710177246 +1919 5.604551254388571 +1920 5.604536805605758 +1921 5.60452236381045 +1922 5.60450792898435 +1923 5.604493501109215 +1924 5.604479080166863 +1925 5.604464666139167 +1926 5.6044502590080585 +1927 5.604435858755526 +1928 5.604421465363611 +1929 5.604407078814416 +1930 5.604392699090097 +1931 5.604378326172869 +1932 5.604363960044998 +1933 5.604349600688812 +1934 5.604335248086688 +1935 5.604320902221066 +1936 5.604306563074432 +1937 5.604292230629335 +1938 5.604277904868374 +1939 5.604263585774207 +1940 5.6042492733295415 +1941 5.604234967517144 +1942 5.60422066831983 +1943 5.604206375720475 +1944 5.604192089702003 +1945 5.604177810247396 +1946 5.604163537339683 +1947 5.604149270961955 +1948 5.60413501109735 +1949 5.604120757729058 +1950 5.604106510840332 +1951 5.60409227041446 +1952 5.6040780364347995 +1953 5.604063808884753 +1954 5.60404958774777 +1955 5.6040353730073615 +1956 5.604021164647086 +1957 5.60400696265055 +1958 5.603992767001418 +1959 5.603978577683403 +1960 5.603964394680268 +1961 5.603950217975827 +1962 5.603936047553947 +1963 5.603921883398542 +1964 5.60390772549358 +1965 5.603893573823079 +1966 5.603879428371104 +1967 5.603865289121773 +1968 5.603851156059252 +1969 5.603837029167756 +1970 5.603822908431556 +1971 5.603808793834961 +1972 5.603794685362337 +1973 5.6037805829981 +1974 5.603766486726711 +1975 5.603752396532679 +1976 5.603738312400566 +1977 5.603724234314979 +1978 5.6037101622605725 +1979 5.603696096222051 +1980 5.60368203618417 +1981 5.603667982131723 +1982 5.6036539340495635 +1983 5.603639891922583 +1984 5.603625855735722 +1985 5.603611825473974 +1986 5.6035978011223735 +1987 5.6035837826660035 +1988 5.603569770089992 +1989 5.603555763379518 +1990 5.603541762519805 +1991 5.603527767496118 +1992 5.603513778293776 +1993 5.603499794898138 +1994 5.60348581729461 +1995 5.603471845468649 +1996 5.603457879405749 +1997 5.603443919091453 +1998 5.603429964511353 +1999 5.60341601565108 +2000 5.603402072496315 diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/log.log b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/log.log new file mode 100644 index 00000000..f90895b2 --- /dev/null +++ b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/log.log @@ -0,0 +1,40 @@ +2024-01-14T18:59:36.992 +== Config == +TAG: v4_infra +STLCGenerationParams(true, 2, 1) +MLELossParams{STLC}(NumApps(), Uniform()) +EPOCHS: 2000 +LEARNING_RATE: 0.003 +DistNat: DistUInt32 + +Building computation graph... + 11.619795557 seconds + +Initial adnodes_of_interest: +Dict("sz1_succ_abs" => 0.5, "tysz1_gen_type_tbool" => 0.5, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.5, "sz2_succ_abs" => 0.5, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5, "sz1_succ_app" => 0.5) +Inferring initial distribution... + 0.255517536 seconds +Saved metric dist to examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/dist_before.csv. + +Saving samples... +Saved samples to examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/terms_before.txt. + 2.658043849 seconds + +Initial loss: Dice.Add(17717928539214294226) + +Training... + 2.258345507 seconds + +Final logprob: 5.603402072496315 +Drawing the target dataset is 1.36x more likely + +Learned adnodes_of_interest: +Dict("sz1_succ_abs" => 0.4040994646611332, "tysz1_gen_type_tbool" => 0.3898050541437879, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.6086307765953906, "sz2_succ_abs" => 0.36241837534771965, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.4575828949877497, "sz1_succ_app" => 0.612357374780445) +Inferring trained distribution... +Saved metric dist to examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/dist_trained.csv. + 0.015229351 seconds + +Saving samples... +Saved samples to examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/terms_trained.txt. + 0.189465751 seconds + diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/terms_before.txt b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/terms_before.txt new file mode 100644 index 00000000..39f26041 --- /dev/null +++ b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/terms_before.txt @@ -0,0 +1,200 @@ +false +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +(λx:Bool. false) true +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) +(λx:Bool. λy:Bool. λz:Bool. false) false true +(λx:Bool -> Bool. x) (λx:Bool. x) +true +(λx:Bool. λy:Bool. true) true +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) (λx:Bool. false) +(λx:Bool. λy:Bool. true) true +(λx:Bool. λy:Bool. true) ((λx:Bool. false) true) +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) +(λx:Bool. λy:Bool. λz:Bool. false) false true +true +λx:Bool. (λy:Bool. false) false +λx:Bool. true +true +(λx:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) ((λx:Bool. true) true) +λx:Bool. x +(λx:Bool. λy:Bool. false) false true +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) (λx:Bool. false) +λx:Bool. (λy:Bool. false) x +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) ((λx:Bool. true) true) +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true (λx:Bool. false) +λx:Bool. (λy:Bool. true) true +(λx:Bool. λy:Bool. true) ((λx:Bool. true) false) +true +false +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) ((λx:Bool. true) false) +(λx:Bool. λy:Bool. false) false +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. false) true) +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. true)) +λx:Bool. false +λx:Bool. false +(λx:Bool. λy:Bool. λz:Bool. true) true true +(λx:Bool -> Bool. true) (λx:Bool. x) +true +(λx:Bool. λy:Bool. false) ((λx:Bool. false) true) +true +true +λx:Bool. x +false +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) true) +false +false +(λx:Bool. λy:Bool. λz:Bool. true) true false +λx:Bool. x +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) (λx:Bool. x) +λx:Bool. (λy:Bool. false) false +(λx:Bool. λy:Bool -> Bool. true) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +(λx:Bool. true) true +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +(λx:Bool. x) ((λx:Bool -> Bool. false) (λx:Bool. false)) +(λx:Bool. λy:Bool -> Bool. true) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +λx:Bool. false +true +λx:Bool. (λy:Bool. false) false +true +(λx:Bool -> Bool. x) (λx:Bool. x) +(λx:Bool. λy:Bool. λz:Bool. true) true true +λx:Bool. (λy:Bool. false) true +(λx:Bool. λy:Bool. true) false ((λx:Bool -> Bool. true) (λx:Bool. true)) +(λx:Bool. λy:Bool. false) false false +λx:Bool. x +λx:Bool. x +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false (λx:Bool. true) +false +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true (λx:Bool. x) +true +(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false)) +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) false) +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +false +λx:Bool. true +true +true +(λx:Bool. λy:Bool -> Bool. true) false (λx:Bool. x) +(λx:Bool. x) true +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) (λx:Bool. x) +false +(λx:Bool. λy:Bool. true) true ((λx:Bool -> Bool. false) (λx:Bool. true)) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) (λx:Bool. x) +λx:Bool. (λy:Bool. true) false +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) true +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false (λx:Bool. x) +false +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) +λx:Bool. true +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) (λx:Bool. true) +(λx:Bool. λy:Bool. true) false +false +false +λx:Bool. true +(λx:Bool -> Bool. false) (λx:Bool. x) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) (λx:Bool. x) +(λx:Bool -> Bool. x) (λx:Bool. false) +(λx:Bool. λy:Bool. false) false +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) true) +λx:Bool. x +(λx:Bool. λy:Bool. λz:Bool. true) true ((λx:Bool. false) true) +(λx:Bool. λy:Bool -> Bool. true) true (λx:Bool. x) +λx:Bool. x +(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) true +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool. true) true) +(λx:Bool -> Bool. true) (λx:Bool. true) +false +false +(λx:Bool. λy:Bool. λz:Bool. false) false true +λx:Bool. x +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +true +λx:Bool. x +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. true)) +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +λx:Bool. x +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +false +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) +λx:Bool. (λy:Bool. false) false +true +(λx:Bool. x) ((λx:Bool. false) true) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) (λx:Bool. false) +(λx:Bool. λy:Bool. true) false ((λx:Bool -> Bool. false) (λx:Bool. false)) +(λx:Bool. λy:Bool -> Bool. false) true ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +(λx:Bool. x) ((λx:Bool. true) true) +(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. true) false) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) (λx:Bool. x) +(λx:Bool. λy:Bool -> Bool. true) false (λx:Bool. x) +λx:Bool. x +(λx:Bool. λy:Bool. true) true +(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. true)) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool. λy:Bool. true) true) +λx:Bool. x +λx:Bool. false +true +(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) true +(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +(λx:Bool. λy:Bool. false) true true +λx:Bool. (λy:Bool. true) false +true +(λx:Bool. false) ((λx:Bool. false) false) +false +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) +λx:Bool. true +(λx:Bool. true) false +true +(λx:Bool. λy:Bool -> Bool. false) true ((λx:Bool. λy:Bool. false) true) +λx:Bool. (λy:Bool. true) x +(λx:Bool. λy:Bool. λz:Bool. true) true ((λx:Bool -> Bool. true) (λx:Bool. true)) +λx:Bool. x +λx:Bool. x +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) false +false +false +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +false +true +false +λx:Bool. false +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) true +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. x) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) ((λx:Bool. true) true) +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true (λx:Bool. x) +λx:Bool. (λy:Bool. true) x +(λx:Bool. λy:Bool. true) false ((λx:Bool -> Bool. false) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) (λx:Bool. x) +(λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. false) true) +false +true +(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +(λx:Bool. x) ((λx:Bool -> Bool. false) (λx:Bool. true)) +(λx:Bool. false) ((λx:Bool. false) true) +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true (λx:Bool. x) +λx:Bool. false +(λx:Bool. λy:Bool. true) true true +(λx:Bool. λy:Bool. true) false +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +true +λx:Bool. true +false +false +true +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) true +λx:Bool. false +true +(λx:Bool. true) true +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) false) diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/terms_trained.txt b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/terms_trained.txt new file mode 100644 index 00000000..24db61f0 --- /dev/null +++ b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/terms_trained.txt @@ -0,0 +1,200 @@ +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) +true +(λx:Bool. λy:Bool. false) false +λx:Bool. false +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +true +(λx:Bool. λy:Bool. true) false ((λx:Bool -> Bool. true) (λx:Bool. false)) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +λx:Bool. (λy:Bool. false) x +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool. λy:Bool. true) true) +λx:Bool. x +λx:Bool. false +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) +false +λx:Bool. x +(λx:Bool. λy:Bool -> Bool. false) false ((λx:Bool. λy:Bool. false) false) +(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +λx:Bool. x +true +(λx:Bool -> Bool. x) (λx:Bool. x) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) ((λx:Bool. false) true) +λx:Bool. false +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool. λy:Bool. true) true) +(λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) true) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) true +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) (λx:Bool. true) +true +false +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool. λy:Bool. false) true) +(λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) false +true +(λx:Bool. λy:Bool. true) true +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) ((λx:Bool. λy:Bool. false) true) +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) +λx:Bool. false +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +λx:Bool. x +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) true +true +(λx:Bool. x) false +λx:Bool. x +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false (λx:Bool. false) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +λx:Bool. x +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) false +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. x) +true +(λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool -> Bool. true) (λx:Bool. true)) +true +(λx:Bool. λy:Bool -> Bool. false) false ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. true)) +(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. true)) +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +λx:Bool. x +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. false) false) +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) +λx:Bool. (λy:Bool. false) x +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) (λx:Bool. true) +(λx:Bool. false) false +λx:Bool. x +(λx:Bool. λy:Bool. false) false +(λx:Bool. x) ((λx:Bool -> Bool. false) (λx:Bool. false)) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +λx:Bool. x +λx:Bool. x +(λx:Bool -> Bool. false) (λx:Bool. x) +(λx:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) +(λx:Bool. λy:Bool -> Bool. false) true ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +false +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool. λy:Bool. false) false) +false +(λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. x) +false +(λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. true)) +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false (λx:Bool. false) +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool. λy:Bool. false) true) +true +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool. true) false) +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. true)) +(λx:Bool. λy:Bool. false) false +λx:Bool. false +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) +(λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +(λx:Bool. λy:Bool -> Bool. true) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +false +(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +false +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) false +(λx:Bool -> Bool. true) (λx:Bool. true) +λx:Bool. false +(λx:Bool. λy:Bool. false) ((λx:Bool. false) true) +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) (λx:Bool. x) +(λx:Bool -> Bool. x) (λx:Bool. true) +(λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) false) +λx:Bool. false +λx:Bool. x +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. x) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +(λx:Bool. λy:Bool. λz:Bool. false) true true +false +λx:Bool. true +λx:Bool. false +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) (λx:Bool. x) +λx:Bool. x +λx:Bool. true +λx:Bool. false +λx:Bool. true +λx:Bool. false +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +(λx:Bool. λy:Bool. true) true ((λx:Bool. true) false) +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) +(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +λx:Bool. x +λx:Bool. false +(λx:Bool -> Bool. x) (λx:Bool. true) +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false (λx:Bool. x) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +λx:Bool. x +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) (λx:Bool. false) +false +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +λx:Bool. (λy:Bool. false) x +λx:Bool. false +false +(λx:Bool. λy:Bool -> Bool. false) true ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +(λx:Bool -> Bool. true) (λx:Bool. false) +(λx:Bool. λy:Bool. true) false +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) true) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +(λx:Bool. λy:Bool. false) true +λx:Bool. x +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false)) +(λx:Bool. λy:Bool -> Bool. true) true (λx:Bool. x) +(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +true +false +(λx:Bool -> Bool. false) (λx:Bool. true) +(λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool. false) false) +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) false +(λx:Bool. λy:Bool. true) ((λx:Bool. true) true) +false +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) false +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) +(λx:Bool. false) false +λx:Bool. false +true +(λx:Bool. λy:Bool. false) false ((λx:Bool. true) false) +false +false +false +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. false) false) +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. true)) +(λx:Bool. λy:Bool. false) false +(λx:Bool. λy:Bool. false) ((λx:Bool. false) true) +λx:Bool. true +λx:Bool. false +λx:Bool. (λy:Bool. true) false +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) false +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) true +(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false)) +λx:Bool. x +(λx:Bool. λy:Bool. true) true true +(λx:Bool. λy:Bool. true) ((λx:Bool. true) true) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +(λx:Bool. λy:Bool -> Bool. false) true (λx:Bool. false) +λx:Bool. x +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool. false) false) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool. false) false) +(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. true)) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. false) false) +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool. true) true) +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) false +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. true)) +true +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +true +λx:Bool. false +(λx:Bool. λy:Bool -> Bool. true) true (λx:Bool. false) +(λx:Bool. λy:Bool. false) false ((λx:Bool -> Bool. true) (λx:Bool. false)) +λx:Bool. false +λx:Bool. x +λx:Bool. true +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/log.log b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/log.log new file mode 100644 index 00000000..b615b41c --- /dev/null +++ b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/log.log @@ -0,0 +1,10 @@ +2024-01-14T19:02:20.667 +== Config == +TAG: v4_infra +STLCGenerationParams(true, 5, 2) +ApproxSTLCConstructorEntropy() +EPOCHS: 2000 +LEARNING_RATE: 0.03 +DistNat: DistUInt32 + +Building computation graph... diff --git a/examples/qc/README.md b/examples/qc/examples/README.md similarity index 100% rename from examples/qc/README.md rename to examples/qc/examples/README.md diff --git a/examples/qc/demo_bst.jl b/examples/qc/examples/demo_bst.jl similarity index 100% rename from examples/qc/demo_bst.jl rename to examples/qc/examples/demo_bst.jl diff --git a/examples/qc/demo_natlist.jl b/examples/qc/examples/demo_natlist.jl similarity index 100% rename from examples/qc/demo_natlist.jl rename to examples/qc/examples/demo_natlist.jl diff --git a/examples/qc/demo_sortednatlist.jl b/examples/qc/examples/demo_sortednatlist.jl similarity index 100% rename from examples/qc/demo_sortednatlist.jl rename to examples/qc/examples/demo_sortednatlist.jl diff --git a/examples/qc/demo_utlc.jl b/examples/qc/examples/demo_utlc.jl similarity index 100% rename from examples/qc/demo_utlc.jl rename to examples/qc/examples/demo_utlc.jl diff --git a/examples/qc/lib/dist_tree.jl b/examples/qc/examples/lib/dist_tree.jl similarity index 100% rename from examples/qc/lib/dist_tree.jl rename to examples/qc/examples/lib/dist_tree.jl diff --git a/examples/qc/lib/dist_utlc.jl b/examples/qc/examples/lib/dist_utlc.jl similarity index 100% rename from examples/qc/lib/dist_utlc.jl rename to examples/qc/examples/lib/dist_utlc.jl diff --git a/examples/qc/samples/bst.txt b/examples/qc/examples/samples/bst.txt similarity index 100% rename from examples/qc/samples/bst.txt rename to examples/qc/examples/samples/bst.txt diff --git a/examples/qc/samples/utlc.txt b/examples/qc/examples/samples/utlc.txt similarity index 100% rename from examples/qc/samples/utlc.txt rename to examples/qc/examples/samples/utlc.txt diff --git a/examples/qc/tour_1_core.jl b/examples/qc/examples/tour_1_core.jl similarity index 100% rename from examples/qc/tour_1_core.jl rename to examples/qc/examples/tour_1_core.jl diff --git a/examples/qc/tour_2_learning.jl b/examples/qc/examples/tour_2_learning.jl similarity index 100% rename from examples/qc/tour_2_learning.jl rename to examples/qc/examples/tour_2_learning.jl diff --git a/examples/qc/stlc/entropy.jl b/examples/qc/stlc/entropy.jl deleted file mode 100644 index c50fd561..00000000 --- a/examples/qc/stlc/entropy.jl +++ /dev/null @@ -1,178 +0,0 @@ -# Train an STLC generator to have some property (term size or num apps) match a -# specific distribution (linear or uniform). -# -# Saves the distributions and sampled terms before and after training. - -using Dice -include("lib/dist.jl") -include("lib/util.jl") -include("lib/generator.jl") - -############################ -# Config -############################ - -# Specify generator, initial & target distributions -METRIC = "entropy" -INIT_SIZE = 2 # size passed to top call of gen_expr -GEN_TYP_SIZE = 1 # size passed to all calls of gen_type - -# Hyperparams -PARAMETERIZE_FLIP_GROUPS_BY_SZ = true # whether flips at the same code location - # but different sizes can have different - # probabilities -EPOCHS = 2000 # epochs to train for - -LOG_TO_FILE = true - -TAG = "v3_opt_meta_ad" - -############################ - -# Corresponds to "problem" - generator we are trying to train & desired dist. -# Data within a directory would get plotted on the same graph -OUT_DIR = "examples/qc/stlc/output/$(TAG)/$(METRIC)/sz=$(INIT_SIZE),tysz=$(GEN_TYP_SIZE)" - -# Hyperparams -OUT_FILE_TAG = "param_by_sz=$(PARAMETERIZE_FLIP_GROUPS_BY_SZ),epochs=$(EPOCHS)" - -############################ -# Intro -############################ - -LOG_PATH = joinpath(OUT_DIR, "log_" * OUT_FILE_TAG * ".log") -LEARNING_CURVE_PATH = joinpath(OUT_DIR, "learning_curve_" * OUT_FILE_TAG * ".csv") - -mkpath(OUT_DIR) -io = if LOG_TO_FILE - open(LOG_PATH, "w") -else - stdout -end - -using Dates -t = now() -for io′ in Set([io, stdout]) - println(io′, t) - println(io′, "== Config ==") - println(io′, "INIT_SIZE: $(INIT_SIZE)") - println(io′, "GEN_TYP_SIZE: $(GEN_TYP_SIZE)") - println(io′, "PARAMETERIZE_FLIP_GROUPS_BY_SZ: $(PARAMETERIZE_FLIP_GROUPS_BY_SZ)") - println(io′, "EPOCHS: $(EPOCHS)") - println(io′, "DistNat: $(DistNat)") - println(io′, "TAG: $(TAG)") - println(io′) -end -if LOG_TO_FILE - println("Logging to $(LOG_PATH)") - println() -end - -var_vals = Valuation() -adnodes_of_interest = Dict{String, ADNode}() -function register_weight!(s) - var = Var("$(s)_before_sigmoid") - var_vals[var] = 0 - weight = sigmoid(var) - adnodes_of_interest[s] = weight - weight -end - -println_flush(io, "Building (gen_expr(...)) computation graph...") -time_build = @elapsed begin - e = gen_expr( - DistNil(DistI{Typ}), - gen_type(GEN_TYP_SIZE, PARAMETERIZE_FLIP_GROUPS_BY_SZ), - INIT_SIZE, - GEN_TYP_SIZE, - PARAMETERIZE_FLIP_GROUPS_BY_SZ - ) -end -println(io, " $(time_build) seconds") -println(io) - - -############################ -# Before -############################ - -println(io, "Initial adnodes_of_interest:") -vals = compute(var_vals, values(adnodes_of_interest)) -show(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) -println(io) - - -println_flush(io, "Saving samples...") -time_sample_init = @elapsed with_concrete_ad_flips(var_vals, e) do - save_samples(joinpath(OUT_DIR, "terms_before.txt"), e; io=io) -end -println(io, " $(time_sample_init) seconds") -println(io) - -to_id = Dict( - "Var" => DistUInt32(1), - "Boolean" => DistUInt32(2), - "App" => DistUInt32(3), - "Abs" => DistUInt32(4), -) - -# 99% \x. x ["Var", "Abs"] -# 1% (\x. x) y ["Var", "Var", "Abs", "App"] - -# dist(collect_constructors(e)) -# Var => 0.99 * 1/2 + 0.01 * 2/4 -# Abs => 0.99 * 1/2 + 0.01 * 1/4 -# App => 0.01 * 1/4 - -function collect_constructors(e) - match(e, [ - "Var" => (i) -> DistVector([to_id["Var"]]), - "Boolean" => (b) -> DistVector([to_id["Boolean"]]), - "App" => (f, x) -> prob_append(prob_extend(collect_constructors(f), collect_constructors(x)), to_id["App"]), - "Abs" => (ty, e′) -> prob_append(collect_constructors(e′), to_id["Abs"]), - ]) -end -random_term = match(e, [ - "None" => () -> DistNone(DistUInt32), - "Some" => e -> DistSome(choice(collect_constructors(e))) -]) -loss = neg_entropy(random_term, Set([DistSome(i) for i in values(to_id)])) - -initial_entropy = compute_mixed(var_vals, -loss) -println(io, "Initial entropy: $(initial_entropy)") -println(io) - -############################ -# Train -############################ - -println_flush(io, "Training...") -time_train = @elapsed learning_curve = train!(var_vals, loss; epochs=EPOCHS, learning_rate=0.003) -println(io, " $(time_train) seconds") -println(io) - -open(LEARNING_CURVE_PATH, "w") do file - for (epoch, logpr) in zip(0:EPOCHS, learning_curve) - println(file, "$(epoch)\t$(logpr)") - end -end - -############################ -# After -############################ - -final_entropy = compute_mixed(var_vals, -loss) -println(io, "Final entropy: $(final_entropy)") -println(io) - -println(io, "Learned adnodes_of_interest:") -vals = compute(var_vals, values(adnodes_of_interest)) -show(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) -println(io) - -println(io, "Saving samples...") -time_sample_final = @elapsed with_concrete_ad_flips(var_vals, e) do - save_samples(joinpath(OUT_DIR, "terms_trained_" * OUT_FILE_TAG * ".txt"), e; io=io) -end -println(io, " $(time_sample_final) seconds") -println(io) diff --git a/examples/qc/stlc/entropy_approx.jl b/examples/qc/stlc/entropy_approx.jl deleted file mode 100644 index b65d94b1..00000000 --- a/examples/qc/stlc/entropy_approx.jl +++ /dev/null @@ -1,209 +0,0 @@ -# Train an STLC generator to have some property (term size or num apps) match a -# specific distribution (linear or uniform). -# -# Saves the distributions and sampled terms before and after training. - -using Dice -include("lib/dist.jl") -include("lib/util.jl") -include("lib/generator.jl") - -############################ -# Config -############################ - -# Specify generator, initial & target distributions -METRIC = "entropy" -INIT_SIZE = 5 # size passed to top call of gen_expr -GEN_TYP_SIZE = 2 # size passed to all calls of gen_type - -# Hyperparams -PARAMETERIZE_FLIP_GROUPS_BY_SZ = true # whether flips at the same code location - # but different sizes can have different - # probabilities -EPOCHS = 2000 # epochs to train for - -LOG_TO_FILE = true - -TAG = "entropy_approx_v01" - -############################ - -# Corresponds to "problem" - generator we are trying to train & desired dist. -# Data within a directory would get plotted on the same graph -OUT_DIR = "examples/qc/stlc/output/$(TAG)/$(METRIC)/sz=$(INIT_SIZE),tysz=$(GEN_TYP_SIZE)" - -# Hyperparams -OUT_FILE_TAG = "param_by_sz=$(PARAMETERIZE_FLIP_GROUPS_BY_SZ),epochs=$(EPOCHS)" - -############################ -# Intro -############################ - -LOG_PATH = joinpath(OUT_DIR, "log_" * OUT_FILE_TAG * ".log") -LEARNING_CURVE_PATH = joinpath(OUT_DIR, "learning_curve_" * OUT_FILE_TAG * ".csv") - -mkpath(OUT_DIR) -io = if LOG_TO_FILE - open(LOG_PATH, "w") -else - stdout -end - -using Dates -t = now() -for io′ in Set([io, stdout]) - println(io′, t) - println(io′, "== Config ==") - println(io′, "INIT_SIZE: $(INIT_SIZE)") - println(io′, "GEN_TYP_SIZE: $(GEN_TYP_SIZE)") - println(io′, "PARAMETERIZE_FLIP_GROUPS_BY_SZ: $(PARAMETERIZE_FLIP_GROUPS_BY_SZ)") - println(io′, "EPOCHS: $(EPOCHS)") - println(io′, "DistNat: $(DistNat)") - println(io′, "TAG: $(TAG)") - println(io′) -end -if LOG_TO_FILE - println("Logging to $(LOG_PATH)") - println() -end - -var_vals = Valuation() -adnodes_of_interest = Dict{String, ADNode}() -function register_weight!(s) - var = Var("$(s)_before_sigmoid") - var_vals[var] = 0 - weight = sigmoid(var) - adnodes_of_interest[s] = weight - weight -end - -function ctor_to_id(ctor) - match(ctor, [ - "Var" => _ -> DistInt32(0) - "Boolean" => _ -> DistInt32(1) - "App" => (_, _) -> DistInt32(2) - "Abs" => (_, _) -> DistInt32(3) - ]) -end - -function opt_ctor_to_id(opt_ctor) - match(opt_ctor, [ - "Some" => ctor_to_id, - "None" => () -> DistInt32(-1), - ]) -end - -generated_constructors = DistInt32[] -function add_ctor(v::DistI{Opt{DistI{Expr}}}) - push!(generated_constructors, opt_ctor_to_id(v)) - v -end - - -println_flush(io, "Building (gen_expr(...)) computation graph...") -generated_constructors = [] -time_build = @elapsed begin - e = gen_expr( - DistNil(DistI{Typ}), - gen_type(GEN_TYP_SIZE, PARAMETERIZE_FLIP_GROUPS_BY_SZ), - INIT_SIZE, - GEN_TYP_SIZE, - PARAMETERIZE_FLIP_GROUPS_BY_SZ, - add_ctor - ) -end -println(io, " $(time_build) seconds") -println(io) - -ctor = generated_constructors[2] -function neg_entropy2(p::Dist, domain::Set{<:Dist}) - sum(domain) do x - pe = prob_equals(p, x) - if length(support_mixed(pe)) == 1 - Dice.Constant(0) - else - LogPr(pe) * exp(LogPr(pe)) - end - end -end -generated_constructors -# compute_mixed(neg_entropy2()) -compute_mixed(var_vals, LogPr(prob_equals(generated_constructors[end], DistInt32(0)))) -[compute_mixed(var_vals, neg_entropy2(ctor, Set([DistInt32(i) for i in 0:3]))) for ctor in generated_constructors] -prob_equals(ctor, DistInt32(2)) - -loss = sum( - neg_entropy2(ctor, Set([DistInt32(i) for i in 0:3])) - for ctor in generated_constructors - if begin - sup = support_mixed(ctor) - ct = sum(1 for i in 0:3 if i in sup) - ct > 1 - end -) -compute_mixed(var_vals, loss) - -############################ -# Before -############################ - -println(io, "Initial adnodes_of_interest:") -vals = compute(var_vals, values(adnodes_of_interest)) -show(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) -println(io) - - -println_flush(io, "Saving samples...") -time_sample_init = @elapsed with_concrete_ad_flips(var_vals, e) do - save_samples(joinpath(OUT_DIR, "terms_before.txt"), e; io=io) -end -println(io, " $(time_sample_init) seconds") -println(io) - -to_id = Dict( - "Var" => DistUInt32(1), - "Boolean" => DistUInt32(2), - "App" => DistUInt32(3), - "Abs" => DistUInt32(4), -) - - -initial_entropy = compute_mixed(var_vals, -loss) -println(io, "Initial entropy: $(initial_entropy)") -println(io) - -############################ -# Train -############################ - -println_flush(io, "Training...") -time_train = @elapsed learning_curve = train!(var_vals, loss; epochs=EPOCHS, learning_rate=0.03) -println(io, " $(time_train) seconds") -println(io) - -open(LEARNING_CURVE_PATH, "w") do file - for (epoch, logpr) in zip(0:EPOCHS, learning_curve) - println(file, "$(epoch)\t$(logpr)") - end -end - -############################ -# After -############################ - -final_entropy = compute_mixed(var_vals, -loss) -println(io, "Final entropy: $(final_entropy)") -println(io) - -println(io, "Learned adnodes_of_interest:") -vals = compute(var_vals, values(adnodes_of_interest)) -show(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) -println(io) - -println(io, "Saving samples...") -time_sample_final = @elapsed with_concrete_ad_flips(var_vals, e) do - save_samples(joinpath(OUT_DIR, "terms_trained_" * OUT_FILE_TAG * ".txt"), e; io=io) -end -println(io, " $(time_sample_final) seconds") -println(io) diff --git a/examples/qc/stlc/main.jl b/examples/qc/stlc/main.jl deleted file mode 100644 index 1e123f8e..00000000 --- a/examples/qc/stlc/main.jl +++ /dev/null @@ -1,170 +0,0 @@ -# Train an STLC generator to have some property (term size or num apps) match a -# specific distribution (linear or uniform). -# -# Saves the distributions and sampled terms before and after training. - -using Dice -include("lib/dist.jl") -include("lib/util.jl") -include("lib/generator.jl") - -############################ -# Config -############################ - -# Specify generator, initial & target distributions -METRIC = num_apps # term_size or num_apps -INIT_SIZE = 5 # size passed to top call of gen_expr -GEN_TYP_SIZE = 2 # size passed to all calls of gen_type -LINEAR = false # by default, the desired distribution is uniform. - -# Hyperparams -PARAMETERIZE_FLIP_GROUPS_BY_SZ = true # whether flips at the same code location - # but different sizes can have different - # probabilities -EPOCHS = 2000 # epochs to train for - -LOG_TO_FILE = true - -TAG = "v3_opt_meta_ad" - -############################ - -dist_desc = if LINEAR "linear" else "uniform" end - -# Corresponds to "problem" - generator we are trying to train & desired dist. -# Data within a directory would get plotted on the same graph -OUT_DIR = "examples/qc/stlc/output/$(TAG)/$(METRIC)/$(dist_desc)/sz=$(INIT_SIZE),tysz=$(GEN_TYP_SIZE)" - -# Hyperparams -OUT_FILE_TAG = "param_by_sz=$(PARAMETERIZE_FLIP_GROUPS_BY_SZ),epochs=$(EPOCHS)" - -############################ -# Intro -############################ - -LOG_PATH = joinpath(OUT_DIR, "log_" * OUT_FILE_TAG * ".log") -LEARNING_CURVE_PATH = joinpath(OUT_DIR, "learning_curve_" * OUT_FILE_TAG * ".csv") - -mkpath(OUT_DIR) -io = if LOG_TO_FILE - open(LOG_PATH, "w") -else - stdout -end - -using Dates -t = now() -for io′ in Set([io, stdout]) - println(io′, t) - println(io′, "== Config ==") - println(io′, "INIT_SIZE: $(INIT_SIZE)") - println(io′, "GEN_TYP_SIZE: $(GEN_TYP_SIZE)") - println(io′, "PARAMETERIZE_FLIP_GROUPS_BY_SZ: $(PARAMETERIZE_FLIP_GROUPS_BY_SZ)") - println(io′, "EPOCHS: $(EPOCHS)") - println(io′, "DistNat: $(DistNat)") - println(io′, "TAG: $(TAG)") - println(io′) -end -if LOG_TO_FILE - println("Logging to $(LOG_PATH)") - println() -end - -var_vals = Valuation() -adnodes_of_interest = Dict{String, ADNode}() -function register_weight!(s) - var = Var("$(s)_before_sigmoid") - var_vals[var] = 0 - weight = sigmoid(var) - adnodes_of_interest[s] = weight - weight -end - -println_flush(io, "Building $(METRIC)(gen_expr(...)) computation graph...") -time_build = @elapsed begin - e = gen_expr( - DistNil(DistI{Typ}), - gen_type(GEN_TYP_SIZE, PARAMETERIZE_FLIP_GROUPS_BY_SZ), - INIT_SIZE, - GEN_TYP_SIZE, - PARAMETERIZE_FLIP_GROUPS_BY_SZ - ) - metric = METRIC(e) -end -println(io, " $(time_build) seconds") -println(io) - - -############################ -# Before -############################ - -println(io, "Initial adnodes_of_interest:") -vals = compute(var_vals, values(adnodes_of_interest)) -show(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) -println(io) - -println_flush(io, "Inferring initial distribution...") -time_infer_init = @elapsed metric_dist = pr_mixed(var_vals)(metric) -println(io, " $(time_infer_init) seconds") -save_metric_dist(joinpath(OUT_DIR, "dist_before.csv"), METRIC, metric_dist; io=io) -println(io) - -println_flush(io, "Saving samples...") -time_sample_init = @elapsed with_concrete_ad_flips(var_vals, e) do - save_samples(joinpath(OUT_DIR, "terms_before.txt"), e; io=io) -end -println(io, " $(time_sample_init) seconds") -println(io) - -loss = mle_loss([ - BoolToMax(prob_equals(metric, DistUInt32(i)), weight=if LINEAR i else 1 end) - for i in key_range(metric_dist) -]) - -initial_logprob = compute_mixed(var_vals, -loss) -println(io, "Initial logprob: $(initial_logprob)") -println(io) - -############################ -# Train -############################ - -println_flush(io, "Training...") -time_train = @elapsed learning_curve = train!(var_vals, loss; epochs=EPOCHS, learning_rate=0.003) -println(io, " $(time_train) seconds") -println(io) - -open(LEARNING_CURVE_PATH, "w") do file - for (epoch, logpr) in zip(0:EPOCHS, learning_curve) - println(file, "$(epoch)\t$(logpr)") - end -end - -############################ -# After -############################ - -final_logprob = compute_mixed(var_vals, -loss) -println(io, "Final logprob: $(final_logprob)") -approx_improvement = round(exp(final_logprob - initial_logprob), digits=2) -println(io, "Drawing the target dataset is $(approx_improvement)x more likely") -println(io) - -println(io, "Learned adnodes_of_interest:") -vals = compute(var_vals, values(adnodes_of_interest)) -show(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) -println(io) - -println(io, "Inferring trained distribution...") -time_infer_final = @elapsed metric_dist_after = pr_mixed(var_vals)(metric) -save_metric_dist(joinpath(OUT_DIR, "dist_trained_" * OUT_FILE_TAG * ".csv"), METRIC, metric_dist_after; io=io) -println(io) - -println(io, "Saving samples...") -time_sample_final = @elapsed with_concrete_ad_flips(var_vals, e) do - save_samples(joinpath(OUT_DIR, "terms_trained_" * OUT_FILE_TAG * ".txt"), e; io=io) -end -println(io, " $(time_sample_final) seconds") -println(io) diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_before.txt b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_before.txt deleted file mode 100644 index be8492f2..00000000 --- a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_before.txt +++ /dev/null @@ -1,200 +0,0 @@ -λx:Bool. true -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -true -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) (λx:Bool. true) -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) false) -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) -λx:Bool. true -false -(λx:Bool -> Bool. false) (λx:Bool. false) -false -true -false -λx:Bool. false -λx:Bool. true -(λx:Bool. λy:Bool. λz:Bool. true) true true -(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. true)) -(λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool. true) false) -(λx:Bool. λy:Bool. false) true ((λx:Bool -> Bool. false) (λx:Bool. true)) -true -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool. λy:Bool. true) true) -false -true -(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. false) false) -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true (λx:Bool. false) -true -false -false -(λx:Bool -> Bool. true) (λx:Bool. x) -(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. false) true) -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. false) false) -(λx:Bool. λy:Bool. true) false ((λx:Bool -> Bool. false) (λx:Bool. true)) -false -true -true -λx:Bool. x -λx:Bool. true -true -true -λx:Bool. x -(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. true) true) -true -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. false) false) -true -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) -(λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool. false) true) -λx:Bool. x -false -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool. λy:Bool. false) true) -λx:Bool. (λy:Bool. false) x -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) -(λx:Bool. x) false -λx:Bool. (λy:Bool. true) x -λx:Bool. (λy:Bool. false) false -(λx:Bool. λy:Bool -> Bool. true) true ((λx:Bool. λy:Bool. false) false) -(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. false) false) -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) -λx:Bool. x -(λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool -> Bool. false) (λx:Bool. true)) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -true -(λx:Bool. λy:Bool. false) false ((λx:Bool -> Bool. true) (λx:Bool. false)) -(λx:Bool. λy:Bool. λz:Bool. false) false false -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool. λy:Bool. false) true) -(λx:Bool. x) true -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) true -true -(λx:Bool. x) ((λx:Bool. true) true) -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) true -λx:Bool. true -λx:Bool. true -false -(λx:Bool. λy:Bool. false) true true -(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -λx:Bool. false -(λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool. true) false) -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool. true) true) -true -(λx:Bool -> Bool. x) (λx:Bool. x) -λx:Bool. false -true -(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -λx:Bool. true -λx:Bool. true -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) true -(λx:Bool. λy:Bool. false) true true -(λx:Bool. λy:Bool. true) true true -λx:Bool. x -(λx:Bool. λy:Bool. false) true -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -false -(λx:Bool. λy:Bool. true) false ((λx:Bool. true) true) -λx:Bool. true -λx:Bool. x -λx:Bool. x -(λx:Bool. λy:Bool. false) false -false -(λx:Bool. false) false -false -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) -false -true -(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. true)) -λx:Bool. true -λx:Bool. true -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. true)) -false -λx:Bool. (λy:Bool. false) x -true -λx:Bool. x -λx:Bool. true -λx:Bool. true -(λx:Bool -> Bool. false) (λx:Bool. x) -λx:Bool. true -(λx:Bool. λy:Bool. true) ((λx:Bool. false) false) -true -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. true) -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -(λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -false -false -(λx:Bool. λy:Bool. true) false -(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -false -false -false -(λx:Bool. true) true -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool. λy:Bool. false) true) -λx:Bool. true -(λx:Bool. λy:Bool. false) true -(λx:Bool. λy:Bool. true) false ((λx:Bool. true) false) -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) -(λx:Bool. λy:Bool. false) ((λx:Bool. true) false) -λx:Bool. false -(λx:Bool -> Bool. x) (λx:Bool. x) -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) -(λx:Bool. λy:Bool. false) true -(λx:Bool. λy:Bool. true) true false -(λx:Bool. λy:Bool. true) false ((λx:Bool. true) false) -(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -λx:Bool. (λy:Bool. false) x -(λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool. false) true) -(λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) -false -λx:Bool. (λy:Bool. true) x -(λx:Bool -> Bool. false) (λx:Bool. true) -(λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool. true) true) -false -false -(λx:Bool -> Bool. false) (λx:Bool. x) -(λx:Bool -> Bool. false) (λx:Bool. x) -true -(λx:Bool. λy:Bool -> Bool. true) true (λx:Bool. true) -λx:Bool. (λy:Bool. false) x -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) true -(λx:Bool. λy:Bool. true) false -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false ((λx:Bool. λy:Bool. true) true) -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -(λx:Bool. λy:Bool. true) false true -λx:Bool. x -λx:Bool. x -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -(λx:Bool. λy:Bool. false) ((λx:Bool. false) false) -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool. false) true) -true -false -(λx:Bool. λy:Bool. true) ((λx:Bool. true) true) -false -(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. true)) -true -λx:Bool. (λy:Bool. false) x -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. false) true) -λx:Bool. x -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) -λx:Bool. false -(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) -λx:Bool. x -λx:Bool. x -λx:Bool. false -(λx:Bool. λy:Bool. λz:Bool. true) false true -λx:Bool. x -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -true -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -true -true -λx:Bool. x -(λx:Bool. λy:Bool -> Bool. false) false ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) true -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) (λx:Bool. false) -false -true diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_trained_param_by_sz=true,epochs=2000.txt b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_trained_param_by_sz=true,epochs=2000.txt deleted file mode 100644 index e8dddd0d..00000000 --- a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=2,tysz=1/terms_trained_param_by_sz=true,epochs=2000.txt +++ /dev/null @@ -1,200 +0,0 @@ -true -λx:Bool. x -false -(λx:Bool. λy:Bool -> Bool. true) false ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) -(λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool. true) true) -λx:Bool. false -false -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) -false -true -true -true -false -λx:Bool. false -(λx:Bool. x) true -(λx:Bool. λy:Bool. false) false -false -true -(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. false) true) -(λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) false) -true -true -λx:Bool. x -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool. false) false) -λx:Bool. (λy:Bool. true) x -(λx:Bool. x) ((λx:Bool. false) true) -(λx:Bool -> Bool. false) (λx:Bool. false) -λx:Bool. x -(λx:Bool. false) true -false -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool. true) true) -(λx:Bool. λy:Bool. true) true -λx:Bool. true -(λx:Bool. λy:Bool. false) false -λx:Bool. (λy:Bool. true) x -false -true -λx:Bool. (λy:Bool. true) x -λx:Bool. x -true -(λx:Bool. λy:Bool. true) true -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -true -false -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool. false) true) -false -(λx:Bool -> Bool. false) (λx:Bool. x) -(λx:Bool. λy:Bool. false) false -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) (λx:Bool. true) -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false (λx:Bool. x) -λx:Bool. x -(λx:Bool. λy:Bool -> Bool. false) true (λx:Bool. false) -λx:Bool. false -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -false -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) false -(λx:Bool. x) ((λx:Bool -> Bool. false) (λx:Bool. true)) -(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -false -true -true -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool. false) false) -false -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) true) -λx:Bool. x -(λx:Bool. λy:Bool. true) true ((λx:Bool. true) false) -λx:Bool. (λy:Bool. true) x -(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -false -false -true -false -λx:Bool. false -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -(λx:Bool. x) false -false -true -λx:Bool. x -(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) true) -false -(λx:Bool. x) false -true -true -true -(λx:Bool. x) true -true -true -(λx:Bool. x) ((λx:Bool -> Bool. false) (λx:Bool. true)) -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. true)) -(λx:Bool. x) true -(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. false) false) -true -true -false -false -true -λx:Bool. x -true -true -true -(λx:Bool. λy:Bool -> Bool. false) true (λx:Bool. x) -true -true -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -(λx:Bool. x) ((λx:Bool -> Bool. true) (λx:Bool. true)) -true -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. true) true) -(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -λx:Bool. x -λx:Bool. x -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) -true -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) true -false -false -(λx:Bool -> Bool. false) (λx:Bool. x) -(λx:Bool. x) true -(λx:Bool. λy:Bool. false) false -false -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. false) true) -true -λx:Bool. x -false -(λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -false -λx:Bool. true -λx:Bool. x -true -false -λx:Bool. (λy:Bool. true) x -λx:Bool. (λy:Bool. false) false -λx:Bool. x -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. false) true) -false -false -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) -(λx:Bool. λy:Bool. true) false -λx:Bool. x -true -true -(λx:Bool. λy:Bool. true) true -true -(λx:Bool. λy:Bool. true) false -λx:Bool. false -(λx:Bool -> Bool. true) (λx:Bool. true) -false -(λx:Bool -> Bool. x) (λx:Bool. x) -λx:Bool. true -(λx:Bool. λy:Bool. true) true -false -true -false -true -(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -λx:Bool. x -λx:Bool. false -false -(λx:Bool. false) false -(λx:Bool -> Bool. true) (λx:Bool. true) -(λx:Bool. λy:Bool. true) ((λx:Bool. true) false) -(λx:Bool. x) ((λx:Bool -> Bool. true) (λx:Bool. false)) -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) -(λx:Bool. true) true -true -(λx:Bool. λy:Bool. true) true -(λx:Bool. x) false -false -false -(λx:Bool -> Bool. false) (λx:Bool. x) -(λx:Bool. λy:Bool. λz:Bool. false) false ((λx:Bool. false) false) -false -(λx:Bool. false) false -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -λx:Bool. (λy:Bool. false) x -(λx:Bool. λy:Bool -> Bool. false) true ((λx:Bool. λy:Bool. false) false) -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) false -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool. λy:Bool. true) true) -(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. false) false) -false -λx:Bool. true -true -true -λx:Bool. x -false -false -false -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) true -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -(λx:Bool. λy:Bool. false) true -true -false -(λx:Bool -> Bool. true) (λx:Bool. true) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) (λx:Bool. true) -(λx:Bool. λy:Bool. false) false -λx:Bool. x -(λx:Bool. x) true -true diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv deleted file mode 100644 index 557228d7..00000000 --- a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv +++ /dev/null @@ -1,2001 +0,0 @@ -0 NaN -1 NaN -2 NaN -3 NaN -4 NaN -5 NaN -6 NaN -7 NaN -8 NaN -9 NaN -10 NaN -11 NaN -12 NaN -13 NaN -14 NaN -15 NaN -16 NaN -17 NaN -18 NaN -19 NaN -20 NaN -21 NaN -22 NaN -23 NaN -24 NaN -25 NaN -26 NaN -27 NaN -28 NaN -29 NaN -30 NaN -31 NaN -32 NaN -33 NaN -34 NaN -35 NaN -36 NaN -37 NaN -38 NaN -39 NaN -40 NaN -41 NaN -42 NaN -43 NaN -44 NaN -45 NaN -46 NaN -47 NaN -48 NaN -49 NaN -50 NaN -51 NaN -52 NaN -53 NaN -54 NaN -55 NaN -56 NaN -57 NaN -58 NaN -59 NaN -60 NaN -61 NaN -62 NaN -63 NaN -64 NaN -65 NaN -66 NaN -67 NaN -68 NaN -69 NaN -70 NaN -71 NaN -72 NaN -73 NaN -74 NaN -75 NaN -76 NaN -77 NaN -78 NaN -79 NaN -80 NaN -81 NaN -82 NaN -83 NaN -84 NaN -85 NaN -86 NaN -87 NaN -88 NaN -89 NaN -90 NaN -91 NaN -92 NaN -93 NaN -94 NaN -95 NaN -96 NaN -97 NaN -98 NaN -99 NaN -100 NaN -101 NaN -102 NaN -103 NaN -104 NaN -105 NaN -106 NaN -107 NaN -108 NaN -109 NaN -110 NaN -111 NaN -112 NaN -113 NaN -114 NaN -115 NaN -116 NaN -117 NaN -118 NaN -119 NaN -120 NaN -121 NaN -122 NaN -123 NaN -124 NaN -125 NaN -126 NaN -127 NaN -128 NaN -129 NaN -130 NaN -131 NaN -132 NaN -133 NaN -134 NaN -135 NaN -136 NaN -137 NaN -138 NaN -139 NaN -140 NaN -141 NaN -142 NaN -143 NaN -144 NaN -145 NaN -146 NaN -147 NaN -148 NaN -149 NaN -150 NaN -151 NaN -152 NaN -153 NaN -154 NaN -155 NaN -156 NaN -157 NaN -158 NaN -159 NaN -160 NaN -161 NaN -162 NaN -163 NaN -164 NaN -165 NaN -166 NaN -167 NaN -168 NaN -169 NaN -170 NaN -171 NaN -172 NaN -173 NaN -174 NaN -175 NaN -176 NaN -177 NaN -178 NaN -179 NaN -180 NaN -181 NaN -182 NaN -183 NaN -184 NaN -185 NaN -186 NaN -187 NaN -188 NaN -189 NaN -190 NaN -191 NaN -192 NaN -193 NaN -194 NaN -195 NaN -196 NaN -197 NaN -198 NaN -199 NaN -200 NaN -201 NaN -202 NaN -203 NaN -204 NaN -205 NaN -206 NaN -207 NaN -208 NaN -209 NaN -210 NaN -211 NaN -212 NaN -213 NaN -214 NaN -215 NaN -216 NaN -217 NaN -218 NaN -219 NaN -220 NaN -221 NaN -222 NaN -223 NaN -224 NaN -225 NaN -226 NaN -227 NaN -228 NaN -229 NaN -230 NaN -231 NaN -232 NaN -233 NaN -234 NaN -235 NaN -236 NaN -237 NaN -238 NaN -239 NaN -240 NaN -241 NaN -242 NaN -243 NaN -244 NaN -245 NaN -246 NaN -247 NaN -248 NaN -249 NaN -250 NaN -251 NaN -252 NaN -253 NaN -254 NaN -255 NaN -256 NaN -257 NaN -258 NaN -259 NaN -260 NaN -261 NaN -262 NaN -263 NaN -264 NaN -265 NaN -266 NaN -267 NaN -268 NaN -269 NaN -270 NaN -271 NaN -272 NaN -273 NaN -274 NaN -275 NaN -276 NaN -277 NaN -278 NaN -279 NaN -280 NaN -281 NaN -282 NaN -283 NaN -284 NaN -285 NaN -286 NaN -287 NaN -288 NaN -289 NaN -290 NaN -291 NaN -292 NaN -293 NaN -294 NaN -295 NaN -296 NaN -297 NaN -298 NaN -299 NaN -300 NaN -301 NaN -302 NaN -303 NaN -304 NaN -305 NaN -306 NaN -307 NaN -308 NaN -309 NaN -310 NaN -311 NaN -312 NaN -313 NaN -314 NaN -315 NaN -316 NaN -317 NaN -318 NaN -319 NaN -320 NaN -321 NaN -322 NaN -323 NaN -324 NaN -325 NaN -326 NaN -327 NaN -328 NaN -329 NaN -330 NaN -331 NaN -332 NaN -333 NaN -334 NaN -335 NaN -336 NaN -337 NaN -338 NaN -339 NaN -340 NaN -341 NaN -342 NaN -343 NaN -344 NaN -345 NaN -346 NaN -347 NaN -348 NaN -349 NaN -350 NaN -351 NaN -352 NaN -353 NaN -354 NaN -355 NaN -356 NaN -357 NaN -358 NaN -359 NaN -360 NaN -361 NaN -362 NaN -363 NaN -364 NaN -365 NaN -366 NaN -367 NaN -368 NaN -369 NaN -370 NaN -371 NaN -372 NaN -373 NaN -374 NaN -375 NaN -376 NaN -377 NaN -378 NaN -379 NaN -380 NaN -381 NaN -382 NaN -383 NaN -384 NaN -385 NaN -386 NaN -387 NaN -388 NaN -389 NaN -390 NaN -391 NaN -392 NaN -393 NaN -394 NaN -395 NaN -396 NaN -397 NaN -398 NaN -399 NaN -400 NaN -401 NaN -402 NaN -403 NaN -404 NaN -405 NaN -406 NaN -407 NaN -408 NaN -409 NaN -410 NaN -411 NaN -412 NaN -413 NaN -414 NaN -415 NaN -416 NaN -417 NaN -418 NaN -419 NaN -420 NaN -421 NaN -422 NaN -423 NaN -424 NaN -425 NaN -426 NaN -427 NaN -428 NaN -429 NaN -430 NaN -431 NaN -432 NaN -433 NaN -434 NaN -435 NaN -436 NaN -437 NaN -438 NaN -439 NaN -440 NaN -441 NaN -442 NaN -443 NaN -444 NaN -445 NaN -446 NaN -447 NaN -448 NaN -449 NaN -450 NaN -451 NaN -452 NaN -453 NaN -454 NaN -455 NaN -456 NaN -457 NaN -458 NaN -459 NaN -460 NaN -461 NaN -462 NaN -463 NaN -464 NaN -465 NaN -466 NaN -467 NaN -468 NaN -469 NaN -470 NaN -471 NaN -472 NaN -473 NaN -474 NaN -475 NaN -476 NaN -477 NaN -478 NaN -479 NaN -480 NaN -481 NaN -482 NaN -483 NaN -484 NaN -485 NaN -486 NaN -487 NaN -488 NaN -489 NaN -490 NaN -491 NaN -492 NaN -493 NaN -494 NaN -495 NaN -496 NaN -497 NaN -498 NaN -499 NaN -500 NaN -501 NaN -502 NaN -503 NaN -504 NaN -505 NaN -506 NaN -507 NaN -508 NaN -509 NaN -510 NaN -511 NaN -512 NaN -513 NaN -514 NaN -515 NaN -516 NaN -517 NaN -518 NaN -519 NaN -520 NaN -521 NaN -522 NaN -523 NaN -524 NaN -525 NaN -526 NaN -527 NaN -528 NaN -529 NaN -530 NaN -531 NaN -532 NaN -533 NaN -534 NaN -535 NaN -536 NaN -537 NaN -538 NaN -539 NaN -540 NaN -541 NaN -542 NaN -543 NaN -544 NaN -545 NaN -546 NaN -547 NaN -548 NaN -549 NaN -550 NaN -551 NaN -552 NaN -553 NaN -554 NaN -555 NaN -556 NaN -557 NaN -558 NaN -559 NaN -560 NaN -561 NaN -562 NaN -563 NaN -564 NaN -565 NaN -566 NaN -567 NaN -568 NaN -569 NaN -570 NaN -571 NaN -572 NaN -573 NaN -574 NaN -575 NaN -576 NaN -577 NaN -578 NaN -579 NaN -580 NaN -581 NaN -582 NaN -583 NaN -584 NaN -585 NaN -586 NaN -587 NaN -588 NaN -589 NaN -590 NaN -591 NaN -592 NaN -593 NaN -594 NaN -595 NaN -596 NaN -597 NaN -598 NaN -599 NaN -600 NaN -601 NaN -602 NaN -603 NaN -604 NaN -605 NaN -606 NaN -607 NaN -608 NaN -609 NaN -610 NaN -611 NaN -612 NaN -613 NaN -614 NaN -615 NaN -616 NaN -617 NaN -618 NaN -619 NaN -620 NaN -621 NaN -622 NaN -623 NaN -624 NaN -625 NaN -626 NaN -627 NaN -628 NaN -629 NaN -630 NaN -631 NaN -632 NaN -633 NaN -634 NaN -635 NaN -636 NaN -637 NaN -638 NaN -639 NaN -640 NaN -641 NaN -642 NaN -643 NaN -644 NaN -645 NaN -646 NaN -647 NaN -648 NaN -649 NaN -650 NaN -651 NaN -652 NaN -653 NaN -654 NaN -655 NaN -656 NaN -657 NaN -658 NaN -659 NaN -660 NaN -661 NaN -662 NaN -663 NaN -664 NaN -665 NaN -666 NaN -667 NaN -668 NaN -669 NaN -670 NaN -671 NaN -672 NaN -673 NaN -674 NaN -675 NaN -676 NaN -677 NaN -678 NaN -679 NaN -680 NaN -681 NaN -682 NaN -683 NaN -684 NaN -685 NaN -686 NaN -687 NaN -688 NaN -689 NaN -690 NaN -691 NaN -692 NaN -693 NaN -694 NaN -695 NaN -696 NaN -697 NaN -698 NaN -699 NaN -700 NaN -701 NaN -702 NaN -703 NaN -704 NaN -705 NaN -706 NaN -707 NaN -708 NaN -709 NaN -710 NaN -711 NaN -712 NaN -713 NaN -714 NaN -715 NaN -716 NaN -717 NaN -718 NaN -719 NaN -720 NaN -721 NaN -722 NaN -723 NaN -724 NaN -725 NaN -726 NaN -727 NaN -728 NaN -729 NaN -730 NaN -731 NaN -732 NaN -733 NaN -734 NaN -735 NaN -736 NaN -737 NaN -738 NaN -739 NaN -740 NaN -741 NaN -742 NaN -743 NaN -744 NaN -745 NaN -746 NaN -747 NaN -748 NaN -749 NaN -750 NaN -751 NaN -752 NaN -753 NaN -754 NaN -755 NaN -756 NaN -757 NaN -758 NaN -759 NaN -760 NaN -761 NaN -762 NaN -763 NaN -764 NaN -765 NaN -766 NaN -767 NaN -768 NaN -769 NaN -770 NaN -771 NaN -772 NaN -773 NaN -774 NaN -775 NaN -776 NaN -777 NaN -778 NaN -779 NaN -780 NaN -781 NaN -782 NaN -783 NaN -784 NaN -785 NaN -786 NaN -787 NaN -788 NaN -789 NaN -790 NaN -791 NaN -792 NaN -793 NaN -794 NaN -795 NaN -796 NaN -797 NaN -798 NaN -799 NaN -800 NaN -801 NaN -802 NaN -803 NaN -804 NaN -805 NaN -806 NaN -807 NaN -808 NaN -809 NaN -810 NaN -811 NaN -812 NaN -813 NaN -814 NaN -815 NaN -816 NaN -817 NaN -818 NaN -819 NaN -820 NaN -821 NaN -822 NaN -823 NaN -824 NaN -825 NaN -826 NaN -827 NaN -828 NaN -829 NaN -830 NaN -831 NaN -832 NaN -833 NaN -834 NaN -835 NaN -836 NaN -837 NaN -838 NaN -839 NaN -840 NaN -841 NaN -842 NaN -843 NaN -844 NaN -845 NaN -846 NaN -847 NaN -848 NaN -849 NaN -850 NaN -851 NaN -852 NaN -853 NaN -854 NaN -855 NaN -856 NaN -857 NaN -858 NaN -859 NaN -860 NaN -861 NaN -862 NaN -863 NaN -864 NaN -865 NaN -866 NaN -867 NaN -868 NaN -869 NaN -870 NaN -871 NaN -872 NaN -873 NaN -874 NaN -875 NaN -876 NaN -877 NaN -878 NaN -879 NaN -880 NaN -881 NaN -882 NaN -883 NaN -884 NaN -885 NaN -886 NaN -887 NaN -888 NaN -889 NaN -890 NaN -891 NaN -892 NaN -893 NaN -894 NaN -895 NaN -896 NaN -897 NaN -898 NaN -899 NaN -900 NaN -901 NaN -902 NaN -903 NaN -904 NaN -905 NaN -906 NaN -907 NaN -908 NaN -909 NaN -910 NaN -911 NaN -912 NaN -913 NaN -914 NaN -915 NaN -916 NaN -917 NaN -918 NaN -919 NaN -920 NaN -921 NaN -922 NaN -923 NaN -924 NaN -925 NaN -926 NaN -927 NaN -928 NaN -929 NaN -930 NaN -931 NaN -932 NaN -933 NaN -934 NaN -935 NaN -936 NaN -937 NaN -938 NaN -939 NaN -940 NaN -941 NaN -942 NaN -943 NaN -944 NaN -945 NaN -946 NaN -947 NaN -948 NaN -949 NaN -950 NaN -951 NaN -952 NaN -953 NaN -954 NaN -955 NaN -956 NaN -957 NaN -958 NaN -959 NaN -960 NaN -961 NaN -962 NaN -963 NaN -964 NaN -965 NaN -966 NaN -967 NaN -968 NaN -969 NaN -970 NaN -971 NaN -972 NaN -973 NaN -974 NaN -975 NaN -976 NaN -977 NaN -978 NaN -979 NaN -980 NaN -981 NaN -982 NaN -983 NaN -984 NaN -985 NaN -986 NaN -987 NaN -988 NaN -989 NaN -990 NaN -991 NaN -992 NaN -993 NaN -994 NaN -995 NaN -996 NaN -997 NaN -998 NaN -999 NaN -1000 NaN -1001 NaN -1002 NaN -1003 NaN -1004 NaN -1005 NaN -1006 NaN -1007 NaN -1008 NaN -1009 NaN -1010 NaN -1011 NaN -1012 NaN -1013 NaN -1014 NaN -1015 NaN -1016 NaN -1017 NaN -1018 NaN -1019 NaN -1020 NaN -1021 NaN -1022 NaN -1023 NaN -1024 NaN -1025 NaN -1026 NaN -1027 NaN -1028 NaN -1029 NaN -1030 NaN -1031 NaN -1032 NaN -1033 NaN -1034 NaN -1035 NaN -1036 NaN -1037 NaN -1038 NaN -1039 NaN -1040 NaN -1041 NaN -1042 NaN -1043 NaN -1044 NaN -1045 NaN -1046 NaN -1047 NaN -1048 NaN -1049 NaN -1050 NaN -1051 NaN -1052 NaN -1053 NaN -1054 NaN -1055 NaN -1056 NaN -1057 NaN -1058 NaN -1059 NaN -1060 NaN -1061 NaN -1062 NaN -1063 NaN -1064 NaN -1065 NaN -1066 NaN -1067 NaN -1068 NaN -1069 NaN -1070 NaN -1071 NaN -1072 NaN -1073 NaN -1074 NaN -1075 NaN -1076 NaN -1077 NaN -1078 NaN -1079 NaN -1080 NaN -1081 NaN -1082 NaN -1083 NaN -1084 NaN -1085 NaN -1086 NaN -1087 NaN -1088 NaN -1089 NaN -1090 NaN -1091 NaN -1092 NaN -1093 NaN -1094 NaN -1095 NaN -1096 NaN -1097 NaN -1098 NaN -1099 NaN -1100 NaN -1101 NaN -1102 NaN -1103 NaN -1104 NaN -1105 NaN -1106 NaN -1107 NaN -1108 NaN -1109 NaN -1110 NaN -1111 NaN -1112 NaN -1113 NaN -1114 NaN -1115 NaN -1116 NaN -1117 NaN -1118 NaN -1119 NaN -1120 NaN -1121 NaN -1122 NaN -1123 NaN -1124 NaN -1125 NaN -1126 NaN -1127 NaN -1128 NaN -1129 NaN -1130 NaN -1131 NaN -1132 NaN -1133 NaN -1134 NaN -1135 NaN -1136 NaN -1137 NaN -1138 NaN -1139 NaN -1140 NaN -1141 NaN -1142 NaN -1143 NaN -1144 NaN -1145 NaN -1146 NaN -1147 NaN -1148 NaN -1149 NaN -1150 NaN -1151 NaN -1152 NaN -1153 NaN -1154 NaN -1155 NaN -1156 NaN -1157 NaN -1158 NaN -1159 NaN -1160 NaN -1161 NaN -1162 NaN -1163 NaN -1164 NaN -1165 NaN -1166 NaN -1167 NaN -1168 NaN -1169 NaN -1170 NaN -1171 NaN -1172 NaN -1173 NaN -1174 NaN -1175 NaN -1176 NaN -1177 NaN -1178 NaN -1179 NaN -1180 NaN -1181 NaN -1182 NaN -1183 NaN -1184 NaN -1185 NaN -1186 NaN -1187 NaN -1188 NaN -1189 NaN -1190 NaN -1191 NaN -1192 NaN -1193 NaN -1194 NaN -1195 NaN -1196 NaN -1197 NaN -1198 NaN -1199 NaN -1200 NaN -1201 NaN -1202 NaN -1203 NaN -1204 NaN -1205 NaN -1206 NaN -1207 NaN -1208 NaN -1209 NaN -1210 NaN -1211 NaN -1212 NaN -1213 NaN -1214 NaN -1215 NaN -1216 NaN -1217 NaN -1218 NaN -1219 NaN -1220 NaN -1221 NaN -1222 NaN -1223 NaN -1224 NaN -1225 NaN -1226 NaN -1227 NaN -1228 NaN -1229 NaN -1230 NaN -1231 NaN -1232 NaN -1233 NaN -1234 NaN -1235 NaN -1236 NaN -1237 NaN -1238 NaN -1239 NaN -1240 NaN -1241 NaN -1242 NaN -1243 NaN -1244 NaN -1245 NaN -1246 NaN -1247 NaN -1248 NaN -1249 NaN -1250 NaN -1251 NaN -1252 NaN -1253 NaN -1254 NaN -1255 NaN -1256 NaN -1257 NaN -1258 NaN -1259 NaN -1260 NaN -1261 NaN -1262 NaN -1263 NaN -1264 NaN -1265 NaN -1266 NaN -1267 NaN -1268 NaN -1269 NaN -1270 NaN -1271 NaN -1272 NaN -1273 NaN -1274 NaN -1275 NaN -1276 NaN -1277 NaN -1278 NaN -1279 NaN -1280 NaN -1281 NaN -1282 NaN -1283 NaN -1284 NaN -1285 NaN -1286 NaN -1287 NaN -1288 NaN -1289 NaN -1290 NaN -1291 NaN -1292 NaN -1293 NaN -1294 NaN -1295 NaN -1296 NaN -1297 NaN -1298 NaN -1299 NaN -1300 NaN -1301 NaN -1302 NaN -1303 NaN -1304 NaN -1305 NaN -1306 NaN -1307 NaN -1308 NaN -1309 NaN -1310 NaN -1311 NaN -1312 NaN -1313 NaN -1314 NaN -1315 NaN -1316 NaN -1317 NaN -1318 NaN -1319 NaN -1320 NaN -1321 NaN -1322 NaN -1323 NaN -1324 NaN -1325 NaN -1326 NaN -1327 NaN -1328 NaN -1329 NaN -1330 NaN -1331 NaN -1332 NaN -1333 NaN -1334 NaN -1335 NaN -1336 NaN -1337 NaN -1338 NaN -1339 NaN -1340 NaN -1341 NaN -1342 NaN -1343 NaN -1344 NaN -1345 NaN -1346 NaN -1347 NaN -1348 NaN -1349 NaN -1350 NaN -1351 NaN -1352 NaN -1353 NaN -1354 NaN -1355 NaN -1356 NaN -1357 NaN -1358 NaN -1359 NaN -1360 NaN -1361 NaN -1362 NaN -1363 NaN -1364 NaN -1365 NaN -1366 NaN -1367 NaN -1368 NaN -1369 NaN -1370 NaN -1371 NaN -1372 NaN -1373 NaN -1374 NaN -1375 NaN -1376 NaN -1377 NaN -1378 NaN -1379 NaN -1380 NaN -1381 NaN -1382 NaN -1383 NaN -1384 NaN -1385 NaN -1386 NaN -1387 NaN -1388 NaN -1389 NaN -1390 NaN -1391 NaN -1392 NaN -1393 NaN -1394 NaN -1395 NaN -1396 NaN -1397 NaN -1398 NaN -1399 NaN -1400 NaN -1401 NaN -1402 NaN -1403 NaN -1404 NaN -1405 NaN -1406 NaN -1407 NaN -1408 NaN -1409 NaN -1410 NaN -1411 NaN -1412 NaN -1413 NaN -1414 NaN -1415 NaN -1416 NaN -1417 NaN -1418 NaN -1419 NaN -1420 NaN -1421 NaN -1422 NaN -1423 NaN -1424 NaN -1425 NaN -1426 NaN -1427 NaN -1428 NaN -1429 NaN -1430 NaN -1431 NaN -1432 NaN -1433 NaN -1434 NaN -1435 NaN -1436 NaN -1437 NaN -1438 NaN -1439 NaN -1440 NaN -1441 NaN -1442 NaN -1443 NaN -1444 NaN -1445 NaN -1446 NaN -1447 NaN -1448 NaN -1449 NaN -1450 NaN -1451 NaN -1452 NaN -1453 NaN -1454 NaN -1455 NaN -1456 NaN -1457 NaN -1458 NaN -1459 NaN -1460 NaN -1461 NaN -1462 NaN -1463 NaN -1464 NaN -1465 NaN -1466 NaN -1467 NaN -1468 NaN -1469 NaN -1470 NaN -1471 NaN -1472 NaN -1473 NaN -1474 NaN -1475 NaN -1476 NaN -1477 NaN -1478 NaN -1479 NaN -1480 NaN -1481 NaN -1482 NaN -1483 NaN -1484 NaN -1485 NaN -1486 NaN -1487 NaN -1488 NaN -1489 NaN -1490 NaN -1491 NaN -1492 NaN -1493 NaN -1494 NaN -1495 NaN -1496 NaN -1497 NaN -1498 NaN -1499 NaN -1500 NaN -1501 NaN -1502 NaN -1503 NaN -1504 NaN -1505 NaN -1506 NaN -1507 NaN -1508 NaN -1509 NaN -1510 NaN -1511 NaN -1512 NaN -1513 NaN -1514 NaN -1515 NaN -1516 NaN -1517 NaN -1518 NaN -1519 NaN -1520 NaN -1521 NaN -1522 NaN -1523 NaN -1524 NaN -1525 NaN -1526 NaN -1527 NaN -1528 NaN -1529 NaN -1530 NaN -1531 NaN -1532 NaN -1533 NaN -1534 NaN -1535 NaN -1536 NaN -1537 NaN -1538 NaN -1539 NaN -1540 NaN -1541 NaN -1542 NaN -1543 NaN -1544 NaN -1545 NaN -1546 NaN -1547 NaN -1548 NaN -1549 NaN -1550 NaN -1551 NaN -1552 NaN -1553 NaN -1554 NaN -1555 NaN -1556 NaN -1557 NaN -1558 NaN -1559 NaN -1560 NaN -1561 NaN -1562 NaN -1563 NaN -1564 NaN -1565 NaN -1566 NaN -1567 NaN -1568 NaN -1569 NaN -1570 NaN -1571 NaN -1572 NaN -1573 NaN -1574 NaN -1575 NaN -1576 NaN -1577 NaN -1578 NaN -1579 NaN -1580 NaN -1581 NaN -1582 NaN -1583 NaN -1584 NaN -1585 NaN -1586 NaN -1587 NaN -1588 NaN -1589 NaN -1590 NaN -1591 NaN -1592 NaN -1593 NaN -1594 NaN -1595 NaN -1596 NaN -1597 NaN -1598 NaN -1599 NaN -1600 NaN -1601 NaN -1602 NaN -1603 NaN -1604 NaN -1605 NaN -1606 NaN -1607 NaN -1608 NaN -1609 NaN -1610 NaN -1611 NaN -1612 NaN -1613 NaN -1614 NaN -1615 NaN -1616 NaN -1617 NaN -1618 NaN -1619 NaN -1620 NaN -1621 NaN -1622 NaN -1623 NaN -1624 NaN -1625 NaN -1626 NaN -1627 NaN -1628 NaN -1629 NaN -1630 NaN -1631 NaN -1632 NaN -1633 NaN -1634 NaN -1635 NaN -1636 NaN -1637 NaN -1638 NaN -1639 NaN -1640 NaN -1641 NaN -1642 NaN -1643 NaN -1644 NaN -1645 NaN -1646 NaN -1647 NaN -1648 NaN -1649 NaN -1650 NaN -1651 NaN -1652 NaN -1653 NaN -1654 NaN -1655 NaN -1656 NaN -1657 NaN -1658 NaN -1659 NaN -1660 NaN -1661 NaN -1662 NaN -1663 NaN -1664 NaN -1665 NaN -1666 NaN -1667 NaN -1668 NaN -1669 NaN -1670 NaN -1671 NaN -1672 NaN -1673 NaN -1674 NaN -1675 NaN -1676 NaN -1677 NaN -1678 NaN -1679 NaN -1680 NaN -1681 NaN -1682 NaN -1683 NaN -1684 NaN -1685 NaN -1686 NaN -1687 NaN -1688 NaN -1689 NaN -1690 NaN -1691 NaN -1692 NaN -1693 NaN -1694 NaN -1695 NaN -1696 NaN -1697 NaN -1698 NaN -1699 NaN -1700 NaN -1701 NaN -1702 NaN -1703 NaN -1704 NaN -1705 NaN -1706 NaN -1707 NaN -1708 NaN -1709 NaN -1710 NaN -1711 NaN -1712 NaN -1713 NaN -1714 NaN -1715 NaN -1716 NaN -1717 NaN -1718 NaN -1719 NaN -1720 NaN -1721 NaN -1722 NaN -1723 NaN -1724 NaN -1725 NaN -1726 NaN -1727 NaN -1728 NaN -1729 NaN -1730 NaN -1731 NaN -1732 NaN -1733 NaN -1734 NaN -1735 NaN -1736 NaN -1737 NaN -1738 NaN -1739 NaN -1740 NaN -1741 NaN -1742 NaN -1743 NaN -1744 NaN -1745 NaN -1746 NaN -1747 NaN -1748 NaN -1749 NaN -1750 NaN -1751 NaN -1752 NaN -1753 NaN -1754 NaN -1755 NaN -1756 NaN -1757 NaN -1758 NaN -1759 NaN -1760 NaN -1761 NaN -1762 NaN -1763 NaN -1764 NaN -1765 NaN -1766 NaN -1767 NaN -1768 NaN -1769 NaN -1770 NaN -1771 NaN -1772 NaN -1773 NaN -1774 NaN -1775 NaN -1776 NaN -1777 NaN -1778 NaN -1779 NaN -1780 NaN -1781 NaN -1782 NaN -1783 NaN -1784 NaN -1785 NaN -1786 NaN -1787 NaN -1788 NaN -1789 NaN -1790 NaN -1791 NaN -1792 NaN -1793 NaN -1794 NaN -1795 NaN -1796 NaN -1797 NaN -1798 NaN -1799 NaN -1800 NaN -1801 NaN -1802 NaN -1803 NaN -1804 NaN -1805 NaN -1806 NaN -1807 NaN -1808 NaN -1809 NaN -1810 NaN -1811 NaN -1812 NaN -1813 NaN -1814 NaN -1815 NaN -1816 NaN -1817 NaN -1818 NaN -1819 NaN -1820 NaN -1821 NaN -1822 NaN -1823 NaN -1824 NaN -1825 NaN -1826 NaN -1827 NaN -1828 NaN -1829 NaN -1830 NaN -1831 NaN -1832 NaN -1833 NaN -1834 NaN -1835 NaN -1836 NaN -1837 NaN -1838 NaN -1839 NaN -1840 NaN -1841 NaN -1842 NaN -1843 NaN -1844 NaN -1845 NaN -1846 NaN -1847 NaN -1848 NaN -1849 NaN -1850 NaN -1851 NaN -1852 NaN -1853 NaN -1854 NaN -1855 NaN -1856 NaN -1857 NaN -1858 NaN -1859 NaN -1860 NaN -1861 NaN -1862 NaN -1863 NaN -1864 NaN -1865 NaN -1866 NaN -1867 NaN -1868 NaN -1869 NaN -1870 NaN -1871 NaN -1872 NaN -1873 NaN -1874 NaN -1875 NaN -1876 NaN -1877 NaN -1878 NaN -1879 NaN -1880 NaN -1881 NaN -1882 NaN -1883 NaN -1884 NaN -1885 NaN -1886 NaN -1887 NaN -1888 NaN -1889 NaN -1890 NaN -1891 NaN -1892 NaN -1893 NaN -1894 NaN -1895 NaN -1896 NaN -1897 NaN -1898 NaN -1899 NaN -1900 NaN -1901 NaN -1902 NaN -1903 NaN -1904 NaN -1905 NaN -1906 NaN -1907 NaN -1908 NaN -1909 NaN -1910 NaN -1911 NaN -1912 NaN -1913 NaN -1914 NaN -1915 NaN -1916 NaN -1917 NaN -1918 NaN -1919 NaN -1920 NaN -1921 NaN -1922 NaN -1923 NaN -1924 NaN -1925 NaN -1926 NaN -1927 NaN -1928 NaN -1929 NaN -1930 NaN -1931 NaN -1932 NaN -1933 NaN -1934 NaN -1935 NaN -1936 NaN -1937 NaN -1938 NaN -1939 NaN -1940 NaN -1941 NaN -1942 NaN -1943 NaN -1944 NaN -1945 NaN -1946 NaN -1947 NaN -1948 NaN -1949 NaN -1950 NaN -1951 NaN -1952 NaN -1953 NaN -1954 NaN -1955 NaN -1956 NaN -1957 NaN -1958 NaN -1959 NaN -1960 NaN -1961 NaN -1962 NaN -1963 NaN -1964 NaN -1965 NaN -1966 NaN -1967 NaN -1968 NaN -1969 NaN -1970 NaN -1971 NaN -1972 NaN -1973 NaN -1974 NaN -1975 NaN -1976 NaN -1977 NaN -1978 NaN -1979 NaN -1980 NaN -1981 NaN -1982 NaN -1983 NaN -1984 NaN -1985 NaN -1986 NaN -1987 NaN -1988 NaN -1989 NaN -1990 NaN -1991 NaN -1992 NaN -1993 NaN -1994 NaN -1995 NaN -1996 NaN -1997 NaN -1998 NaN -1999 NaN -2000 NaN diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log deleted file mode 100644 index b1762783..00000000 --- a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log +++ /dev/null @@ -1,31 +0,0 @@ -2024-01-12T20:07:24.785 -== Config == -INIT_SIZE: 3 -GEN_TYP_SIZE: 2 -PARAMETERIZE_FLIP_GROUPS_BY_SZ: true -EPOCHS: 2000 -DistNat: DistUInt32 -TAG: entropy_approx_v01 - -Building (gen_expr(...)) computation graph... - 9.185591083 seconds - -Initial adnodes_of_interest: -Dict("tysz2_gen_type_tbool" => 0.5, "tysz1_gen_type_tbool" => 0.5, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.5, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5, "sz1_succ_app" => 0.5, "sz1_succ_abs" => 0.5, "sz3_succ_abs" => 0.5, "sz3_succ_app" => 0.5, "sz2_succ_abs" => 0.5, "sz3_succ_var" => 0.5) -Saving samples... -Saved samples to examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/terms_before.txt. - 4.659673916 seconds - -Initial entropy: NaN - -Training... - 12.081615834 seconds - -Final entropy: NaN - -Learned adnodes_of_interest: -Dict("tysz2_gen_type_tbool" => 0.5978984273401428, "tysz1_gen_type_tbool" => 0.5600089054385535, "sz0_zero_pr_var2" => 0.6513030182610037, "sz2_succ_app" => 0.3795215977122936, "sz2_succ_var" => 0.5390004105904865, "sz1_succ_var" => 0.6204245802808753, "sz1_succ_app" => 0.34157715109058717, "sz1_succ_abs" => 0.5014908667859062, "sz3_succ_abs" => 0.5799456371963269, "sz3_succ_app" => 0.4051250446057422, "sz2_succ_abs" => 0.5643766075999167, "sz3_succ_var" => 0.5) -Saving samples... -Saved samples to examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt. - 2.370024833 seconds - diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/terms_before.txt b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/terms_before.txt deleted file mode 100644 index 48eadecd..00000000 --- a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/terms_before.txt +++ /dev/null @@ -1,200 +0,0 @@ -λx:Bool -> Bool. x -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) false ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true) -(λx:Bool. false) false -(λx:Bool. (λy:Bool. false) true) ((λx:(Bool -> Bool) -> Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false))) -(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λx:Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. y) -λx:Bool. (λy:Bool. false) true -λx:Bool -> Bool. x -λx:Bool -> Bool. true -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) true -(λx:Bool -> Bool. false) (λx:Bool. (λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. false)) -(λx:Bool. x) false -true -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. false) ((λx:Bool. false) true) (λx:Bool -> Bool. (λy:Bool -> Bool. false) x) -λx:Bool. x -true -λx:Bool. λy:Bool. x -(λx:Bool. false) false -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true)) ((λx:Bool. x) true) -false -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. false) -(λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. false) false -(λx:Bool. λy:Bool -> Bool. false) true ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. y) (λx:Bool -> Bool. λy:Bool. true) -λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool -> Bool. true) ((λy:Bool. λz:Bool. false) false) -λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. true) false (λy:Bool -> Bool. x) -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) false (λx:Bool -> Bool. (λy:Bool. λz:Bool. false) true) -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true)) (λx:Bool -> Bool. true) -false -λx:Bool. (λy:Bool. λz:Bool. false) false false -λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. false) x ((λy:Bool. λz:Bool -> Bool. λw:Bool. true) x) -(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. λz:Bool. false)) true -(λx:Bool. λy:Bool -> Bool. y) true -(λx:Bool. (λy:Bool. false) false) ((λx:Bool. x) false) -(λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool. true)) true -(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. true) (λx:Bool -> Bool. x) false -λx:Bool. (λy:Bool -> Bool. y) ((λy:Bool -> Bool. λz:Bool. false) (λy:Bool. true)) -(λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool -> Bool. true) false (λx:Bool. false) (λx:Bool. true) -true -false -λx:Bool. x -(λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. x) -false -(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. λa:Bool. true) false ((λx:Bool. false) false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool. false) true)) -(λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. true)) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool. false) (λx:Bool. true) ((λx:Bool. λy:Bool -> Bool. false) false)) -λx:Bool -> Bool. (λy:Bool. λz:Bool -> Bool -> Bool. false) false ((λy:Bool. λz:Bool. λw:Bool. false) true) -(λx:Bool. λy:Bool. false) ((λx:Bool. false) false) ((λx:Bool. true) true) -λx:Bool. (λy:Bool. λz:Bool. λw:Bool. false) false false -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) true ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false))) -false -false -true -false -false -λx:Bool -> Bool. x -λx:Bool -> Bool. x -λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) ((λy:Bool. λz:Bool -> Bool. λw:Bool. false) true) -true -(λx:Bool. λy:Bool -> Bool. y) ((λx:Bool. λy:Bool. true) true true) -false -true -(λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. true) ((λx:Bool. λy:(Bool -> Bool) -> Bool. true) false (λx:Bool -> Bool. false)) -λx:Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. true) false -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool. false) (λy:Bool. false)) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true))) -λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. false) ((λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. λz:Bool. true)) -true -λx:Bool -> Bool. x -(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) (λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. true)) ((λx:Bool. λy:Bool. true) false) -(λx:(Bool -> Bool) -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. true))) -true -true -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. false) -λx:Bool. λy:Bool. true -λx:Bool -> Bool. (λy:Bool -> Bool. λz:Bool. false) x ((λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. true)) -λx:Bool. λy:Bool. y -λx:Bool -> Bool. λy:Bool. false -(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. false) (λx:Bool -> Bool. true) (λx:Bool. λy:Bool. y) -true -false -(λx:Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) -true -λx:Bool -> Bool. true -(λx:Bool. x) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false) (λx:Bool. λy:Bool. false)) -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) ((λx:Bool. false) false) (λx:Bool -> Bool. true) -λx:Bool. x -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. false) (λx:Bool -> Bool. x) (λx:Bool. λy:Bool. x) -(λx:Bool -> Bool. λy:Bool. x) (λx:Bool. x) -λx:Bool. λy:Bool. y -false -false -false -false -(λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true)) (λx:Bool. x) -(λx:(Bool -> Bool) -> Bool -> Bool. x) (λx:Bool -> Bool. x) -(λx:(Bool -> Bool) -> Bool. (λy:Bool. true) false) ((λx:Bool. λy:Bool. λz:Bool -> Bool. false) true ((λx:Bool. true) true)) -false -(λx:Bool -> Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool. false) (λx:Bool -> Bool. true) false) -false -(λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. true) false -(λx:(Bool -> Bool) -> Bool. (λy:Bool. false) true) (λx:Bool -> Bool. false) -(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. false) (λx:Bool -> Bool. (λy:Bool -> Bool. λz:Bool. true) (λy:Bool. false)) -λx:Bool -> Bool. true -λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) x (λy:Bool -> Bool. true) -true -λx:Bool. λy:Bool. x -(λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. true) true ((λx:Bool. false) true) (λx:Bool. λy:Bool. false) -(λx:Bool. true) false -false -(λx:Bool -> Bool -> Bool. false) ((λx:Bool. λy:Bool. λz:Bool. true) ((λx:Bool. true) false)) -(λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. true) (λx:Bool. x)) -(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. false) false ((λx:Bool. λy:Bool. λz:Bool. true) true) ((λx:Bool -> Bool. λy:Bool. λz:Bool. true) ((λx:Bool. λy:Bool. true) false)) -false -(λx:Bool -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false)) (λx:Bool -> Bool. (λy:Bool -> Bool. true) x) -false -(λx:(Bool -> Bool) -> Bool. (λy:Bool. true) false) (λx:Bool -> Bool. x false) -λx:Bool -> Bool. (λy:Bool. x) (x true) -(λx:Bool. λy:Bool -> Bool -> Bool. false) false (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) -(λx:Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. false) (λx:Bool. false) false ((λx:Bool. x) ((λx:Bool. true) false)) -true -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false) ((λx:Bool -> Bool -> Bool. x) ((λx:Bool. λy:Bool. λz:Bool. true) true)) -false -true -λx:Bool. (λy:Bool. x) ((λy:Bool -> Bool. true) (λy:Bool. true)) -(λx:Bool. λy:Bool. λz:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) false -λx:Bool -> Bool. λy:Bool. false -λx:Bool. λy:Bool. y -true -(λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. false) (λx:Bool. true) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true)) ((λx:Bool. λy:Bool. λz:Bool. true) false) -(λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true) -λx:Bool -> Bool. λy:Bool. true -λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. λz:Bool. true) x -false -(λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true) -(λx:Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. false) (λx:Bool. x) ((λx:Bool. λy:Bool. true) false ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true))) -(λx:Bool. λy:Bool -> Bool. false) false ((λx:Bool. λy:Bool. false) true) -true -false -λx:Bool -> Bool. λy:Bool. (λz:Bool -> Bool -> Bool. true) (λz:Bool. λw:Bool. false) -λx:Bool -> Bool. (λy:Bool. λz:Bool. false) ((λy:Bool. true) true) -(λx:Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) true true false -(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. λa:Bool. false) true ((λx:Bool. true) false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false))) -λx:Bool -> Bool. λy:Bool. false -λx:Bool -> Bool. false -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. true) true)) -(λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. false) (λx:Bool. true) ((λx:Bool. true) true) (λx:Bool. x) -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) true -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) false ((λx:Bool. λy:Bool -> Bool. false) false) ((λx:Bool. true) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true))) -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool. λy:Bool. false) (λx:Bool. x) true -(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. true) true true ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) false (λx:Bool -> Bool. λy:Bool. true)) -(λx:Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. true) true -(λx:Bool. (λy:Bool. false) x) ((λx:Bool. false) ((λx:Bool. true) false)) -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool -> Bool. true) -(λx:Bool. x) false -λx:Bool -> Bool. true -false -false -λx:Bool -> Bool. (λy:Bool. x) ((λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. true)) -(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) ((λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true)) (λx:Bool -> Bool. true) -false -(λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. false) ((λx:Bool. true) false) -λx:Bool -> Bool. λy:Bool. y -λx:Bool. x -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. true) false (λx:Bool -> Bool. false)) -false -false -false -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true))) -λx:Bool. x -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool. true) ((λx:Bool. λy:Bool -> Bool. false) true) true -false -(λx:Bool. λy:Bool. λz:Bool. false) false -true -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. y) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool -> Bool. false)) -λx:Bool. (λy:Bool. true) ((λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. true)) -(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) false true ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. false))) -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool. x) ((λx:Bool. true) true)) -λx:Bool -> Bool. false -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) -true -λx:Bool -> Bool. false -(λx:Bool. true) ((λx:(Bool -> Bool) -> Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. false))) -false -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. true) true ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. false)) (λx:Bool. x) -true -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. false) ((λy:Bool. λz:Bool -> Bool. false) false) -λx:Bool -> Bool. λy:Bool. true -false -(λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. false) true true (λx:Bool. x) -λx:Bool. λy:Bool. true -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. true)) ((λx:Bool. false) true) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false) true -(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool. λz:Bool. true)) false -λx:Bool -> Bool. λy:Bool. x y -(λx:Bool. λy:Bool -> Bool. true) false -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. false)) -λx:Bool. λy:Bool. true -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. true) -λx:Bool. λy:Bool. x -(λx:Bool. λy:Bool. x) true -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) x) (λx:Bool -> Bool. λy:Bool. y) diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt deleted file mode 100644 index 0c031c9f..00000000 --- a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt +++ /dev/null @@ -1,200 +0,0 @@ -(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. true) (λx:Bool -> Bool. false) (λx:Bool. false) -(λx:Bool -> Bool. false) (λx:Bool. false) -true -(λx:Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. λy:Bool. false) (λx:Bool. x)) -true -(λx:Bool. x) ((λx:Bool. x) ((λx:Bool -> Bool. true) (λx:Bool. false))) -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. false) false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false) -λx:Bool -> Bool. (λy:Bool. x) false -true -(λx:Bool. λy:Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. true))) -true -λx:Bool. λy:Bool. false -false -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool. λy:Bool. false) (λx:Bool. λy:Bool. true) ((λx:Bool. λy:(Bool -> Bool) -> Bool. true) true (λx:Bool -> Bool. false)) -(λx:Bool -> Bool. (λy:Bool. false) false) ((λx:Bool -> Bool. x) (λx:Bool. false)) -false -(λx:Bool. (λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. false) false) -λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) ((λy:Bool. λz:Bool -> Bool. false) x) -true -(λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. true) true true (λx:Bool. x) -true -false -true -λx:Bool. x -false -(λx:Bool. λy:Bool. false) false ((λx:Bool. λy:Bool. true) false ((λx:Bool. true) true)) -true -(λx:Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. true) false -(λx:(Bool -> Bool) -> Bool. (λy:Bool. false) true) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) -(λx:Bool. λy:Bool -> Bool. true) ((λx:Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true))) -false -true -false -(λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true)) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true)) -λx:Bool. false -true -false -(λx:Bool. λy:Bool. false) false false -true -(λx:Bool. λy:Bool. true) ((λx:Bool. false) true) true -λx:Bool. true -(λx:Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. false) false false false -(λx:Bool. λy:Bool -> Bool. y) ((λx:Bool. x) true) -λx:Bool. false -false -λx:Bool -> Bool. x false -true -λx:Bool -> Bool. x ((λy:Bool. false) false) -λx:Bool -> Bool. x -(λx:Bool. λy:Bool. λz:Bool -> Bool. true) true ((λx:Bool. λy:Bool -> Bool. false) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true))) -(λx:Bool -> Bool. false) (λx:Bool. false) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. x) true -λx:Bool. true -false -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. true) false) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. true)) -false -false -false -true -λx:Bool. x -false -true -(λx:Bool. x) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false)) -(λx:Bool. (λy:Bool. false) x) true -false -λx:Bool -> Bool. (λy:Bool. λz:Bool. true) true true -(λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. λz:Bool. true) false false) -false -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) true ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true) ((λx:Bool. λy:Bool. false) ((λx:Bool. true) false)) -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool. true) true (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. false) true ((λx:Bool. λy:Bool. true) true)) -true -false -false -(λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool. true)) false -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. false) -true -false -false -(λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true) -λx:Bool. x -true -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:Bool. true) true) (λx:Bool. x) -(λx:Bool. (λy:Bool. true) x) false -(λx:Bool -> Bool. x) (λx:Bool. x) false -(λx:Bool. λy:Bool -> Bool. true) false (λx:Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. true)) -(λx:Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. false) true ((λx:Bool. true) true) ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. true) true) -false -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false) (λx:Bool -> Bool. true) -false -false -λx:Bool. true -true -λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. true) ((λy:Bool. λz:Bool. false) true) -λx:Bool -> Bool. x -(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool. true) true) false -true -λx:Bool -> Bool. x -(λx:Bool. λy:Bool -> Bool. false) ((λx:Bool. false) false) (λx:Bool. x) -(λx:Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) (λx:Bool. true) false (λx:Bool -> Bool. x true) -λx:Bool. false -false -λx:Bool. false -λx:Bool. false -true -false -false -(λx:Bool. (λy:Bool. true) true) ((λx:Bool -> Bool. λy:Bool -> Bool -> Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) true)) -(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. y) (λx:Bool -> Bool. false) -λx:Bool. false -(λx:Bool -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true)) ((λx:Bool. λy:Bool -> Bool. false) false) -(λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. false) false) false -(λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false) -(λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. x false) -false -(λx:Bool. true) false -λx:Bool -> Bool. λy:Bool. true -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. false) ((λy:Bool. λz:Bool -> Bool. true) true) -false -true -λx:Bool -> Bool. λy:Bool. y -true -false -true -(λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) true)) -λx:Bool -> Bool. λy:Bool. (λz:Bool. true) y -λx:Bool. true -(λx:Bool. λy:Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) false -λx:Bool. (λy:(Bool -> Bool) -> Bool. x) (λy:Bool -> Bool. x) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true) ((λx:Bool. x) false) -true -λx:Bool. λy:Bool. x -(λx:Bool. false) false -false -(λx:Bool. true) true -(λx:Bool. λy:Bool. λz:Bool. true) false -true -false -(λx:(Bool -> Bool) -> Bool. false) ((λx:Bool. λy:Bool. λz:Bool -> Bool. true) false ((λx:Bool. false) true)) -(λx:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false))) -(λx:Bool -> Bool. (λy:Bool. true) true) (λx:Bool. (λy:Bool. false) x) -false -true -true -(λx:Bool. λy:Bool. λz:Bool. true) false true true -false -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) false ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false) (λx:Bool. x) -(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) true true (λx:Bool -> Bool. (λy:Bool. λz:Bool. false) false) -false -false -true -λx:Bool -> Bool. false -false -(λx:(Bool -> Bool) -> Bool. (λy:Bool. true) true) (λx:Bool -> Bool. true) -(λx:Bool -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. false) (λx:Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool. λz:Bool -> Bool. false) false true) -λx:Bool. x -false -(λx:Bool. λy:Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. false) (λx:Bool -> Bool. true) ((λx:Bool. false) false)) -(λx:Bool. x) true -true -λx:Bool -> Bool. λy:Bool. false -true -false -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false) -(λx:Bool. λy:Bool -> Bool. false) ((λx:Bool. false) true) ((λx:Bool. λy:Bool. λz:Bool. true) false true) -false -(λx:Bool -> Bool. (λy:Bool. true) false) (λx:Bool. false) -false -false -true -false -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true (λx:Bool. x) false -(λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) true ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) -true -true -(λx:(Bool -> Bool) -> Bool. x) (λx:Bool -> Bool. false) -(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. true) ((λx:Bool. true) true) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) false (λx:Bool -> Bool. false)) -true -λx:Bool. (λy:Bool. true) ((λy:Bool -> Bool. true) (λy:Bool. true)) -true -true -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) (λx:Bool -> Bool. true) false ((λx:Bool. λy:Bool -> Bool. false) false) -λx:Bool. x -λx:Bool -> Bool. false -true -λx:Bool -> Bool. true -(λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. true) ((λx:Bool. x) false) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) (λx:Bool -> Bool. false) -λx:Bool. (λy:Bool. λz:Bool. false) ((λy:Bool -> Bool. true) (λy:Bool. true)) -false -λx:Bool. (λy:Bool. λz:Bool. true) x -λx:Bool. (λy:Bool. λz:Bool. false) x x -true -(λx:Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. false) true ((λx:Bool. false) false) ((λx:Bool. x) false) -(λx:Bool -> Bool. x true) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. x)) -(λx:Bool -> Bool -> Bool. λy:Bool. y) ((λx:Bool. λy:Bool. λz:Bool. λw:Bool. true) true false) -true -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false -(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. true) true (λx:Bool. λy:Bool. false) false -λx:Bool. x diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv deleted file mode 100644 index 2b37e2b3..00000000 --- a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv +++ /dev/null @@ -1,2001 +0,0 @@ -0 -268.9974234499506 -1 -275.61368438169603 -2 -276.69326542744767 -3 -277.08857634639025 -4 -277.31535648957856 -5 -277.4705297445105 -6 -277.5871368391721 -7 -277.68026130109786 -8 -277.75777583928516 -9 -277.82413378018487 -10 -277.88202366782593 -11 -277.933174863397 -12 -277.9787734641662 -13 -278.0196842142628 -14 -278.05657165139684 -15 -278.08996784570695 -16 -278.12031152824 -17 -278.1479717450886 -18 -278.17326301429915 -19 -278.19645569285524 -20 -278.21778352935354 -21 -278.23744946573913 -22 -278.2556302730326 -23 -278.272480355396 -24 -278.28813492475075 -25 -278.3027126772456 -26 -278.31631806349526 -27 -278.32904322128303 -28 -278.3409696247989 -29 -278.35216949435664 -30 -278.3627070030896 -31 -278.372639311265 -32 -278.3820174540819 -33 -278.3908871048695 -34 -278.39928923224056 -35 -278.40726066695026 -36 -278.41483459179733 -37 -278.42204096586966 -38 -278.4289068927295 -39 -278.43545694063704 -40 -278.4417134217212 -41 -278.4476966359091 -42 -278.4534250845886 -43 -278.4589156581943 -44 -278.4641838013023 -45 -278.46924365827647 -46 -278.4741082020537 -47 -278.4787893482878 -48 -278.48329805674655 -49 -278.48764442157295 -50 -278.49183775181575 -51 -278.49588664341684 -52 -278.4997990436849 -53 -278.503582309161 -54 -278.50724325762155 -55 -278.51078821492 -56 -278.514223057221 -57 -278.51755324915524 -58 -278.52078387832796 -59 -278.5239196865777 -60 -278.5269650983246 -61 -278.5299242463061 -62 -278.5328009949784 -63 -278.53559896180354 -64 -278.5383215366478 -65 -278.5409718994587 -66 -278.54355303641046 -67 -278.54606775463816 -68 -278.54851869571536 -69 -278.55090834798466 -70 -278.55323905784036 -71 -278.55551304008003 -72 -278.5577323873802 -73 -278.5598990790068 -74 -278.56201498880256 -75 -278.564081892531 -76 -278.5661014746309 -77 -278.56807533442446 -78 -278.570004991844 -79 -278.5718918926939 -80 -278.57373741351773 -81 -278.5755428660742 -82 -278.57730950147686 -83 -278.579038514018 -84 -278.5807310447009 -85 -278.5823881845065 -86 -278.58401097742 -87 -278.585600423234 -88 -278.5871574801425 -89 -278.58868306715294 -90 -278.5901780663216 -91 -278.59164332482777 -92 -278.5930796569101 -93 -278.5944878456569 -94 -278.5958686446815 -95 -278.5972227796782 -96 -278.5985509498747 -97 -278.5998538293881 -98 -278.60113206848655 -99 -278.6023862947792 -100 -278.6036171143111 -101 -278.6048251126081 -102 -278.6060108556395 -103 -278.60717489072965 -104 -278.60831774741206 -105 -278.6094399382259 -106 -278.6105419594728 -107 -278.61162429192086 -108 -278.6126874014744 -109 -278.6137317397975 -110 -278.6147577449114 -111 -278.61576584174514 -112 -278.6167564426699 -113 -278.6177299479939 -114 -278.6186867464353 -115 -278.6196272155662 -116 -278.62055172224046 -117 -278.6214606229886 -118 -278.6223542644031 -119 -278.6232329834971 -120 -278.6240971080503 -121 -278.6249469569333 -122 -278.6257828404206 -123 -278.6266050604856 -124 -278.62741391108364 -125 -278.6282096784226 -126 -278.62899264121825 -127 -278.62976307094056 -128 -278.63052123205006 -129 -278.63126738222286 -130 -278.6320017725618 -131 -278.6327246478089 -132 -278.6334362465379 -133 -278.6341368013459 -134 -278.6348265390359 -135 -278.6355056807902 -136 -278.63617444233853 -137 -278.6368330341202 -138 -278.6374816614384 -139 -278.63812052461 -140 -278.6387498191093 -141 -278.63936973570725 -142 -278.63998046060266 -143 -278.6405821755558 -144 -278.64117505800715 -145 -278.6417592811999 -146 -278.6423350142962 -147 -278.6429024224889 -148 -278.6434616671083 -149 -278.6440129057273 -150 -278.64455629226444 -151 -278.6450919770765 -152 -278.6456201070598 -153 -278.6461408257376 -154 -278.6466542733485 -155 -278.64716058693386 -156 -278.6476599004228 -157 -278.6481523447082 -158 -278.64863804772784 -159 -278.6491171345428 -160 -278.64958972740584 -161 -278.6500559458352 -162 -278.6505159066859 -163 -278.6509697242133 -164 -278.6514175101426 -165 -278.6518593737282 -166 -278.65229542181686 -167 -278.65272575891095 -168 -278.6531504872213 -169 -278.65356970672684 -170 -278.6539835152284 -171 -278.654392008404 -172 -278.65479527985923 -173 -278.6551934211781 -174 -278.6555865219721 -175 -278.65597466992944 -176 -278.6563579508596 -177 -278.65673644874045 -178 -278.65711024576143 -179 -278.6574794223659 -180 -278.6578440572955 -181 -278.65820422762675 -182 -278.65856000881536 -183 -278.65891147473155 -184 -278.6592586976978 -185 -278.6596017485294 -186 -278.65994069656205 -187 -278.66027560969667 -188 -278.6606065544244 -189 -278.6609335958665 -190 -278.66125679780146 -191 -278.66157622269924 -192 -278.66189193175074 -193 -278.66220398489736 -194 -278.6625124408605 -195 -278.66281735717024 -196 -278.66311879019304 -197 -278.66341679515585 -198 -278.6637114261766 -199 -278.6640027362871 -200 -278.66429077745806 -201 -278.6645756006239 -202 -278.6648572557077 -203 -278.66513579164166 -204 -278.6654112563918 -205 -278.6656836969791 -206 -278.6659531595007 -207 -278.66621968915223 -208 -278.66648333024614 -209 -278.66674412623325 -210 -278.66700211972204 -211 -278.66725735249594 -212 -278.6675098655345 -213 -278.66775969902886 -214 -278.6680068924016 -215 -278.66825148432275 -216 -278.66849351272623 -217 -278.6687330148257 -218 -278.6689700271343 -219 -278.66920458547503 -220 -278.66943672499855 -221 -278.66966648020025 -222 -278.66989388492885 -223 -278.670118972407 -224 -278.670341775241 -225 -278.6705623254341 -226 -278.67078065440336 -227 -278.6709967929906 -228 -278.67121077147004 -229 -278.67142261956946 -230 -278.67163236647644 -231 -278.67184004085084 -232 -278.6720456708362 -233 -278.67224928407177 -234 -278.6724509077041 -235 -278.67265056839375 -236 -278.67284829233074 -237 -278.67304410524173 -238 -278.6732380323992 -239 -278.6734300986337 -240 -278.67362032834046 -241 -278.67380874549184 -242 -278.67399537364355 -243 -278.6741802359428 -244 -278.67436335514185 -245 -278.67454475360023 -246 -278.6747244532955 -247 -278.67490247583396 -248 -278.6750788424535 -249 -278.675253574034 -250 -278.67542669110424 -251 -278.67559821385083 -252 -278.6757681621219 -253 -278.6759365554365 -254 -278.6761034129905 -255 -278.6762687536651 -256 -278.67643259602886 -257 -278.6765949583494 -258 -278.67675585859615 -259 -278.6769153144467 -260 -278.6770733432934 -261 -278.67722996225075 -262 -278.6773851881563 -263 -278.67753903758125 -264 -278.6776915268332 -265 -278.6778426719623 -266 -278.67799248876463 -267 -278.6781409927897 -268 -278.67828819934437 -269 -278.67843412349663 -270 -278.6785787800831 -271 -278.6787221837085 -272 -278.67886434875606 -273 -278.6790052893885 -274 -278.67914501955164 -275 -278.67928355298204 -276 -278.6794209032077 -277 -278.6795570835535 -278 -278.6796921071441 -279 -278.6798259869111 -280 -278.679958735592 -281 -278.68009036573574 -282 -278.68022088970895 -283 -278.68035031969634 -284 -278.68047866770263 -285 -278.68060594556243 -286 -278.68073216493593 -287 -278.68085733731647 -288 -278.68098147403344 -289 -278.68110458625284 -290 -278.6812266849835 -291 -278.68134778107856 -292 -278.681467885237 -293 -278.68158700800814 -294 -278.6817051597957 -295 -278.68182235085567 -296 -278.68193859130514 -297 -278.682053891119 -298 -278.6821682601372 -299 -278.6822817080642 -300 -278.6823942444718 -301 -278.6825058788037 -302 -278.6826166203753 -303 -278.6827264783764 -304 -278.6828354618744 -305 -278.68294357981523 -306 -278.683050841027 -307 -278.683157254221 -308 -278.68326282799325 -309 -278.6833675708278 -310 -278.6834714910976 -311 -278.68357459706635 -312 -278.68367689689245 -313 -278.6837783986277 -314 -278.68387911022097 -315 -278.68397903952035 -316 -278.684078194272 -317 -278.6841765821259 -318 -278.6842742106349 -319 -278.68437108725743 -320 -278.68446721935715 -321 -278.6845626142058 -322 -278.684657278988 -323 -278.68475122079514 -324 -278.6848444466345 -325 -278.6849369634252 -326 -278.68502877800324 -327 -278.68511989712084 -328 -278.68521032744894 -329 -278.6853000755766 -330 -278.68538914801513 -331 -278.6854775511953 -332 -278.6855652914748 -333 -278.6856523751331 -334 -278.6857388083756 -335 -278.6858245973346 -336 -278.68590974807034 -337 -278.6859942665732 -338 -278.68607815876175 -339 -278.686161430487 -340 -278.68624408753107 -341 -278.68632613561095 -342 -278.68640758037526 -343 -278.6864884274116 -344 -278.6865686822411 -345 -278.68664835032155 -346 -278.6867274370518 -347 -278.6868059477661 -348 -278.6868838877422 -349 -278.68696126219606 -350 -278.68703807628566 -351 -278.6871143351134 -352 -278.687190043722 -353 -278.68726520710123 -354 -278.6873398301844 -355 -278.6874139178504 -356 -278.6874874749259 -357 -278.6875605061829 -358 -278.6876330163434 -359 -278.68770501007765 -360 -278.68777649200416 -361 -278.6878474666933 -362 -278.68791793866524 -363 -278.6879879123922 -364 -278.6880573922991 -365 -278.68812638276285 -366 -278.6881948881139 -367 -278.688262912638 -368 -278.6883304605742 -369 -278.68839753611843 -370 -278.68846414342175 -371 -278.6885302865914 -372 -278.6885959696929 -373 -278.6886611967485 -374 -278.68872597174027 -375 -278.6887902986068 -376 -278.68885418124796 -377 -278.68891762352297 -378 -278.6889806292517 -379 -278.68904320221435 -380 -278.68910534615213 -381 -278.6891670647706 -382 -278.6892283617358 -383 -278.6892892406762 -384 -278.6893497051854 -385 -278.6894097588196 -386 -278.68946940509943 -387 -278.68952864751134 -388 -278.68958748950524 -389 -278.6896459344981 -390 -278.689703985873 -391 -278.68976164697733 -392 -278.6898189211286 -393 -278.6898758116087 -394 -278.6899323216692 -395 -278.6899884545291 -396 -278.69004421337553 -397 -278.69009960136395 -398 -278.6901546216215 -399 -278.69020927724193 -400 -278.69026357129076 -401 -278.69031750680284 -402 -278.69037108678435 -403 -278.6904243142122 -404 -278.6904771920354 -405 -278.69052972317286 -406 -278.6905819105169 -407 -278.6906337569329 -408 -278.6906852652564 -409 -278.6907364382982 -410 -278.69078727884136 -411 -278.69083778964233 -412 -278.69088797343244 -413 -278.6909378329163 -414 -278.69098737077377 -415 -278.6910365896582 -416 -278.6910854921993 -417 -278.69113408100264 -418 -278.6911823586463 -419 -278.69123032768795 -420 -278.6912779906589 -421 -278.6913253500682 -422 -278.6913724084012 -423 -278.69141916811964 -424 -278.6914656316629 -425 -278.69151180144877 -426 -278.6915576798702 -427 -278.6916032693014 -428 -278.6916485720916 -429 -278.6916935905702 -430 -278.6917383270451 -431 -278.69178278380235 -432 -278.6918269631074 -433 -278.69187086720524 -434 -278.6919144983209 -435 -278.6919578586578 -436 -278.6920009503992 -437 -278.69204377571134 -438 -278.6920863367371 -439 -278.6921286356024 -440 -278.6921706744133 -441 -278.6922124552566 -442 -278.69225398020023 -443 -278.69229525129464 -444 -278.6923362705694 -445 -278.6923770400388 -446 -278.69241756169623 -447 -278.69245783752075 -448 -278.69249786946955 -449 -278.6925376594848 -450 -278.6925772094923 -451 -278.6926165213982 -452 -278.6926555970926 -453 -278.69269443844917 -454 -278.69273304732496 -455 -278.6927714255605 -456 -278.6928095749799 -457 -278.69284749739086 -458 -278.6928851945855 -459 -278.69292266833935 -460 -278.692959920414 -461 -278.6929969525536 -462 -278.6930337664886 -463 -278.69307036393275 -464 -278.69310674658533 -465 -278.69314291613136 -466 -278.69317887424006 -467 -278.693214622567 -468 -278.6932501627529 -469 -278.6932854964228 -470 -278.69332062519067 -471 -278.6933555506532 -472 -278.6933902743948 -473 -278.6934247979859 -474 -278.69345912298337 -475 -278.6934932509308 -476 -278.6935271833572 -477 -278.6935609217801 -478 -278.69359446770096 -479 -278.6936278226121 -480 -278.6936609879906 -481 -278.69369396530067 -482 -278.69372675599425 -483 -278.693759361512 -484 -278.6937917832803 -485 -278.69382402271464 -486 -278.6938560812169 -487 -278.69388796017813 -488 -278.69391966097754 -489 -278.69395118498215 -490 -278.693982533546 -491 -278.69401370801364 -492 -278.6940447097167 -493 -278.69407553997587 -494 -278.69410620010126 -495 -278.6941366913907 -496 -278.69416701513074 -497 -278.6941971725985 -498 -278.694227165058 -499 -278.6942569937654 -500 -278.6942866599636 -501 -278.694316164886 -502 -278.6943455097547 -503 -278.6943746957844 -504 -278.6944037241745 -505 -278.69443259611893 -506 -278.6944613127977 -507 -278.69448987538414 -508 -278.69451828504015 -509 -278.69454654291695 -510 -278.6945746501577 -511 -278.69460260789486 -512 -278.69463041725163 -513 -278.694658079341 -514 -278.6946855952686 -515 -278.6947129661283 -516 -278.6947401930068 -517 -278.6947672769794 -518 -278.6947942191153 -519 -278.6948210204724 -520 -278.69484768209986 -521 -278.6948742050396 -522 -278.6949005903237 -523 -278.6949268389757 -524 -278.6949529520092 -525 -278.69497893043297 -526 -278.6950047752443 -527 -278.6950304874311 -528 -278.695056067977 -529 -278.69508151785413 -530 -278.695106838029 -531 -278.6951320294568 -532 -278.69515709308774 -533 -278.6951820298629 -534 -278.6952068407148 -535 -278.69523152657 -536 -278.69525608834675 -537 -278.695280526954 -538 -278.69530484329545 -539 -278.69532903826547 -540 -278.69535311275206 -541 -278.6953770676357 -542 -278.6954009037899 -543 -278.69542462208 -544 -278.6954482233646 -545 -278.69547170849523 -546 -278.69549507831664 -547 -278.6955183336664 -548 -278.6955414753742 -549 -278.69556450426523 -550 -278.6955874211552 -551 -278.6956102268551 -552 -278.6956329221683 -553 -278.69565550789054 -554 -278.69567798481376 -555 -278.69570035372095 -556 -278.69572261538883 -557 -278.69574477058967 -558 -278.6957668200866 -559 -278.6957887646389 -560 -278.6958106049987 -561 -278.6958323419109 -562 -278.6958539761166 -563 -278.69587550834774 -564 -278.69589693933415 -565 -278.69591826979564 -566 -278.695939500449 -567 -278.6959606320038 -568 -278.6959816651636 -569 -278.69600260062737 -570 -278.6960234390877 -571 -278.6960441812319 -572 -278.6960648277403 -573 -278.69608537928957 -574 -278.69610583654986 -575 -278.6961262001854 -576 -278.6961464708556 -577 -278.6961666492151 -578 -278.6961867359121 -579 -278.6962067315893 -580 -278.69622663688597 -581 -278.6962464524346 -582 -278.69626617886314 -583 -278.6962858167932 -584 -278.6963053668433 -585 -278.69632482962663 -586 -278.69634420574954 -587 -278.6963634958149 -588 -278.6963827004213 -589 -278.696401820161 -590 -278.6964208556216 -591 -278.696439807388 -592 -278.69645867603737 -593 -278.696477462144 -594 -278.6964961662783 -595 -278.6965147890033 -596 -278.69653333087956 -597 -278.69655179246354 -598 -278.69657017430546 -599 -278.69658847695246 -600 -278.696606700947 -601 -278.6966248468258 -602 -278.69664291512305 -603 -278.69666090636827 -604 -278.6966788210861 -605 -278.69669665979757 -606 -278.6967144230188 -607 -278.6967321112621 -608 -278.6967497250358 -609 -278.69676726484454 -610 -278.69678473118825 -611 -278.6968021245623 -612 -278.6968194454597 -613 -278.6968366943681 -614 -278.69685387177213 -615 -278.6968709781515 -616 -278.6968880139837 -617 -278.6969049797408 -618 -278.69692187589135 -619 -278.6969387029016 -620 -278.69695546123137 -621 -278.69697215133993 -622 -278.69698877368086 -623 -278.6970053287047 -624 -278.6970218168576 -625 -278.6970382385833 -626 -278.69705459432197 -627 -278.6970708845092 -628 -278.6970871095784 -629 -278.6971032699581 -630 -278.6971193660748 -631 -278.69713539835146 -632 -278.6971513672061 -633 -278.6971672730545 -634 -278.6971831163096 -635 -278.6971988973818 -636 -278.6972146166751 -637 -278.69723027459327 -638 -278.69724587153627 -639 -278.69726140789925 -640 -278.69727688407687 -641 -278.6972923004579 -642 -278.69730765743026 -643 -278.69732295537733 -644 -278.69733819468064 -645 -278.697353375718 -646 -278.69736849886385 -647 -278.6973835644904 -648 -278.6973985729677 -649 -278.6974135246603 -650 -278.69742841993207 -651 -278.69744325914326 -652 -278.69745804265176 -653 -278.6974727708125 -654 -278.6974874439762 -655 -278.69750206249284 -656 -278.6975166267094 -657 -278.6975311369683 -658 -278.69754559361127 -659 -278.6975599969768 -660 -278.6975743474 -661 -278.69758864521384 -662 -278.69760289074964 -663 -278.69761708433407 -664 -278.69763122629234 -665 -278.6976453169479 -666 -278.69765935662133 -667 -278.6976733456293 -668 -278.6976872842867 -669 -278.69770117290733 -670 -278.69771501180134 -671 -278.6977288012761 -672 -278.69774254163656 -673 -278.69775623318725 -674 -278.6977698762275 -675 -278.69778347105614 -676 -278.69779701797006 -677 -278.6978105172613 -678 -278.6978239692227 -679 -278.6978373741431 -680 -278.6978507323091 -681 -278.697864044006 -682 -278.6978773095158 -683 -278.69789052911887 -684 -278.6979037030936 -685 -278.69791683171667 -686 -278.6979299152601 -687 -278.697942953997 -688 -278.69795594819686 -689 -278.6979688981263 -690 -278.69798180405184 -691 -278.69799466623715 -692 -278.69800748494305 -693 -278.69802026042845 -694 -278.6980329929516 -695 -278.69804568276766 -696 -278.69805833012947 -697 -278.6980709352891 -698 -278.6980834984961 -699 -278.69809601999873 -700 -278.6981085000409 -701 -278.69812093886816 -702 -278.69813333672204 -703 -278.6981456938423 -704 -278.69815801046786 -705 -278.69817028683394 -706 -278.6981825231765 -707 -278.6981947197286 -708 -278.69820687671944 -709 -278.69821899438045 -710 -278.69823107293826 -711 -278.6982431126183 -712 -278.6982551136454 -713 -278.6982670762412 -714 -278.69827900062813 -715 -278.69829088702267 -716 -278.6983027356445 -717 -278.69831454670765 -718 -278.6983263204274 -719 -278.69833805701546 -720 -278.69834975668243 -721 -278.69836141963873 -722 -278.6983730460913 -723 -278.6983846362462 -724 -278.6983961903078 -725 -278.6984077084787 -726 -278.69841919096183 -727 -278.6984306379559 -728 -278.6984420496599 -729 -278.6984534262701 -730 -278.69846476798244 -731 -278.6984760749911 -732 -278.6984873474883 -733 -278.6984985856647 -734 -278.6985097897107 -735 -278.6985209598142 -736 -278.69853209616144 -737 -278.6985431989391 -738 -278.69855426832964 -739 -278.69856530451693 -740 -278.69857630768223 -741 -278.6985872780045 -742 -278.698598215663 -743 -278.69860912083436 -744 -278.69861999369516 -745 -278.69863083442067 -746 -278.6986416431822 -747 -278.6986524201535 -748 -278.69866316550406 -749 -278.69867387940457 -750 -278.6986845620221 -751 -278.6986952135248 -752 -278.69870583407726 -753 -278.69871642384487 -754 -278.69872698298997 -755 -278.6987375116756 -756 -278.69874801006273 -757 -278.69875847831025 -758 -278.6987689165765 -759 -278.69877932501964 -760 -278.69878970379517 -761 -278.698800053059 -762 -278.6988103729645 -763 -278.69882066366415 -764 -278.69883092531 -765 -278.69884115805246 -766 -278.6988513620413 -767 -278.69886153742397 -768 -278.69887168434855 -769 -278.69888180296107 -770 -278.69889189340626 -771 -278.6989019558291 -772 -278.6989119903719 -773 -278.69892199717566 -774 -278.698931976383 -775 -278.6989419281331 -776 -278.6989518525648 -777 -278.6989617498159 -778 -278.69897162002366 -779 -278.6989814633231 -780 -278.69899127985065 -781 -278.69900106973904 -782 -278.6990108331209 -783 -278.69902057012933 -784 -278.699030280895 -785 -278.6990399655477 -786 -278.6990496242164 -787 -278.6990592570304 -788 -278.69906886411576 -789 -278.69907844559964 -790 -278.69908800160715 -791 -278.69909753226375 -792 -278.6991070376916 -793 -278.6991165180149 -794 -278.6991259733551 -795 -278.69913540383266 -796 -278.6991448095682 -797 -278.6991541906818 -798 -278.69916354729094 -799 -278.6991728795138 -800 -278.69918218746733 -801 -278.69919147126683 -802 -278.69920073102844 -803 -278.6992099668655 -804 -278.69921917889235 -805 -278.6992283672211 -806 -278.69923753196343 -807 -278.69924667323215 -808 -278.6992557911358 -809 -278.69926488578477 -810 -278.6992739572878 -811 -278.6992830057527 -812 -278.6992920312872 -813 -278.6993010339979 -814 -278.69931001398965 -815 -278.6993189713689 -816 -278.69932790623847 -817 -278.69933681870333 -818 -278.69934570886585 -819 -278.69935457682743 -820 -278.69936342268994 -821 -278.699372246555 -822 -278.6993810485211 -823 -278.6993898286895 -824 -278.69939858715736 -825 -278.6994073240233 -826 -278.69941603938383 -827 -278.6994247333359 -828 -278.6994334059766 -829 -278.6994420573995 -830 -278.6994506877003 -831 -278.699459296973 -832 -278.6994678853102 -833 -278.69947645280484 -834 -278.6994849995495 -835 -278.69949352563515 -836 -278.699502031153 -837 -278.6995105161928 -838 -278.69951898084423 -839 -278.69952742519655 -840 -278.69953584933654 -841 -278.69954425335504 -842 -278.69955263733596 -843 -278.6995610013685 -844 -278.69956934553676 -845 -278.69957766992684 -846 -278.69958597462386 -847 -278.69959425971126 -848 -278.699602525274 -849 -278.6996107713935 -850 -278.6996189981532 -851 -278.69962720563564 -852 -278.69963539392165 -853 -278.69964356309214 -854 -278.699651713228 -855 -278.69965984440773 -856 -278.6996679567115 -857 -278.69967605021867 -858 -278.699684125007 -859 -278.6996921811534 -860 -278.69970021873615 -861 -278.6997082378309 -862 -278.6997162385146 -863 -278.69972422086323 -864 -278.6997321849512 -865 -278.6997401308534 -866 -278.69974805864433 -867 -278.6997559683975 -868 -278.69976386018607 -869 -278.69977173408284 -870 -278.69977959015995 -871 -278.69978742848923 -872 -278.69979524914214 -873 -278.69980305218905 -874 -278.69981083770097 -875 -278.6998186057469 -876 -278.69982635639775 -877 -278.69983408972143 -878 -278.69984180578695 -879 -278.6998495046619 -880 -278.6998571864146 -881 -278.6998648511121 -882 -278.6998724988212 -883 -278.6998801296087 -884 -278.6998877435394 -885 -278.6998953406794 -886 -278.6999029210949 -887 -278.6999104848489 -888 -278.6999180320066 -889 -278.6999255626317 -890 -278.69993307678783 -891 -278.6999405745378 -892 -278.69994805594416 -893 -278.69995552107014 -894 -278.69996296997584 -895 -278.6999704027251 -896 -278.69997781937633 -897 -278.69998521999173 -898 -278.69999260463163 -899 -278.69999997335555 -900 -278.70000732622356 -901 -278.7000146632952 -902 -278.70002198462777 -903 -278.7000292902802 -904 -278.70003658031163 -905 -278.7000438547786 -906 -278.7000511137396 -907 -278.7000583572504 -908 -278.70006558536886 -909 -278.70007279815087 -910 -278.7000799956512 -911 -278.70008717792683 -912 -278.70009434503316 -913 -278.70010149702404 -914 -278.7001086339546 -915 -278.7001157558789 -916 -278.7001228628514 -917 -278.7001299549248 -918 -278.70013703215363 -919 -278.70014409459003 -920 -278.7001511422859 -921 -278.7001581752947 -922 -278.70016519366817 -923 -278.70017219745705 -924 -278.70017918671414 -925 -278.70018616148946 -926 -278.7001931218339 -927 -278.70020006779805 -928 -278.7002069994325 -929 -278.7002139167858 -930 -278.70022081990777 -931 -278.7002277088489 -932 -278.7002345836572 -933 -278.70024144438116 -934 -278.7002482910693 -935 -278.7002551237693 -936 -278.70026194253035 -937 -278.7002687473985 -938 -278.7002755384206 -939 -278.7002823156457 -940 -278.7002890791181 -941 -278.70029582888554 -942 -278.7003025649939 -943 -278.7003092874886 -944 -278.7003159964158 -945 -278.7003226918208 -946 -278.70032937374793 -947 -278.70033604224227 -948 -278.7003426973489 -949 -278.7003493391113 -950 -278.7003559675733 -951 -278.70036258278 -952 -278.70036918477393 -953 -278.700375773598 -954 -278.70038234929615 -955 -278.70038891191007 -956 -278.70039546148314 -957 -278.7004019980575 -958 -278.70040852167466 -959 -278.7004150323762 -960 -278.70042153020506 -961 -278.70042801520106 -962 -278.70043448740665 -963 -278.70044094686097 -964 -278.70044739360605 -965 -278.70045382768154 -966 -278.7004602491281 -967 -278.70046665798486 -968 -278.70047305429216 -969 -278.7004794380897 -970 -278.7004858094162 -971 -278.700492168311 -972 -278.7004985148127 -973 -278.7005048489597 -974 -278.7005111707911 -975 -278.7005174803452 -976 -278.7005237776588 -977 -278.70053006277055 -978 -278.7005363357179 -979 -278.70054259653784 -980 -278.70054884526786 -981 -278.700555081945 -982 -278.7005613066057 -983 -278.7005675192868 -984 -278.7005737200246 -985 -278.70057990885454 -986 -278.7005860858133 -987 -278.70059225093706 -988 -278.7005984042606 -989 -278.7006045458193 -990 -278.7006106756485 -991 -278.700616793783 -992 -278.7006229002585 -993 -278.7006289951088 -994 -278.70063507836835 -995 -278.7006411500713 -996 -278.7006472102524 -997 -278.70065325894524 -998 -278.700659296183 -999 -278.700665322 -1000 -278.70067133642846 -1001 -278.70067733950344 -1002 -278.7006833312561 -1003 -278.7006893117205 -1004 -278.70069528092847 -1005 -278.70070123891304 -1006 -278.7007071857062 -1007 -278.70071312134047 -1008 -278.7007190458471 -1009 -278.7007249592589 -1010 -278.7007308616074 -1011 -278.70073675292366 -1012 -278.70074263323903 -1013 -278.7007485025849 -1014 -278.70075436099177 -1015 -278.70076020849126 -1016 -278.70076604511394 -1017 -278.7007718708899 -1018 -278.7007776858499 -1019 -278.7007834900241 -1020 -278.7007892834421 -1021 -278.7007950661353 -1022 -278.70080083813167 -1023 -278.70080659946166 -1024 -278.70081235015584 -1025 -278.7008180902417 -1026 -278.7008238197492 -1027 -278.7008295387074 -1028 -278.70083524714505 -1029 -278.7008409450911 -1030 -278.7008466325746 -1031 -278.7008523096231 -1032 -278.70085797626575 -1033 -278.7008636325303 -1034 -278.7008692784449 -1035 -278.70087491403746 -1036 -278.70088053933597 -1037 -278.70088615436833 -1038 -278.70089175916115 -1039 -278.7008973537419 -1040 -278.70090293813917 -1041 -278.70090851237893 -1042 -278.70091407648846 -1043 -278.7009196304943 -1044 -278.7009251744237 -1045 -278.7009307083029 -1046 -278.70093623215877 -1047 -278.7009417460176 -1048 -278.70094724990446 -1049 -278.7009527438476 -1050 -278.70095822787175 -1051 -278.7009637020024 -1052 -278.700969166266 -1053 -278.70097462068804 -1054 -278.70098006529395 -1055 -278.70098550010874 -1056 -278.70099092515835 -1057 -278.7009963404675 -1058 -278.7010017460607 -1059 -278.7010071419642 -1060 -278.70101252820166 -1061 -278.7010179047985 -1062 -278.70102327177943 -1063 -278.70102862916747 -1064 -278.70103397698847 -1065 -278.70103931526614 -1066 -278.70104464402385 -1067 -278.70104996328706 -1068 -278.7010552730795 -1069 -278.70106057342355 -1070 -278.7010658643442 -1071 -278.7010711458648 -1072 -278.70107641800814 -1073 -278.7010816807989 -1074 -278.701086934259 -1075 -278.70109217841235 -1076 -278.7010974132812 -1077 -278.70110263889035 -1078 -278.7011078552605 -1079 -278.7011130624157 -1080 -278.70111826037805 -1081 -278.70112344917067 -1082 -278.7011286288159 -1083 -278.70113379933525 -1084 -278.70113896075236 -1085 -278.7011441130882 -1086 -278.7011492563649 -1087 -278.70115439060567 -1088 -278.7011595158314 -1089 -278.70116463206335 -1090 -278.7011697393248 -1091 -278.7011748376359 -1092 -278.7011799270186 -1093 -278.7011850074948 -1094 -278.70119007908534 -1095 -278.70119514181204 -1096 -278.70120019569464 -1097 -278.70120524075577 -1098 -278.7012102770158 -1099 -278.70121530449507 -1100 -278.7012203232148 -1101 -278.7012253331964 -1102 -278.7012303344595 -1103 -278.7012353270249 -1104 -278.70124031091297 -1105 -278.70124528614457 -1106 -278.7012502527393 -1107 -278.70125521071765 -1108 -278.70126016009993 -1109 -278.7012651009065 -1110 -278.701270033156 -1111 -278.7012749568693 -1112 -278.7012798720665 -1113 -278.7012847787663 -1114 -278.7012896769884 -1115 -278.7012945667539 -1116 -278.7012994480799 -1117 -278.70130432098756 -1118 -278.7013091854956 -1119 -278.7013140416233 -1120 -278.70131888938937 -1121 -278.70132372881443 -1122 -278.70132855991494 -1123 -278.7013333827126 -1124 -278.7013381972237 -1125 -278.70134300346814 -1126 -278.70134780146606 -1127 -278.70135259123384 -1128 -278.70135737279116 -1129 -278.7013621461562 -1130 -278.7013669113466 -1131 -278.70137166838293 -1132 -278.70137641728155 -1133 -278.70138115806066 -1134 -278.7013858907397 -1135 -278.70139061533536 -1136 -278.70139533186665 -1137 -278.70140004035085 -1138 -278.70140474080574 -1139 -278.7014094332498 -1140 -278.7014141176996 -1141 -278.7014187941743 -1142 -278.7014234626902 -1143 -278.7014281232661 -1144 -278.70143277591734 -1145 -278.70143742066364 -1146 -278.701442057521 -1147 -278.7014466865071 -1148 -278.70145130763837 -1149 -278.7014559209335 -1150 -278.7014605264079 -1151 -278.7014651240791 -1152 -278.7014697139644 -1153 -278.70147429608113 -1154 -278.70147887044504 -1155 -278.7014834370727 -1156 -278.7014879959824 -1157 -278.7014925471894 -1158 -278.70149709071075 -1159 -278.70150162656245 -1160 -278.7015061547612 -1161 -278.70151067532385 -1162 -278.70151518826594 -1163 -278.70151969360467 -1164 -278.7015241913555 -1165 -278.70152868153525 -1166 -278.7015331641595 -1167 -278.70153763924424 -1168 -278.7015421068054 -1169 -278.7015465668597 -1170 -278.70155101942163 -1171 -278.7015554645087 -1172 -278.7015599021353 -1173 -278.7015643323175 -1174 -278.70156875507126 -1175 -278.701573170412 -1176 -278.7015775783548 -1177 -278.701581978916 -1178 -278.70158637211046 -1179 -278.70159075795374 -1180 -278.70159513646104 -1181 -278.7015995076477 -1182 -278.7016038715283 -1183 -278.70160822811977 -1184 -278.70161257743473 -1185 -278.70161691949113 -1186 -278.7016212543017 -1187 -278.70162558188235 -1188 -278.7016299022471 -1189 -278.70163421541264 -1190 -278.7016385213919 -1191 -278.7016428202005 -1192 -278.7016471118531 -1193 -278.70165139636373 -1194 -278.7016556737485 -1195 -278.70165994402066 -1196 -278.70166420719477 -1197 -278.70166846328635 -1198 -278.70167271230844 -1199 -278.70167695427625 -1200 -278.70168118920395 -1201 -278.70168541710603 -1202 -278.70168963799534 -1203 -278.7016938518881 -1204 -278.7016980587986 -1205 -278.7017022587383 -1206 -278.7017064517236 -1207 -278.70171063776706 -1208 -278.7017148168837 -1209 -278.70171898908717 -1210 -278.701723154391 -1211 -278.7017273128098 -1212 -278.7017314643555 -1213 -278.7017356090441 -1214 -278.70173974688817 -1215 -278.70174387790127 -1216 -278.70174800209685 -1217 -278.7017521194897 -1218 -278.70175623009163 -1219 -278.70176033391726 -1220 -278.70176443097984 -1221 -278.70176852129254 -1222 -278.7017726048686 -1223 -278.701776681722 -1224 -278.7017807518651 -1225 -278.7017848153119 -1226 -278.7017888720747 -1227 -278.7017929221674 -1228 -278.70179696560365 -1229 -278.7018010023946 -1230 -278.7018050325548 -1231 -278.7018090560966 -1232 -278.70181307303335 -1233 -278.70181708337833 -1234 -278.7018210871437 -1235 -278.70182508434175 -1236 -278.7018290749872 -1237 -278.7018330590905 -1238 -278.7018370366656 -1239 -278.70184100772576 -1240 -278.7018449722819 -1241 -278.701848930348 -1242 -278.7018528819364 -1243 -278.70185682705915 -1244 -278.7018607657289 -1245 -278.70186469795794 -1246 -278.7018686237593 -1247 -278.70187254314567 -1248 -278.7018764561277 -1249 -278.70188036271935 -1250 -278.70188426293174 -1251 -278.7018881567773 -1252 -278.7018920442697 -1253 -278.7018959254187 -1254 -278.70189980023866 -1255 -278.70190366873993 -1256 -278.70190753093556 -1257 -278.70191138683714 -1258 -278.7019152364568 -1259 -278.701919079806 -1260 -278.70192291689796 -1261 -278.70192674774364 -1262 -278.70193057235485 -1263 -278.70193439074336 -1264 -278.7019382029211 -1265 -278.7019420089006 -1266 -278.70194580869224 -1267 -278.70194960230793 -1268 -278.7019533897598 -1269 -278.70195717105975 -1270 -278.70196094621923 -1271 -278.7019647152487 -1272 -278.70196847816067 -1273 -278.7019722349666 -1274 -278.7019759856779 -1275 -278.70197973030554 -1276 -278.7019834688614 -1277 -278.7019872013567 -1278 -278.701990927803 -1279 -278.7019946482111 -1280 -278.7019983625924 -1281 -278.7020020709589 -1282 -278.70200577332054 -1283 -278.7020094696896 -1284 -278.7020131600759 -1285 -278.70201684449165 -1286 -278.7020205229474 -1287 -278.702024195455 -1288 -278.7020278620252 -1289 -278.7020315226677 -1290 -278.7020351773955 -1291 -278.70203882621826 -1292 -278.70204246914733 -1293 -278.70204610619294 -1294 -278.70204973736696 -1295 -278.70205336267895 -1296 -278.7020569821405 -1297 -278.7020605957626 -1298 -278.70206420355515 -1299 -278.7020678055304 -1300 -278.7020714016975 -1301 -278.7020749920669 -1302 -278.7020785766509 -1303 -278.7020821554585 -1304 -278.7020857285007 -1305 -278.7020892957892 -1306 -278.7020928573321 -1307 -278.70209641314216 -1308 -278.70209996322876 -1309 -278.7021035076025 -1310 -278.70210704627385 -1311 -278.70211057925314 -1312 -278.7021141065506 -1313 -278.7021176281768 -1314 -278.70212114414215 -1315 -278.7021246544563 -1316 -278.70212815912987 -1317 -278.7021316581732 -1318 -278.7021351515963 -1319 -278.70213863940916 -1320 -278.7021421216227 -1321 -278.7021455982461 -1322 -278.70214906928993 -1323 -278.70215253476425 -1324 -278.70215599467855 -1325 -278.70215944904396 -1326 -278.7021628978692 -1327 -278.70216634116525 -1328 -278.7021697789414 -1329 -278.70217321120805 -1330 -278.7021766379744 -1331 -278.7021800592508 -1332 -278.7021834750473 -1333 -278.7021868853728 -1334 -278.70219029023843 -1335 -278.70219368965337 -1336 -278.70219708362663 -1337 -278.7022004721689 -1338 -278.7022038552891 -1339 -278.70220723299786 -1340 -278.7022106053037 -1341 -278.7022139722175 -1342 -278.7022173337482 -1343 -278.70222068990483 -1344 -278.702224040697 -1345 -278.7022273861362 -1346 -278.7022307262287 -1347 -278.70223406098734 -1348 -278.7022373904188 -1349 -278.70224071453435 -1350 -278.7022440333426 -1351 -278.7022473468532 -1352 -278.7022506550751 -1353 -278.7022539580182 -1354 -278.7022572556919 -1355 -278.7022605481047 -1356 -278.70226383526625 -1357 -278.7022671171862 -1358 -278.7022703938739 -1359 -278.7022736653377 -1360 -278.70227693158773 -1361 -278.7022801926323 -1362 -278.70228344848107 -1363 -278.70228669914343 -1364 -278.7022899446274 -1365 -278.70229318494376 -1366 -278.7022964200999 -1367 -278.70229965010645 -1368 -278.7023028749708 -1369 -278.7023060947028 -1370 -278.7023093093113 -1371 -278.70231251880534 -1372 -278.7023157231946 -1373 -278.7023189224863 -1374 -278.7023221166913 -1375 -278.7023253058169 -1376 -278.7023284898724 -1377 -278.70233166886715 -1378 -278.702334842809 -1379 -278.70233801170804 -1380 -278.702341175572 -1381 -278.7023443344098 -1382 -278.7023474882304 -1383 -278.7023506370432 -1384 -278.70235378085516 -1385 -278.7023569196765 -1386 -278.70236005351586 -1387 -278.7023631823806 -1388 -278.70236630628045 -1389 -278.7023694252237 -1390 -278.70237253921874 -1391 -278.7023756482745 -1392 -278.70237875239917 -1393 -278.7023818516013 -1394 -278.70238494589 -1395 -278.7023880352733 -1396 -278.7023911197592 -1397 -278.70239419935695 -1398 -278.70239727407477 -1399 -278.70240034392094 -1400 -278.70240340890336 -1401 -278.70240646903153 -1402 -278.7024095243132 -1403 -278.70241257475595 -1404 -278.7024156203692 -1405 -278.70241866116106 -1406 -278.70242169713924 -1407 -278.7024247283131 -1408 -278.7024277546899 -1409 -278.7024307762775 -1410 -278.7024337930859 -1411 -278.7024368051207 -1412 -278.7024398123934 -1413 -278.7024428149089 -1414 -278.7024458126769 -1415 -278.7024488057062 -1416 -278.70245179400365 -1417 -278.702454777577 -1418 -278.7024577564363 -1419 -278.7024607305878 -1420 -278.70246370004014 -1421 -278.7024666648012 -1422 -278.702469624879 -1423 -278.7024725802821 -1424 -278.70247553101746 -1425 -278.70247847709425 -1426 -278.7024814185191 -1427 -278.7024843553004 -1428 -278.7024872874463 -1429 -278.70249021496505 -1430 -278.7024931378634 -1431 -278.7024960561498 -1432 -278.7024989698328 -1433 -278.7025018789194 -1434 -278.702504783417 -1435 -278.70250768333415 -1436 -278.7025105786783 -1437 -278.7025134694574 -1438 -278.70251635567894 -1439 -278.7025192373513 -1440 -278.7025221144814 -1441 -278.70252498707686 -1442 -278.7025278551456 -1443 -278.7025307186953 -1444 -278.70253357773396 -1445 -278.7025364322688 -1446 -278.7025392823068 -1447 -278.7025421278572 -1448 -278.702544968926 -1449 -278.70254780552176 -1450 -278.70255063765114 -1451 -278.70255346532286 -1452 -278.7025562885431 -1453 -278.7025591073203 -1454 -278.70256192166187 -1455 -278.7025647315745 -1456 -278.7025675370666 -1457 -278.70257033814505 -1458 -278.70257313481756 -1459 -278.70257592709095 -1460 -278.70257871497296 -1461 -278.7025814984715 -1462 -278.7025842775933 -1463 -278.7025870523461 -1464 -278.70258982273674 -1465 -278.7025925887732 -1466 -278.7025953504611 -1467 -278.70259810781016 -1468 -278.70260086082624 -1469 -278.7026036095168 -1470 -278.70260635388945 -1471 -278.70260909395057 -1472 -278.70261182970813 -1473 -278.7026145611692 -1474 -278.70261728834026 -1475 -278.70262001122984 -1476 -278.70262272984377 -1477 -278.70262544419046 -1478 -278.70262815427554 -1479 -278.7026308601072 -1480 -278.70263356169244 -1481 -278.70263625903783 -1482 -278.70263895215044 -1483 -278.70264164103816 -1484 -278.7026443257077 -1485 -278.70264700616536 -1486 -278.7026496824189 -1487 -278.702652354475 -1488 -278.70265502234105 -1489 -278.7026576860235 -1490 -278.70266034553003 -1491 -278.70266300086615 -1492 -278.7026656520401 -1493 -278.70266829905887 -1494 -278.7026709419281 -1495 -278.70267358065547 -1496 -278.70267621524835 -1497 -278.7026788457132 -1498 -278.7026814720568 -1499 -278.7026840942854 -1500 -278.70268671240694 -1501 -278.70268932642756 -1502 -278.7026919363538 -1503 -278.7026945421938 -1504 -278.7026971439518 -1505 -278.70269974163716 -1506 -278.7027023352555 -1507 -278.7027049248132 -1508 -278.7027075103179 -1509 -278.70271009177554 -1510 -278.7027126691935 -1511 -278.7027152425774 -1512 -278.7027178119348 -1513 -278.70272037727165 -1514 -278.7027229385953 -1515 -278.70272549591226 -1516 -278.7027280492285 -1517 -278.7027305985511 -1518 -278.7027331438876 -1519 -278.70273568524294 -1520 -278.70273822262374 -1521 -278.70274075603817 -1522 -278.70274328549147 -1523 -278.7027458109903 -1524 -278.70274833254115 -1525 -278.70275085015084 -1526 -278.7027533638256 -1527 -278.7027558735726 -1528 -278.70275837939676 -1529 -278.7027608813064 -1530 -278.7027633793067 -1531 -278.7027658734039 -1532 -278.70276836360557 -1533 -278.7027708499174 -1534 -278.7027733323461 -1535 -278.70277581089704 -1536 -278.7027782855776 -1537 -278.70278075639385 -1538 -278.7027832233523 -1539 -278.7027856864594 -1540 -278.7027881457208 -1541 -278.70279060114376 -1542 -278.7027930527338 -1543 -278.702795500497 -1544 -278.70279794444076 -1545 -278.7028003845693 -1546 -278.70280282089146 -1547 -278.70280525341263 -1548 -278.7028076821374 -1549 -278.70281010707373 -1550 -278.702812528227 -1551 -278.7028149456038 -1552 -278.70281735920986 -1553 -278.70281976905284 -1554 -278.7028221751368 -1555 -278.70282457746885 -1556 -278.7028269760552 -1557 -278.70282937090127 -1558 -278.7028317620147 -1559 -278.70283414940036 -1560 -278.70283653306427 -1561 -278.70283891301295 -1562 -278.7028412892527 -1563 -278.7028436617885 -1564 -278.7028460306275 -1565 -278.70284839577516 -1566 -278.7028507572379 -1567 -278.70285311502187 -1568 -278.70285546913163 -1569 -278.702857819575 -1570 -278.702860166357 -1571 -278.7028625094832 -1572 -278.7028648489613 -1573 -278.7028671847953 -1574 -278.702869516992 -1575 -278.70287184555775 -1576 -278.70287417049684 -1577 -278.7028764918164 -1578 -278.7028788095224 -1579 -278.70288112362095 -1580 -278.7028834341171 -1581 -278.7028857410168 -1582 -278.70288804432624 -1583 -278.7028903440513 -1584 -278.7028926401975 -1585 -278.70289493277056 -1586 -278.70289722177677 -1587 -278.7028995072215 -1588 -278.70290178911085 -1589 -278.7029040674507 -1590 -278.7029063422456 -1591 -278.70290861350304 -1592 -278.7029108812278 -1593 -278.70291314542544 -1594 -278.7029154061021 -1595 -278.7029176632637 -1596 -278.7029199169154 -1597 -278.7029221670627 -1598 -278.70292441371197 -1599 -278.70292665686844 -1600 -278.7029288965383 -1601 -278.70293113272606 -1602 -278.70293336543887 -1603 -278.7029355946809 -1604 -278.7029378204589 -1605 -278.70294004277804 -1606 -278.70294226164305 -1607 -278.7029444770612 -1608 -278.70294668903693 -1609 -278.7029488975758 -1610 -278.7029511026842 -1611 -278.70295330436664 -1612 -278.70295550262955 -1613 -278.70295769747725 -1614 -278.70295988891684 -1615 -278.70296207695253 -1616 -278.7029642615904 -1617 -278.7029664428357 -1618 -278.7029686206945 -1619 -278.7029707951716 -1620 -278.70297296627234 -1621 -278.70297513400254 -1622 -278.70297729836795 -1623 -278.70297945937284 -1624 -278.7029816170242 -1625 -278.7029837713256 -1626 -278.7029859222848 -1627 -278.7029880699048 -1628 -278.7029902141921 -1629 -278.7029923551526 -1630 -278.70299449279105 -1631 -278.7029966271122 -1632 -278.70299875812213 -1633 -278.7030008858263 -1634 -278.70300301022985 -1635 -278.70300513133725 -1636 -278.70300724915523 -1637 -278.70300936368875 -1638 -278.70301147494166 -1639 -278.703013582921 -1640 -278.70301568763085 -1641 -278.7030177890777 -1642 -278.7030198872659 -1643 -278.70302198220065 -1644 -278.70302407388755 -1645 -278.70302616233187 -1646 -278.70302824753753 -1647 -278.7030303295118 -1648 -278.70303240825865 -1649 -278.70303448378303 -1650 -278.7030365560911 -1651 -278.70303862518665 -1652 -278.7030406910766 -1653 -278.7030427537646 -1654 -278.70304481325684 -1655 -278.70304686955774 -1656 -278.70304892267234 -1657 -278.7030509726055 -1658 -278.7030530193641 -1659 -278.7030550629514 -1660 -278.7030571033728 -1661 -278.7030591406339 -1662 -278.70306117473956 -1663 -278.70306320569426 -1664 -278.7030652335037 -1665 -278.7030672581736 -1666 -278.70306927970745 -1667 -278.70307129811135 -1668 -278.7030733133891 -1669 -278.7030753255478 -1670 -278.70307733459026 -1671 -278.7030793405223 -1672 -278.7030813433498 -1673 -278.7030833430765 -1674 -278.7030853397077 -1675 -278.7030873332483 -1676 -278.7030893237036 -1677 -278.7030913110783 -1678 -278.70309329537713 -1679 -278.7030952766053 -1680 -278.70309725476756 -1681 -278.70309922986905 -1682 -278.70310120191374 -1683 -278.70310317090843 -1684 -278.7031051368556 -1685 -278.70310709976263 -1686 -278.7031090596323 -1687 -278.70311101647 -1688 -278.7031129702815 -1689 -278.70311492107055 -1690 -278.7031168688422 -1691 -278.7031188136015 -1692 -278.70312075535355 -1693 -278.70312269410255 -1694 -278.70312462985345 -1695 -278.7031265626111 -1696 -278.7031284923796 -1697 -278.7031304191657 -1698 -278.7031323429725 -1699 -278.7031342638043 -1700 -278.70313618166705 -1701 -278.7031380965652 -1702 -278.70314000850385 -1703 -278.7031419174861 -1704 -278.7031438235186 -1705 -278.70314572660465 -1706 -278.7031476267497 -1707 -278.70314952395864 -1708 -278.7031514182349 -1709 -278.70315330958505 -1710 -278.70315519801187 -1711 -278.7031570835211 -1712 -278.7031589661171 -1713 -278.70316084580503 -1714 -278.70316272258805 -1715 -278.7031645964726 -1716 -278.70316646746176 -1717 -278.703168335561 -1718 -278.7031702007747 -1719 -278.7031720631079 -1720 -278.7031739225642 -1721 -278.7031757791492 -1722 -278.70317763286704 -1723 -278.7031794837222 -1724 -278.70318133171855 -1725 -278.70318317686207 -1726 -278.7031850191566 -1727 -278.70318685860616 -1728 -278.70318869521617 -1729 -278.7031905289904 -1730 -278.7031923599337 -1731 -278.70319418805065 -1732 -278.7031960133453 -1733 -278.7031978358231 -1734 -278.7031996554872 -1735 -278.7032014723429 -1736 -278.7032032863947 -1737 -278.70320509764707 -1738 -278.70320690610384 -1739 -278.70320871176983 -1740 -278.7032105146498 -1741 -278.70321231474765 -1742 -278.7032141120681 -1743 -278.7032159066149 -1744 -278.7032176983937 -1745 -278.7032194874074 -1746 -278.7032212736622 -1747 -278.70322305716076 -1748 -278.7032248379083 -1749 -278.7032266159085 -1750 -278.7032283911667 -1751 -278.7032301636869 -1752 -278.7032319334733 -1753 -278.70323370052984 -1754 -278.70323546486156 -1755 -278.70323722647265 -1756 -278.7032389853662 -1757 -278.7032407415487 -1758 -278.7032424950224 -1759 -278.7032442457933 -1760 -278.70324599386424 -1761 -278.70324773924034 -1762 -278.70324948192587 -1763 -278.7032512219248 -1764 -278.7032529592407 -1765 -278.703254693879 -1766 -278.70325642584334 -1767 -278.70325815513814 -1768 -278.7032598817678 -1769 -278.70326160573643 -1770 -278.70326332704786 -1771 -278.70326504570664 -1772 -278.70326676171646 -1773 -278.7032684750828 -1774 -278.70327018580804 -1775 -278.70327189389775 -1776 -278.7032735993553 -1777 -278.7032753021855 -1778 -278.70327700239164 -1779 -278.7032786999794 -1780 -278.70328039495155 -1781 -278.70328208731223 -1782 -278.7032837770661 -1783 -278.703285464217 -1784 -278.7032871487692 -1785 -278.7032888307266 -1786 -278.7032905100937 -1787 -278.7032921868744 -1788 -278.7032938610721 -1789 -278.70329553269175 -1790 -278.7032972017376 -1791 -278.7032988682126 -1792 -278.7033005321221 -1793 -278.7033021934694 -1794 -278.7033038522588 -1795 -278.70330550849405 -1796 -278.70330716217967 -1797 -278.70330881331887 -1798 -278.70331046191575 -1799 -278.703312107976 -1800 -278.70331375150107 -1801 -278.7033153924972 -1802 -278.7033170309664 -1803 -278.7033186669143 -1804 -278.70332030034467 -1805 -278.70332193126 -1806 -278.70332355966616 -1807 -278.70332518556563 -1808 -278.7033268089635 -1809 -278.7033284298629 -1810 -278.70333004826824 -1811 -278.70333166418305 -1812 -278.70333327761097 -1813 -278.70333488855783 -1814 -278.7033364970244 -1815 -278.70333810301724 -1816 -278.7033397065402 -1817 -278.7033413075948 -1818 -278.7033429061869 -1819 -278.7033445023201 -1820 -278.70334609599803 -1821 -278.7033476872241 -1822 -278.70334927600334 -1823 -278.7033508623388 -1824 -278.703352446234 -1825 -278.70335402769314 -1826 -278.70335560672027 -1827 -278.70335718331984 -1828 -278.7033587574942 -1829 -278.70336032924797 -1830 -278.703361898585 -1831 -278.70336346550835 -1832 -278.7033650300236 -1833 -278.7033665921324 -1834 -278.70336815184015 -1835 -278.7033697091494 -1836 -278.7033712640649 -1837 -278.7033728165897 -1838 -278.7033743667281 -1839 -278.7033759144832 -1840 -278.70337745985955 -1841 -278.70337900286086 -1842 -278.7033805434892 -1843 -278.7033820817506 -1844 -278.70338361764817 -1845 -278.70338515118505 -1846 -278.7033866823645 -1847 -278.703388211191 -1848 -278.70338973766815 -1849 -278.70339126179977 -1850 -278.7033927835895 -1851 -278.70339430304085 -1852 -278.70339582015737 -1853 -278.7033973349425 -1854 -278.70339884740065 -1855 -278.7034003575351 -1856 -278.7034018653501 -1857 -278.70340337084787 -1858 -278.703404874033 -1859 -278.7034063749093 -1860 -278.7034078734799 -1861 -278.70340936974844 -1862 -278.7034108637189 -1863 -278.7034123553945 -1864 -278.703413844779 -1865 -278.7034153318767 -1866 -278.70341681668987 -1867 -278.70341829922296 -1868 -278.7034197794789 -1869 -278.70342125746254 -1870 -278.70342273317556 -1871 -278.70342420662314 -1872 -278.7034256778085 -1873 -278.7034271467338 -1874 -278.7034286134047 -1875 -278.7034300778237 -1876 -278.7034315399943 -1877 -278.70343299992004 -1878 -278.7034344576039 -1879 -278.70343591305067 -1880 -278.70343736626336 -1881 -278.70343881724443 -1882 -278.7034402659993 -1883 -278.70344171252947 -1884 -278.70344315683974 -1885 -278.70344459893295 -1886 -278.70344603881347 -1887 -278.70344747648363 -1888 -278.703448911947 -1889 -278.70345034520784 -1890 -278.7034517762687 -1891 -278.70345320513405 -1892 -278.70345463180723 -1893 -278.70345605629063 -1894 -278.7034574785878 -1895 -278.703458898703 -1896 -278.70346031663945 -1897 -278.70346173240034 -1898 -278.7034631459891 -1899 -278.70346455740844 -1900 -278.70346596666343 -1901 -278.7034673737565 -1902 -278.7034687786907 -1903 -278.70347018146924 -1904 -278.7034715820971 -1905 -278.70347298057584 -1906 -278.7034743769092 -1907 -278.7034757711012 -1908 -278.7034771631547 -1909 -278.7034785530737 -1910 -278.70347994086035 -1911 -278.7034813265187 -1912 -278.7034827100529 -1913 -278.7034840914647 -1914 -278.70348547075764 -1915 -278.7034868479366 -1916 -278.70348822300275 -1917 -278.7034895959609 -1918 -278.70349096681423 -1919 -278.7034923355657 -1920 -278.703493702218 -1921 -278.70349506677474 -1922 -278.70349642924026 -1923 -278.70349778961685 -1924 -278.70349914790785 -1925 -278.7035005041169 -1926 -278.70350185824617 -1927 -278.70350321030037 -1928 -278.7035045602814 -1929 -278.70350590819385 -1930 -278.70350725404006 -1931 -278.70350859782343 -1932 -278.70350993954713 -1933 -278.7035112792146 -1934 -278.7035126168291 -1935 -278.703513952393 -1936 -278.7035152859109 -1937 -278.70351661738476 -1938 -278.7035179468182 -1939 -278.7035192742151 -1940 -278.7035205995774 -1941 -278.70352192290903 -1942 -278.7035232442127 -1943 -278.70352456349235 -1944 -278.70352588075116 -1945 -278.7035271959913 -1946 -278.7035285092159 -1947 -278.7035298204286 -1948 -278.7035311296336 -1949 -278.7035324368328 -1950 -278.70353374202887 -1951 -278.7035350452258 -1952 -278.7035363464264 -1953 -278.7035376456341 -1954 -278.7035389428516 -1955 -278.70354023808244 -1956 -278.7035415313291 -1957 -278.703542822595 -1958 -278.70354411188384 -1959 -278.70354539919833 -1960 -278.7035466845405 -1961 -278.7035479679146 -1962 -278.70354924932377 -1963 -278.7035505287699 -1964 -278.70355180625745 -1965 -278.7035530817886 -1966 -278.7035543553667 -1967 -278.7035556269951 -1968 -278.7035568966758 -1969 -278.7035581644131 -1970 -278.70355943020905 -1971 -278.70356069406745 -1972 -278.70356195599066 -1973 -278.7035632159821 -1974 -278.7035644740445 -1975 -278.7035657301812 -1976 -278.70356698439537 -1977 -278.7035682366891 -1978 -278.7035694870664 -1979 -278.7035707355292 -1980 -278.7035719820819 -1981 -278.70357322672544 -1982 -278.703574469465 -1983 -278.7035757103027 -1984 -278.7035769492407 -1985 -278.70357818628236 -1986 -278.7035794214315 -1987 -278.70358065469054 -1988 -278.7035818860621 -1989 -278.7035831155493 -1990 -278.70358434315455 -1991 -278.7035855688824 -1992 -278.70358679273426 -1993 -278.70358801471355 -1994 -278.70358923482337 -1995 -278.70359045306583 -1996 -278.70359166944496 -1997 -278.70359288396276 -1998 -278.703594096623 -1999 -278.7035953074276 -2000 -278.7035965163802 diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/log_param_by_sz=true,epochs=2000.log b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/log_param_by_sz=true,epochs=2000.log deleted file mode 100644 index ea51af85..00000000 --- a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/log_param_by_sz=true,epochs=2000.log +++ /dev/null @@ -1,31 +0,0 @@ -2024-01-13T00:22:54.907 -== Config == -INIT_SIZE: 5 -GEN_TYP_SIZE: 2 -PARAMETERIZE_FLIP_GROUPS_BY_SZ: true -EPOCHS: 2000 -DistNat: DistUInt32 -TAG: entropy_approx_v01 - -Building (gen_expr(...)) computation graph... - 19.248910882 seconds - -Initial adnodes_of_interest: -Dict("tysz2_gen_type_tbool" => 0.5, "sz4_succ_var" => 0.5, "tysz1_gen_type_tbool" => 0.5, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.5, "sz4_succ_abs" => 0.5, "sz5_succ_var" => 0.5, "sz5_succ_abs" => 0.5, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5, "sz1_succ_app" => 0.5, "sz1_succ_abs" => 0.5, "sz3_succ_abs" => 0.5, "sz3_succ_app" => 0.5, "sz5_succ_app" => 0.5, "sz4_succ_app" => 0.5, "sz2_succ_abs" => 0.5, "sz3_succ_var" => 0.5) -Saving samples... -Saved samples to examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/terms_before.txt. - 106.794707683 seconds - -Initial entropy: 268.9974234499506 - -Training... - 172.545444082 seconds - -Final entropy: 278.7035965163802 - -Learned adnodes_of_interest: -Dict("tysz2_gen_type_tbool" => 0.6406501979548713, "sz4_succ_var" => 0.6674255144274396, "tysz1_gen_type_tbool" => 0.5518244186781357, "sz0_zero_pr_var2" => 0.6074364937924714, "sz2_succ_app" => 0.2924748841302053, "sz4_succ_abs" => 0.46214510333327624, "sz5_succ_var" => 0.5, "sz5_succ_abs" => 0.6296817679421843, "sz2_succ_var" => 0.692442569329581, "sz1_succ_var" => 0.6690399301775136, "sz1_succ_app" => 0.3164272452618666, "sz1_succ_abs" => 0.44933794966818746, "sz3_succ_abs" => 0.43541600818707565, "sz3_succ_app" => 0.2995197540262324, "sz5_succ_app" => 0.32780288605621516, "sz4_succ_app" => 0.30132673109175784, "sz2_succ_abs" => 0.42233005579465066, "sz3_succ_var" => 0.6824377595027068) -Saving samples... -Saved samples to examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt. - 109.846797327 seconds - diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/terms_before.txt b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/terms_before.txt deleted file mode 100644 index a37505b4..00000000 --- a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/terms_before.txt +++ /dev/null @@ -1,200 +0,0 @@ -λx:Bool. (λy:Bool. true) x -λx:Bool -> Bool. λy:Bool. (λz:Bool -> Bool. true) (λz:Bool. z) -(λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) true true ((λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. λa:Bool. true) (λy:Bool. λz:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. x) (λx:Bool -> Bool. λy:Bool. true)) ((λx:Bool. x) true)) -(λx:Bool. λy:Bool. y) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool -> Bool. true) false false) (λx:Bool. (λy:Bool -> Bool. y) (λy:Bool. false))) -(λx:Bool. (λy:Bool. (λz:(Bool -> Bool) -> Bool. false) (λz:Bool -> Bool. true)) false) false -false -(λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. λw:(Bool -> Bool) -> Bool. false) x) ((λx:Bool. x) false) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) ((λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. false))) ((λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. true) ((λx:Bool. λy:Bool. false) true) false (λx:Bool. (λy:Bool. false) false)) -false -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. (λw:(Bool -> Bool) -> Bool. false) (λw:Bool -> Bool. false)) ((λx:Bool. (λy:Bool. λz:Bool. λw:Bool. λa:Bool. false) false true) true) -λx:Bool -> Bool. false -false -λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. y) -false -false -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool. x) ((λx:Bool. λy:Bool -> Bool. false) true)) ((λx:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool. false) false)) (λx:Bool -> Bool. false) -(λx:Bool -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) true)) false ((λx:Bool. λy:Bool -> Bool. (λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λz:Bool -> Bool. λw:Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. true)) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool. λy:Bool -> Bool. true) false)))) -λx:Bool -> Bool. λy:Bool. (λz:Bool. λw:Bool. true) (x y) false -false -(λx:Bool -> Bool. λy:Bool -> Bool. (λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. λa:Bool. true) (λz:Bool -> Bool. λw:Bool. false) (x true)) (λx:Bool. false) -(λx:Bool. λy:Bool. (λz:Bool. false) false) false true -(λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool. λz:Bool. false) false false ((λx:Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. false)) false)) -λx:Bool. x -(λx:Bool. x) true -λx:Bool -> Bool. x -true -λx:Bool -> Bool. x -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. false) true) (λx:Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. false) true) true -λx:Bool. (λy:Bool. x) x -(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. λa:Bool -> Bool. λb:Bool. false) false x) ((λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool -> Bool. false) (λx:Bool. true)) true) ((λx:(Bool -> Bool) -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. (λy:Bool. λz:Bool. true) false))) -false -true -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. x) false (λx:Bool -> Bool. (λy:Bool. x) ((λy:Bool -> Bool. λz:Bool. false) (λy:Bool. true) ((λy:Bool. false) true))) -λx:Bool -> Bool. λy:Bool. (λz:Bool -> Bool. λw:(Bool -> Bool) -> Bool -> Bool. λa:Bool. false) x (λz:Bool -> Bool. λw:Bool. true) y -(λx:Bool -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. false) true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. y) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. x))) ((λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. false) false)) (λx:Bool. x)) -(λx:Bool. false) false -λx:Bool -> Bool. λy:Bool. y -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) false ((λx:Bool. (λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool. true)) ((λx:Bool. false) ((λx:Bool. true) false))) false -false -λx:Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool -> Bool. false) (x false) false ((λy:Bool. λz:Bool. λw:Bool. false) ((λy:Bool -> Bool. true) (λy:Bool. false)) false) -false -λx:Bool. λy:Bool. false -λx:Bool -> Bool. true -true -λx:Bool -> Bool. x -false -λx:Bool -> Bool. false -false -(λx:Bool -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool. x) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool. λy:Bool. true) true)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool. true) ((λx:Bool. λy:Bool -> Bool. false) false))) ((λx:Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. false) true ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true)) false true) -(λx:Bool -> Bool -> Bool. λy:Bool. y) (λx:Bool. λy:Bool. (λz:Bool -> Bool. λw:Bool. false) (λz:Bool. false) ((λz:Bool. false) x)) -(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. false) x false ((λy:Bool. y) x)) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) false (λx:Bool -> Bool. false) (λx:Bool -> Bool. x) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool. λy:Bool. true) true false))) -λx:Bool. (λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool. λa:(Bool -> Bool) -> Bool. λb:Bool. false) false ((λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. true)) ((λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. false) x ((λy:Bool. λz:Bool. false) true)) ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. x) (λy:Bool -> Bool. (λz:Bool. λw:Bool. true) true)) -true -(λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool. (λz:(Bool -> Bool) -> Bool -> Bool. false) (λz:Bool -> Bool. λw:Bool. true)) (λy:Bool. (λz:Bool -> Bool. true) (λz:Bool. true))) ((λx:Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool -> Bool. λa:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false)) ((λx:Bool. λy:Bool -> Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. true))) (λx:Bool. λy:Bool. (λz:Bool. false) false)) -(λx:Bool -> Bool -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. false) false ((λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) true ((λy:Bool. λz:Bool. true) false))) (λx:Bool. λy:Bool. (λz:Bool. true) true) -(λx:Bool. false) ((λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. false)) (λx:Bool. (λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. true)) (λx:Bool -> Bool. x)) -λx:Bool -> Bool. λy:Bool. true -(λx:Bool. (λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. false) (λy:Bool. false)) false ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. false) true false)) ((λx:(Bool -> Bool) -> Bool. (λy:Bool. y) ((λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. false))) ((λx:Bool. λy:Bool -> Bool. x) ((λx:Bool. true) ((λx:Bool. true) false)))) -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) ((λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) ((λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. λz:Bool. false))) (λy:Bool -> Bool. λz:Bool. true) -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. x) (λy:Bool -> Bool. x) false -λx:Bool -> Bool. x -(λx:Bool. λy:Bool -> Bool. x) true -(λx:Bool -> Bool -> Bool. x) (λx:Bool. λy:Bool. x) -(λx:Bool. λy:Bool. (λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool -> Bool. λa:Bool. true) (λz:Bool -> Bool. false) (λz:Bool. λw:Bool. false)) false -(λx:Bool -> Bool. false) (λx:Bool. (λy:(Bool -> Bool) -> Bool. x) ((λy:Bool -> Bool. λz:Bool. λw:Bool -> Bool. false) (λy:Bool. false) false)) -λx:Bool. (λy:Bool -> Bool -> Bool. x) ((λy:Bool. λz:Bool. λw:Bool. false) ((λy:Bool. x) ((λy:Bool. true) false))) -true -λx:Bool -> Bool. x false -(λx:Bool. false) ((λx:Bool -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) false (λy:Bool -> Bool. x)) (λx:Bool. (λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. false) (λy:Bool. false) ((λy:Bool. λz:Bool -> Bool. true) false))) -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. y) ((λx:(Bool -> Bool) -> Bool. λy:Bool. (λz:Bool. λw:Bool. false) true) (λx:Bool -> Bool. true)) -(λx:Bool. x) ((λx:Bool. (λy:Bool -> Bool -> Bool. x) ((λy:Bool. λz:Bool. λw:Bool. true) true)) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) true ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. true) true)))) -false -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:Bool. true) false)) false true -true -λx:Bool. λy:Bool. y -λx:Bool -> Bool. false -(λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:(Bool -> Bool) -> Bool. λa:Bool -> Bool. false) (λy:Bool. λz:Bool. true)) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) true (λx:Bool -> Bool. false) -λx:Bool -> Bool. (λy:Bool. y) false -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. true)) ((λx:Bool. x) ((λx:Bool. λy:Bool. true) false ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)))) (λx:Bool. λy:Bool. (λz:(Bool -> Bool) -> Bool -> Bool. x) ((λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) (λz:Bool. λw:Bool. false))) -λx:Bool. λy:Bool. false -λx:Bool -> Bool. true -true -λx:Bool. x -(λx:Bool. λy:Bool. λz:Bool. false) ((λx:Bool. true) ((λx:Bool. x) true)) ((λx:(Bool -> Bool) -> Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool. λy:Bool. λz:Bool. true) false)))) -λx:Bool -> Bool. x true -(λx:Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. λb:Bool -> Bool. λc:Bool. true) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true)) (λx:Bool. λy:Bool. false) true false -true -λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. (λz:Bool -> Bool. λw:(Bool -> Bool) -> Bool. λa:Bool. false) (λz:Bool. true)) (λy:Bool -> Bool. λz:Bool. true) ((λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool -> Bool. true) (λy:Bool -> Bool. false) x (λy:Bool. (λz:Bool. true) true)) -(λx:Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool -> Bool -> Bool. λb:Bool. λc:Bool. true) true true true ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. true) (λx:Bool -> Bool. x) ((λx:Bool. false) true)) (λx:Bool. (λy:Bool. λz:Bool. y) false) -false -(λx:Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. y) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. false)))) -λx:Bool. x -λx:Bool -> Bool. x ((λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool -> Bool. true) (λy:Bool -> Bool. false) x x) -λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) ((λy:Bool -> Bool -> Bool. (λz:Bool. λw:Bool -> Bool. λa:Bool. true) true) ((λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. true) false (λy:Bool -> Bool. x))) -λx:Bool -> Bool. x -true -(λx:Bool. λy:Bool. (λz:Bool. λw:Bool. false) false) false -λx:Bool -> Bool. false -(λx:Bool. (λy:Bool. λz:Bool -> Bool. false) x) false (λx:Bool. (λy:Bool. λz:Bool. false) x ((λy:Bool. true) ((λy:Bool. true) x))) -(λx:Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. true) false ((λy:Bool. false) false)) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false)) -true -false -λx:Bool. true -(λx:Bool. λy:Bool -> Bool. (λz:Bool. λw:Bool. true) x ((λz:Bool. false) x)) false -(λx:Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. false) ((λx:(Bool -> Bool) -> Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. false))) ((λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. λz:Bool. false)) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:Bool. true) true))) ((λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. true) ((λy:Bool. λz:Bool -> Bool. false) false)) false) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. (λz:Bool. false) y) ((λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool. λy:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)))) true -true -λx:Bool. false -true -λx:Bool. (λy:Bool. true) x -(λx:Bool -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:(Bool -> Bool) -> Bool. λa:Bool. false) true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. true) false)) (λx:Bool -> Bool. x) (λx:Bool -> Bool. false) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. false)) ((λx:Bool -> Bool. λy:Bool. λz:Bool. true) ((λx:Bool. λy:Bool. false) false)) ((λx:Bool. λy:Bool. false) false ((λx:Bool. λy:Bool. false) true ((λx:Bool. false) true))) (λx:Bool. x) -(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) false (λy:Bool. x)) false ((λx:Bool -> Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. false) (λx:Bool. true) (λx:Bool. false) (λx:Bool -> Bool. (λy:Bool -> Bool. λz:Bool. false) x) ((λx:Bool. λy:Bool -> Bool -> Bool. false) ((λx:Bool. true) false) (λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool -> Bool. false)))) -false -false -(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. λa:Bool. λb:Bool. true) x ((λy:Bool. true) false) true) false -(λx:Bool -> Bool -> Bool. λy:Bool. y) (λx:Bool. λy:Bool. false) -(λx:Bool. x) false -false -λx:Bool. (λy:(Bool -> Bool) -> Bool. (λz:Bool. λw:Bool. false) x) (λy:Bool -> Bool. true) ((λy:Bool. x) true) -(λx:(Bool -> Bool) -> Bool -> Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. (λy:Bool. λz:Bool. true) true) true) -λx:Bool -> Bool. true -true -λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. (λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. λa:Bool. true) x ((λz:Bool. λw:Bool -> Bool. λa:Bool. false) x)) (λy:Bool -> Bool. y) -(λx:Bool. λy:Bool -> Bool. λz:Bool. y z) ((λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool -> Bool. false) false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool. λy:Bool. false) (λx:Bool. λy:Bool. true)) ((λx:Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. λa:Bool. false) (λx:Bool. true) ((λx:Bool. true) true) ((λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) false (λx:Bool. false)))) -(λx:Bool -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) ((λy:Bool -> Bool. true) (λy:Bool. false))) (λx:Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. λa:Bool. false) ((λx:Bool. λy:Bool -> Bool. false) false) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool. false) false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) ((λx:Bool. false) false)))) -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. true) ((λy:Bool -> Bool. true) (λy:Bool. true)) ((λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. true) (λy:Bool. true) (λy:Bool -> Bool. true))) (λx:Bool -> Bool. λy:Bool. y) -(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. true) (λy:Bool. λz:Bool. false)) false (λx:Bool. λy:Bool. false) -false -true -false -λx:Bool -> Bool. (λy:Bool. (λz:Bool. x) ((λz:Bool. false) y)) ((λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. true) ((λy:Bool. λz:Bool. λw:Bool. true) false) ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false) (λy:Bool. y))) -λx:Bool -> Bool. x true -false -(λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) false ((λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) false ((λy:Bool. false) false))) false -(λx:Bool. λy:(Bool -> Bool) -> Bool. x) ((λx:Bool. λy:Bool. λz:Bool. true) true ((λx:Bool. false) false) true) (λx:Bool -> Bool. false) -(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λx:Bool. x) ((λx:Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) false ((λx:Bool. true) true) true) -(λx:Bool -> Bool -> Bool. λy:Bool. (λz:Bool -> Bool. false) (λz:Bool. true)) (λx:Bool. λy:Bool. (λz:Bool -> Bool -> Bool. true) (λz:Bool. λw:Bool. false)) true -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. (λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. λa:Bool. true) (λz:Bool -> Bool. λw:Bool. true)) false ((λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λy:Bool -> Bool. λz:Bool. false) false) true) -(λx:Bool. true) ((λx:Bool. λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool. true) true ((λx:Bool. true) true) ((λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) false)) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. false) true (λx:Bool -> Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. false)))) -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool -> Bool -> Bool. false) true (λx:Bool -> Bool. λy:Bool. true) (λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool -> Bool. false)) ((λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool. false) true) false) ((λx:Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool. false) ((λx:Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. false)))) -λx:Bool. λy:Bool. x -λx:Bool -> Bool. λy:Bool. y -λx:Bool. (λy:Bool. (λz:Bool -> Bool. λw:Bool -> Bool -> Bool. false) (λz:Bool. true)) false (λy:Bool. (λz:Bool. λw:Bool -> Bool -> Bool. λa:Bool. false) true (λz:Bool. λw:Bool. true)) -(λx:Bool. λy:Bool. (λz:Bool -> Bool -> Bool. λw:Bool. false) (λz:Bool. λw:Bool. true) ((λz:Bool -> Bool. true) (λz:Bool. false))) false -true -(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. true) x) true (λx:Bool. λy:Bool. (λz:(Bool -> Bool) -> Bool. false) (λz:Bool -> Bool. y)) -(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. true) ((λy:Bool. λz:Bool -> Bool. λw:Bool. true) false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. false) (λx:Bool -> Bool. λy:Bool. true) false false) ((λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool. true) ((λy:Bool. true) false)) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. false) (λx:Bool -> Bool. false) true))) -false -(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. (λz:(Bool -> Bool) -> Bool. true) (λz:Bool -> Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true))) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool -> Bool. λa:Bool -> Bool. λb:Bool. true) true ((λx:Bool. λy:Bool -> Bool. true) false) false ((λx:Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. true) false ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true)) false)) -(λx:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) (λy:Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. true)) false) -λx:Bool. x -false -(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool -> Bool. true) (λx:Bool. λy:Bool. false) true ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. false)) ((λx:Bool. false) true) (λx:Bool. (λy:Bool. (λz:Bool. false) y) x) -true -(λx:Bool -> Bool. λy:Bool. (λz:Bool. λw:Bool -> Bool. λa:Bool. true) y) (λx:Bool. x) false -(λx:Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool -> Bool -> Bool. true) true ((λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. false)) ((λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. true) (λy:Bool -> Bool. false))) (λx:Bool. x) -λx:Bool. x -true -(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. λw:(Bool -> Bool) -> Bool. false) false) ((λx:Bool. λy:Bool -> Bool. false) false) ((λx:Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. false) true true true) (λx:Bool -> Bool. (λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. false) ((λy:Bool -> Bool. λz:Bool. false) (λy:Bool. false)) (λy:Bool -> Bool. (λz:Bool. true) true)) -λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. (λw:Bool. false) z) (λy:Bool -> Bool. x) -(λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. (λz:Bool. λw:Bool -> Bool. λa:Bool. false) false) (λy:Bool. x)) (λx:Bool. x) -(λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. false))) false (λx:Bool. λy:Bool. (λz:Bool. z) x) -λx:Bool. λy:Bool. (λz:Bool -> Bool. λw:Bool -> Bool. false) (λz:Bool. z) (λz:Bool. true) -λx:Bool. (λy:Bool. λz:Bool. true) false x -true -true -false -true -(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool -> Bool. false)) (λx:Bool. (λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. true) x (λy:Bool. λz:Bool. true)) true -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. λb:Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. false)) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. (λy:Bool. false) false) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) (λx:Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. true))) ((λx:Bool -> Bool. (λy:Bool. λz:Bool -> Bool -> Bool. true) true) (λx:Bool. x) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) ((λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool. λz:Bool. false)))) -false -true -(λx:Bool. x) ((λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. false) false ((λx:Bool. λy:Bool. λz:Bool. false) true) (λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. true)) ((λx:Bool -> Bool. false) (λx:Bool. true)))) -false -(λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. y) (λy:Bool -> Bool. y)) -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool. λa:Bool. false) true) (λx:Bool -> Bool. x) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. false)) true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) ((λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. false)) ((λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) (λx:Bool. x)))) -λx:Bool. (λy:Bool. (λz:Bool. λw:Bool. λa:Bool. false) true) x x -(λx:Bool. (λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool. true) true false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false) ((λx:Bool. λy:(Bool -> Bool) -> Bool. false) false ((λx:Bool. λy:Bool -> Bool. true) true))) (λx:Bool -> Bool. (λy:Bool -> Bool. (λz:Bool. false) false) ((λy:Bool. λz:Bool. λw:Bool. true) true ((λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. true)))) -(λx:Bool -> Bool. x false) (λx:Bool. x) -λx:Bool -> Bool. true -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. y) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. y) ((λx:Bool. λy:Bool. λz:Bool. true) ((λx:Bool. λy:Bool -> Bool. true) false (λx:Bool. x)))) -(λx:Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool. true) false false) (λx:Bool. x) -(λx:Bool. x) false -(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. (λz:Bool. λw:Bool. true) false) ((λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) false ((λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. false)))) ((λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool -> Bool. true) true) (λx:Bool -> Bool. λy:Bool. false) false) -(λx:Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:(Bool -> Bool) -> Bool. λa:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) ((λx:Bool. λy:Bool. λz:Bool. true) ((λx:Bool. true) true)) true ((λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. true)) ((λx:Bool. λy:Bool. false) false) true) -(λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. true)) (λx:Bool. x) false (λx:Bool. true) -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool. λa:Bool -> Bool. false) (λy:Bool. false) ((λy:Bool. true) true) true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. z) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. true) (λx:Bool -> Bool. true) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true))))) -true -(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. false) ((λx:Bool. false) false) ((λx:Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. false) (λx:Bool. true) true) false (λx:Bool. false) -false -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool -> Bool -> Bool. λb:Bool. true) (λy:Bool -> Bool. false) ((λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. λz:Bool. true)) ((λy:Bool. y) (x true)) (λy:Bool. λz:Bool. (λw:Bool. false) z) -(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. y) (λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. true) (λy:Bool -> Bool. false) ((λy:Bool. true) x)) false -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. (λz:(Bool -> Bool) -> Bool. false) y) ((λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. false) ((λy:Bool. λz:Bool. λw:Bool. true) false) (λy:Bool -> Bool. x)) -(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool. (λy:Bool -> Bool. λz:Bool. false) (λy:Bool. false)) false (λx:Bool. λy:Bool. y) -true -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. λa:Bool. true) (λx:Bool. λy:Bool. x) ((λx:Bool -> Bool. λy:Bool. y) ((λx:Bool. λy:Bool. true) true)) ((λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. true) true ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. true))) ((λx:Bool. x) false)) -(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. λa:Bool. λb:Bool. true) x x) ((λx:Bool. λy:Bool. false) true false) ((λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) true true ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) false ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. λy:Bool. true)) ((λx:Bool -> Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool. λz:Bool. true) false)))) -false -(λx:(Bool -> Bool) -> Bool. x ((λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. true))) ((λx:Bool. λy:Bool. λz:Bool -> Bool. false) false true) -false diff --git a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt b/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt deleted file mode 100644 index 9160ed61..00000000 --- a/examples/qc/stlc/output/entropy_approx_v01/entropy/sz=5,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt +++ /dev/null @@ -1,200 +0,0 @@ -true -true -false -λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. true) ((λy:Bool. λz:Bool. λw:Bool. false) false) ((λy:Bool. λz:Bool. λw:Bool. false) false) -(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) x ((λy:Bool -> Bool. true) ((λy:Bool. λz:Bool. false) true))) (λx:Bool. λy:Bool. false) -true -λx:Bool. (λy:Bool. λz:Bool -> Bool. z) x ((λy:Bool -> Bool -> Bool. (λz:Bool -> Bool. λw:Bool. false) (λz:Bool. true)) (λy:Bool. λz:Bool. y)) -false -false -λx:Bool. (λy:Bool. y) x -false -λx:Bool -> Bool. x -(λx:Bool. (λy:Bool. x) x) false -(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. true) x ((λy:Bool -> Bool. true) (λy:Bool. false))) false false -false -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. true) true) true ((λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. false) false false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:Bool. x) false))) -λx:Bool -> Bool. (λy:Bool -> Bool. (λz:Bool. z) ((λz:Bool. false) true)) x -true -λx:Bool -> Bool. false -false -(λx:Bool. (λy:Bool. λz:Bool. true) x) ((λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. false) false true (λx:Bool. (λy:Bool. λz:Bool. true) x)) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true) false true (λx:Bool. (λy:Bool. λz:Bool. false) ((λy:Bool. false) x))) -λx:Bool. λy:Bool. (λz:Bool. true) false -false -true -λx:Bool -> Bool. x -false -(λx:Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool -> Bool -> Bool. false) true ((λy:Bool. false) false) (λy:Bool. x)) ((λx:Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. (λz:Bool. true) x)) -(λx:Bool. x) true -true -(λx:Bool -> Bool -> Bool. false) ((λx:Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. λb:Bool. false) true ((λx:Bool. true) true) true ((λx:Bool -> Bool. λy:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) true) (λx:Bool. x))) -true -false -(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. y) ((λx:Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool. false) false) (λx:Bool. false)) ((λx:Bool. x) true) -false -(λx:Bool. true) false -false -false -(λx:Bool. (λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) ((λy:Bool -> Bool. false) (λy:Bool. false))) true true -true -(λx:Bool. x) false -λx:Bool. (λy:Bool. (λz:Bool -> Bool -> Bool. y) ((λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. true) (λz:Bool. λw:Bool. false))) true -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. true) ((λy:Bool. y) ((λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. true)))) (λx:Bool -> Bool. λy:Bool. true) -false -true -(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool. λw:Bool. true) true) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. y) (λx:Bool -> Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. true) false)) -true -true -false -(λx:Bool. x) ((λx:Bool -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) ((λx:Bool. false) ((λx:Bool. false) false)) ((λx:Bool. λy:Bool. x) false)) -true -true -false -false -λx:Bool. (λy:Bool. λz:Bool. false) ((λy:Bool. λz:Bool. true) x ((λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. false))) x -true -false -(λx:Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool. y) ((λx:Bool. λy:Bool. λz:Bool. false) ((λx:Bool. x) false))) -(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool -> Bool. true) true) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) true ((λx:(Bool -> Bool) -> Bool. λy:Bool. (λz:Bool -> Bool. true) (λz:Bool. true)) (λx:Bool -> Bool. false)) -λx:Bool -> Bool. (λy:Bool. x) true -λx:Bool -> Bool. (λy:Bool. y) false -(λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. true) ((λx:Bool. false) false) true (λx:Bool. λy:Bool. y) -true -(λx:Bool. (λy:Bool -> Bool. λz:Bool. true) (λy:Bool. x)) false ((λx:Bool. (λy:Bool -> Bool. x) ((λy:Bool -> Bool. λz:Bool. true) (λy:Bool. false))) true) -(λx:Bool. (λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool. λa:Bool. true) x) true false ((λx:Bool. λy:Bool. λz:Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. true) true (λx:Bool. true)) ((λx:Bool. x) false)) -(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. false) false false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. λy:Bool. true) false (λx:Bool -> Bool. false)) false -true -true -λx:Bool. false -λx:Bool. false -(λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. x) ((λy:Bool. λz:Bool. λw:Bool. true) ((λy:Bool -> Bool. true) x))) (λx:Bool. false) -true -(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. λw:(Bool -> Bool) -> Bool. true) true (λy:Bool -> Bool. false) x) (λx:Bool -> Bool. true) -(λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool. true) ((λx:Bool. false) false) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. true)) (λx:Bool. x) false -(λx:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. x)) -(λx:Bool. true) false -false -true -λx:Bool. x -λx:Bool. (λy:Bool. λz:Bool. false) true -λx:Bool -> Bool. x ((λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. true) true ((λy:Bool. λz:Bool. λw:Bool. true) false) ((λy:Bool -> Bool. λz:Bool. false) (λy:Bool. false) ((λy:Bool -> Bool. false) (λy:Bool. true)))) -false -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. false) false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. false) false)) ((λx:Bool. (λy:Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool. true)) true)) -false -false -(λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. true) x (λy:Bool -> Bool. x) x) false -true -λx:Bool. x -(λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. false) (λy:Bool -> Bool. x)) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. true) true) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true))) false -true -(λx:Bool. λy:Bool. true) ((λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. (λy:Bool. true) x))) -λx:Bool -> Bool. true -(λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. false) false ((λx:Bool -> Bool. λy:Bool. λz:Bool. false) ((λx:Bool. λy:Bool. false) false) ((λx:Bool. x) true)) -λx:Bool -> Bool. x -(λx:Bool. x) false -(λx:Bool. λy:Bool -> Bool. x) true ((λx:Bool. λy:Bool. x) false) -true -λx:Bool. λy:Bool. y -true -false -(λx:Bool. λy:Bool. y) ((λx:Bool -> Bool. (λy:Bool. true) true) (λx:Bool. x)) false -true -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. true) true) true -λx:Bool -> Bool. (λy:Bool. y) true -λx:Bool. (λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. true) true (λy:Bool. λz:Bool. y) -true -(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool. true) (λy:Bool. true)) (λx:Bool. λy:Bool. true) -(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. y) (λx:Bool -> Bool. (λy:Bool. x y) ((λy:Bool. y) (x true))) -λx:Bool -> Bool. (λy:Bool. x) ((λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) true (λy:Bool -> Bool. y)) false -true -false -false -false -λx:Bool -> Bool. x true -λx:Bool -> Bool. x -(λx:Bool. x) false -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. (λz:Bool. λw:Bool. true) false) (λy:Bool -> Bool. true)) -true -(λx:Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. true) false ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. true) false (λx:Bool -> Bool. false)) ((λx:Bool -> Bool -> Bool. (λy:Bool. true) true) (λx:Bool. λy:Bool. false)) false -(λx:Bool. (λy:Bool. (λz:Bool -> Bool. true) (λz:Bool. true)) x) ((λx:Bool. x) false) -false -λx:Bool. λy:Bool. y -(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. true) x) ((λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool. true) ((λy:Bool. λz:Bool. false) true)) (λx:Bool -> Bool. x ((λy:Bool. true) true))) -(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool. λw:Bool -> Bool. true) false) (λx:Bool -> Bool. true) false (λx:Bool. x) -(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool. x) (λx:Bool -> Bool. false)) (λx:Bool -> Bool. x) true -false -true -(λx:Bool. λy:Bool. λz:Bool -> Bool. y) false false -true -(λx:Bool. λy:Bool -> Bool. (λz:Bool. true) true) false -λx:Bool -> Bool. λy:Bool. y -(λx:Bool. λy:(Bool -> Bool) -> Bool. true) true ((λx:Bool -> Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) ((λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) x)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. x))) -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool -> Bool. λb:Bool -> Bool. λc:Bool. false) (λx:Bool -> Bool. true) ((λx:Bool. true) true) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true)) false ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. (λy:Bool. x) true)) -λx:Bool -> Bool. λy:Bool. y -λx:Bool -> Bool. (λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) ((λy:Bool. false) true) ((λy:Bool. λz:Bool. λw:Bool. false) false) x -λx:Bool. (λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. λa:Bool. false) true ((λy:Bool. y) false) (λy:Bool -> Bool. y) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false)) (λx:Bool -> Bool. false) false false -(λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true) -false -λx:Bool -> Bool. λy:Bool. false -false -λx:Bool -> Bool. false -(λx:Bool. λy:Bool. λz:Bool. λw:Bool. λa:(Bool -> Bool) -> Bool. λb:Bool -> Bool. λc:Bool. false) true false ((λx:Bool -> Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool. false) false)) true ((λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool. true) false) (λx:Bool -> Bool. (λy:Bool. x) ((λy:Bool -> Bool. false) x))) -false -λx:Bool -> Bool. (λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. true) ((λy:Bool -> Bool -> Bool. λz:Bool. false) (λy:Bool. λz:Bool. true)) (λy:Bool -> Bool. (λz:Bool -> Bool -> Bool. false) (λz:Bool. λw:Bool. false)) true -λx:Bool -> Bool. false -λx:Bool. λy:Bool. (λz:Bool -> Bool. λw:Bool. λa:Bool. false) (λz:Bool. false) false false -(λx:Bool. λy:Bool. (λz:Bool. false) y) ((λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) false)) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. y)) -λx:Bool. (λy:Bool -> Bool. y true) (λy:Bool. x) -(λx:Bool. λy:Bool. λz:Bool. true) true false -(λx:Bool. λy:Bool. false) ((λx:Bool. true) true) -(λx:Bool -> Bool. (λy:Bool. (λz:Bool. λw:Bool -> Bool. true) false) ((λy:Bool. y) (x false))) (λx:Bool. true) -λx:Bool -> Bool. true -true -λx:Bool. λy:Bool. x -true -false -λx:Bool. λy:Bool. false -false -(λx:Bool. λy:Bool. y) false -false -(λx:Bool. (λy:Bool -> Bool -> Bool. x) ((λy:Bool. λz:Bool. λw:Bool. true) x)) ((λx:Bool. (λy:Bool. x) true) ((λx:Bool. x) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) true))) -λx:Bool -> Bool. λy:Bool. x y -true -false -(λx:Bool. true) true -true -λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. z) (λy:Bool -> Bool. y x) ((λy:Bool. true) false) -true -false -λx:Bool. λy:Bool. false -λx:Bool. λy:Bool. y -λx:Bool -> Bool. x true -false -true -(λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:(Bool -> Bool) -> Bool -> Bool. true) false ((λx:Bool. λy:Bool. λz:Bool. false) false ((λx:Bool. true) true)) (λx:Bool. (λy:Bool. y) x) (λx:Bool -> Bool. x) -(λx:Bool. x) true -(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool. λw:Bool. true) false) ((λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. x)) true true -λx:Bool. (λy:Bool. λz:Bool. z) true ((λy:Bool. y) x) -true -(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. λa:Bool. true) x x) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. x)) true -false -false -true -false -true -false -λx:Bool. x -(λx:Bool. (λy:Bool. λz:Bool. λw:Bool -> Bool -> Bool. λa:Bool. λb:Bool. true) true x ((λy:Bool. λz:Bool. λw:Bool. false) ((λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. true)))) true -true -true -(λx:Bool. λy:Bool. y) true ((λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. true)) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) (λx:Bool. λy:Bool. true)) -(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool. λy:Bool. true) false false -true -(λx:Bool. false) false -(λx:Bool. λy:Bool. (λz:Bool. λw:Bool. λa:Bool. false) x) ((λx:Bool -> Bool -> Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) false)) false -(λx:Bool. x) true -true -(λx:Bool. x) ((λx:Bool. x) false) -λx:Bool. x -λx:Bool -> Bool. λy:Bool. y diff --git a/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/dist_before.csv b/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/dist_before.csv deleted file mode 100644 index d1440ff9..00000000 --- a/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/dist_before.csv +++ /dev/null @@ -1,9 +0,0 @@ -num_apps probability -0 0.3784722222222223 -1 0.10286458333333337 -2 0.1511501736111112 -3 0.14680989583333343 -4 0.11425781250000003 -5 0.06738281250000001 -6 0.03125 -7 0.007812500000000002 diff --git a/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=2000.csv b/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=2000.csv deleted file mode 100644 index b1b81154..00000000 --- a/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=2000.csv +++ /dev/null @@ -1,9 +0,0 @@ -num_apps probability -0 0.16486577196496097 -1 0.047180881871368555 -2 0.1088898526593344 -3 0.15080968983713253 -4 0.17234621280449572 -5 0.16286665359517002 -6 0.10749048574248589 -7 0.08555045152505174 diff --git a/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv b/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv deleted file mode 100644 index e0babad5..00000000 --- a/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv +++ /dev/null @@ -1,2001 +0,0 @@ -0 -20.238481981031438 -1 -20.21217230375934 -2 -20.186130303707692 -3 -20.160352655808524 -4 -20.13483608957884 -5 -20.10957738797502 -6 -20.084573386274744 -7 -20.059820970985772 -8 -20.035317078780828 -9 -20.011058695458033 -10 -19.98704285492616 -11 -19.96326663821411 -12 -19.939727172504014 -13 -19.916421630187337 -14 -19.89334722794337 -15 -19.870501225839668 -16 -19.847880926453747 -17 -19.82548367401553 -18 -19.8033068535701 -19 -19.781347890160117 -20 -19.759604248027557 -21 -19.738073429834124 -22 -19.716752975899986 -23 -19.69564046346033 -24 -19.67473350593927 -25 -19.654029752240692 -26 -19.633526886055627 -27 -19.613222625185664 -28 -19.593114720882163 -29 -19.573200957200605 -30 -19.55347915036999 -31 -19.533947148176708 -32 -19.514602829362612 -33 -19.495444103036867 -34 -19.47646890810131 -35 -19.457675212688983 -36 -19.43906101361537 -37 -19.420624335842213 -38 -19.40236323195352 -39 -19.384275781643346 -40 -19.366360091215263 -41 -19.34861429309307 -42 -19.331036545342528 -43 -19.313625031203838 -44 -19.29637795863459 -45 -19.279293559862914 -46 -19.262370090950622 -47 -19.24560583136608 -48 -19.22899908356645 -49 -19.212548172589344 -50 -19.19625144565336 -51 -19.180107271767454 -52 -19.164114041348927 -53 -19.148270165849738 -54 -19.132574077390966 -55 -19.11702422840531 -56 -19.101619091287258 -57 -19.086357158050944 -58 -19.071236939995302 -59 -19.05625696737652 -60 -19.041415789087424 -61 -19.02671197234388 -62 -19.012144102377746 -63 -18.99771078213649 -64 -18.983410631989088 -65 -18.969242289438228 -66 -18.955204408838537 -67 -18.941295661120762 -68 -18.92751473352176 -69 -18.913860329320084 -70 -18.90033116757712 -71 -18.886925982883632 -72 -18.87364352511144 -73 -18.8604825591704 -74 -18.847441864770275 -75 -18.834520236187476 -76 -18.821716482036646 -77 -18.809029425046884 -78 -18.79645790184244 -79 -18.784000762727977 -80 -18.771656871478015 -81 -18.759425105130767 -82 -18.747304353785957 -83 -18.735293520406767 -84 -18.723391520625718 -85 -18.71159728255436 -86 -18.6999097465967 -87 -18.688327865266398 -88 -18.676850603007427 -89 -18.66547693601835 -90 -18.654205852079894 -91 -18.64303635038597 -92 -18.63196744137787 -93 -18.620998146581783 -94 -18.610127498449174 -95 -18.599354540200554 -96 -18.58867832567188 -97 -18.578097919164094 -98 -18.567612395295384 -99 -18.557220838856253 -100 -18.54692234466734 -101 -18.536716017439755 -102 -18.526600971638175 -103 -18.51657633134632 -104 -18.506641230135042 -105 -18.49679481093267 -106 -18.487036225897825 -107 -18.477364636294574 -108 -18.46777921236972 -109 -18.458279133232367 -110 -18.4488635867357 -111 -18.439531769360762 -112 -18.430282886102344 -113 -18.421116150356927 -114 -18.41203078381254 -115 -18.403026016340597 -116 -18.394101085889545 -117 -18.385255238380466 -118 -18.376487727604392 -119 -18.367797815121406 -120 -18.35918477016153 -121 -18.350647869527197 -122 -18.342186397497485 -123 -18.333799645733905 -124 -18.325486913187763 -125 -18.317247506009117 -126 -18.309080737457222 -127 -18.30098592781247 -128 -18.29296240428975 -129 -18.28500950095328 -130 -18.277126558632794 -131 -18.269312924841117 -132 -18.261567953693017 -133 -18.253891005825448 -134 -18.246281448319014 -135 -18.238738654620676 -136 -18.231262004467727 -137 -18.223850883812947 -138 -18.216504684750916 -139 -18.20922280544552 -140 -18.202004650058527 -141 -18.194849628679325 -142 -18.187757157255728 -143 -18.180726657525792 -144 -18.17375755695076 -145 -18.16684928864893 -146 -18.160001291330616 -147 -18.153213009233987 -148 -18.146483892061987 -149 -18.139813394920022 -150 -18.133200978254763 -151 -18.126646107793707 -152 -18.12014825448571 -153 -18.113706894442295 -154 -18.10732150887994 -155 -18.10099158406309 -156 -18.094716611248035 -157 -18.088496086627547 -158 -18.082329511276427 -159 -18.076216391097645 -160 -18.070156236769392 -161 -18.06414856369279 -162 -18.058192891940337 -163 -18.052288746205154 -164 -18.046435655750773 -165 -18.040633154361792 -166 -18.034880780295072 -167 -18.029178076231656 -168 -18.023524589229382 -169 -18.017919870676018 -170 -18.012363476243138 -171 -18.00685496584056 -172 -18.001393903571433 -173 -17.995979857687814 -174 -17.990612400546976 -175 -17.985291108568216 -176 -17.98001556219019 -177 -17.97478534582885 -178 -17.969600047835968 -179 -17.96445926045808 -180 -17.959362579796064 -181 -17.954309605765154 -182 -17.949299942055553 -183 -17.944333196093417 -184 -17.939408979002494 -185 -17.93452690556607 -186 -17.929686594189505 -187 -17.92488766686325 -188 -17.920129749126218 -189 -17.915412470029658 -190 -17.910735462101535 -191 -17.906098361311244 -192 -17.901500807034818 -193 -17.896942442020535 -194 -17.89242291235494 -195 -17.88794186742929 -196 -17.883498959906376 -197 -17.879093845687763 -198 -17.87472618388141 -199 -17.870395636769665 -200 -17.8661018697777 -201 -17.861844551442154 -202 -17.85762335338035 -203 -17.853437950259735 -204 -17.84928801976772 -205 -17.84517324258182 -206 -17.841093302340255 -207 -17.837047885612744 -208 -17.83303668187173 -209 -17.8290593834639 -210 -17.82511568558201 -211 -17.821205286237102 -212 -17.817327886230917 -213 -17.813483189128753 -214 -17.809670901232465 -215 -17.805890731553966 -216 -17.802142391788827 -217 -17.798425596290304 -218 -17.794740062043594 -219 -17.791085508640368 -220 -17.787461658253623 -221 -17.783868235612797 -222 -17.7803049679791 -223 -17.776771585121207 -224 -17.773267819291142 -225 -17.769793405200453 -226 -17.766348079996604 -227 -17.762931583239734 -228 -17.759543656879494 -229 -17.756184045232285 -230 -17.752852494958624 -231 -17.749548755040863 -232 -17.74627257676104 -233 -17.743023713678998 -234 -17.739801921610763 -235 -17.736606958607144 -236 -17.733438584932504 -237 -17.73029656304382 -238 -17.727180657569917 -239 -17.72409063529093 -240 -17.721026265118013 -241 -17.71798731807316 -242 -17.714973567269396 -243 -17.711984787890973 -244 -17.70902075717396 -245 -17.70608125438688 -246 -17.703166060811668 -247 -17.70027495972471 -248 -17.697407736378143 -249 -17.694564177981384 -250 -17.69174407368273 -251 -17.688947214551227 -252 -17.68617339355871 -253 -17.683422405562016 -254 -17.680694047285368 -255 -17.677988117302952 -256 -17.675304416021667 -257 -17.672642745664014 -258 -17.67000291025121 -259 -17.667384715586437 -260 -17.664787969238244 -261 -17.662212480524154 -262 -17.6596580604944 -263 -17.65712452191584 -264 -17.65461167925602 -265 -17.65211934866738 -266 -17.64964734797169 -267 -17.647195496644496 -268 -17.64476361579987 -269 -17.64235152817524 -270 -17.639959058116325 -271 -17.63758603156231 -272 -17.635232276031097 -273 -17.632897620604705 -274 -17.630581895914894 -275 -17.62828493412877 -276 -17.62600656893469 -277 -17.623746635528196 -278 -17.621504970598156 -279 -17.61928141231297 -280 -17.61707580030697 -281 -17.614887975666935 -282 -17.61271778091868 -283 -17.61056506001387 -284 -17.608429658316876 -285 -17.606311422591816 -286 -17.604210200989666 -287 -17.602125843035555 -288 -17.600058199616118 -289 -17.598007122967022 -290 -17.595972466660584 -291 -17.593954085593495 -292 -17.591951835974704 -293 -17.58996557531337 -294 -17.587995162406948 -295 -17.5860404573294 -296 -17.584101321419503 -297 -17.582177617269256 -298 -17.580269208712412 -299 -17.578375960813162 -300 -17.576497739854787 -301 -17.57463441332861 -302 -17.572785849922873 -303 -17.570951919511838 -304 -17.56913249314496 -305 -17.5673274430361 -306 -17.56553664255294 -307 -17.563759966206415 -308 -17.561997289640303 -309 -17.560248489620854 -310 -17.55851344402658 -311 -17.556792031838082 -312 -17.55508413312801 -313 -17.55338962905108 -314 -17.55170840183426 -315 -17.550040334766944 -316 -17.548385312191293 -317 -17.54674321949263 -318 -17.54511394308995 -319 -17.54349737042648 -320 -17.541893389960403 -321 -17.540301891155536 -322 -17.538722764472233 -323 -17.537155901358307 -324 -17.535601194240016 -325 -17.53405853651318 -326 -17.53252782253437 -327 -17.531008947612115 -328 -17.529501807998315 -329 -17.528006300879603 -330 -17.526522324368866 -331 -17.52504977749684 -332 -17.523588560203713 -333 -17.52213857333093 -334 -17.520699718612953 -335 -17.519271898669125 -336 -17.517855016995718 -337 -17.51644897795785 -338 -17.51505368678168 -339 -17.51366904954655 -340 -17.51229497317723 -341 -17.51093136543626 -342 -17.509578134916328 -343 -17.508235191032746 -344 -17.506902444015942 -345 -17.505579804904134 -346 -17.5042671855359 -347 -17.502964498543015 -348 -17.501671657343167 -349 -17.500388576132877 -350 -17.49911516988042 -351 -17.497851354318794 -352 -17.49659704593882 -353 -17.49535216198226 -354 -17.494116620434966 -355 -17.49289034002021 -356 -17.49167324019189 -357 -17.490465241127996 -358 -17.489266263723998 -359 -17.488076229586355 -360 -17.48689506102605 -361 -17.48572268105221 -362 -17.48455901336579 -363 -17.483403982353295 -364 -17.48225751308055 -365 -17.48111953128656 -366 -17.479989963377392 -367 -17.478868736420154 -368 -17.47775577813697 -369 -17.476651016899066 -370 -17.47555438172089 -371 -17.474465802254272 -372 -17.47338520878265 -373 -17.472312532215344 -374 -17.47124770408191 -375 -17.470190656526476 -376 -17.469141322302217 -377 -17.468099634765807 -378 -17.46706552787198 -379 -17.466038936168083 -380 -17.465019794788713 -381 -17.464008039450448 -382 -17.463003606446488 -383 -17.46200643264149 -384 -17.461016455466392 -385 -17.460033612913286 -386 -17.459057843530296 -387 -17.45808908641657 -388 -17.45712728121732 -389 -17.45617236811882 -390 -17.455224287843553 -391 -17.454282981645335 -392 -17.453348391304484 -393 -17.452420459123108 -394 -17.451499127920336 -395 -17.450584341027643 -396 -17.44967604228423 -397 -17.448774176032416 -398 -17.447878687113068 -399 -17.44698952086112 -400 -17.446106623101088 -401 -17.445229940142617 -402 -17.44435941877613 -403 -17.44349500626843 -404 -17.44263665035844 -405 -17.44178429925288 -406 -17.440937901622057 -407 -17.440097406595687 -408 -17.439262763758705 -409 -17.438433923147155 -410 -17.437610835244115 -411 -17.436793450975653 -412 -17.43598172170681 -413 -17.43517559923763 -414 -17.434375035799224 -415 -17.43357998404987 -416 -17.432790397071155 -417 -17.432006228364127 -418 -17.431227431845524 -419 -17.430453961843988 -420 -17.42968577309635 -421 -17.428922820743946 -422 -17.428165060328944 -423 -17.427412447790715 -424 -17.426664939462263 -425 -17.425922492066636 -426 -17.425185062713407 -427 -17.424452608895194 -428 -17.423725088484158 -429 -17.42300245972862 -430 -17.42228468124961 -431 -17.421571712037533 -432 -17.420863511448793 -433 -17.42016003920252 -434 -17.419461255377257 -435 -17.41876712040773 -436 -17.418077595081627 -437 -17.417392640536374 -438 -17.416712218256027 -439 -17.416036290068096 -440 -17.41536481814043 -441 -17.41469776497819 -442 -17.414035093420758 -443 -17.413376766638702 -444 -17.412722748130832 -445 -17.412073001721197 -446 -17.411427491556147 -447 -17.41078618210142 -448 -17.410149038139252 -449 -17.409516024765544 -450 -17.408887107386988 -451 -17.408262251718252 -452 -17.407641423779246 -453 -17.407024589892313 -454 -17.406411716679525 -455 -17.405802771059946 -456 -17.405197720246985 -457 -17.404596531745696 -458 -17.403999173350165 -459 -17.403405613140887 -460 -17.402815819482186 -461 -17.40222976101964 -462 -17.401647406677558 -463 -17.401068725656437 -464 -17.400493687430465 -465 -17.399922261745076 -466 -17.39935441861447 -467 -17.3987901283192 -468 -17.39822936140375 -469 -17.397672088674184 -470 -17.397118281195716 -471 -17.39656791029046 -472 -17.396020947535025 -473 -17.39547736475825 -474 -17.39493713403894 -475 -17.394400227703596 -476 -17.393866618324132 -477 -17.39333627871576 -478 -17.392809181934684 -479 -17.39228530127599 -480 -17.391764610271462 -481 -17.39124708268745 -482 -17.39073269252274 -483 -17.390221414006497 -484 -17.389713221596132 -485 -17.389208089975238 -486 -17.388705994051612 -487 -17.388206908955162 -488 -17.387710810035937 -489 -17.38721767286213 -490 -17.3867274732181 -491 -17.386240187102434 -492 -17.385755790725995 -493 -17.38527426051003 -494 -17.384795573084247 -495 -17.38431970528495 -496 -17.38384663415316 -497 -17.383376336932773 -498 -17.382908791068726 -499 -17.382443974205202 -500 -17.381981864183786 -501 -17.38152243904173 -502 -17.381065677010163 -503 -17.38061155651236 -504 -17.380160056161966 -505 -17.379711154761313 -506 -17.37926483129973 -507 -17.37882106495182 -508 -17.378379835075805 -509 -17.37794112121186 -510 -17.37750490308051 -511 -17.377071160580925 -512 -17.376639873789394 -513 -17.376211022957662 -514 -17.37578458851139 -515 -17.375360551048566 -516 -17.37493889133793 -517 -17.37451959031751 -518 -17.374102629092988 -519 -17.37368798893627 -520 -17.373275651283965 -521 -17.372865597735867 -522 -17.37245781005354 -523 -17.372052270158814 -524 -17.371648960132358 -525 -17.371247862212236 -526 -17.370848958792518 -527 -17.37045223242185 -528 -17.37005766580204 -529 -17.369665241786734 -530 -17.36927494337997 -531 -17.368886753734923 -532 -17.368500656152467 -533 -17.368116634079882 -534 -17.367734671109538 -535 -17.367354750977615 -536 -17.36697685756272 -537 -17.366600974884697 -538 -17.366227087103304 -539 -17.36585517851698 -540 -17.36548523356156 -541 -17.365117236809084 -542 -17.364751172966507 -543 -17.364387026874564 -544 -17.364024783506487 -545 -17.36366442796688 -546 -17.363305945490467 -547 -17.362949321440993 -548 -17.362594541310003 -549 -17.36224159071572 -550 -17.3618904554019 -551 -17.3615411212367 -552 -17.361193574211566 -553 -17.360847800440098 -554 -17.360503786156997 -555 -17.360161517716918 -556 -17.35982098159344 -557 -17.35948216437797 -558 -17.359145052778672 -559 -17.358809633619465 -560 -17.35847589383893 -561 -17.358143820489296 -562 -17.357813400735427 -563 -17.357484621853796 -564 -17.357157471231496 -565 -17.35683193636523 -566 -17.35650800486033 -567 -17.356185664429784 -568 -17.35586490289327 -569 -17.35554570817619 -570 -17.355228068308712 -571 -17.354911971424862 -572 -17.354597405761535 -573 -17.354284359657644 -574 -17.35397282155312 -575 -17.35366277998808 -576 -17.353354223601876 -577 -17.35304714113222 -578 -17.352741521414302 -579 -17.352437353379926 -580 -17.352134626056607 -581 -17.351833328566766 -582 -17.35153345012681 -583 -17.351234980046346 -584 -17.35093790772732 -585 -17.35064222266319 -586 -17.350347914438093 -587 -17.350054972726053 -588 -17.349763387290174 -589 -17.349473147981815 -590 -17.349184244739796 -591 -17.348896667589692 -592 -17.348610406642926 -593 -17.348325452096095 -594 -17.34804179423019 -595 -17.347759423409812 -596 -17.347478330082435 -597 -17.34719850477765 -598 -17.346919938106495 -599 -17.34664262076062 -600 -17.34636654351163 -601 -17.34609169721037 -602 -17.345818072786194 -603 -17.345545661246256 -604 -17.345274453674847 -605 -17.34500444123266 -606 -17.34473561515613 -607 -17.344467966756785 -608 -17.34420148742049 -609 -17.343936168606863 -610 -17.34367200184857 -611 -17.343408978750706 -612 -17.343147090990108 -613 -17.342886330314734 -614 -17.34262668854301 -615 -17.342368157563243 -616 -17.342110729332934 -617 -17.3418543958782 -618 -17.34159914929315 -619 -17.341344981739276 -620 -17.341091885444847 -621 -17.340839852704327 -622 -17.340588875877756 -623 -17.340338947390187 -624 -17.34009005973109 -625 -17.339842205453795 -626 -17.3395953771749 -627 -17.33934956757371 -628 -17.339104769391703 -629 -17.338860975431917 -630 -17.338618178558466 -631 -17.33837637169596 -632 -17.338135547828955 -633 -17.337895700001443 -634 -17.337656821316315 -635 -17.337418904934797 -636 -17.33718194407601 -637 -17.336945932016384 -638 -17.336710862089156 -639 -17.33647672768389 -640 -17.336243522245955 -641 -17.33601123927604 -642 -17.33577987232964 -643 -17.335549415016583 -644 -17.33531986100056 -645 -17.335091203998587 -646 -17.33486343778062 -647 -17.33463655616899 -648 -17.33441055303801 -649 -17.33418542231346 -650 -17.33396115797216 -651 -17.333737754041508 -652 -17.333515204599003 -653 -17.333293503771856 -654 -17.3330726457365 -655 -17.33285262471816 -656 -17.332633434990417 -657 -17.332415070874816 -658 -17.332197526740355 -659 -17.331980797003187 -660 -17.331764876126062 -661 -17.331549758618024 -662 -17.33133543903394 -663 -17.33112191197408 -664 -17.330909172083803 -665 -17.330697214053046 -666 -17.330486032615994 -667 -17.33027562255066 -668 -17.330065978678522 -669 -17.329857095864096 -670 -17.3296489690146 -671 -17.32944159307953 -672 -17.329234963050336 -673 -17.329029073959983 -674 -17.328823920882662 -675 -17.32861949893335 -676 -17.328415803267493 -677 -17.328212829080638 -678 -17.32801057160806 -679 -17.327809026124452 -680 -17.327608187943504 -681 -17.327408052417642 -682 -17.32720861493762 -683 -17.32700987093222 -684 -17.32681181586787 -685 -17.326614445248364 -686 -17.326417754614514 -687 -17.326221739543794 -688 -17.326026395650032 -689 -17.325831718583117 -690 -17.325637704028626 -691 -17.325444347707574 -692 -17.325251645376035 -693 -17.325059592824868 -694 -17.324868185879392 -695 -17.324677420399123 -696 -17.324487292277414 -697 -17.324297797441186 -698 -17.32410893185063 -699 -17.32392069149892 -700 -17.32373307241191 -701 -17.323546070647826 -702 -17.323359682297028 -703 -17.323173903481695 -704 -17.32298873035554 -705 -17.32280415910357 -706 -17.322620185941737 -707 -17.322436807116752 -708 -17.322254018905745 -709 -17.322071817616045 -710 -17.321890199584853 -711 -17.321709161179076 -712 -17.32152869879496 -713 -17.32134880885789 -714 -17.321169487822146 -715 -17.320990732170603 -716 -17.320812538414497 -717 -17.320634903093204 -718 -17.320457822773943 -719 -17.320281294051572 -720 -17.320105313548318 -721 -17.319929877913566 -722 -17.31975498382359 -723 -17.319580627981324 -724 -17.319406807116145 -725 -17.319233517983612 -726 -17.31906075736528 -727 -17.318888522068413 -728 -17.318716808925803 -729 -17.318545614795543 -730 -17.318374936560794 -731 -17.318204771129537 -732 -17.318035115434416 -733 -17.317865966432485 -734 -17.317697321104983 -735 -17.317529176457153 -736 -17.317361529518013 -737 -17.317194377340154 -738 -17.317027716999533 -739 -17.316861545595252 -740 -17.31669586024939 -741 -17.316530658106768 -742 -17.316365936334787 -743 -17.316201692123173 -744 -17.31603792268385 -745 -17.315874625250697 -746 -17.315711797079356 -747 -17.315549435447117 -748 -17.315387537652587 -749 -17.315226101015664 -750 -17.315065122877215 -751 -17.314904600598997 -752 -17.3147445315634 -753 -17.314584913173313 -754 -17.314425742851927 -755 -17.314267018042536 -756 -17.31410873620845 -757 -17.31395089483268 -758 -17.313793491417904 -759 -17.31363652348619 -760 -17.313479988578912 -761 -17.313323884256516 -762 -17.313168208098396 -763 -17.313012957702703 -764 -17.312858130686195 -765 -17.312703724684084 -766 -17.312549737349848 -767 -17.312396166355114 -768 -17.312243009389448 -769 -17.312090264160254 -770 -17.311937928392574 -771 -17.311785999828942 -772 -17.31163447622928 -773 -17.311483355370694 -774 -17.31133263504733 -775 -17.311182313070255 -776 -17.311032387267282 -777 -17.310882855482856 -778 -17.31073371557786 -779 -17.31058496542955 -780 -17.310436602931322 -781 -17.31028862599264 -782 -17.31014103253887 -783 -17.309993820511163 -784 -17.30984698786627 -785 -17.30970053257648 -786 -17.30955445262941 -787 -17.309408746027948 -788 -17.309263410790045 -789 -17.30911844494865 -790 -17.308973846551535 -791 -17.308829613661196 -792 -17.308685744354726 -793 -17.308542236723657 -794 -17.30839908887387 -795 -17.308256298925457 -796 -17.30811386501261 -797 -17.30797178528349 -798 -17.307830057900077 -799 -17.30768868103814 -800 -17.307547652887003 -801 -17.307406971649527 -802 -17.30726663554195 -803 -17.307126642793737 -804 -17.306986991647555 -805 -17.30684768035909 -806 -17.30670870719694 -807 -17.306570070442543 -808 -17.306431768390038 -809 -17.30629379934616 -810 -17.306156161630128 -811 -17.306018853573566 -812 -17.305881873520345 -813 -17.305745219826537 -814 -17.30560889086027 -815 -17.305472885001635 -816 -17.30533720064261 -817 -17.305201836186896 -818 -17.30506679004989 -819 -17.304932060658533 -820 -17.304797646451238 -821 -17.3046635458778 -822 -17.30452975739925 -823 -17.30439627948783 -824 -17.30426311062682 -825 -17.304130249310525 -826 -17.303997694044117 -827 -17.30386544334358 -828 -17.3037334957356 -829 -17.303601849757463 -830 -17.303470503957016 -831 -17.30333945689252 -832 -17.303208707132583 -833 -17.303078253256086 -834 -17.302948093852073 -835 -17.302818227519683 -836 -17.302688652868056 -837 -17.30255936851625 -838 -17.30243037309315 -839 -17.302301665237405 -840 -17.30217324359732 -841 -17.302045106830796 -842 -17.30191725360524 -843 -17.301789682597473 -844 -17.30166239249367 -845 -17.301535381989282 -846 -17.301408649788954 -847 -17.301282194606397 -848 -17.30115601516441 -849 -17.301030110194738 -850 -17.300904478438007 -851 -17.300779118643646 -852 -17.300654029569813 -853 -17.300529209983353 -854 -17.300404658659694 -855 -17.30028037438275 -856 -17.30015635594493 -857 -17.300032602146985 -858 -17.299909111797987 -859 -17.29978588371522 -860 -17.299662916724174 -861 -17.2995402096584 -862 -17.2994177613595 -863 -17.29929557067704 -864 -17.29917363646848 -865 -17.2990519575991 -866 -17.29893053294196 -867 -17.298809361377828 -868 -17.298688441795093 -869 -17.29856777308972 -870 -17.29844735416519 -871 -17.29832718393244 -872 -17.29820726130977 -873 -17.298087585222824 -874 -17.297968154604515 -875 -17.29784896839494 -876 -17.29773002554136 -877 -17.2976113249981 -878 -17.29749286572653 -879 -17.29737464669497 -880 -17.29725666687869 -881 -17.29713892525975 -882 -17.297021420827065 -883 -17.29690415257625 -884 -17.296787119509627 -885 -17.296670320636153 -886 -17.29655375497133 -887 -17.29643742153722 -888 -17.296321319362324 -889 -17.296205447481558 -890 -17.296089804936216 -891 -17.295974390773885 -892 -17.29585920404842 -893 -17.29574424381988 -894 -17.29562950915446 -895 -17.29551499912449 -896 -17.29540071280833 -897 -17.29528664929036 -898 -17.29517280766091 -899 -17.295059187016214 -900 -17.294945786458364 -901 -17.29483260509527 -902 -17.29471964204059 -903 -17.294606896413722 -904 -17.294494367339716 -905 -17.29438205394924 -906 -17.294269955378564 -907 -17.294158070769466 -908 -17.294046399269224 -909 -17.293934940030542 -910 -17.293823692211557 -911 -17.293712654975725 -912 -17.293601827491837 -913 -17.29349120893393 -914 -17.293380798481287 -915 -17.293270595318365 -916 -17.293160598634756 -917 -17.29305080762517 -918 -17.29294122148935 -919 -17.292831839432083 -920 -17.292722660663124 -921 -17.292613684397132 -922 -17.292504909853733 -923 -17.29239633625735 -924 -17.29228796283725 -925 -17.292179788827468 -926 -17.2920718134668 -927 -17.291964035998728 -928 -17.2918564556714 -929 -17.291749071737613 -930 -17.29164188345473 -931 -17.291534890084684 -932 -17.291428090893916 -933 -17.29132148515336 -934 -17.29121507213839 -935 -17.291108851128786 -936 -17.291002821408718 -937 -17.290896982266688 -938 -17.290791332995504 -939 -17.290685872892244 -940 -17.29058060125822 -941 -17.290475517398967 -942 -17.290370620624188 -943 -17.290265910247697 -944 -17.290161385587435 -945 -17.290057045965423 -946 -17.289952890707706 -947 -17.28984891914434 -948 -17.289745130609365 -949 -17.28964152444076 -950 -17.289538099980422 -951 -17.289434856574143 -952 -17.28933179357154 -953 -17.28922891032608 -954 -17.289126206195004 -955 -17.28902368053933 -956 -17.2889213327238 -957 -17.28881916211686 -958 -17.288717168090635 -959 -17.288615350020898 -960 -17.28851370728704 -961 -17.28841223927203 -962 -17.28831094536242 -963 -17.28820982494826 -964 -17.288108877423156 -965 -17.288008102184158 -966 -17.28790749863176 -967 -17.287807066169925 -968 -17.287706804205964 -969 -17.287606712150595 -970 -17.28750678941787 -971 -17.287407035425144 -972 -17.287307449593104 -973 -17.287208031345685 -974 -17.287108780110046 -975 -17.287009695316602 -976 -17.286910776398937 -977 -17.286812022793814 -978 -17.28671343394114 -979 -17.286615009283942 -980 -17.286516748268333 -981 -17.28641865034352 -982 -17.286320714961743 -983 -17.28622294157828 -984 -17.286125329651394 -985 -17.28602787864235 -986 -17.285930588015347 -987 -17.285833457237544 -988 -17.28573648577899 -989 -17.285639673112634 -990 -17.2855430187143 -991 -17.285446522062646 -992 -17.285350182639164 -993 -17.28525399992813 -994 -17.285157973416634 -995 -17.28506210259451 -996 -17.284966386954316 -997 -17.284870825991355 -998 -17.284775419203626 -999 -17.284680166091796 -1000 -17.284585066159188 -1001 -17.284490118911776 -1002 -17.28439532385815 -1003 -17.28430068050949 -1004 -17.284206188379553 -1005 -17.284111846984683 -1006 -17.28401765584374 -1007 -17.283923614478102 -1008 -17.283829722411674 -1009 -17.28373597917082 -1010 -17.283642384284384 -1011 -17.28354893728367 -1012 -17.283455637702374 -1013 -17.283362485076644 -1014 -17.283269478944998 -1015 -17.283176618848337 -1016 -17.28308390432992 -1017 -17.282991334935335 -1018 -17.282898910212516 -1019 -17.28280662971169 -1020 -17.282714492985377 -1021 -17.28262249958836 -1022 -17.28253064907768 -1023 -17.28243894101265 -1024 -17.282347374954746 -1025 -17.282255950467693 -1026 -17.282164667117414 -1027 -17.28207352447196 -1028 -17.281982522101586 -1029 -17.281891659578662 -1030 -17.28180093647772 -1031 -17.28171035237535 -1032 -17.28161990685028 -1033 -17.281529599483306 -1034 -17.281439429857297 -1035 -17.281349397557157 -1036 -17.281259502169846 -1037 -17.281169743284323 -1038 -17.281080120491588 -1039 -17.280990633384583 -1040 -17.280901281558283 -1041 -17.280812064609588 -1042 -17.280722982137355 -1043 -17.2806340337424 -1044 -17.280545219027438 -1045 -17.280456537597086 -1046 -17.280367989057883 -1047 -17.280279573018234 -1048 -17.28019128908839 -1049 -17.280103136880502 -1050 -17.280015116008524 -1051 -17.279927226088255 -1052 -17.279839466737315 -1053 -17.2797518375751 -1054 -17.279664338222826 -1055 -17.27957696830347 -1056 -17.279489727441774 -1057 -17.279402615264253 -1058 -17.279315631399104 -1059 -17.279228775476323 -1060 -17.279142047127575 -1061 -17.279055445986252 -1062 -17.27896897168742 -1063 -17.27888262386783 -1064 -17.27879640216591 -1065 -17.278710306221726 -1066 -17.278624335677012 -1067 -17.278538490175123 -1068 -17.278452769361017 -1069 -17.278367172881314 -1070 -17.278281700384174 -1071 -17.27819635151938 -1072 -17.27811112593829 -1073 -17.27802602329382 -1074 -17.277941043240446 -1075 -17.27785618543419 -1076 -17.277771449532604 -1077 -17.27768683519478 -1078 -17.277602342081288 -1079 -17.277517969854244 -1080 -17.277433718177228 -1081 -17.27734958671532 -1082 -17.277265575135058 -1083 -17.277181683104455 -1084 -17.27709791029297 -1085 -17.277014256371505 -1086 -17.2769307210124 -1087 -17.2768473038894 -1088 -17.276764004677705 -1089 -17.27668082305388 -1090 -17.276597758695893 -1091 -17.276514811283118 -1092 -17.276431980496273 -1093 -17.276349266017473 -1094 -17.276266667530187 -1095 -17.276184184719195 -1096 -17.27610181727068 -1097 -17.276019564872097 -1098 -17.275937427212256 -1099 -17.27585540398129 -1100 -17.27577349487059 -1101 -17.27569169957289 -1102 -17.275610017782206 -1103 -17.27552844919379 -1104 -17.275446993504225 -1105 -17.275365650411302 -1106 -17.275284419614103 -1107 -17.27520330081295 -1108 -17.275122293709394 -1109 -17.275041398006206 -1110 -17.274960613407394 -1111 -17.274879939618184 -1112 -17.27479937634499 -1113 -17.27471892329544 -1114 -17.274638580178344 -1115 -17.274558346703685 -1116 -17.274478222582644 -1117 -17.274398207527547 -1118 -17.2743183012519 -1119 -17.274238503470336 -1120 -17.27415881389865 -1121 -17.274079232253786 -1122 -17.273999758253787 -1123 -17.273920391617832 -1124 -17.27384113206624 -1125 -17.273761979320394 -1126 -17.273682933102823 -1127 -17.273603993137108 -1128 -17.273525159147958 -1129 -17.27344643086114 -1130 -17.273367808003492 -1131 -17.273289290302934 -1132 -17.273210877488435 -1133 -17.273132569290034 -1134 -17.27305436543879 -1135 -17.272976265666824 -1136 -17.272898269707287 -1137 -17.27282037729435 -1138 -17.27274258816323 -1139 -17.272664902050117 -1140 -17.27258731869225 -1141 -17.27250983782784 -1142 -17.272432459196118 -1143 -17.272355182537297 -1144 -17.27227800759257 -1145 -17.272200934104106 -1146 -17.27212396181505 -1147 -17.27204709046952 -1148 -17.271970319812585 -1149 -17.271893649590268 -1150 -17.271817079549557 -1151 -17.27174060943834 -1152 -17.271664239005496 -1153 -17.2715879680008 -1154 -17.27151179617497 -1155 -17.271435723279623 -1156 -17.27135974906732 -1157 -17.271283873291505 -1158 -17.271208095706545 -1159 -17.271132416067687 -1160 -17.271056834131087 -1161 -17.270981349653777 -1162 -17.270905962393684 -1163 -17.270830672109586 -1164 -17.27075547856116 -1165 -17.27068038150894 -1166 -17.270605380714322 -1167 -17.270530475939555 -1168 -17.27045566694774 -1169 -17.270380953502833 -1170 -17.270306335369618 -1171 -17.27023181231372 -1172 -17.27015738410159 -1173 -17.27008305050054 -1174 -17.27000881127864 -1175 -17.26993466620484 -1176 -17.269860615048852 -1177 -17.26978665758124 -1178 -17.269712793573348 -1179 -17.269639022797307 -1180 -17.269565345026056 -1181 -17.269491760033336 -1182 -17.269418267593647 -1183 -17.269344867482282 -1184 -17.269271559475307 -1185 -17.269198343349565 -1186 -17.269125218882657 -1187 -17.26905218585294 -1188 -17.268979244039564 -1189 -17.26890639322238 -1190 -17.26883363318203 -1191 -17.2687609636999 -1192 -17.268688384558086 -1193 -17.268615895539448 -1194 -17.268543496427576 -1195 -17.26847118700676 -1196 -17.26839896706207 -1197 -17.268326836379252 -1198 -17.268254794744777 -1199 -17.26818284194583 -1200 -17.268110977770323 -1201 -17.268039202006847 -1202 -17.267967514444706 -1203 -17.26789591487389 -1204 -17.26782440308511 -1205 -17.26775297886974 -1206 -17.267681642019845 -1207 -17.267610392328173 -1208 -17.26753922958816 -1209 -17.267468153593907 -1210 -17.267397164140167 -1211 -17.267326261022415 -1212 -17.267255444036728 -1213 -17.267184712979883 -1214 -17.2671140676493 -1215 -17.267043507843045 -1216 -17.266973033359847 -1217 -17.266902643999064 -1218 -17.26683233956073 -1219 -17.266762119845467 -1220 -17.26669198465458 -1221 -17.266621933789985 -1222 -17.266551967054223 -1223 -17.266482084250473 -1224 -17.266412285182525 -1225 -17.266342569654793 -1226 -17.266272937472316 -1227 -17.266203388440736 -1228 -17.2661339223663 -1229 -17.266064539055865 -1230 -17.265995238316904 -1231 -17.265926019957465 -1232 -17.26585688378621 -1233 -17.265787829612393 -1234 -17.265718857245865 -1235 -17.265649966497048 -1236 -17.265581157176957 -1237 -17.265512429097193 -1238 -17.26544378206993 -1239 -17.265375215907913 -1240 -17.26530673042448 -1241 -17.26523832543352 -1242 -17.26517000074948 -1243 -17.265101756187413 -1244 -17.265033591562876 -1245 -17.26496550669204 -1246 -17.264897501391587 -1247 -17.264829575478775 -1248 -17.26476172877141 -1249 -17.264693961087843 -1250 -17.264626272246975 -1251 -17.26455866206823 -1252 -17.264491130371596 -1253 -17.264423676977586 -1254 -17.26435630170724 -1255 -17.26428900438215 -1256 -17.264221784824404 -1257 -17.26415464285666 -1258 -17.264087578302043 -1259 -17.264020590984256 -1260 -17.263953680727486 -1261 -17.263886847356446 -1262 -17.26382009069636 -1263 -17.263753410572974 -1264 -17.26368680681252 -1265 -17.263620279241756 -1266 -17.26355382768793 -1267 -17.2634874519788 -1268 -17.26342115194263 -1269 -17.263354927408155 -1270 -17.263288778204632 -1271 -17.263222704161784 -1272 -17.26315670510985 -1273 -17.263090780879537 -1274 -17.26302493130205 -1275 -17.26295915620905 -1276 -17.262893455432714 -1277 -17.262827828805673 -1278 -17.26276227616104 -1279 -17.2626967973324 -1280 -17.262631392153814 -1281 -17.262566060459815 -1282 -17.262500802085388 -1283 -17.26243561686599 -1284 -17.262370504637556 -1285 -17.26230546523645 -1286 -17.262240498499526 -1287 -17.262175604264073 -1288 -17.26211078236784 -1289 -17.262046032649035 -1290 -17.2619813549463 -1291 -17.261916749098752 -1292 -17.26185221494593 -1293 -17.261787752327812 -1294 -17.26172336108484 -1295 -17.2616590410579 -1296 -17.261594792088278 -1297 -17.26153061401773 -1298 -17.261466506688436 -1299 -17.261402469943008 -1300 -17.26133850362448 -1301 -17.261274607576336 -1302 -17.26121078164248 -1303 -17.261147025667203 -1304 -17.26108333949527 -1305 -17.261019722971845 -1306 -17.260956175942503 -1307 -17.260892698253258 -1308 -17.260829289750504 -1309 -17.26076595028109 -1310 -17.26070267969225 -1311 -17.260639477831635 -1312 -17.2605763445473 -1313 -17.26051327968772 -1314 -17.260450283101754 -1315 -17.26038735463868 -1316 -17.26032449414816 -1317 -17.26026170148029 -1318 -17.26019897648552 -1319 -17.260136319014727 -1320 -17.260073728919163 -1321 -17.26001120605049 -1322 -17.259948750260747 -1323 -17.259886361402373 -1324 -17.25982403932818 -1325 -17.25976178389139 -1326 -17.259699594945573 -1327 -17.259637472344725 -1328 -17.25957541594319 -1329 -17.259513425595706 -1330 -17.259451501157386 -1331 -17.259389642483725 -1332 -17.259327849430573 -1333 -17.259266121854186 -1334 -17.259204459611162 -1335 -17.259142862558484 -1336 -17.259081330553506 -1337 -17.259019863453936 -1338 -17.258958461117864 -1339 -17.258897123403734 -1340 -17.258835850170353 -1341 -17.258774641276894 -1342 -17.25871349658289 -1343 -17.258652415948216 -1344 -17.258591399233136 -1345 -17.25853044629824 -1346 -17.25846955700449 -1347 -17.258408731213187 -1348 -17.258347968786005 -1349 -17.258287269584933 -1350 -17.25822663347234 -1351 -17.25816606031094 -1352 -17.258105549963766 -1353 -17.258045102294222 -1354 -17.25798471716605 -1355 -17.25792439444332 -1356 -17.257864133990473 -1357 -17.257803935672243 -1358 -17.25774379935375 -1359 -17.257683724900406 -1360 -17.257623712178 -1361 -17.257563761052616 -1362 -17.2575038713907 -1363 -17.257444043059024 -1364 -17.257384275924668 -1365 -17.25732456985508 -1366 -17.257264924717994 -1367 -17.257205340381486 -1368 -17.25714581671398 -1369 -17.25708635358418 -1370 -17.257026950861153 -1371 -17.256967608414264 -1372 -17.256908326113198 -1373 -17.256849103827978 -1374 -17.25678994142892 -1375 -17.256730838786684 -1376 -17.256671795772206 -1377 -17.256612812256783 -1378 -17.256553888111984 -1379 -17.25649502320972 -1380 -17.256436217422188 -1381 -17.256377470621914 -1382 -17.256318782681728 -1383 -17.25626015347476 -1384 -17.256201582874443 -1385 -17.256143070754536 -1386 -17.256084616989078 -1387 -17.25602622145242 -1388 -17.255967884019213 -1389 -17.255909604564426 -1390 -17.255851382963293 -1391 -17.25579321909138 -1392 -17.255735112824528 -1393 -17.25567706403888 -1394 -17.255619072610877 -1395 -17.255561138417256 -1396 -17.25550326133505 -1397 -17.25544544124157 -1398 -17.255387678014426 -1399 -17.255329971531516 -1400 -17.25527232167103 -1401 -17.25521472831145 -1402 -17.25515719133154 -1403 -17.255099710610345 -1404 -17.2550422860272 -1405 -17.25498491746172 -1406 -17.254927604793806 -1407 -17.254870347903648 -1408 -17.254813146671705 -1409 -17.254756000978713 -1410 -17.25469891070571 -1411 -17.25464187573398 -1412 -17.254584895945115 -1413 -17.254527971220952 -1414 -17.254471101443634 -1415 -17.25441428649556 -1416 -17.254357526259398 -1417 -17.254300820618106 -1418 -17.254244169454896 -1419 -17.254187572653265 -1420 -17.254131030096964 -1421 -17.254074541670022 -1422 -17.25401810725674 -1423 -17.253961726741682 -1424 -17.253905400009668 -1425 -17.25384912694579 -1426 -17.25379290743542 -1427 -17.25373674136415 -1428 -17.253680628617904 -1429 -17.253624569082795 -1430 -17.253568562645235 -1431 -17.253512609191883 -1432 -17.253456708609676 -1433 -17.25340086078579 -1434 -17.253345065607657 -1435 -17.253289322962985 -1436 -17.25323363273971 -1437 -17.253177994826046 -1438 -17.253122409110446 -1439 -17.253066875481622 -1440 -17.253011393828555 -1441 -17.25295596404043 -1442 -17.25290058600674 -1443 -17.25284525961719 -1444 -17.252789984761737 -1445 -17.252734761330604 -1446 -17.252679589214253 -1447 -17.25262446830338 -1448 -17.25256939848894 -1449 -17.25251437966213 -1450 -17.252459411714398 -1451 -17.252404494537426 -1452 -17.25234962802314 -1453 -17.252294812063703 -1454 -17.252240046551528 -1455 -17.25218533137927 -1456 -17.252130666439815 -1457 -17.252076051626297 -1458 -17.25202148683207 -1459 -17.251966971950758 -1460 -17.251912506876188 -1461 -17.251858091502434 -1462 -17.251803725723814 -1463 -17.251749409434872 -1464 -17.251695142530387 -1465 -17.251640924905374 -1466 -17.25158675645508 -1467 -17.25153263707497 -1468 -17.251478566660765 -1469 -17.25142454510839 -1470 -17.25137057231402 -1471 -17.251316648174047 -1472 -17.25126277258509 -1473 -17.251208945444 -1474 -17.251155166647862 -1475 -17.251101436093972 -1476 -17.251047753679856 -1477 -17.25099411930327 -1478 -17.250940532862188 -1479 -17.250886994254817 -1480 -17.25083350337956 -1481 -17.25078006013509 -1482 -17.25072666442024 -1483 -17.25067331613412 -1484 -17.25062001517602 -1485 -17.250566761445477 -1486 -17.25051355484221 -1487 -17.250460395266217 -1488 -17.250407282617644 -1489 -17.250354216796897 -1490 -17.250301197704594 -1491 -17.250248225241545 -1492 -17.2501952993088 -1493 -17.250142419807617 -1494 -17.250089586639454 -1495 -17.250036799706002 -1496 -17.24998405890915 -1497 -17.249931364151006 -1498 -17.249878715333878 -1499 -17.249826112360292 -1500 -17.249773555132993 -1501 -17.249721043554924 -1502 -17.249668577529235 -1503 -17.24961615695928 -1504 -17.24956378174864 -1505 -17.249511451801087 -1506 -17.2494591670206 -1507 -17.249406927311366 -1508 -17.24935473257778 -1509 -17.249302582724436 -1510 -17.249250477656137 -1511 -17.24919841727789 -1512 -17.249146401494883 -1513 -17.24909443021254 -1514 -17.249042503336476 -1515 -17.24899062077249 -1516 -17.24893878242659 -1517 -17.248886988204998 -1518 -17.248835238014113 -1519 -17.24878353176056 -1520 -17.248731869351133 -1521 -17.248680250692836 -1522 -17.248628675692874 -1523 -17.248577144258647 -1524 -17.248525656297748 -1525 -17.248474211717962 -1526 -17.248422810427275 -1527 -17.24837145233387 -1528 -17.24832013734611 -1529 -17.248268865372573 -1530 -17.24821763632201 -1531 -17.248166450103373 -1532 -17.248115306625802 -1533 -17.24806420579863 -1534 -17.248013147531385 -1535 -17.247962131733786 -1536 -17.247911158315716 -1537 -17.24786022718728 -1538 -17.24780933825877 -1539 -17.247758491440642 -1540 -17.247707686643555 -1541 -17.247656923778347 -1542 -17.24760620275606 -1543 -17.247555523487904 -1544 -17.247504885885277 -1545 -17.247454289859782 -1546 -17.247403735323168 -1547 -17.247353222187407 -1548 -17.247302750364632 -1549 -17.24725231976716 -1550 -17.24720193030751 -1551 -17.24715158189835 -1552 -17.247101274452564 -1553 -17.247051007883186 -1554 -17.24700078210347 -1555 -17.246950597026803 -1556 -17.24690045256678 -1557 -17.246850348637174 -1558 -17.24680028515194 -1559 -17.24675026202519 -1560 -17.24670027917123 -1561 -17.24665033650455 -1562 -17.24660043393981 -1563 -17.246550571391833 -1564 -17.246500748775638 -1565 -17.246450966006396 -1566 -17.246401222999488 -1567 -17.246351519670444 -1568 -17.246301855934966 -1569 -17.246252231708954 -1570 -17.24620264690844 -1571 -17.246153101449668 -1572 -17.246103595249046 -1573 -17.246054128223143 -1574 -17.246004700288694 -1575 -17.24595531136263 -1576 -17.245905961362034 -1577 -17.245856650204146 -1578 -17.245807377806422 -1579 -17.24575814408644 -1580 -17.245708948961973 -1581 -17.245659792350942 -1582 -17.24561067417146 -1583 -17.245561594341797 -1584 -17.24551255278038 -1585 -17.24546354940582 -1586 -17.245414584136878 -1587 -17.245365656892503 -1588 -17.245316767591774 -1589 -17.245267916153978 -1590 -17.245219102498535 -1591 -17.245170326545043 -1592 -17.245121588213255 -1593 -17.2450728874231 -1594 -17.245024224094657 -1595 -17.24497559814818 -1596 -17.24492700950407 -1597 -17.24487845808291 -1598 -17.244829943805406 -1599 -17.244781466592492 -1600 -17.244733026365193 -1601 -17.24468462304474 -1602 -17.24463625655249 -1603 -17.24458792680999 -1604 -17.24453963373893 -1605 -17.244491377261166 -1606 -17.24444315729869 -1607 -17.244394973773694 -1608 -17.24434682660849 -1609 -17.244298715725552 -1610 -17.244250641047536 -1611 -17.24420260249723 -1612 -17.244154599997582 -1613 -17.244106633471702 -1614 -17.244058702842857 -1615 -17.24401080803445 -1616 -17.24396294897006 -1617 -17.243915125573416 -1618 -17.243867337768393 -1619 -17.243819585479017 -1620 -17.243771868629477 -1621 -17.243724187144114 -1622 -17.243676540947423 -1623 -17.24362892996403 -1624 -17.243581354118742 -1625 -17.24353381333649 -1626 -17.243486307542394 -1627 -17.243438836661667 -1628 -17.243391400619725 -1629 -17.243343999342105 -1630 -17.243296632754507 -1631 -17.24324930078277 -1632 -17.243202003352895 -1633 -17.243154740391 -1634 -17.243107511823403 -1635 -17.243060317576514 -1636 -17.24301315757692 -1637 -17.242966031751365 -1638 -17.242918940026726 -1639 -17.242871882330004 -1640 -17.24282485858838 -1641 -17.24277786872917 -1642 -17.242730912679836 -1643 -17.242683990367965 -1644 -17.242637101721325 -1645 -17.24259024666779 -1646 -17.24254342513541 -1647 -17.242496637052362 -1648 -17.242449882346964 -1649 -17.242403160947678 -1650 -17.24235647278312 -1651 -17.242309817782044 -1652 -17.242263195873328 -1653 -17.242216606986013 -1654 -17.24217005104926 -1655 -17.24212352799241 -1656 -17.242077037744902 -1657 -17.24203058023633 -1658 -17.241984155396434 -1659 -17.241937763155086 -1660 -17.241891403442295 -1661 -17.241845076188238 -1662 -17.24179878132318 -1663 -17.24175251877756 -1664 -17.24170628848195 -1665 -17.241660090367052 -1666 -17.2416139243637 -1667 -17.241567790402886 -1668 -17.241521688415716 -1669 -17.241475618333453 -1670 -17.241429580087484 -1671 -17.24138357360932 -1672 -17.241337598830633 -1673 -17.24129165568322 -1674 -17.241245744098993 -1675 -17.24119986401003 -1676 -17.241154015348542 -1677 -17.241108198046835 -1678 -17.241062412037394 -1679 -17.2410166572528 -1680 -17.2409709336258 -1681 -17.240925241089247 -1682 -17.240879579576145 -1683 -17.240833949019624 -1684 -17.240788349352947 -1685 -17.240742780509496 -1686 -17.240697242422797 -1687 -17.240651735026514 -1688 -17.240606258254417 -1689 -17.240560812040435 -1690 -17.24051539631861 -1691 -17.24047001102311 -1692 -17.240424656088248 -1693 -17.240379331448448 -1694 -17.24033403703828 -1695 -17.24028877279244 -1696 -17.24024353864573 -1697 -17.240198334533112 -1698 -17.240153160389657 -1699 -17.240108016150565 -1700 -17.240062901751166 -1701 -17.240017817126915 -1702 -17.23997276221341 -1703 -17.239927736946328 -1704 -17.23988274126154 -1705 -17.23983777509498 -1706 -17.23979283838275 -1707 -17.23974793106106 -1708 -17.239703053066243 -1709 -17.239658204334752 -1710 -17.23961338480319 -1711 -17.23956859440826 -1712 -17.23952383308679 -1713 -17.239479100775743 -1714 -17.2394343974122 -1715 -17.239389722933364 -1716 -17.239345077276553 -1717 -17.239300460379226 -1718 -17.23925587217895 -1719 -17.23921131261342 -1720 -17.239166781620444 -1721 -17.239122279137966 -1722 -17.239077805104046 -1723 -17.239033359456837 -1724 -17.238988942134668 -1725 -17.23894455307595 -1726 -17.238900192219205 -1727 -17.238855859503115 -1728 -17.238811554866448 -1729 -17.238767278248098 -1730 -17.238723029587096 -1731 -17.238678808822556 -1732 -17.23863461589375 -1733 -17.238590450740038 -1734 -17.23854631330093 -1735 -17.238502203516006 -1736 -17.238458121325017 -1737 -17.238414066667797 -1738 -17.238370039484295 -1739 -17.238326039714607 -1740 -17.238282067298915 -1741 -17.238238122177535 -1742 -17.23819420429089 -1743 -17.238150313579517 -1744 -17.238106449984087 -1745 -17.23806261344535 -1746 -17.238018803904215 -1747 -17.237975021301676 -1748 -17.23793126557884 -1749 -17.237887536676954 -1750 -17.23784383453735 -1751 -17.237800159101496 -1752 -17.237756510310966 -1753 -17.23771288810743 -1754 -17.23766929243271 -1755 -17.2376257232287 -1756 -17.237582180437435 -1757 -17.237538664001043 -1758 -17.23749517386177 -1759 -17.237451709961995 -1760 -17.23740827224418 -1761 -17.2373648606509 -1762 -17.237321475124865 -1763 -17.23727811560887 -1764 -17.23723478204584 -1765 -17.237191474378793 -1766 -17.23714819255088 -1767 -17.237104936505325 -1768 -17.237061706185514 -1769 -17.237018501534898 -1770 -17.236975322497045 -1771 -17.23693216901566 -1772 -17.236889041034523 -1773 -17.236845938497545 -1774 -17.23680286134873 -1775 -17.236759809532202 -1776 -17.23671678299219 -1777 -17.23667378167302 -1778 -17.236630805519148 -1779 -17.23658785447511 -1780 -17.236544928485575 -1781 -17.2365020274953 -1782 -17.23645915144915 -1783 -17.236416300292113 -1784 -17.236373473969273 -1785 -17.236330672425808 -1786 -17.23628789560701 -1787 -17.236245143458294 -1788 -17.236202415925156 -1789 -17.23615971295321 -1790 -17.236117034488167 -1791 -17.236074380475856 -1792 -17.23603175086218 -1793 -17.235989145593194 -1794 -17.235946564615023 -1795 -17.235904007873888 -1796 -17.235861475316142 -1797 -17.235818966888232 -1798 -17.235776482536696 -1799 -17.235734022208185 -1800 -17.235691585849445 -1801 -17.235649173407346 -1802 -17.23560678482882 -1803 -17.235564420060957 -1804 -17.2355220790509 -1805 -17.2354797617459 -1806 -17.23543746809334 -1807 -17.23539519804067 -1808 -17.23535295153548 -1809 -17.23531072852541 -1810 -17.235268528958237 -1811 -17.235226352781833 -1812 -17.235184199944158 -1813 -17.235142070393284 -1814 -17.23509996407738 -1815 -17.235057880944716 -1816 -17.235015820943648 -1817 -17.23497378402265 -1818 -17.23493177013029 -1819 -17.23488977921522 -1820 -17.234847811226206 -1821 -17.234805866112108 -1822 -17.234763943821886 -1823 -17.234722044304604 -1824 -17.2346801675094 -1825 -17.234638313385542 -1826 -17.234596481882377 -1827 -17.234554672949336 -1828 -17.234512886535974 -1829 -17.234471122591934 -1830 -17.234429381066946 -1831 -17.234387661910844 -1832 -17.234345965073555 -1833 -17.234304290505108 -1834 -17.234262638155627 -1835 -17.23422100797532 -1836 -17.234179399914506 -1837 -17.234137813923585 -1838 -17.234096249953062 -1839 -17.234054707953536 -1840 -17.234013187875696 -1841 -17.23397168967034 -1842 -17.23393021328832 -1843 -17.233888758680646 -1844 -17.233847325798354 -1845 -17.23380591459262 -1846 -17.233764525014703 -1847 -17.23372315701594 -1848 -17.23368181054778 -1849 -17.233640485561764 -1850 -17.233599182009506 -1851 -17.233557899842737 -1852 -17.23351663901326 -1853 -17.233475399472987 -1854 -17.233434181173894 -1855 -17.2333929840681 -1856 -17.23335180810777 -1857 -17.23331065324517 -1858 -17.23326951943266 -1859 -17.233228406622718 -1860 -17.23318731476785 -1861 -17.233146243820727 -1862 -17.233105193734055 -1863 -17.233064164460654 -1864 -17.23302315595343 -1865 -17.23298216816538 -1866 -17.23294120104958 -1867 -17.232900254559215 -1868 -17.232859328647553 -1869 -17.23281842326794 -1870 -17.232777538373828 -1871 -17.23273667391874 -1872 -17.232695829856297 -1873 -17.232655006140213 -1874 -17.23261420272428 -1875 -17.232573419562396 -1876 -17.232532656608516 -1877 -17.232491913816716 -1878 -17.232451191141138 -1879 -17.23241048853602 -1880 -17.232369805955685 -1881 -17.232329143354548 -1882 -17.23228850068711 -1883 -17.232247877907945 -1884 -17.232207274971728 -1885 -17.232166691833225 -1886 -17.232126128447266 -1887 -17.232085584768797 -1888 -17.232045060752828 -1889 -17.23200455635445 -1890 -17.23196407152887 -1891 -17.231923606231344 -1892 -17.231883160417244 -1893 -17.23184273404199 -1894 -17.231802327061146 -1895 -17.231761939430292 -1896 -17.23172157110514 -1897 -17.23168122204148 -1898 -17.23164089219516 -1899 -17.23160058152214 -1900 -17.23156028997845 -1901 -17.231520017520218 -1902 -17.23147976410363 -1903 -17.231439529684973 -1904 -17.23139931422062 -1905 -17.23135911766703 -1906 -17.231318939980728 -1907 -17.231278781118327 -1908 -17.23123864103653 -1909 -17.231198519692125 -1910 -17.231158417041968 -1911 -17.231118333043003 -1912 -17.23107826765226 -1913 -17.231038220826854 -1914 -17.230998192523977 -1915 -17.23095818270089 -1916 -17.230918191314956 -1917 -17.230878218323607 -1918 -17.230838263684362 -1919 -17.23079832735482 -1920 -17.230758409292644 -1921 -17.23071850945561 -1922 -17.23067862780155 -1923 -17.230638764288376 -1924 -17.230598918874087 -1925 -17.230559091516774 -1926 -17.230519282174583 -1927 -17.230479490805756 -1928 -17.23043971736861 -1929 -17.230399961821544 -1930 -17.230360224123018 -1931 -17.230320504231603 -1932 -17.230280802105927 -1933 -17.2302411177047 -1934 -17.230201450986716 -1935 -17.230161801910835 -1936 -17.23012217043601 -1937 -17.23008255652126 -1938 -17.230042960125697 -1939 -17.230003381208494 -1940 -17.2299638197289 -1941 -17.22992427564626 -1942 -17.229884748919993 -1943 -17.229845239509576 -1944 -17.229805747374574 -1945 -17.22976627247463 -1946 -17.229726814769478 -1947 -17.22968737421889 -1948 -17.229647950782766 -1949 -17.22960854442103 -1950 -17.229569155093717 -1951 -17.229529782760917 -1952 -17.229490427382824 -1953 -17.22945108891968 -1954 -17.22941176733181 -1955 -17.229372462579615 -1956 -17.229333174623576 -1957 -17.229293903424242 -1958 -17.22925464894225 -1959 -17.229215411138288 -1960 -17.22917618997314 -1961 -17.229136985407663 -1962 -17.229097797402765 -1963 -17.229058625919453 -1964 -17.229019470918807 -1965 -17.228980332361967 -1966 -17.228941210210156 -1967 -17.228902104424666 -1968 -17.228863014966866 -1969 -17.228823941798197 -1970 -17.228784884880167 -1971 -17.22874584417437 -1972 -17.228706819642465 -1973 -17.228667811246183 -1974 -17.22862881894733 -1975 -17.228589842707784 -1976 -17.22855088248948 -1977 -17.22851193825446 -1978 -17.228473009964812 -1979 -17.228434097582696 -1980 -17.22839520107035 -1981 -17.228356320390084 -1982 -17.228317455504282 -1983 -17.22827860637539 -1984 -17.22823977296594 -1985 -17.22820095523851 -1986 -17.228162153155765 -1987 -17.228123366680457 -1988 -17.228084595775382 -1989 -17.22804584040341 -1990 -17.228007100527492 -1991 -17.227968376110653 -1992 -17.227929667115966 -1993 -17.227890973506597 -1994 -17.227852295245764 -1995 -17.227813632296773 -1996 -17.227774984622982 -1997 -17.22773635218783 -1998 -17.227697734954816 -1999 -17.227659132887513 -2000 -17.22762054594957 diff --git a/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log b/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log deleted file mode 100644 index db4447c0..00000000 --- a/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log +++ /dev/null @@ -1,39 +0,0 @@ -2023-12-23T22:28:34.294 -== Config == -INIT_SIZE: 3 -GEN_TYP_SIZE: 2 -PARAMETERIZE_FLIP_GROUPS_BY_SZ: true -EPOCHS: 2000 -DistNat: DistUInt32 -TAG: v1 - -Building num_apps(gen_expr(...)) computation graph... - 10.137793584 seconds - -Initial adnodes_of_interest: -Dict("tysz2_gen_type_tbool" => 0.5, "tysz1_gen_type_tbool" => 0.5, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.5, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5, "sz1_succ_app" => 0.5, "sz1_succ_abs" => 0.5, "sz3_succ_abs" => 0.5, "sz3_succ_app" => 0.5, "sz2_succ_abs" => 0.5, "sz3_succ_var" => 0.5) -Inferring initial distribution... - 0.334806833 seconds -Saved num_apps dist to examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/dist_before.csv. - -Saving samples... -Saved samples to examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/terms_before.txt. - 5.357602125 seconds - -Initial logprob: -20.238481981031438 - -Training... - 23.875804334 seconds - -Final logprob: -17.22762054594957 -Drawing the target dataset is 20.3x more likely - -Learned adnodes_of_interest: -Dict("tysz2_gen_type_tbool" => 0.3408372476438081, "tysz1_gen_type_tbool" => 0.39501557295049866, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.6151878798944757, "sz2_succ_var" => 0.43468900171159863, "sz1_succ_var" => 0.5103724794228328, "sz1_succ_app" => 0.68419917231591, "sz1_succ_abs" => 0.2149167539907951, "sz3_succ_abs" => 0.25149682656466177, "sz3_succ_app" => 0.6712638585215596, "sz2_succ_abs" => 0.4236132578800875, "sz3_succ_var" => 0.5) -Inferring trained distribution... -Saved num_apps dist to examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=2000.csv. - -Saving samples... -Saved samples to examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt. - 3.1883675 seconds - diff --git a/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/terms_before.txt b/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/terms_before.txt deleted file mode 100644 index cd541c29..00000000 --- a/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/terms_before.txt +++ /dev/null @@ -1,200 +0,0 @@ -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. true)) -(λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) true false (λx:Bool. (λy:Bool. λz:Bool. true) true) -(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. true) true ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) ((λx:Bool. λy:Bool -> Bool. true) true) -(λx:Bool. λy:Bool -> Bool. true) ((λx:Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false))) -λx:Bool -> Bool. false -(λx:Bool. (λy:Bool. false) false) false -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) false ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. λy:Bool. true))) -λx:Bool -> Bool. true -(λx:Bool. λy:Bool. λz:Bool. false) ((λx:Bool. true) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true))) -true -false -λx:Bool. (λy:Bool. y) ((λy:Bool. true) false) -true -λx:Bool -> Bool. x -(λx:Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) true true true -(λx:Bool -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. true) true) (λx:Bool. (λy:Bool. λz:Bool. true) x) -(λx:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:Bool. true) true)) -λx:Bool -> Bool. (λy:Bool -> Bool. λz:Bool. false) ((λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool -> Bool. false)) -false -λx:Bool -> Bool. true -λx:Bool -> Bool. true -λx:Bool -> Bool. (λy:Bool -> Bool. λz:Bool. false) x false -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. true)) (λx:Bool. x) -(λx:Bool. (λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. true)) ((λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) (λx:Bool. x)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) false -(λx:Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. true) false ((λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false)) (λx:Bool -> Bool. x false) -(λx:Bool. λy:Bool -> Bool. x) true -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false) true ((λx:Bool -> Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false))) -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true)) -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. λa:Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool. true) true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool. λz:Bool. true) true)) -λx:Bool. x -(λx:Bool. λy:Bool -> Bool. x) true -false -λx:Bool -> Bool. true -(λx:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:Bool. true) true)) -(λx:Bool. (λy:Bool. λz:Bool -> Bool. true) false) true -true -(λx:Bool. λy:(Bool -> Bool) -> Bool. false) false (λx:Bool -> Bool. true) -(λx:Bool. x) false -true -λx:Bool -> Bool. x false -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. true) ((λx:Bool. λy:Bool. λz:Bool. true) false) (λx:Bool. (λy:Bool. λz:Bool. true) x) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool -> Bool. λy:Bool. y) -λx:Bool. λy:Bool. (λz:(Bool -> Bool) -> Bool -> Bool. false) (λz:Bool -> Bool. λw:Bool. true) -λx:Bool. λy:Bool. y -false -λx:Bool. λy:Bool. (λz:Bool -> Bool -> Bool. false) (λz:Bool. λw:Bool. false) -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool. λy:Bool. true) true false) -false -(λx:Bool. (λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true))) -(λx:Bool -> Bool -> Bool. false) (λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. false)) -λx:Bool. false -(λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. true) true true ((λx:Bool. λy:Bool. λz:Bool. false) true) -true -true -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. true) true) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) true ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false))) -λx:Bool -> Bool. false -(λx:Bool. λy:Bool -> Bool. true) true -λx:Bool. x -(λx:(Bool -> Bool) -> Bool. x (λy:Bool. false)) ((λx:Bool. λy:Bool -> Bool. true) false) -false -λx:Bool -> Bool. (λy:Bool. λz:Bool. false) true -(λx:Bool. λy:(Bool -> Bool) -> Bool. true) true ((λx:Bool. λy:Bool -> Bool. false) true) -λx:Bool -> Bool. true -(λx:Bool -> Bool. (λy:Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool. true)) (λx:Bool. (λy:Bool. true) true) -(λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false) -λx:Bool -> Bool. x -λx:Bool. (λy:Bool. λz:Bool. λw:Bool. true) x false -(λx:Bool. λy:Bool. λz:Bool. true) ((λx:Bool. false) true) true -true -(λx:Bool. λy:Bool. false) true -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) ((λy:Bool. λz:Bool -> Bool. λw:Bool. false) false) -(λx:Bool. x) false -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) false ((λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false))) -false -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true)) (λx:Bool -> Bool. x) -false -false -(λx:Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) ((λx:Bool. true) true)) -(λx:Bool. λy:Bool -> Bool. x) ((λx:Bool. λy:Bool -> Bool. false) true ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. true))) -true -true -λx:Bool. (λy:(Bool -> Bool) -> Bool. true) ((λy:Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool. false)) -(λx:Bool. x) ((λx:Bool. λy:Bool -> Bool -> Bool. true) false ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true))) -(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. false) true ((λx:Bool. true) true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:Bool. λy:Bool. λz:Bool. true) true)) -λx:Bool. (λy:Bool. true) x -λx:Bool -> Bool. x -λx:Bool -> Bool. (λy:Bool. λz:Bool. true) true ((λy:Bool. false) false) -(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool. true) false) ((λx:(Bool -> Bool) -> Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. false))) -(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. false)) (λx:Bool. λy:Bool. y) -(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. false) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) (λx:Bool. false) (λx:Bool -> Bool. x)) -false -λx:Bool. true -false -(λx:Bool -> Bool -> Bool. false) ((λx:Bool. λy:Bool. λz:Bool. true) ((λx:Bool. true) false)) -(λx:Bool. (λy:Bool. false) false) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) true (λx:Bool -> Bool. λy:Bool. false)) -true -true -(λx:(Bool -> Bool) -> Bool. (λy:Bool. true) true) (λx:Bool -> Bool. (λy:Bool. true) false) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true))) -(λx:(Bool -> Bool) -> Bool. x) (λx:Bool -> Bool. (λy:Bool -> Bool. false) (λy:Bool. false)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) -(λx:Bool -> Bool. λy:Bool -> Bool -> Bool. true) (λx:Bool. false) (λx:Bool. λy:Bool. x) -(λx:Bool -> Bool. (λy:Bool. false) false) (λx:Bool. (λy:Bool. false) false) -false -false -λx:Bool -> Bool. x -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. true) (λx:Bool -> Bool. false) true false -(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. false) (λx:Bool. λy:Bool. true) false (λx:Bool. false) -λx:Bool -> Bool. (λy:Bool. false) ((λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. false)) -(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) true (λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. false) false)) -λx:Bool. λy:Bool. true -false -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. true) false) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) false ((λx:Bool -> Bool. true) (λx:Bool. true))) -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. false) (λx:Bool -> Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. true)) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) true (λx:Bool -> Bool. λy:Bool. false)) -false -false -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) false (λx:Bool -> Bool. false) (λx:Bool. λy:Bool. x) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. false) true -(λx:(Bool -> Bool) -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool -> Bool. false) false) ((λx:Bool. x) ((λx:Bool. false) false)) -false -λx:Bool -> Bool. false -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. false) false -λx:Bool -> Bool. true -false -false -(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. true) ((λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. x)) -true -(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. false) true ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. λy:Bool. false)) true -(λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. true) (λy:Bool -> Bool. false)) ((λx:Bool. λy:Bool. true) false false) -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. λa:Bool. true) (λx:Bool -> Bool. true) ((λx:Bool. false) true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:Bool. false) true)) -(λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) false (λx:Bool. true) -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. λa:Bool. false) true ((λx:Bool. λy:Bool -> Bool. true) false) true -false -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. x) false -(λx:Bool. (λy:Bool. λz:Bool -> Bool. false) x) ((λx:Bool. true) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false))) -(λx:Bool. x) false -true -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool. false) (λy:Bool. false)) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. false)) -(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool -> Bool. x) -(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false)) (λx:Bool. λy:Bool. true) -λx:Bool -> Bool. (λy:Bool. y) ((λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. true)) -(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) x) true -(λx:(Bool -> Bool) -> Bool. (λy:Bool. true) true) (λx:Bool -> Bool. false) -λx:Bool -> Bool. λy:Bool. (λz:Bool. false) y -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. y) (λx:Bool -> Bool. (λy:Bool. λz:Bool. false) false) -true -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. false) false -λx:Bool. (λy:Bool. λz:Bool. λw:Bool. true) false true -false -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) false (λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. true))) -λx:Bool. (λy:Bool. λz:Bool. false) false -true -λx:Bool. x -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. x) (λy:Bool -> Bool. false) -(λx:Bool. λy:Bool. λz:Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) ((λx:Bool. false) true)) -λx:Bool. x -(λx:Bool. (λy:Bool. true) x) false -λx:Bool -> Bool. true -λx:Bool. (λy:Bool. λz:Bool. false) true -λx:Bool -> Bool. true -(λx:Bool. λy:Bool. λz:Bool -> Bool. true) false ((λx:Bool. false) false) ((λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. true))) -λx:Bool -> Bool. x -false -λx:Bool -> Bool. false -true -true -false -λx:Bool -> Bool. true -false -λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. false) ((λy:Bool. λz:Bool. λw:Bool. true) x) -(λx:Bool -> Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false)) true -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) true false) -false -false -λx:Bool. (λy:Bool. λz:Bool -> Bool. false) true (λy:Bool. true) -(λx:Bool. (λy:Bool. true) true) ((λx:Bool. x) false) -true -(λx:Bool -> Bool. (λy:Bool. false) false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true))) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. x) -(λx:Bool. true) ((λx:Bool. false) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true))) -λx:Bool -> Bool. x -λx:Bool. x -true -true -(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. true)) true -λx:Bool -> Bool. (λy:Bool -> Bool. λz:Bool -> Bool. true) x (λy:Bool. false) -(λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. true) false (λx:Bool. false) -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool -> Bool. false) false (λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. λz:Bool. true) true ((λx:Bool. false) true)) -(λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false)) false -(λx:Bool. λy:Bool -> Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. x)) -(λx:Bool. (λy:Bool. λz:Bool -> Bool. false) false) true -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool. false) true) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) true ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true))) -λx:Bool. (λy:Bool -> Bool. y) (λy:Bool. true) -true -λx:Bool. λy:Bool. (λz:Bool. true) x -true -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) false ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true))) -(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. true) ((λx:Bool. λy:Bool -> Bool. true) false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) -true diff --git a/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt b/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt deleted file mode 100644 index efcfd6df..00000000 --- a/examples/qc/stlc/output/v1/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt +++ /dev/null @@ -1,200 +0,0 @@ -(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. true) ((λx:Bool. λy:Bool -> Bool. true) false) (λx:Bool. x) -true -true -(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. false) (λy:Bool. λz:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. x)) -λx:Bool -> Bool. x -(λx:Bool. λy:Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) false ((λx:Bool. λy:Bool. true) false) ((λx:Bool. λy:Bool. false) true ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. false))) -(λx:Bool -> Bool -> Bool. (λy:Bool. λz:Bool. true) true) ((λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) false ((λx:Bool. λy:Bool. λz:Bool. true) true)) -λx:Bool. x -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. false) false (λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool -> Bool. true) true)) -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) x) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false))) -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. true) (λy:Bool -> Bool. true) -(λx:Bool. λy:(Bool -> Bool) -> Bool. false) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true)) ((λx:Bool. λy:Bool. λz:Bool -> Bool. false) true ((λx:Bool. false) false)) -true -λx:Bool -> Bool. λy:Bool. false -λx:Bool -> Bool. x -true -(λx:Bool. λy:Bool. λz:Bool. false) ((λx:Bool. false) false) false -λx:Bool. (λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool. false) ((λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. false)) -(λx:Bool. λy:Bool -> Bool. false) ((λx:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true))) -(λx:Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true)) ((λx:Bool. true) true) -(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. true))) -(λx:Bool. λy:Bool. y) ((λx:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. false) false ((λx:Bool. λy:Bool. false) false ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false))) -λx:Bool -> Bool. (λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λy:Bool. true) (λy:Bool -> Bool. λz:Bool. false) -(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true)) (λx:Bool -> Bool. true) -(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool. λz:Bool. false)) ((λx:Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. false) true ((λx:Bool. λy:Bool. true) false)) -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. x) ((λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool. λz:Bool. true)) -(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool. true) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. false) false ((λx:Bool. λy:Bool -> Bool. true) false)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. λy:Bool. false)) (λx:Bool -> Bool. false) -(λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) false ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false)) (λx:Bool. false) -(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. false)) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) false ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true)) -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool. true) (λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. x) (λx:Bool -> Bool. x)) -false -(λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. false) (λx:Bool. false) false ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. λy:Bool. false) false) -(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. false) false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true)) -λx:Bool. x -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. false)) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. false)) -λx:Bool -> Bool. true -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) false)) -true -(λx:Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. false) ((λx:Bool. false) true) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true))) -false -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) x) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false))) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λx:Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. true))) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. false) (λx:Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false))) -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. false) true)) -(λx:Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. true) (λx:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. λy:Bool. false)) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true))) -(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool. λz:Bool. false)) ((λx:Bool -> Bool. λy:Bool -> Bool -> Bool. false) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false))) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true))) -(λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. false))) -(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. false) true ((λx:Bool. λy:Bool. λz:Bool. true) true) false -false -(λx:(Bool -> Bool) -> Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) (λx:Bool. λy:Bool. false) (λx:Bool. λy:Bool. true)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. true)) false -false -(λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool. false) (λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. false) (λx:Bool -> Bool. false)) -true -true -(λx:Bool. (λy:Bool. true) x) false -(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool. λz:Bool. false)) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. false))) -(λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false))) -(λx:Bool -> Bool. x false) (λx:Bool. (λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. true)) -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool. true) (λy:Bool. false)) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool -> Bool. true)) -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) false (λx:Bool -> Bool. λy:Bool. true) true -λx:Bool -> Bool. (λy:Bool. λz:Bool -> Bool -> Bool. true) true (λy:Bool. λz:Bool. false) -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. false)) ((λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true))) -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. false) ((λy:Bool. λz:Bool -> Bool. true) false) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. true) false -(λx:Bool -> Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. false) (λx:Bool. x) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true))) -λx:Bool -> Bool. true -(λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) false ((λx:Bool. true) false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false))) -(λx:Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true)) ((λx:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false))) -(λx:Bool -> Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool. λz:Bool. false) false) false -λx:Bool. (λy:Bool. λz:Bool. false) x ((λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. true)) -λx:Bool -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) false ((λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. true)) -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. λa:Bool. true) true (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false))) -(λx:Bool -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool. false) true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. λy:Bool. true))) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true)) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true (λx:Bool. x)) -λx:Bool -> Bool. (λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) (λy:Bool. false) ((λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool. λz:Bool. false)) -λx:Bool -> Bool. λy:Bool. y -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) true ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false)) false -λx:Bool -> Bool. x -(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true) ((λx:Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true))) -true -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool. false) true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. false))) -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool. true) (λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. true))) -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. false)) false -(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. x) (λx:Bool -> Bool. λy:Bool. false) -(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true)) (λx:Bool -> Bool. (λy:Bool. true) false) -(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) false ((λx:Bool. false) false) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) false (λx:Bool -> Bool. false)) -(λx:Bool -> Bool. (λy:Bool. true) true) (λx:Bool. x) -(λx:Bool. true) true -(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. true) (λy:Bool -> Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false))) -λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. false) false (λy:Bool -> Bool. λz:Bool. false) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false)) ((λx:Bool. λy:Bool. false) false true) -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. false) false) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. false) (λx:Bool. λy:Bool. false) (λx:Bool -> Bool. false)) -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. true) (λx:Bool -> Bool. false) true ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. true))) -(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. false) true (λx:Bool. λy:Bool. false) false -(λx:Bool -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool. false) false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool. λz:Bool. false) true)) -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. true) false)) -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) false ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. true))) -(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false)) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. true))) -(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool -> Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool -> Bool. true) true)) -λx:Bool -> Bool. false -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. true) ((λx:Bool. true) true) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false))) -(λx:Bool. λy:Bool -> Bool. y) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true)) -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. true) false ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. true))) -(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool. λw:Bool. true) true) ((λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. false) (λx:Bool. true) false) -(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. λa:Bool. false) true true ((λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false))) -(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false)) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true) (λx:Bool. λy:Bool. true)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) false -true -true -(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. true) true ((λx:Bool. λy:Bool. λz:Bool. false) false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) true)) -(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool. false) false) ((λx:Bool. true) true) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. false) (λx:Bool. x) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) true false) -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool. λy:Bool. false) (λx:Bool -> Bool. x)) -(λx:Bool. x) ((λx:(Bool -> Bool) -> Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. false))) -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool -> Bool. true) false)) -(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) false ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true)) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true))) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool. (λy:Bool. true) false) -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. false)) true -true -(λx:Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. false) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) false -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false))) -(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool. λw:Bool. false) true) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. true)) -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. true) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true)) ((λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) false)) -(λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. true) (λy:Bool -> Bool. false)) false -(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool. true) false) (λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool -> Bool. false)) -(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool. false) false)) -(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool. (λy:Bool. λz:Bool. true) x) -(λx:Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool. true) true ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) false ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false)) -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. false) (x true) -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. false) x -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. x) -λx:Bool -> Bool. (λy:Bool. true) true -(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. true) true) true -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. false)) ((λx:Bool -> Bool. λy:Bool -> Bool -> Bool. false) (λx:Bool. false) (λx:Bool. λy:Bool. false)) -true -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. true) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. false)) -false -(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) true ((λx:Bool. false) false) (λx:Bool -> Bool. x) -λx:Bool. λy:Bool. y -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true)) (λx:Bool. (λy:Bool -> Bool. λz:Bool. false) (λy:Bool. false)) -(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. true)) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) -λx:Bool -> Bool. λy:Bool. (λz:Bool -> Bool. true) x -(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λx:Bool -> Bool. false) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. false) (λx:Bool -> Bool. false) true) -(λx:Bool -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true)) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool. true)) -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. true)) (λx:Bool -> Bool. λy:Bool. y) -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. true) (λx:Bool -> Bool. true) ((λx:Bool. true) false) (λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. false)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. false) true -(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool. true) true) ((λx:Bool -> Bool. λy:Bool -> Bool. false) ((λx:Bool. λy:Bool. false) true)) -false -true -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. false) ((λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. false)) -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. true) (λy:Bool -> Bool. true) ((λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. λz:Bool. true)) -(λx:(Bool -> Bool) -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. true)) false -λx:Bool -> Bool. λy:Bool. (λz:Bool -> Bool. true) x -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) true ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true))) -(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) x) true -(λx:Bool. λy:Bool. λz:Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) false) -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool. λy:Bool. false) false ((λx:Bool. true) true)) -λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) (λy:Bool -> Bool. false) (λy:Bool -> Bool. true) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. false) false -(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool. λz:Bool. true)) false -λx:Bool. x -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false) -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. λa:Bool. false) false (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false))) -(λx:Bool. λy:Bool -> Bool. y) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false))) -(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false)) -true -(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) x) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false)) -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. false) true) (λx:Bool -> Bool. x) -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) true ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. false)) (λx:Bool -> Bool. x) -λx:Bool -> Bool. true -(λx:Bool -> Bool. x) ((λx:Bool -> Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true))) -(λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)) -(λx:(Bool -> Bool) -> Bool. (λy:Bool. false) true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true))) -(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. true)) (λx:Bool -> Bool. true) -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. true) (λx:Bool -> Bool. false) false ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. true) false)) -(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool. true) (λy:Bool. false)) ((λx:Bool -> Bool -> Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true))) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. λy:Bool. false)) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. false))) -(λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool -> Bool. false) (λx:Bool. true)) ((λx:Bool. λy:Bool -> Bool -> Bool. true) false ((λx:Bool. λy:Bool. λz:Bool. false) false)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. true) (λx:Bool. x)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. false) false true -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. true) true ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. false) true (λx:Bool -> Bool. true)) -false -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) true -(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false))) -(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. true) true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool. λy:Bool. λz:Bool. true) false)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. false)) true -λx:Bool -> Bool. true -(λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. x) -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. y) ((λx:Bool. λy:Bool. λz:Bool. λw:Bool. true) true ((λx:Bool. false) false)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. λa:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. false)) ((λx:Bool. x) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true))) -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool. λz:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false)) -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool. false) false) ((λx:Bool. λy:Bool -> Bool -> Bool. false) true ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. false))) -λx:Bool -> Bool. λy:Bool. (λz:Bool -> Bool. false) (λz:Bool. false) diff --git a/examples/qc/stlc/output/v1/num_apps/uniform/sz=5,tysz=3/dist_before.csv b/examples/qc/stlc/output/v1/num_apps/uniform/sz=5,tysz=3/dist_before.csv deleted file mode 100644 index 8c807d57..00000000 --- a/examples/qc/stlc/output/v1/num_apps/uniform/sz=5,tysz=3/dist_before.csv +++ /dev/null @@ -1,33 +0,0 @@ -num_apps probability -0 0.3606409143518519 -1 0.05641611384429723 -2 0.0399178471129322 -3 0.055718450264983205 -4 0.06286475115099321 -5 0.0631891571636481 -6 0.06071199853595934 -7 0.0565407960849159 -8 0.05054355325902638 -9 0.04387031939921337 -10 0.03697202597048562 -11 0.030115291214431832 -12 0.02375575081312689 -13 0.01820884823263876 -14 0.013531338456830815 -15 0.00970514812432869 -16 0.006685952619927052 -17 0.004401808954585001 -18 0.002757227398669732 -19 0.0016375421268298557 -20 0.0009185495742082724 -21 0.0004837929658476374 -22 0.0002373891708356682 -23 0.00010745762985484615 -24 4.432393462737166e-5 -25 1.6404615757182087e-5 -26 5.342839248391098e-6 -27 1.4917861865144543e-6 -28 3.4339839904973283e-7 -29 6.108911732027998e-8 -30 7.450580596923903e-9 -31 4.656612873077455e-10 diff --git a/examples/qc/stlc/output/v1/num_apps/uniform/sz=5,tysz=3/log_param_by_sz=true,epochs=200.log b/examples/qc/stlc/output/v1/num_apps/uniform/sz=5,tysz=3/log_param_by_sz=true,epochs=200.log deleted file mode 100644 index 996274db..00000000 --- a/examples/qc/stlc/output/v1/num_apps/uniform/sz=5,tysz=3/log_param_by_sz=true,epochs=200.log +++ /dev/null @@ -1,19 +0,0 @@ -2023-06-22T21:37:05.829 -== Config == -INIT_SIZE: 5 -GEN_TYP_SIZE: 3 -PARAMETERIZE_FLIP_GROUPS_BY_SZ: true -EPOCHS: 200 -DistNat: DistUInt32 -TAG: v1 - -Building num_apps(gen_expr(...)) computation graph... - 19.497588255 seconds - -Initial adnodes_of_interest: -Dict("tysz2_gen_type_tbool" => 0.5, "sz4_succ_var" => 0.5, "tysz1_gen_type_tbool" => 0.5, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.5, "sz4_succ_abs" => 0.5, "sz5_succ_var" => 0.5, "sz5_succ_abs" => 0.5, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5, "sz1_succ_app" => 0.5, "sz1_succ_abs" => 0.5, "sz3_succ_abs" => 0.5, "sz3_succ_app" => 0.5, "sz5_succ_app" => 0.5, "sz4_succ_app" => 0.5, "sz2_succ_abs" => 0.5, "sz3_succ_var" => 0.5, "tysz3_gen_type_tbool" => 0.5) -Inferring initial distribution... - 9472.909234143 seconds -Saved num_apps dist to examples/qc/stlc/output/v1/num_apps/uniform/sz=5,tysz=3/dist_before.csv. - -Saving samples... diff --git a/examples/qc/stlc/output/v1/num_apps/uniform/sz=5,tysz=3/terms_before.txt b/examples/qc/stlc/output/v1/num_apps/uniform/sz=5,tysz=3/terms_before.txt deleted file mode 100644 index af5a44e4..00000000 --- a/examples/qc/stlc/output/v1/num_apps/uniform/sz=5,tysz=3/terms_before.txt +++ /dev/null @@ -1,200 +0,0 @@ -(λx:Bool -> Bool. λy:Bool -> Bool -> Bool. x true) ((λx:Bool -> Bool. λy:Bool. y) ((λx:Bool. λy:((Bool -> Bool) -> Bool) -> (Bool -> Bool) -> Bool. λz:Bool. true) true (λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. false))) ((λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. true) true ((λx:((Bool -> Bool) -> Bool) -> Bool. λy:Bool. false) (λx:(Bool -> Bool) -> Bool. true)) ((λx:Bool. λy:Bool. λz:Bool. λw:Bool. false) false true)) -λx:Bool. (λy:Bool. λz:Bool. λw:Bool. λa:Bool. true) true false ((λy:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool. λz:Bool -> Bool. true) (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool. true)) false -λx:Bool -> Bool -> Bool. λy:Bool -> Bool. (λz:Bool. (λw:(Bool -> Bool) -> Bool. false) (λw:Bool -> Bool. true)) ((λz:Bool. z) false) -(λx:Bool. λy:Bool -> Bool. (λz:Bool. λw:(Bool -> Bool -> Bool) -> Bool -> Bool. λa:Bool. λb:Bool. false) x ((λz:(Bool -> Bool -> Bool) -> Bool. λw:Bool -> Bool -> Bool. λa:Bool. true) (λz:Bool -> Bool -> Bool. false))) true -(λx:Bool. (λy:(Bool -> Bool -> Bool) -> Bool. λz:Bool. λw:Bool. λa:Bool. false) (λy:Bool -> Bool -> Bool. false) true) true true -λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. λb:Bool -> Bool. λc:Bool. true) x (λy:Bool -> Bool. true) false true -λx:Bool -> Bool -> Bool. (λy:Bool -> Bool. (λz:Bool. λw:((Bool -> Bool) -> Bool -> Bool) -> Bool -> Bool -> Bool. λa:Bool -> Bool. false) true) ((λy:Bool -> Bool -> Bool. λz:(Bool -> Bool -> Bool) -> Bool. λw:Bool. false) (λy:Bool. λz:Bool. false) ((λy:Bool. λz:Bool -> Bool -> Bool. false) true)) (λy:(Bool -> Bool) -> Bool -> Bool. x) -true -λx:Bool -> Bool. λy:Bool. y -(λx:((Bool -> Bool) -> Bool) -> Bool. λy:Bool -> Bool. (λz:((Bool -> Bool) -> Bool) -> Bool -> Bool -> Bool. λw:Bool -> Bool -> Bool -> Bool. false) (λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. true) ((λz:Bool. λw:Bool. λa:Bool. λb:Bool. true) true)) (λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool. λw:Bool. false) false ((λy:Bool. false) false) false) -λx:Bool. (λy:Bool -> (Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. λb:Bool. false) ((λy:((Bool -> Bool) -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. true) (λy:(Bool -> Bool) -> Bool. true)) (λy:Bool -> Bool. true) false -λx:Bool. (λy:Bool. λz:((Bool -> Bool) -> Bool -> Bool) -> Bool. true) ((λy:Bool. x) ((λy:Bool -> Bool. true) (λy:Bool. true))) (λy:(Bool -> Bool) -> Bool -> Bool. x) -(λx:Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. false) ((λx:((Bool -> Bool) -> Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. true)) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true)) (λx:Bool. (λy:Bool. λz:((Bool -> Bool) -> Bool -> Bool) -> Bool. λw:Bool -> (Bool -> Bool) -> Bool -> Bool. false) x (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool. λz:Bool -> Bool. z)) -λx:Bool -> Bool. true -(λx:Bool. λy:Bool -> Bool -> Bool. y) ((λx:Bool. true) true) -(λx:((Bool -> Bool) -> Bool -> Bool) -> Bool. λy:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. (λz:Bool -> Bool. λw:Bool -> Bool. true) (λz:Bool. false)) (λx:(Bool -> Bool) -> Bool -> Bool. true) ((λx:((Bool -> Bool) -> Bool) -> Bool. (λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. λa:Bool -> Bool. λb:Bool. true) true) (λx:(Bool -> Bool) -> Bool. true) false) -(λx:((Bool -> Bool) -> Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. (λz:((Bool -> Bool) -> Bool -> Bool) -> Bool -> Bool. false) x) (λx:(Bool -> Bool) -> Bool -> Bool. (λy:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false)) ((λx:Bool. λy:Bool. λz:Bool -> Bool. false) false false) -λx:Bool -> Bool -> Bool. λy:Bool -> Bool. true -true -(λx:Bool. λy:Bool -> Bool. y true) ((λx:((Bool -> Bool) -> Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> (Bool -> Bool) -> Bool -> Bool. true) (λx:(Bool -> Bool) -> Bool -> Bool. true) false ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false)))) (λx:Bool. false) -(λx:Bool -> (Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. λa:(Bool -> Bool -> Bool) -> Bool. λb:(Bool -> Bool) -> Bool. true) (λx:Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) ((λx:Bool. λy:(Bool -> Bool) -> Bool. true) true (λx:Bool -> Bool. false)) (λx:Bool. (λy:((Bool -> Bool) -> Bool) -> Bool -> Bool -> Bool. x) (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false)) (λx:Bool -> Bool -> Bool. (λy:Bool. y) ((λy:((Bool -> Bool) -> Bool -> Bool) -> Bool. λz:((Bool -> Bool) -> Bool -> Bool) -> Bool -> Bool. true) (λy:(Bool -> Bool) -> Bool -> Bool. false) ((λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) false))) -(λx:(Bool -> Bool -> Bool) -> Bool -> Bool -> Bool. false) (λx:Bool -> Bool -> Bool. x) -(λx:Bool -> (Bool -> Bool) -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. true) ((λx:(Bool -> Bool -> Bool) -> Bool -> Bool. λy:((Bool -> Bool) -> Bool) -> Bool. λz:Bool. λw:Bool. λa:Bool -> Bool. true) (λx:Bool -> Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. false) (λx:Bool. λy:Bool. λz:Bool. true)) ((λx:Bool. false) ((λx:Bool. true) false))) ((λx:Bool -> (Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. λw:(Bool -> Bool) -> Bool. true) (λx:Bool. λy:Bool -> Bool. true) false (λx:Bool. (λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. false)) (λx:Bool -> Bool. x false)) -(λx:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. true) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) ((λx:Bool. true) true)) ((λx:Bool -> Bool. λy:Bool -> Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool -> Bool. false) (λx:Bool. true) ((λx:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true)) false) (λx:Bool. λy:Bool. x) -true -(λx:Bool. (λy:(Bool -> Bool -> Bool) -> Bool -> Bool. (λz:Bool -> Bool -> Bool. true) (λz:Bool. λw:Bool. false)) ((λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. true) ((λy:(Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. false)))) true -(λx:Bool. λy:Bool. λz:Bool. λw:((Bool -> Bool) -> Bool) -> (Bool -> Bool) -> Bool. λa:Bool. true) false true ((λx:((Bool -> Bool) -> Bool) -> Bool. λy:Bool. λz:Bool. false) (λx:(Bool -> Bool) -> Bool. false) ((λx:Bool. false) true) false) ((λx:Bool -> Bool. λy:((Bool -> Bool) -> Bool) -> Bool. λz:(Bool -> Bool -> Bool) -> Bool -> Bool -> Bool. λw:(Bool -> Bool) -> Bool. λa:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. true)) ((λx:Bool. λy:(Bool -> Bool) -> Bool. false) true) ((λx:Bool. λy:Bool -> Bool -> Bool. y) ((λx:(Bool -> Bool) -> Bool. λy:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool. false))))) -(λx:Bool. λy:((Bool -> Bool) -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λz:Bool -> (Bool -> Bool) -> Bool -> Bool. λw:((Bool -> Bool) -> Bool -> Bool) -> Bool. true) false ((λx:Bool -> (Bool -> Bool) -> Bool. λy:((Bool -> Bool) -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool. λy:Bool -> Bool. true) (λx:(Bool -> Bool) -> Bool. λy:Bool. false)) (λx:Bool. λy:Bool -> Bool. y) ((λx:((Bool -> Bool) -> Bool) -> Bool. (λy:(Bool -> Bool -> Bool) -> Bool -> Bool. λz:((Bool -> Bool) -> Bool -> Bool) -> Bool. λw:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool -> Bool. λz:Bool. false)) ((λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. false) true true) (λx:(Bool -> Bool) -> Bool -> Bool. false)) -(λx:Bool -> Bool -> Bool -> Bool. λy:Bool -> Bool. y true) (λx:Bool. λy:Bool. (λz:Bool -> Bool -> Bool -> Bool. λw:Bool. false) (λz:Bool. λw:Bool. λa:Bool. false)) ((λx:Bool. (λy:Bool. λz:Bool -> (Bool -> Bool) -> Bool. λw:Bool. true) x (λy:Bool. λz:Bool -> Bool. false)) ((λx:((Bool -> Bool) -> Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. true) (λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. λy:Bool. x))) -λx:Bool -> Bool -> Bool. λy:Bool. false -(λx:(Bool -> Bool -> Bool) -> Bool -> Bool. (λy:Bool. false) ((λy:Bool -> Bool. false) ((λy:Bool -> Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. λw:Bool. false)))) ((λx:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool -> Bool. λa:Bool. false) false ((λy:Bool. λz:Bool -> Bool. false) true)) (λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. (λz:(Bool -> Bool -> Bool) -> Bool. true) (λz:Bool -> Bool -> Bool. false))) -(λx:Bool. λy:Bool. (λz:Bool. λw:Bool. λa:Bool. false) y) true true -(λx:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. (λy:((Bool -> Bool) -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. λa:Bool. false) ((λy:Bool. λz:(Bool -> Bool) -> Bool. true) false)) ((λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool -> Bool. λa:Bool -> Bool. λb:Bool. false) false (λx:Bool. λy:Bool. false) false) ((λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true)) ((λx:((Bool -> Bool) -> Bool -> Bool) -> Bool. λy:Bool. true) (λx:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. true) false))) -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:((Bool -> Bool) -> Bool) -> Bool -> Bool -> Bool. λa:Bool. false) (λy:Bool -> Bool. λz:Bool. λw:Bool. false)) ((λx:Bool. x) false) ((λx:Bool -> Bool -> Bool. x) (λx:Bool. λy:Bool. false)) ((λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. true) x) true) -false -false -(λx:Bool. true) false -(λx:Bool -> Bool. λy:Bool. y) ((λx:((Bool -> Bool) -> Bool) -> Bool. λy:((Bool -> Bool) -> Bool -> Bool) -> Bool. λz:Bool. false) ((λx:Bool. λy:(Bool -> Bool) -> Bool. false) true) ((λx:Bool -> Bool -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool. λy:Bool. λz:Bool. true) false)) ((λx:(Bool -> Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> (Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool -> Bool. λy:Bool. false) ((λx:Bool -> (Bool -> Bool) -> Bool. true) ((λx:(Bool -> Bool) -> (Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool -> Bool. true))) ((λx:(Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λy:Bool -> (Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. λy:Bool -> Bool. false))) -(λx:Bool. true) false -(λx:Bool -> (Bool -> Bool) -> Bool -> Bool. (λy:Bool. (λz:Bool -> Bool -> Bool -> Bool. true) (λz:Bool. λw:Bool. λa:Bool. false)) true) (λx:Bool. λy:Bool -> Bool. (λz:Bool. λw:Bool. λa:Bool. false) x x) -(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool -> Bool) -> Bool. λz:Bool. λw:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool. λa:((Bool -> Bool) -> Bool) -> (Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool -> Bool. false) true) false (λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. y) -λx:Bool. (λy:Bool. λz:Bool. λw:(Bool -> Bool -> Bool) -> Bool. true) true ((λy:Bool. λz:Bool. false) false false) ((λy:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool. λz:(Bool -> Bool -> Bool) -> Bool. λw:Bool -> Bool -> Bool. true) ((λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. false) false) (λy:Bool -> Bool -> Bool. x)) -λx:(Bool -> Bool) -> Bool. false -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. λa:Bool. λb:Bool -> Bool -> Bool. false) true ((λx:((Bool -> Bool) -> Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) (λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool -> Bool. true) (λx:Bool -> Bool. true) (λx:Bool. λy:Bool. λz:Bool. false)) true ((λx:Bool -> Bool. false) ((λx:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. true) false) (λx:Bool -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) false))) -(λx:(Bool -> Bool) -> Bool. x) (λx:Bool -> Bool. false) -true -(λx:Bool. λy:Bool. λz:(Bool -> Bool -> Bool) -> Bool. λw:Bool. λa:Bool. true) false true ((λx:Bool -> Bool. λy:Bool -> Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false))) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. false) false ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. λy:Bool. true)) (λx:Bool. (λy:((Bool -> Bool) -> Bool) -> Bool. false) (λy:(Bool -> Bool) -> Bool. false))) ((λx:Bool. (λy:Bool. λz:Bool. false) x) ((λx:(Bool -> Bool -> Bool) -> Bool. true) (λx:Bool -> Bool -> Bool. false)) ((λx:Bool. x) false)) -(λx:(Bool -> Bool) -> Bool. (λy:Bool -> (Bool -> Bool) -> Bool. false) ((λy:Bool. λz:Bool. λw:Bool. λa:Bool -> Bool. true) true ((λy:(Bool -> Bool -> Bool) -> Bool. false) (λy:Bool -> Bool -> Bool. true)))) (λx:Bool -> Bool. true) -false -true -(λx:(Bool -> Bool) -> Bool. λy:((Bool -> Bool) -> Bool) -> Bool. λz:Bool. λw:Bool. λa:Bool. false) (λx:Bool -> Bool. false) (λx:(Bool -> Bool) -> Bool. true) -λx:Bool -> Bool. (λy:(Bool -> Bool -> Bool) -> Bool. (λz:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λw:Bool. λa:Bool -> Bool. λb:Bool. true) (λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) ((λz:Bool -> Bool. true) (λz:Bool. false))) ((λy:Bool. (λz:Bool -> Bool. λw:Bool -> Bool -> Bool. true) x) ((λy:Bool. y) (x false))) -true -(λx:Bool -> Bool. λy:((Bool -> Bool) -> Bool) -> Bool. x false) (λx:Bool. false) ((λx:(Bool -> Bool -> Bool) -> Bool. (λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool. true) false) ((λx:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. false) (λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:Bool -> Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. λz:Bool. true))) ((λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false)) true)) -(λx:Bool -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. x) (x false)) (λx:Bool. (λy:((Bool -> Bool) -> Bool) -> Bool. λz:Bool. λw:Bool. true) (λy:(Bool -> Bool) -> Bool. true) x ((λy:(Bool -> Bool -> Bool) -> Bool. x) (λy:Bool -> Bool -> Bool. false))) -false -(λx:Bool -> Bool -> Bool. (λy:Bool. λz:Bool. λw:((Bool -> Bool) -> Bool -> Bool) -> Bool. true) false ((λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. true))) ((λx:Bool. (λy:Bool -> (Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. λz:Bool -> Bool. true)) ((λx:Bool. x) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true)))) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. (λy:Bool. λz:Bool. true) x) ((λx:((Bool -> Bool) -> Bool -> Bool) -> Bool. true) (λx:(Bool -> Bool) -> Bool -> Bool. true)))) -(λx:((Bool -> Bool) -> Bool -> Bool) -> Bool. λy:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. false) ((λx:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. true) (λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true)) ((λx:Bool -> (Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:Bool. false) false))) ((λx:Bool. λy:Bool. λz:Bool. false) false true) -(λx:Bool -> Bool. x) (λx:Bool. x) -true -(λx:Bool -> (Bool -> Bool) -> Bool. λy:Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. true) ((λx:Bool -> (Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. λy:Bool -> Bool. λz:Bool. true)) ((λx:((Bool -> Bool) -> Bool) -> (Bool -> Bool) -> Bool -> Bool. false) ((λx:((Bool -> Bool) -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true)))) ((λx:Bool -> Bool. λy:Bool. λz:((Bool -> Bool) -> Bool) -> Bool. λw:Bool. λa:Bool. true) (λx:Bool. true) true ((λx:Bool. λy:(Bool -> Bool) -> Bool. false) true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) ((λx:Bool. x) ((λx:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true))))) -λx:Bool. (λy:Bool -> Bool -> Bool. x) ((λy:Bool. (λz:Bool. λw:Bool. λa:Bool. true) true) ((λy:Bool -> Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. λw:Bool. true))) -(λx:Bool -> Bool -> Bool -> Bool. (λy:Bool -> Bool. (λz:Bool. false) true) (x false ((λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. false)))) (λx:Bool. (λy:((Bool -> Bool) -> Bool) -> Bool. λz:Bool. λw:Bool. true) (λy:(Bool -> Bool) -> Bool. x)) -λx:Bool. (λy:(Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. (λz:Bool. λw:Bool. true) true ((λz:(Bool -> Bool) -> (Bool -> Bool) -> Bool. false) (λz:Bool -> Bool. λw:Bool -> Bool. false))) ((λy:((Bool -> Bool) -> Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool -> Bool. λb:Bool. true) (λy:(Bool -> Bool) -> Bool -> Bool. x) false) -(λx:Bool. true) false -true -(λx:Bool -> Bool. λy:((Bool -> Bool) -> Bool) -> Bool. λz:Bool. z) (λx:Bool. (λy:Bool -> Bool. x) (λy:Bool. x)) ((λx:Bool. (λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool. true) false true) ((λx:Bool -> Bool. x) ((λx:Bool -> Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. λz:Bool. true)) ((λx:Bool. λy:Bool. false) true ((λx:Bool. false) true)))) -λx:Bool -> Bool. (λy:Bool -> (Bool -> Bool) -> Bool -> Bool. (λz:Bool. λw:Bool -> Bool. λa:Bool. false) false) ((λy:Bool. λz:Bool. λw:((Bool -> Bool) -> Bool -> Bool) -> Bool. λa:Bool. λb:Bool -> Bool. λc:Bool. true) true ((λy:Bool. true) false) (λy:(Bool -> Bool) -> Bool -> Bool. x true)) -λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool -> Bool) -> Bool -> Bool. λz:Bool. (λw:Bool. false) z) (λy:Bool -> Bool -> Bool. λz:Bool. true) -λx:Bool. λy:Bool -> Bool. (λz:Bool -> (Bool -> Bool) -> Bool. λw:Bool. λa:Bool. true) (λz:Bool. λw:Bool -> Bool. false) true -(λx:Bool. λy:Bool -> (Bool -> Bool) -> Bool. λz:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool. λw:Bool. λa:Bool. λb:Bool. λc:Bool. true) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true)) (λx:Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool -> Bool. λy:Bool -> Bool. (λz:((Bool -> Bool) -> Bool -> Bool) -> Bool. true) (λz:(Bool -> Bool) -> Bool -> Bool. false)) ((λx:Bool -> Bool. x ((λy:Bool -> Bool. true) (λy:Bool. false))) (λx:Bool. (λy:(Bool -> Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool -> Bool. true) ((λy:Bool. false) false))) -(λx:Bool -> Bool. λy:Bool. y) ((λx:Bool. λy:Bool. true) true) -λx:Bool. x -true -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> (Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. λz:Bool -> Bool. true)) (λx:Bool -> Bool. x) ((λx:Bool. true) false) -(λx:Bool. true) false -(λx:Bool -> Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. λa:Bool. false) x ((λy:Bool -> Bool. λz:Bool. false) (λy:Bool. false))) ((λx:Bool. x) false) -true -true -false -λx:Bool. (λy:Bool -> (Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool -> Bool. false) ((λy:Bool -> (Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λy:Bool. λz:Bool -> Bool. λw:Bool. false)) (λy:Bool. (λz:((Bool -> Bool) -> Bool -> Bool) -> Bool. λw:((Bool -> Bool) -> Bool) -> (Bool -> Bool) -> Bool. false) (λz:(Bool -> Bool) -> Bool -> Bool. true) ((λz:Bool -> Bool. λw:(Bool -> Bool) -> Bool. λa:Bool -> Bool. true) (λz:Bool. false))) -(λx:Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. false) ((λx:Bool -> (Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool. λz:Bool. true) (λy:Bool. false)) ((λx:Bool. λy:((Bool -> Bool) -> Bool) -> (Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) false (λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true))) false -λx:Bool. (λy:Bool. false) x -(λx:(Bool -> Bool -> Bool) -> Bool. (λy:Bool. false) true) ((λx:Bool. λy:Bool -> Bool -> Bool. false) false) -(λx:Bool. (λy:Bool. λz:((Bool -> Bool) -> Bool) -> (Bool -> Bool) -> Bool. λw:Bool. true) false) false (λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. (λz:((Bool -> Bool) -> Bool -> Bool) -> Bool. true) (λz:(Bool -> Bool) -> Bool -> Bool. true)) ((λx:Bool -> Bool. (λy:Bool -> Bool. λz:Bool. true) x true) (λx:Bool. (λy:Bool. λz:(Bool -> Bool -> Bool) -> Bool. true) true ((λy:Bool. λz:Bool -> Bool -> Bool. false) x))) -(λx:Bool. λy:Bool. λz:Bool. λw:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool. λa:Bool. λb:Bool -> Bool. false) true ((λx:Bool. x) ((λx:Bool. false) true)) ((λx:Bool -> (Bool -> Bool) -> Bool. false) ((λx:Bool -> Bool -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. true) (λx:Bool. λy:Bool. λz:Bool. true) false)) ((λx:Bool -> (Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. (λz:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. true) (λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true)) (λx:Bool. λy:Bool -> Bool. false)) -λx:Bool. x -false -λx:Bool. (λy:((Bool -> Bool) -> Bool -> Bool) -> Bool -> Bool. (λz:Bool. λw:Bool -> (Bool -> Bool) -> Bool -> Bool. λa:Bool. false) x) (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) ((λy:((Bool -> Bool) -> Bool) -> Bool. λz:Bool. λw:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λa:Bool. λb:Bool -> Bool. λc:Bool. false) (λy:(Bool -> Bool) -> Bool. false) ((λy:(Bool -> Bool) -> (Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. λz:Bool -> Bool. false)) (λy:(Bool -> Bool) -> Bool -> Bool. y)) -(λx:Bool -> Bool -> Bool -> Bool. λy:Bool. (λz:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λw:(Bool -> Bool) -> Bool -> Bool. true) (λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false)) ((λx:Bool -> (Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. false) (λx:Bool. λy:Bool -> Bool. y)) ((λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool. λz:Bool. false) (λy:Bool. true)) ((λx:Bool -> Bool. λy:(Bool -> Bool -> Bool) -> Bool -> Bool -> Bool. λz:Bool -> Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) false)) false) -(λx:(Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool. (λy:Bool -> Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool -> Bool. λb:Bool. true) (λy:Bool. λz:Bool. λw:Bool. false) x) true) -(λx:Bool. λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. true) true) ((λx:Bool. λy:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. true) false ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) true)) ((λx:(Bool -> Bool) -> (Bool -> Bool) -> Bool. λy:Bool -> Bool. false) ((λx:Bool -> (Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. true) (λx:Bool. λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool -> (Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. λy:Bool -> Bool. true) true)) ((λx:((Bool -> Bool) -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) (λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. (λy:Bool. false) true) false) -false -(λx:Bool. (λy:Bool. (λz:Bool. λw:Bool. false) false) ((λy:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) x)) ((λx:Bool. false) true) -(λx:Bool -> (Bool -> Bool) -> Bool. (λy:((Bool -> Bool) -> Bool) -> Bool. λz:Bool. true) (λy:(Bool -> Bool) -> Bool. (λz:Bool. false) false)) ((λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. false) (λx:Bool. true) ((λx:Bool. false) true) ((λx:Bool. λy:Bool. true) false ((λx:Bool. false) true)))) -λx:Bool -> Bool -> Bool. (λy:Bool. (λz:Bool. λw:(Bool -> Bool -> Bool) -> Bool. true) y) ((λy:Bool -> (Bool -> Bool) -> Bool -> Bool. false) (λy:Bool. λz:Bool -> Bool. λw:Bool. true)) (λy:Bool -> Bool -> Bool. (λz:Bool. z) ((λz:Bool -> Bool. true) (λz:Bool. false))) -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. (λz:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool. λw:(Bool -> Bool) -> Bool -> Bool -> Bool. false) (λz:Bool -> Bool -> Bool. λw:Bool -> Bool. true) ((λz:Bool. λw:Bool -> Bool. λa:Bool. λb:Bool. true) x)) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. false) (λx:Bool. λy:Bool. false) (λx:Bool. x) true false) -(λx:((Bool -> Bool) -> Bool) -> Bool. (λy:(Bool -> Bool -> Bool) -> Bool. λz:Bool. true) ((λy:Bool -> Bool. λz:Bool -> Bool -> Bool. true) (λy:Bool. true)) ((λy:Bool -> Bool. true) ((λy:Bool -> (Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool. λz:Bool -> Bool. λw:Bool. true)))) ((λx:Bool -> Bool -> Bool -> Bool. (λy:Bool -> Bool. λz:Bool. λw:(Bool -> Bool) -> Bool. false) (λy:Bool. false) ((λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. false))) (λx:Bool. (λy:Bool -> Bool -> Bool. y) (λy:Bool. λz:Bool. true))) -λx:Bool. x -false -λx:Bool. false -(λx:Bool. false) ((λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) ((λx:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. λy:Bool. λz:Bool. false))))) -λx:(Bool -> Bool) -> Bool -> Bool. true -(λx:Bool. λy:Bool -> Bool. λz:(Bool -> Bool -> Bool) -> Bool -> Bool -> Bool. λw:Bool -> (Bool -> Bool) -> Bool. λa:Bool. false) false (λx:Bool. x) ((λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. true) false (λx:Bool. true)) ((λx:Bool -> Bool -> Bool -> Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool -> Bool. false) (λy:Bool. true)) (λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. true) (λy:Bool -> Bool. true))) ((λx:((Bool -> Bool) -> Bool) -> Bool -> Bool -> Bool. λy:Bool -> Bool. true) (λx:(Bool -> Bool) -> Bool. (λy:Bool -> (Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. λz:Bool -> Bool. λw:Bool. false)) ((λx:Bool -> (Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. true) false) (λx:Bool. λy:Bool -> Bool. y))) -true -λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool -> Bool. (λz:Bool. λw:Bool. λa:Bool. true) true ((λz:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. true) (λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true))) ((λy:Bool -> Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. λb:Bool. true) ((λy:Bool -> (Bool -> Bool) -> Bool. λz:Bool. λw:Bool. λa:Bool. false) (λy:Bool. λz:Bool -> Bool. true)) false) -false -(λx:Bool. (λy:Bool -> (Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. λa:Bool -> Bool. λb:Bool. λc:Bool. true) (λy:Bool. λz:Bool -> Bool. λw:Bool. true)) false true ((λx:Bool. (λy:Bool. λz:Bool -> Bool. false) false) false ((λx:Bool. λy:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) true ((λx:(Bool -> Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool -> Bool. true)) true)) -λx:(Bool -> Bool) -> Bool -> Bool. true -false -λx:(Bool -> Bool) -> Bool -> Bool. false -λx:(Bool -> Bool) -> Bool. true -true -true -(λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. x) -(λx:Bool -> Bool. λy:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool -> Bool. λa:Bool -> Bool. false) ((λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false))) ((λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) true true) false -false -(λx:Bool. (λy:Bool. true) ((λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. true))) false -false -(λx:Bool. (λy:((Bool -> Bool) -> Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. false) (λy:(Bool -> Bool) -> Bool -> Bool. true)) true true ((λx:Bool -> Bool. (λy:((Bool -> Bool) -> Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λy:(Bool -> Bool) -> Bool -> Bool. false)) ((λx:((Bool -> Bool) -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:(Bool -> Bool) -> Bool. false) false) false) -false -(λx:Bool. λy:Bool -> Bool. (λz:(Bool -> Bool -> Bool) -> Bool. y) (λz:Bool -> Bool -> Bool. x)) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:(Bool -> Bool -> Bool) -> Bool. true) false ((λx:Bool. true) false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) ((λx:(Bool -> Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. true) ((λx:Bool. λy:(Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. false) false ((λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) false)))) -(λx:Bool -> (Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool. true) true ((λy:Bool -> Bool. false) (λy:Bool. true)) false) ((λx:Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. λb:Bool -> Bool. λc:Bool. true) true true ((λx:Bool. x) true) ((λx:Bool. (λy:Bool -> Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. λw:Bool. true)) ((λx:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool. λy:Bool. false) (λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) false))) -(λx:Bool. (λy:Bool -> (Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. true) (λy:Bool. λz:Bool -> Bool. true) ((λy:Bool. false) false)) false ((λx:Bool -> (Bool -> Bool) -> Bool. λy:Bool -> (Bool -> Bool) -> Bool. λz:Bool. true) (λx:Bool. λy:Bool -> Bool. x) ((λx:Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. true) false true)) -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool -> Bool. λz:Bool. λw:Bool. λa:Bool -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. λw:Bool. true) true ((λy:Bool -> Bool. λz:Bool. false) x false) (λy:Bool. (λz:Bool. λw:Bool. λa:Bool. true) false true) -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. false) true ((λx:Bool. λy:Bool. true) true) true) true -(λx:Bool -> Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. z) ((λx:(Bool -> Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool -> Bool. false)) -(λx:(Bool -> Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. x) ((λx:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. λw:Bool. false)) ((λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) false))) -(λx:Bool. λy:Bool -> (Bool -> Bool) -> Bool. λz:((Bool -> Bool) -> Bool -> Bool) -> Bool -> Bool. false) true (λx:Bool. λy:Bool -> Bool. x) (λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. y) -λx:Bool. false -(λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. x) ((λx:Bool. λy:(Bool -> Bool) -> (Bool -> Bool) -> Bool. λz:(Bool -> Bool -> Bool) -> Bool. false) true ((λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. true) true) (λx:Bool -> Bool -> Bool. (λy:((Bool -> Bool) -> Bool) -> (Bool -> Bool) -> Bool -> Bool. true) (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true))) ((λx:Bool. λy:Bool -> Bool. x) ((λx:Bool. true) ((λx:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. true) (λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true))) (λx:Bool. x)) -(λx:Bool. (λy:(Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) ((λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. true))) true ((λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) false (λx:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true (λx:Bool. x)) true) -(λx:Bool -> Bool. λy:Bool. λz:Bool. λw:((Bool -> Bool) -> Bool -> Bool) -> Bool -> Bool. λa:Bool. λb:Bool. λc:Bool. true) ((λx:Bool. λy:Bool. true) true) false true (λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. y) -λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. (λw:(Bool -> Bool) -> Bool. z) ((λw:Bool. λa:Bool -> Bool. true) true) -λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. false -(λx:Bool -> (Bool -> Bool) -> Bool. (λy:Bool -> Bool -> Bool -> Bool. λz:(Bool -> Bool -> Bool) -> Bool. false) (λy:Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool -> Bool. (λz:((Bool -> Bool) -> Bool) -> Bool -> Bool -> Bool. true) (λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. true))) (λx:Bool. (λy:Bool -> Bool -> Bool. (λz:Bool. λw:Bool -> Bool. true) true) (λy:Bool. (λz:Bool -> Bool. λw:Bool. true) (λz:Bool. false))) -λx:(Bool -> Bool) -> Bool -> Bool. false -λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λw:Bool. false) ((λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) (λy:Bool. false) ((λy:((Bool -> Bool) -> Bool) -> Bool. λz:Bool. false) (λy:(Bool -> Bool) -> Bool. false))) ((λy:Bool. (λz:((Bool -> Bool) -> Bool -> Bool) -> Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool -> Bool. λb:Bool. false) (λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. λa:Bool. false)) ((λy:Bool -> (Bool -> Bool) -> Bool. false) ((λy:Bool. λz:Bool. λw:Bool -> Bool. false) true))) -λx:(Bool -> Bool) -> Bool. λy:Bool. (λz:Bool. (λw:Bool. false) y) false -false -(λx:Bool. (λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool -> Bool -> Bool. false) true ((λy:Bool -> (Bool -> Bool) -> Bool. true) (λy:Bool. λz:Bool -> Bool. true)) (λy:Bool. (λz:Bool. true) x)) true -(λx:Bool. true) ((λx:Bool -> (Bool -> Bool) -> Bool. λy:Bool. y) (λx:Bool. (λy:Bool. λz:Bool -> Bool. false) x) ((λx:Bool. (λy:((Bool -> Bool) -> Bool -> Bool) -> Bool -> Bool. false) (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false)) ((λx:Bool. λy:Bool. false) true true))) -(λx:Bool -> (Bool -> Bool) -> Bool. λy:Bool. λz:((Bool -> Bool) -> Bool -> Bool) -> Bool. false) (λx:Bool. (λy:Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool. false)) ((λx:Bool. x) ((λx:Bool. λy:Bool -> Bool. true) false ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. false)))) ((λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool. false) ((λx:Bool. true) false)) false) -(λx:(Bool -> Bool -> Bool) -> Bool. λy:Bool -> (Bool -> Bool) -> Bool. (λz:Bool. true) true) ((λx:Bool -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool -> Bool. false) true) (λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool -> Bool. false))) ((λx:Bool. (λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool -> Bool. true) true) true (λx:Bool. (λy:Bool. λz:((Bool -> Bool) -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λw:Bool. true) x (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true))) -λx:Bool. λy:Bool -> Bool. y -(λx:((Bool -> Bool) -> Bool) -> Bool. (λy:Bool -> Bool. λz:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool. true) ((λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool. false)) ((λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. true) ((λy:(Bool -> Bool -> Bool) -> Bool. true) (λy:Bool -> Bool -> Bool. true)))) (λx:(Bool -> Bool) -> Bool. true) -(λx:((Bool -> Bool) -> Bool -> Bool) -> Bool. x) ((λx:Bool -> Bool. λy:Bool -> (Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool. λy:Bool. true) ((λx:Bool. false) true)) (λx:Bool. (λy:((Bool -> Bool) -> Bool) -> Bool. λz:Bool -> Bool. true) (λy:(Bool -> Bool) -> Bool. x))) -(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> (Bool -> Bool) -> Bool. λw:Bool. λa:Bool. false) true ((λx:((Bool -> Bool) -> Bool) -> Bool. false) (λx:(Bool -> Bool) -> Bool. true)) ((λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. false) false) true ((λx:Bool. λy:Bool. true) ((λx:((Bool -> Bool) -> Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) true)) ((λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true)) true)) -λx:Bool. λy:Bool -> Bool. (λz:(Bool -> Bool -> Bool) -> Bool. λw:Bool -> Bool -> Bool -> Bool. λa:Bool. false) ((λz:Bool. λw:Bool -> Bool -> Bool. true) x) (λz:Bool. λw:Bool. λa:Bool. false) -λx:Bool. false -λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> (Bool -> Bool) -> Bool. λz:Bool. (λw:Bool -> Bool -> Bool -> Bool. λa:Bool. false) (λw:Bool. λa:Bool. λb:Bool. true)) (λy:Bool -> Bool. λz:Bool -> Bool. (λw:Bool -> Bool -> Bool. false) (λw:Bool. λa:Bool. true)) -(λx:Bool. (λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) ((λy:Bool -> (Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool. λz:Bool -> Bool. true)) (λy:Bool. true)) ((λx:(Bool -> Bool -> Bool) -> Bool. (λy:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool. λz:((Bool -> Bool) -> Bool -> Bool) -> Bool. true) (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) ((λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) false)) ((λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. true) ((λx:((Bool -> Bool) -> Bool -> Bool) -> Bool -> Bool -> Bool. λy:Bool. false) (λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true)) false)) -(λx:((Bool -> Bool) -> Bool) -> Bool. λy:Bool. λz:((Bool -> Bool) -> Bool) -> Bool. λw:Bool. λa:Bool. false) (λx:(Bool -> Bool) -> Bool. true) false (λx:(Bool -> Bool) -> Bool. (λy:Bool. false) false) ((λx:(Bool -> Bool) -> Bool -> Bool -> Bool. λy:(Bool -> Bool -> Bool) -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. λz:Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool -> Bool. true) (λx:Bool. false)) true) true -(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool -> Bool) -> Bool. (λz:((Bool -> Bool) -> Bool -> Bool) -> Bool. false) (λz:(Bool -> Bool) -> Bool -> Bool. false)) (λy:Bool -> Bool -> Bool. (λz:Bool. true) true)) (λx:Bool. λy:Bool. (λz:(Bool -> Bool -> Bool) -> Bool. x) (λz:Bool -> Bool -> Bool. x)) -λx:Bool. true -(λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. x) -(λx:Bool. λy:Bool. λz:Bool -> Bool. λw:((Bool -> Bool) -> Bool -> Bool) -> Bool. λa:Bool. λb:Bool. false) true ((λx:Bool -> (Bool -> Bool) -> Bool. true) (λx:Bool. λy:Bool -> Bool. true)) ((λx:Bool -> Bool -> Bool -> Bool. λy:((Bool -> Bool) -> Bool) -> Bool. λz:Bool. true) (λx:Bool. λy:Bool. λz:Bool. false) ((λx:Bool. λy:(Bool -> Bool) -> Bool. false) false)) ((λx:Bool. λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. false) true true ((λx:Bool. λy:(Bool -> Bool -> Bool) -> Bool. true) true (λx:Bool -> Bool -> Bool. false))) true -λx:Bool -> Bool. x -(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool -> Bool. false) x ((λy:Bool. false) true)) ((λx:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λy:((Bool -> Bool) -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool -> Bool. true) (λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:((Bool -> Bool) -> Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. false) (λx:(Bool -> Bool) -> Bool -> Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. x))) ((λx:Bool -> Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:((Bool -> Bool) -> Bool) -> (Bool -> Bool) -> Bool. λw:Bool. λa:Bool. false) (λx:Bool. λy:Bool. true) true (λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool -> Bool) -> Bool. λz:Bool -> Bool. true) (λy:Bool -> Bool -> Bool. false)))) -(λx:Bool. λy:Bool. λz:Bool -> Bool. λw:(Bool -> Bool -> Bool) -> Bool -> Bool -> Bool. true) ((λx:Bool. false) true) false ((λx:Bool -> Bool -> Bool -> Bool. λy:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool. λz:Bool. true) ((λx:Bool. λy:Bool. λz:Bool. λw:Bool. true) true) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) ((λx:Bool. true) true))) ((λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool -> Bool. λa:Bool. λb:Bool. false) x (λy:Bool. x)) true) -λx:(Bool -> Bool) -> Bool. λy:Bool. (λz:Bool -> Bool. λw:Bool. λa:(Bool -> Bool) -> Bool. false) (λz:Bool. false) y (λz:Bool -> Bool. false) -λx:Bool. false -(λx:((Bool -> Bool) -> Bool) -> Bool. (λy:Bool. (λz:Bool -> Bool -> Bool. λw:Bool. false) (λz:Bool. λw:Bool. true)) false) ((λx:((Bool -> Bool) -> Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. y)) ((λx:Bool -> Bool -> Bool -> Bool. (λy:((Bool -> Bool) -> Bool -> Bool) -> Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false)) (λx:Bool. (λy:Bool -> Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. λz:Bool. λw:Bool. true)))) -(λx:Bool. λy:Bool -> (Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. λa:Bool. false) ((λx:(Bool -> Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false)) true) ((λx:Bool -> (Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) ((λx:Bool. (λy:Bool. λz:Bool. λw:Bool -> Bool. false) x) true)) -(λx:((Bool -> Bool) -> Bool) -> Bool. (λy:Bool -> Bool -> Bool. λz:((Bool -> Bool) -> Bool) -> Bool. λw:Bool -> (Bool -> Bool) -> Bool -> Bool. λa:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool. λz:Bool. false)) ((λx:Bool. λy:(Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. true) true ((λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) false)) ((λx:Bool. (λy:(Bool -> Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool -> Bool. λz:Bool. true)) ((λx:Bool. x) true)) ((λx:(Bool -> Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. z) (λx:Bool -> Bool -> Bool. (λy:((Bool -> Bool) -> Bool) -> Bool -> Bool -> Bool. λz:Bool. true) (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) ((λy:Bool. true) true))) -true -(λx:Bool. (λy:Bool. (λz:Bool. λw:Bool -> Bool. false) x) true) false -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. true) ((λy:Bool. y) false)) (λx:Bool -> Bool. (λy:Bool. λz:Bool. z) false) -(λx:Bool -> Bool -> Bool -> Bool. (λy:Bool. false) ((λy:Bool. false) false)) (λx:Bool. λy:Bool. λz:Bool. false) -λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. true) false -(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. λa:Bool. λb:Bool. false) false) (λx:Bool -> Bool. false) (λx:Bool. x) false -(λx:((Bool -> Bool) -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool. false) (λx:(Bool -> Bool) -> Bool. true) ((λx:Bool. λy:Bool -> Bool -> Bool -> Bool. true) true ((λx:Bool. λy:Bool. λz:Bool. λw:Bool. false) true)) ((λx:Bool -> Bool -> Bool -> Bool. false) ((λx:Bool. λy:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool. λz:Bool. λw:Bool. λa:Bool. true) true (λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true))) true -false -(λx:Bool -> (Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. (λw:Bool. λa:Bool. false) z) ((λx:Bool. λy:Bool. λz:Bool -> (Bool -> Bool) -> Bool. λw:Bool. λa:Bool -> Bool. λb:Bool. true) ((λx:Bool. false) false) false ((λx:Bool -> (Bool -> Bool) -> Bool. λy:(Bool -> Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool -> Bool. false) true) ((λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. false) false false))) -(λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) ((λx:Bool. false) false) (λx:Bool. false) (λx:Bool. (λy:((Bool -> Bool) -> Bool -> Bool) -> Bool. x) ((λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool. λz:Bool. true))) -λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool. λw:Bool. false) true ((λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool. false) ((λy:Bool. λz:Bool. false) false) ((λy:Bool. y) ((λy:Bool -> (Bool -> Bool) -> Bool. true) (λy:Bool. λz:Bool -> Bool. false)))) -true -(λx:Bool. false) false -(λx:Bool. (λy:((Bool -> Bool) -> Bool) -> Bool. λz:Bool -> Bool -> Bool. true) ((λy:Bool -> Bool. λz:Bool -> Bool. λw:(Bool -> Bool) -> Bool. false) (λy:Bool. false) ((λy:Bool. λz:Bool. true) x))) ((λx:((Bool -> Bool) -> Bool) -> Bool. λy:Bool. true) (λx:(Bool -> Bool) -> Bool. (λy:Bool. false) false) false) -(λx:((Bool -> Bool) -> Bool) -> Bool. (λy:Bool. λz:((Bool -> Bool) -> Bool -> Bool) -> Bool. λw:Bool -> Bool. λa:Bool. λb:Bool. true) false) ((λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. true) true) true) (λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool -> Bool. (λz:(Bool -> Bool -> Bool) -> Bool. false) (λz:Bool -> Bool -> Bool. true)) (λy:Bool. λz:Bool. y)) -(λx:Bool. λy:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. λa:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. true)) (λx:Bool -> Bool -> Bool. λy:Bool -> Bool. y) false ((λx:Bool -> Bool -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool. true) false) (λx:Bool. λy:Bool. λz:Bool. true) (λx:Bool. true)) -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. false) ((λx:Bool. λy:Bool. λz:Bool -> Bool. true) true false) ((λx:(Bool -> Bool -> Bool) -> Bool. (λy:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. false) (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false)) ((λx:Bool -> (Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool -> Bool. true) (λx:Bool. x))) false -(λx:(Bool -> Bool) -> Bool. (λy:Bool. false) true) (λx:Bool -> Bool. false) -λx:Bool. λy:Bool -> Bool. λz:Bool. false -(λx:Bool. λy:Bool. (λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. λa:Bool -> Bool. false) x) true ((λx:Bool. (λy:((Bool -> Bool) -> Bool) -> Bool -> Bool. false) ((λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) x)) true) -(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool -> Bool. true) (λx:Bool -> Bool. (λy:((Bool -> Bool) -> Bool -> Bool) -> Bool. false) ((λy:((Bool -> Bool) -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true))) (λx:Bool -> Bool -> Bool. (λy:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool. λz:Bool. λw:Bool. λa:Bool -> Bool. λb:Bool. false) (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) ((λy:((Bool -> Bool) -> Bool -> Bool) -> Bool. true) (λy:(Bool -> Bool) -> Bool -> Bool. false)) true) -true -true -false -(λx:Bool. λy:Bool. λz:Bool -> Bool. y) true -true -λx:Bool. (λy:Bool. (λz:Bool. λw:Bool. λa:Bool -> Bool. λb:Bool. true) false ((λz:Bool -> Bool. false) (λz:Bool. false))) x -true -(λx:(Bool -> Bool) -> Bool. λy:Bool. (λz:((Bool -> Bool) -> Bool -> Bool) -> Bool. λw:Bool -> Bool -> Bool. λa:Bool. false) (λz:(Bool -> Bool) -> Bool -> Bool. false) ((λz:(Bool -> Bool -> Bool) -> Bool. λw:Bool. λa:Bool. true) (λz:Bool -> Bool -> Bool. false))) ((λx:((Bool -> Bool) -> Bool -> Bool) -> Bool. (λy:Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool. y)) ((λx:(Bool -> Bool -> Bool) -> (Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) true) ((λx:((Bool -> Bool) -> Bool) -> Bool -> Bool. true) (λx:(Bool -> Bool) -> Bool. λy:Bool. true)))) -λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. (λz:Bool. λw:Bool. true) y ((λz:Bool. λw:Bool -> (Bool -> Bool) -> Bool. false) y ((λz:Bool. λw:Bool. λa:Bool -> Bool. false) y)) -(λx:Bool. (λy:((Bool -> Bool) -> Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. false) (λy:(Bool -> Bool) -> Bool -> Bool. (λz:Bool. false) true)) ((λx:((Bool -> Bool) -> Bool) -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool. λz:Bool. true) ((λy:Bool. λz:Bool. true) true)) (λx:(Bool -> Bool) -> Bool. (λy:Bool. true) false)) -false -λx:Bool. x -λx:Bool. x -λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. z) ((λy:((Bool -> Bool) -> Bool -> Bool) -> (Bool -> Bool) -> Bool. λz:Bool. true) (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) false) false diff --git a/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_before.csv b/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_before.csv deleted file mode 100644 index d20e6394..00000000 --- a/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_before.csv +++ /dev/null @@ -1,9 +0,0 @@ -num_apps probability -0 0.3784722222222222 -1 0.10286458333333331 -2 0.15115017361111122 -3 0.14680989583333345 -4 0.11425781250000003 -5 0.06738281250000001 -6 0.03125 -7 0.007812500000000002 diff --git a/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=100.csv b/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=100.csv deleted file mode 100644 index 9700f62e..00000000 --- a/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=100.csv +++ /dev/null @@ -1,9 +0,0 @@ -num_apps probability -0 0.3125572704145472 -1 0.07735489491608907 -2 0.13610854147514473 -3 0.15261066940220364 -4 0.1404676330301102 -5 0.10049392046673733 -6 0.059517793091192275 -7 0.020889277203975522 diff --git a/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=2000.csv b/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=2000.csv deleted file mode 100644 index 40de05c6..00000000 --- a/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=2000.csv +++ /dev/null @@ -1,9 +0,0 @@ -num_apps probability -0 0.16486577196496097 -1 0.047180881871368575 -2 0.10888985265933435 -3 0.15080968983713255 -4 0.1723462128044957 -5 0.16286665359517002 -6 0.10749048574248589 -7 0.08555045152505178 diff --git a/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=100.csv b/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=100.csv deleted file mode 100644 index 07b81577..00000000 --- a/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=100.csv +++ /dev/null @@ -1,101 +0,0 @@ -0 20.238481981031438 -1 20.212172303759335 -2 20.186130303707692 -3 20.160352655808524 -4 20.13483608957884 -5 20.10957738797502 -6 20.084573386274748 -7 20.059820970985776 -8 20.035317078780828 -9 20.01105869545803 -10 19.98704285492616 -11 19.96326663821411 -12 19.939727172504014 -13 19.916421630187337 -14 19.893347227943366 -15 19.870501225839668 -16 19.847880926453747 -17 19.82548367401553 -18 19.8033068535701 -19 19.781347890160117 -20 19.759604248027554 -21 19.738073429834124 -22 19.716752975899983 -23 19.69564046346033 -24 19.674733505939265 -25 19.654029752240692 -26 19.633526886055623 -27 19.613222625185664 -28 19.59311472088216 -29 19.57320095720061 -30 19.55347915036999 -31 19.533947148176708 -32 19.514602829362616 -33 19.495444103036867 -34 19.47646890810131 -35 19.457675212688983 -36 19.439061013615365 -37 19.42062433584222 -38 19.402363231953522 -39 19.384275781643346 -40 19.366360091215263 -41 19.34861429309307 -42 19.331036545342528 -43 19.313625031203838 -44 19.296377958634594 -45 19.279293559862914 -46 19.262370090950622 -47 19.245605831366078 -48 19.22899908356645 -49 19.212548172589344 -50 19.19625144565336 -51 19.180107271767454 -52 19.16411404134893 -53 19.148270165849734 -54 19.13257407739097 -55 19.11702422840531 -56 19.101619091287258 -57 19.086357158050944 -58 19.07123693999531 -59 19.05625696737652 -60 19.04141578908743 -61 19.026711972343875 -62 19.012144102377746 -63 18.997710782136487 -64 18.983410631989088 -65 18.969242289438228 -66 18.955204408838533 -67 18.94129566112076 -68 18.92751473352176 -69 18.913860329320084 -70 18.90033116757713 -71 18.886925982883632 -72 18.87364352511144 -73 18.8604825591704 -74 18.84744186477028 -75 18.834520236187473 -76 18.821716482036646 -77 18.809029425046884 -78 18.796457901842444 -79 18.784000762727977 -80 18.77165687147802 -81 18.759425105130767 -82 18.74730435378595 -83 18.735293520406767 -84 18.723391520625718 -85 18.71159728255436 -86 18.6999097465967 -87 18.688327865266398 -88 18.676850603007427 -89 18.66547693601835 -90 18.654205852079894 -91 18.64303635038597 -92 18.631967441377867 -93 18.620998146581776 -94 18.61012749844918 -95 18.599354540200554 -96 18.58867832567188 -97 18.578097919164094 -98 18.567612395295384 -99 18.557220838856253 -100 18.54692234466734 diff --git a/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv b/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv deleted file mode 100644 index 7ea98785..00000000 --- a/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv +++ /dev/null @@ -1,2001 +0,0 @@ -0 20.238481981031438 -1 20.212172303759335 -2 20.186130303707692 -3 20.160352655808524 -4 20.13483608957884 -5 20.10957738797502 -6 20.084573386274748 -7 20.059820970985776 -8 20.035317078780828 -9 20.01105869545803 -10 19.98704285492616 -11 19.96326663821411 -12 19.939727172504014 -13 19.916421630187337 -14 19.893347227943366 -15 19.870501225839668 -16 19.847880926453747 -17 19.82548367401553 -18 19.8033068535701 -19 19.781347890160117 -20 19.759604248027554 -21 19.738073429834124 -22 19.716752975899983 -23 19.69564046346033 -24 19.674733505939265 -25 19.654029752240692 -26 19.633526886055623 -27 19.613222625185664 -28 19.59311472088216 -29 19.57320095720061 -30 19.55347915036999 -31 19.533947148176708 -32 19.514602829362616 -33 19.495444103036867 -34 19.47646890810131 -35 19.457675212688983 -36 19.439061013615365 -37 19.42062433584222 -38 19.402363231953522 -39 19.384275781643346 -40 19.366360091215263 -41 19.34861429309307 -42 19.331036545342528 -43 19.313625031203838 -44 19.296377958634594 -45 19.279293559862914 -46 19.262370090950622 -47 19.245605831366078 -48 19.22899908356645 -49 19.212548172589344 -50 19.19625144565336 -51 19.180107271767454 -52 19.16411404134893 -53 19.148270165849734 -54 19.13257407739097 -55 19.11702422840531 -56 19.101619091287258 -57 19.086357158050944 -58 19.07123693999531 -59 19.05625696737652 -60 19.04141578908743 -61 19.026711972343875 -62 19.012144102377746 -63 18.997710782136487 -64 18.983410631989088 -65 18.969242289438228 -66 18.955204408838533 -67 18.94129566112076 -68 18.92751473352176 -69 18.913860329320084 -70 18.90033116757713 -71 18.886925982883632 -72 18.87364352511144 -73 18.8604825591704 -74 18.84744186477028 -75 18.834520236187473 -76 18.821716482036646 -77 18.809029425046884 -78 18.796457901842444 -79 18.784000762727977 -80 18.77165687147802 -81 18.759425105130767 -82 18.74730435378595 -83 18.735293520406767 -84 18.723391520625718 -85 18.71159728255436 -86 18.6999097465967 -87 18.688327865266398 -88 18.676850603007427 -89 18.66547693601835 -90 18.654205852079894 -91 18.64303635038597 -92 18.631967441377867 -93 18.620998146581776 -94 18.61012749844918 -95 18.599354540200554 -96 18.58867832567188 -97 18.578097919164094 -98 18.567612395295384 -99 18.557220838856253 -100 18.54692234466734 -101 18.536716017439755 -102 18.52660097163817 -103 18.516576331346325 -104 18.506641230135045 -105 18.49679481093267 -106 18.487036225897825 -107 18.47736463629458 -108 18.46777921236972 -109 18.458279133232367 -110 18.448863586735705 -111 18.439531769360762 -112 18.43028288610234 -113 18.421116150356923 -114 18.412030783812543 -115 18.403026016340597 -116 18.394101085889545 -117 18.385255238380466 -118 18.37648772760439 -119 18.367797815121406 -120 18.359184770161527 -121 18.350647869527194 -122 18.342186397497485 -123 18.3337996457339 -124 18.325486913187763 -125 18.317247506009114 -126 18.30908073745723 -127 18.300985927812466 -128 18.292962404289746 -129 18.285009500953276 -130 18.277126558632794 -131 18.269312924841117 -132 18.261567953693017 -133 18.253891005825448 -134 18.246281448319014 -135 18.23873865462068 -136 18.231262004467727 -137 18.223850883812943 -138 18.21650468475092 -139 18.209222805445517 -140 18.202004650058527 -141 18.19484962867933 -142 18.187757157255728 -143 18.18072665752579 -144 18.17375755695076 -145 18.166849288648926 -146 18.160001291330616 -147 18.153213009233994 -148 18.146483892061987 -149 18.13981339492003 -150 18.133200978254763 -151 18.126646107793704 -152 18.120148254485713 -153 18.113706894442295 -154 18.107321508879945 -155 18.10099158406309 -156 18.094716611248028 -157 18.088496086627547 -158 18.082329511276427 -159 18.076216391097645 -160 18.070156236769392 -161 18.06414856369279 -162 18.058192891940337 -163 18.052288746205157 -164 18.04643565575077 -165 18.040633154361792 -166 18.03488078029507 -167 18.02917807623166 -168 18.023524589229385 -169 18.01791987067602 -170 18.012363476243138 -171 18.006854965840564 -172 18.00139390357144 -173 17.995979857687814 -174 17.99061240054698 -175 17.985291108568212 -176 17.980015562190186 -177 17.974785345828852 -178 17.969600047835975 -179 17.96445926045808 -180 17.959362579796064 -181 17.954309605765157 -182 17.949299942055553 -183 17.944333196093417 -184 17.939408979002494 -185 17.934526905566063 -186 17.929686594189505 -187 17.92488766686325 -188 17.920129749126218 -189 17.915412470029658 -190 17.91073546210153 -191 17.906098361311248 -192 17.901500807034818 -193 17.896942442020535 -194 17.89242291235494 -195 17.887941867429287 -196 17.883498959906373 -197 17.879093845687763 -198 17.874726183881407 -199 17.870395636769675 -200 17.866101869777705 -201 17.861844551442154 -202 17.85762335338035 -203 17.853437950259735 -204 17.84928801976772 -205 17.845173242581822 -206 17.84109330234025 -207 17.837047885612744 -208 17.83303668187173 -209 17.829059383463893 -210 17.82511568558201 -211 17.8212052862371 -212 17.817327886230924 -213 17.813483189128753 -214 17.809670901232465 -215 17.805890731553966 -216 17.802142391788827 -217 17.798425596290308 -218 17.79474006204359 -219 17.791085508640368 -220 17.787461658253626 -221 17.783868235612793 -222 17.7803049679791 -223 17.776771585121207 -224 17.77326781929114 -225 17.769793405200453 -226 17.7663480799966 -227 17.76293158323973 -228 17.759543656879494 -229 17.756184045232285 -230 17.75285249495863 -231 17.749548755040863 -232 17.746272576761037 -233 17.743023713678998 -234 17.739801921610763 -235 17.73660695860714 -236 17.733438584932504 -237 17.73029656304382 -238 17.727180657569917 -239 17.72409063529093 -240 17.721026265118006 -241 17.71798731807316 -242 17.714973567269393 -243 17.711984787890977 -244 17.709020757173963 -245 17.706081254386888 -246 17.703166060811668 -247 17.7002749597247 -248 17.69740773637814 -249 17.694564177981388 -250 17.69174407368273 -251 17.688947214551227 -252 17.686173393558708 -253 17.683422405562016 -254 17.680694047285368 -255 17.677988117302952 -256 17.67530441602166 -257 17.672642745664014 -258 17.670002910251213 -259 17.667384715586437 -260 17.664787969238244 -261 17.662212480524154 -262 17.6596580604944 -263 17.65712452191584 -264 17.654611679256018 -265 17.65211934866738 -266 17.649647347971694 -267 17.647195496644493 -268 17.644763615799874 -269 17.64235152817524 -270 17.639959058116325 -271 17.637586031562314 -272 17.635232276031093 -273 17.632897620604712 -274 17.630581895914897 -275 17.62828493412877 -276 17.626006568934688 -277 17.623746635528196 -278 17.621504970598153 -279 17.619281412312965 -280 17.617075800306974 -281 17.614887975666935 -282 17.61271778091868 -283 17.61056506001387 -284 17.608429658316872 -285 17.606311422591816 -286 17.604210200989662 -287 17.602125843035548 -288 17.600058199616118 -289 17.59800712296702 -290 17.595972466660584 -291 17.5939540855935 -292 17.591951835974704 -293 17.58996557531337 -294 17.587995162406948 -295 17.5860404573294 -296 17.584101321419503 -297 17.582177617269252 -298 17.580269208712416 -299 17.57837596081316 -300 17.576497739854787 -301 17.57463441332861 -302 17.572785849922873 -303 17.570951919511838 -304 17.569132493144963 -305 17.567327443036103 -306 17.565536642552942 -307 17.563759966206415 -308 17.561997289640303 -309 17.560248489620857 -310 17.558513444026584 -311 17.556792031838082 -312 17.55508413312801 -313 17.55338962905108 -314 17.55170840183426 -315 17.550040334766944 -316 17.548385312191293 -317 17.54674321949263 -318 17.54511394308995 -319 17.54349737042648 -320 17.5418933899604 -321 17.540301891155536 -322 17.538722764472237 -323 17.537155901358307 -324 17.535601194240016 -325 17.534058536513186 -326 17.53252782253437 -327 17.53100894761212 -328 17.529501807998315 -329 17.528006300879603 -330 17.526522324368866 -331 17.52504977749684 -332 17.523588560203713 -333 17.52213857333093 -334 17.52069971861295 -335 17.51927189866913 -336 17.517855016995718 -337 17.51644897795785 -338 17.515053686781684 -339 17.513669049546543 -340 17.512294973177227 -341 17.51093136543626 -342 17.509578134916325 -343 17.50823519103275 -344 17.506902444015946 -345 17.50557980490413 -346 17.504267185535905 -347 17.502964498543015 -348 17.501671657343167 -349 17.500388576132877 -350 17.49911516988042 -351 17.497851354318794 -352 17.496597045938824 -353 17.495352161982257 -354 17.494116620434966 -355 17.49289034002021 -356 17.491673240191894 -357 17.490465241127996 -358 17.489266263724005 -359 17.48807622958636 -360 17.486895061026054 -361 17.48572268105221 -362 17.48455901336579 -363 17.483403982353295 -364 17.48225751308055 -365 17.481119531286566 -366 17.479989963377395 -367 17.478868736420157 -368 17.477755778136974 -369 17.47665101689907 -370 17.47555438172089 -371 17.474465802254272 -372 17.47338520878265 -373 17.472312532215348 -374 17.47124770408191 -375 17.470190656526476 -376 17.469141322302214 -377 17.468099634765807 -378 17.46706552787198 -379 17.466038936168083 -380 17.465019794788716 -381 17.464008039450448 -382 17.463003606446485 -383 17.46200643264149 -384 17.461016455466396 -385 17.46003361291329 -386 17.459057843530296 -387 17.45808908641657 -388 17.457127281217318 -389 17.45617236811882 -390 17.455224287843556 -391 17.454282981645335 -392 17.45334839130448 -393 17.452420459123115 -394 17.451499127920336 -395 17.450584341027646 -396 17.44967604228423 -397 17.448774176032416 -398 17.447878687113068 -399 17.44698952086112 -400 17.446106623101084 -401 17.445229940142614 -402 17.444359418776127 -403 17.44349500626843 -404 17.44263665035844 -405 17.44178429925288 -406 17.440937901622057 -407 17.44009740659569 -408 17.439262763758705 -409 17.438433923147155 -410 17.437610835244115 -411 17.436793450975657 -412 17.435981721706806 -413 17.43517559923763 -414 17.434375035799224 -415 17.43357998404987 -416 17.43279039707115 -417 17.43200622836413 -418 17.43122743184552 -419 17.430453961843988 -420 17.429685773096345 -421 17.42892282074395 -422 17.42816506032894 -423 17.427412447790715 -424 17.426664939462263 -425 17.425922492066636 -426 17.42518506271341 -427 17.42445260889519 -428 17.423725088484158 -429 17.42300245972862 -430 17.42228468124961 -431 17.421571712037533 -432 17.42086351144879 -433 17.42016003920252 -434 17.419461255377257 -435 17.41876712040773 -436 17.41807759508162 -437 17.41739264053637 -438 17.416712218256027 -439 17.416036290068096 -440 17.41536481814043 -441 17.41469776497819 -442 17.41403509342076 -443 17.413376766638702 -444 17.412722748130832 -445 17.412073001721197 -446 17.411427491556147 -447 17.410786182101422 -448 17.41014903813926 -449 17.40951602476555 -450 17.408887107386988 -451 17.40826225171825 -452 17.407641423779246 -453 17.407024589892313 -454 17.406411716679525 -455 17.40580277105995 -456 17.405197720246985 -457 17.404596531745696 -458 17.403999173350165 -459 17.403405613140887 -460 17.402815819482186 -461 17.40222976101964 -462 17.40164740667756 -463 17.401068725656437 -464 17.400493687430462 -465 17.399922261745076 -466 17.399354418614468 -467 17.398790128319195 -468 17.39822936140375 -469 17.397672088674184 -470 17.39711828119572 -471 17.39656791029046 -472 17.396020947535025 -473 17.39547736475825 -474 17.394937134038944 -475 17.394400227703592 -476 17.393866618324136 -477 17.39333627871576 -478 17.392809181934688 -479 17.39228530127599 -480 17.391764610271466 -481 17.391247082687446 -482 17.39073269252274 -483 17.390221414006497 -484 17.389713221596132 -485 17.389208089975238 -486 17.388705994051612 -487 17.388206908955162 -488 17.387710810035937 -489 17.38721767286213 -490 17.3867274732181 -491 17.386240187102434 -492 17.38575579072599 -493 17.38527426051003 -494 17.384795573084247 -495 17.38431970528495 -496 17.38384663415316 -497 17.383376336932777 -498 17.382908791068726 -499 17.382443974205202 -500 17.381981864183782 -501 17.381522439041735 -502 17.381065677010163 -503 17.38061155651236 -504 17.380160056161962 -505 17.37971115476131 -506 17.37926483129973 -507 17.37882106495182 -508 17.378379835075805 -509 17.37794112121186 -510 17.37750490308051 -511 17.377071160580925 -512 17.37663987378939 -513 17.376211022957662 -514 17.37578458851139 -515 17.375360551048566 -516 17.37493889133793 -517 17.374519590317508 -518 17.374102629092985 -519 17.373687988936275 -520 17.37327565128397 -521 17.372865597735867 -522 17.37245781005354 -523 17.372052270158814 -524 17.371648960132354 -525 17.371247862212236 -526 17.37084895879252 -527 17.37045223242185 -528 17.37005766580204 -529 17.369665241786727 -530 17.369274943379974 -531 17.368886753734923 -532 17.368500656152463 -533 17.368116634079886 -534 17.36773467110954 -535 17.367354750977608 -536 17.36697685756272 -537 17.366600974884694 -538 17.366227087103304 -539 17.36585517851698 -540 17.365485233561564 -541 17.365117236809073 -542 17.364751172966507 -543 17.36438702687456 -544 17.36402478350649 -545 17.363664427966878 -546 17.363305945490467 -547 17.362949321440993 -548 17.362594541310003 -549 17.36224159071572 -550 17.361890455401902 -551 17.361541121236698 -552 17.361193574211566 -553 17.360847800440098 -554 17.360503786156997 -555 17.360161517716918 -556 17.359820981593437 -557 17.359482164377965 -558 17.359145052778672 -559 17.358809633619465 -560 17.35847589383893 -561 17.358143820489296 -562 17.357813400735424 -563 17.357484621853796 -564 17.3571574712315 -565 17.35683193636523 -566 17.35650800486033 -567 17.356185664429788 -568 17.35586490289327 -569 17.355545708176187 -570 17.355228068308712 -571 17.354911971424862 -572 17.35459740576153 -573 17.35428435965764 -574 17.35397282155312 -575 17.35366277998808 -576 17.353354223601876 -577 17.353047141132215 -578 17.352741521414305 -579 17.352437353379923 -580 17.352134626056607 -581 17.35183332856677 -582 17.351533450126805 -583 17.351234980046346 -584 17.35093790772732 -585 17.35064222266319 -586 17.350347914438093 -587 17.35005497272605 -588 17.349763387290178 -589 17.34947314798181 -590 17.3491842447398 -591 17.34889666758969 -592 17.348610406642923 -593 17.3483254520961 -594 17.34804179423019 -595 17.347759423409812 -596 17.347478330082435 -597 17.347198504777655 -598 17.3469199381065 -599 17.34664262076062 -600 17.34636654351163 -601 17.346091697210372 -602 17.345818072786194 -603 17.345545661246256 -604 17.345274453674847 -605 17.34500444123266 -606 17.344735615156132 -607 17.34446796675678 -608 17.344201487420484 -609 17.34393616860686 -610 17.34367200184857 -611 17.34340897875071 -612 17.343147090990108 -613 17.342886330314737 -614 17.34262668854301 -615 17.342368157563243 -616 17.342110729332934 -617 17.341854395878197 -618 17.34159914929315 -619 17.341344981739272 -620 17.34109188544485 -621 17.340839852704324 -622 17.340588875877753 -623 17.340338947390187 -624 17.340090059731093 -625 17.339842205453795 -626 17.339595377174902 -627 17.339349567573706 -628 17.339104769391696 -629 17.338860975431913 -630 17.33861817855847 -631 17.33837637169596 -632 17.338135547828955 -633 17.33789570000144 -634 17.337656821316312 -635 17.337418904934797 -636 17.33718194407601 -637 17.33694593201639 -638 17.336710862089156 -639 17.33647672768389 -640 17.336243522245958 -641 17.336011239276047 -642 17.335779872329635 -643 17.33554941501659 -644 17.335319861000556 -645 17.33509120399859 -646 17.33486343778062 -647 17.334636556168995 -648 17.334410553038005 -649 17.33418542231346 -650 17.333961157972162 -651 17.333737754041504 -652 17.333515204599003 -653 17.33329350377186 -654 17.3330726457365 -655 17.332852624718157 -656 17.33263343499042 -657 17.332415070874813 -658 17.332197526740355 -659 17.331980797003187 -660 17.331764876126062 -661 17.331549758618024 -662 17.331335439033936 -663 17.331121911974087 -664 17.3309091720838 -665 17.330697214053046 -666 17.330486032615994 -667 17.330275622550662 -668 17.330065978678526 -669 17.329857095864096 -670 17.329648969014595 -671 17.32944159307953 -672 17.329234963050336 -673 17.32902907395998 -674 17.328823920882662 -675 17.32861949893335 -676 17.32841580326749 -677 17.32821282908063 -678 17.328010571608065 -679 17.32780902612445 -680 17.327608187943504 -681 17.327408052417642 -682 17.32720861493762 -683 17.32700987093222 -684 17.326811815867863 -685 17.326614445248367 -686 17.326417754614514 -687 17.326221739543794 -688 17.326026395650032 -689 17.32583171858311 -690 17.325637704028626 -691 17.325444347707577 -692 17.325251645376035 -693 17.325059592824864 -694 17.324868185879392 -695 17.324677420399127 -696 17.32448729227741 -697 17.324297797441183 -698 17.32410893185063 -699 17.323920691498927 -700 17.323733072411905 -701 17.323546070647822 -702 17.323359682297024 -703 17.323173903481692 -704 17.322988730355547 -705 17.322804159103573 -706 17.322620185941744 -707 17.322436807116755 -708 17.322254018905745 -709 17.32207181761604 -710 17.321890199584857 -711 17.321709161179076 -712 17.321528698794953 -713 17.32134880885789 -714 17.32116948782215 -715 17.320990732170603 -716 17.320812538414497 -717 17.3206349030932 -718 17.320457822773943 -719 17.32028129405157 -720 17.320105313548318 -721 17.319929877913566 -722 17.319754983823593 -723 17.319580627981324 -724 17.319406807116135 -725 17.319233517983612 -726 17.319060757365275 -727 17.318888522068406 -728 17.318716808925803 -729 17.318545614795546 -730 17.31837493656079 -731 17.318204771129537 -732 17.318035115434416 -733 17.31786596643249 -734 17.317697321104976 -735 17.31752917645715 -736 17.317361529518017 -737 17.317194377340158 -738 17.317027716999533 -739 17.316861545595252 -740 17.31669586024939 -741 17.31653065810677 -742 17.316365936334783 -743 17.316201692123173 -744 17.31603792268385 -745 17.315874625250697 -746 17.31571179707936 -747 17.315549435447114 -748 17.315387537652587 -749 17.315226101015664 -750 17.315065122877215 -751 17.314904600599 -752 17.314744531563402 -753 17.314584913173313 -754 17.314425742851917 -755 17.314267018042536 -756 17.31410873620845 -757 17.313950894832676 -758 17.313793491417897 -759 17.31363652348619 -760 17.313479988578912 -761 17.313323884256516 -762 17.313168208098393 -763 17.313012957702703 -764 17.312858130686195 -765 17.312703724684084 -766 17.312549737349848 -767 17.312396166355114 -768 17.31224300938945 -769 17.312090264160254 -770 17.311937928392567 -771 17.311785999828942 -772 17.31163447622928 -773 17.311483355370694 -774 17.31133263504733 -775 17.311182313070255 -776 17.311032387267282 -777 17.310882855482856 -778 17.310733715577868 -779 17.31058496542955 -780 17.31043660293132 -781 17.310288625992637 -782 17.31014103253887 -783 17.30999382051116 -784 17.30984698786627 -785 17.309700532576475 -786 17.30955445262941 -787 17.309408746027945 -788 17.309263410790045 -789 17.309118444948645 -790 17.30897384655153 -791 17.3088296136612 -792 17.30868574435472 -793 17.308542236723657 -794 17.30839908887387 -795 17.308256298925457 -796 17.308113865012615 -797 17.307971785283485 -798 17.30783005790008 -799 17.30768868103814 -800 17.30754765288701 -801 17.30740697164953 -802 17.307266635541946 -803 17.307126642793737 -804 17.30698699164756 -805 17.306847680359088 -806 17.306708707196943 -807 17.306570070442547 -808 17.306431768390034 -809 17.306293799346157 -810 17.306156161630128 -811 17.306018853573562 -812 17.30588187352035 -813 17.305745219826537 -814 17.305608890860274 -815 17.30547288500164 -816 17.305337200642608 -817 17.305201836186892 -818 17.305066790049885 -819 17.304932060658533 -820 17.30479764645124 -821 17.3046635458778 -822 17.30452975739925 -823 17.304396279487825 -824 17.30426311062682 -825 17.304130249310525 -826 17.30399769404412 -827 17.303865443343582 -828 17.303733495735592 -829 17.303601849757463 -830 17.303470503957016 -831 17.303339456892516 -832 17.303208707132583 -833 17.303078253256082 -834 17.302948093852073 -835 17.30281822751968 -836 17.302688652868056 -837 17.30255936851625 -838 17.302430373093152 -839 17.3023016652374 -840 17.30217324359732 -841 17.302045106830796 -842 17.301917253605236 -843 17.30178968259747 -844 17.301662392493675 -845 17.301535381989286 -846 17.301408649788947 -847 17.301282194606394 -848 17.301156015164413 -849 17.301030110194738 -850 17.300904478438007 -851 17.300779118643643 -852 17.300654029569813 -853 17.300529209983353 -854 17.300404658659687 -855 17.30028037438275 -856 17.300156355944928 -857 17.300032602146985 -858 17.299909111797984 -859 17.299785883715224 -860 17.29966291672417 -861 17.299540209658396 -862 17.2994177613595 -863 17.299295570677046 -864 17.299173636468474 -865 17.2990519575991 -866 17.29893053294196 -867 17.298809361377828 -868 17.29868844179509 -869 17.298567773089715 -870 17.29844735416519 -871 17.298327183932436 -872 17.29820726130977 -873 17.29808758522282 -874 17.29796815460452 -875 17.29784896839494 -876 17.29773002554135 -877 17.297611324998098 -878 17.297492865726532 -879 17.297374646694973 -880 17.29725666687869 -881 17.297138925259752 -882 17.297021420827065 -883 17.296904152576246 -884 17.29678711950963 -885 17.29667032063615 -886 17.296553754971338 -887 17.29643742153722 -888 17.296321319362328 -889 17.296205447481558 -890 17.296089804936216 -891 17.29597439077389 -892 17.295859204048423 -893 17.295744243819875 -894 17.29562950915446 -895 17.295514999124485 -896 17.29540071280833 -897 17.29528664929036 -898 17.295172807660915 -899 17.295059187016218 -900 17.294945786458364 -901 17.294832605095266 -902 17.294719642040594 -903 17.29460689641372 -904 17.294494367339716 -905 17.29438205394924 -906 17.294269955378567 -907 17.294158070769463 -908 17.29404639926922 -909 17.293934940030546 -910 17.293823692211557 -911 17.293712654975725 -912 17.293601827491837 -913 17.293491208933933 -914 17.293380798481287 -915 17.293270595318365 -916 17.29316059863476 -917 17.293050807625168 -918 17.29294122148935 -919 17.292831839432083 -920 17.29272266066312 -921 17.29261368439714 -922 17.292504909853733 -923 17.292396336257355 -924 17.292287962837246 -925 17.29217978882747 -926 17.292071813466805 -927 17.291964035998728 -928 17.291856455671404 -929 17.291749071737613 -930 17.29164188345473 -931 17.291534890084684 -932 17.291428090893916 -933 17.29132148515336 -934 17.291215072138392 -935 17.291108851128786 -936 17.291002821408725 -937 17.29089698226669 -938 17.2907913329955 -939 17.29068587289224 -940 17.290580601258224 -941 17.290475517398967 -942 17.290370620624184 -943 17.290265910247697 -944 17.29016138558743 -945 17.29005704596542 -946 17.289952890707696 -947 17.28984891914434 -948 17.28974513060936 -949 17.289641524440757 -950 17.289538099980426 -951 17.289434856574143 -952 17.289331793571545 -953 17.289228910326084 -954 17.289126206195004 -955 17.28902368053933 -956 17.2889213327238 -957 17.28881916211686 -958 17.28871716809063 -959 17.2886153500209 -960 17.288513707287038 -961 17.288412239272027 -962 17.28831094536241 -963 17.288209824948265 -964 17.288108877423156 -965 17.288008102184158 -966 17.28790749863176 -967 17.287807066169925 -968 17.287706804205968 -969 17.287606712150595 -970 17.287506789417865 -971 17.287407035425144 -972 17.287307449593108 -973 17.28720803134568 -974 17.287108780110053 -975 17.287009695316602 -976 17.286910776398937 -977 17.286812022793818 -978 17.28671343394115 -979 17.28661500928394 -980 17.286516748268337 -981 17.286418650343528 -982 17.286320714961743 -983 17.28622294157828 -984 17.286125329651398 -985 17.28602787864235 -986 17.285930588015347 -987 17.285833457237544 -988 17.285736485778987 -989 17.285639673112634 -990 17.285543018714296 -991 17.28544652206265 -992 17.285350182639164 -993 17.285253999928127 -994 17.28515797341663 -995 17.28506210259451 -996 17.284966386954316 -997 17.284870825991355 -998 17.284775419203626 -999 17.28468016609179 -1000 17.284585066159185 -1001 17.28449011891178 -1002 17.28439532385815 -1003 17.28430068050949 -1004 17.284206188379557 -1005 17.284111846984686 -1006 17.284017655843737 -1007 17.283923614478102 -1008 17.283829722411674 -1009 17.28373597917082 -1010 17.28364238428438 -1011 17.28354893728367 -1012 17.283455637702374 -1013 17.283362485076648 -1014 17.283269478944998 -1015 17.283176618848334 -1016 17.283083904329917 -1017 17.282991334935335 -1018 17.282898910212516 -1019 17.28280662971169 -1020 17.28271449298538 -1021 17.282622499588363 -1022 17.28253064907769 -1023 17.28243894101265 -1024 17.282347374954742 -1025 17.282255950467693 -1026 17.28216466711741 -1027 17.28207352447196 -1028 17.281982522101583 -1029 17.281891659578662 -1030 17.281800936477712 -1031 17.28171035237535 -1032 17.281619906850274 -1033 17.281529599483306 -1034 17.281439429857297 -1035 17.281349397557157 -1036 17.281259502169846 -1037 17.28116974328433 -1038 17.281080120491584 -1039 17.280990633384583 -1040 17.280901281558283 -1041 17.280812064609588 -1042 17.280722982137355 -1043 17.280634033742402 -1044 17.28054521902744 -1045 17.280456537597086 -1046 17.280367989057886 -1047 17.28027957301823 -1048 17.28019128908839 -1049 17.280103136880506 -1050 17.28001511600852 -1051 17.279927226088255 -1052 17.27983946673731 -1053 17.2797518375751 -1054 17.27966433822283 -1055 17.279576968303466 -1056 17.279489727441778 -1057 17.279402615264242 -1058 17.2793156313991 -1059 17.279228775476323 -1060 17.279142047127575 -1061 17.279055445986252 -1062 17.278968971687412 -1063 17.278882623867826 -1064 17.278796402165906 -1065 17.27871030622173 -1066 17.278624335677012 -1067 17.278538490175123 -1068 17.27845276936102 -1069 17.278367172881314 -1070 17.278281700384174 -1071 17.278196351519377 -1072 17.278111125938285 -1073 17.278026023293823 -1074 17.277941043240446 -1075 17.27785618543418 -1076 17.2777714495326 -1077 17.277686835194775 -1078 17.277602342081288 -1079 17.27751796985424 -1080 17.27743371817723 -1081 17.277349586715324 -1082 17.27726557513506 -1083 17.277181683104455 -1084 17.277097910292966 -1085 17.277014256371505 -1086 17.2769307210124 -1087 17.276847303889404 -1088 17.276764004677705 -1089 17.276680823053876 -1090 17.276597758695896 -1091 17.276514811283118 -1092 17.276431980496273 -1093 17.27634926601747 -1094 17.27626666753018 -1095 17.276184184719195 -1096 17.276101817270682 -1097 17.276019564872097 -1098 17.27593742721226 -1099 17.275855403981286 -1100 17.27577349487059 -1101 17.275691699572892 -1102 17.275610017782203 -1103 17.27552844919379 -1104 17.275446993504225 -1105 17.2753656504113 -1106 17.275284419614106 -1107 17.275203300812954 -1108 17.27512229370939 -1109 17.275041398006195 -1110 17.274960613407398 -1111 17.274879939618184 -1112 17.274799376344987 -1113 17.274718923295442 -1114 17.274638580178344 -1115 17.274558346703685 -1116 17.274478222582648 -1117 17.274398207527554 -1118 17.2743183012519 -1119 17.274238503470336 -1120 17.274158813898655 -1121 17.27407923225379 -1122 17.273999758253787 -1123 17.273920391617835 -1124 17.273841132066238 -1125 17.273761979320394 -1126 17.27368293310282 -1127 17.273603993137108 -1128 17.27352515914796 -1129 17.273446430861135 -1130 17.273367808003492 -1131 17.273289290302934 -1132 17.273210877488438 -1133 17.273132569290034 -1134 17.273054365438785 -1135 17.272976265666827 -1136 17.272898269707287 -1137 17.27282037729436 -1138 17.272742588163226 -1139 17.272664902050117 -1140 17.272587318692246 -1141 17.27250983782784 -1142 17.272432459196118 -1143 17.272355182537297 -1144 17.27227800759257 -1145 17.2722009341041 -1146 17.27212396181505 -1147 17.27204709046952 -1148 17.27197031981258 -1149 17.271893649590268 -1150 17.271817079549557 -1151 17.27174060943834 -1152 17.2716642390055 -1153 17.2715879680008 -1154 17.27151179617497 -1155 17.271435723279623 -1156 17.271359749067322 -1157 17.27128387329151 -1158 17.271208095706548 -1159 17.27113241606769 -1160 17.271056834131087 -1161 17.27098134965378 -1162 17.270905962393684 -1163 17.270830672109582 -1164 17.27075547856116 -1165 17.27068038150894 -1166 17.270605380714322 -1167 17.27053047593955 -1168 17.27045566694774 -1169 17.27038095350283 -1170 17.270306335369618 -1171 17.270231812313725 -1172 17.270157384101598 -1173 17.270083050500535 -1174 17.270008811278636 -1175 17.269934666204833 -1176 17.269860615048852 -1177 17.26978665758124 -1178 17.269712793573348 -1179 17.269639022797307 -1180 17.26956534502606 -1181 17.269491760033336 -1182 17.269418267593647 -1183 17.269344867482285 -1184 17.269271559475307 -1185 17.269198343349565 -1186 17.269125218882646 -1187 17.26905218585294 -1188 17.26897924403956 -1189 17.26890639322238 -1190 17.268833633182034 -1191 17.2687609636999 -1192 17.268688384558086 -1193 17.26861589553945 -1194 17.26854349642757 -1195 17.268471187006764 -1196 17.268398967062073 -1197 17.26832683637925 -1198 17.268254794744774 -1199 17.268182841945833 -1200 17.268110977770327 -1201 17.268039202006847 -1202 17.267967514444706 -1203 17.267895914873893 -1204 17.26782440308511 -1205 17.26775297886974 -1206 17.26768164201984 -1207 17.267610392328173 -1208 17.26753922958816 -1209 17.2674681535939 -1210 17.26739716414017 -1211 17.26732626102242 -1212 17.267255444036728 -1213 17.267184712979883 -1214 17.2671140676493 -1215 17.267043507843045 -1216 17.266973033359843 -1217 17.266902643999064 -1218 17.266832339560725 -1219 17.266762119845467 -1220 17.26669198465458 -1221 17.266621933789978 -1222 17.26655196705422 -1223 17.26648208425047 -1224 17.266412285182525 -1225 17.26634256965479 -1226 17.26627293747232 -1227 17.266203388440733 -1228 17.2661339223663 -1229 17.26606453905587 -1230 17.2659952383169 -1231 17.265926019957462 -1232 17.26585688378621 -1233 17.265787829612393 -1234 17.265718857245865 -1235 17.265649966497044 -1236 17.265581157176953 -1237 17.265512429097193 -1238 17.26544378206993 -1239 17.265375215907916 -1240 17.26530673042448 -1241 17.26523832543352 -1242 17.26517000074948 -1243 17.265101756187413 -1244 17.26503359156288 -1245 17.264965506692032 -1246 17.26489750139158 -1247 17.264829575478775 -1248 17.264761728771408 -1249 17.264693961087847 -1250 17.26462627224697 -1251 17.264558662068232 -1252 17.2644911303716 -1253 17.26442367697759 -1254 17.264356301707245 -1255 17.264289004382153 -1256 17.2642217848244 -1257 17.264154642856653 -1258 17.26408757830205 -1259 17.264020590984252 -1260 17.263953680727482 -1261 17.263886847356446 -1262 17.263820090696363 -1263 17.263753410572974 -1264 17.26368680681252 -1265 17.263620279241753 -1266 17.26355382768793 -1267 17.2634874519788 -1268 17.263421151942627 -1269 17.263354927408155 -1270 17.263288778204625 -1271 17.263222704161787 -1272 17.26315670510985 -1273 17.26309078087954 -1274 17.263024931302045 -1275 17.262959156209046 -1276 17.26289345543271 -1277 17.262827828805673 -1278 17.262762276161034 -1279 17.262696797332403 -1280 17.262631392153818 -1281 17.262566060459815 -1282 17.262500802085388 -1283 17.262435616865993 -1284 17.262370504637556 -1285 17.26230546523645 -1286 17.262240498499526 -1287 17.262175604264073 -1288 17.26211078236784 -1289 17.26204603264903 -1290 17.261981354946304 -1291 17.26191674909875 -1292 17.26185221494592 -1293 17.261787752327812 -1294 17.261723361084844 -1295 17.261659041057897 -1296 17.261594792088275 -1297 17.26153061401773 -1298 17.261466506688432 -1299 17.261402469943004 -1300 17.26133850362448 -1301 17.26127460757634 -1302 17.26121078164248 -1303 17.261147025667206 -1304 17.261083339495272 -1305 17.261019722971845 -1306 17.260956175942503 -1307 17.260892698253254 -1308 17.260829289750507 -1309 17.260765950281094 -1310 17.26070267969225 -1311 17.260639477831635 -1312 17.2605763445473 -1313 17.26051327968772 -1314 17.26045028310175 -1315 17.260387354638677 -1316 17.26032449414816 -1317 17.260261701480285 -1318 17.260198976485523 -1319 17.26013631901473 -1320 17.260073728919163 -1321 17.260011206050493 -1322 17.259948750260747 -1323 17.259886361402376 -1324 17.25982403932818 -1325 17.259761783891385 -1326 17.259699594945577 -1327 17.25963747234472 -1328 17.259575415943186 -1329 17.259513425595703 -1330 17.259451501157386 -1331 17.25938964248372 -1332 17.259327849430573 -1333 17.259266121854186 -1334 17.259204459611166 -1335 17.259142862558484 -1336 17.259081330553506 -1337 17.25901986345394 -1338 17.258958461117864 -1339 17.258897123403734 -1340 17.258835850170353 -1341 17.258774641276894 -1342 17.258713496582885 -1343 17.258652415948216 -1344 17.258591399233136 -1345 17.25853044629824 -1346 17.25846955700449 -1347 17.25840873121319 -1348 17.258347968786005 -1349 17.258287269584933 -1350 17.25822663347234 -1351 17.258166060310934 -1352 17.258105549963766 -1353 17.258045102294222 -1354 17.257984717166046 -1355 17.257924394443325 -1356 17.25786413399047 -1357 17.25780393567225 -1358 17.257743799353744 -1359 17.25768372490041 -1360 17.257623712178 -1361 17.25756376105262 -1362 17.257503871390703 -1363 17.257444043059024 -1364 17.257384275924675 -1365 17.257324569855083 -1366 17.257264924717994 -1367 17.25720534038149 -1368 17.25714581671398 -1369 17.257086353584178 -1370 17.257026950861153 -1371 17.256967608414264 -1372 17.2569083261132 -1373 17.256849103827978 -1374 17.256789941428924 -1375 17.25673083878668 -1376 17.25667179577221 -1377 17.25661281225678 -1378 17.256553888111988 -1379 17.256495023209723 -1380 17.256436217422184 -1381 17.256377470621914 -1382 17.256318782681728 -1383 17.256260153474763 -1384 17.256201582874443 -1385 17.25614307075454 -1386 17.256084616989078 -1387 17.256026221452416 -1388 17.255967884019217 -1389 17.255909604564426 -1390 17.255851382963293 -1391 17.25579321909138 -1392 17.255735112824528 -1393 17.255677064038874 -1394 17.25561907261088 -1395 17.255561138417256 -1396 17.25550326133505 -1397 17.255445441241566 -1398 17.255387678014426 -1399 17.255329971531516 -1400 17.25527232167103 -1401 17.255214728311458 -1402 17.255157191331545 -1403 17.255099710610345 -1404 17.2550422860272 -1405 17.25498491746172 -1406 17.254927604793806 -1407 17.25487034790365 -1408 17.2548131466717 -1409 17.254756000978716 -1410 17.254698910705706 -1411 17.25464187573398 -1412 17.25458489594512 -1413 17.254527971220952 -1414 17.254471101443634 -1415 17.254414286495557 -1416 17.2543575262594 -1417 17.254300820618106 -1418 17.254244169454896 -1419 17.25418757265326 -1420 17.254131030096964 -1421 17.25407454167002 -1422 17.25401810725674 -1423 17.25396172674168 -1424 17.253905400009668 -1425 17.253849126945795 -1426 17.253792907435418 -1427 17.253736741364154 -1428 17.253680628617907 -1429 17.253624569082795 -1430 17.253568562645228 -1431 17.253512609191883 -1432 17.253456708609676 -1433 17.253400860785785 -1434 17.253345065607657 -1435 17.253289322962985 -1436 17.25323363273971 -1437 17.253177994826043 -1438 17.253122409110443 -1439 17.253066875481625 -1440 17.25301139382855 -1441 17.25295596404043 -1442 17.252900586006742 -1443 17.252845259617185 -1444 17.25278998476174 -1445 17.252734761330608 -1446 17.252679589214253 -1447 17.25262446830338 -1448 17.25256939848894 -1449 17.25251437966213 -1450 17.2524594117144 -1451 17.252404494537426 -1452 17.25234962802314 -1453 17.252294812063703 -1454 17.252240046551528 -1455 17.25218533137927 -1456 17.252130666439815 -1457 17.252076051626293 -1458 17.252021486832074 -1459 17.251966971950754 -1460 17.251912506876184 -1461 17.251858091502438 -1462 17.251803725723818 -1463 17.251749409434872 -1464 17.25169514253039 -1465 17.251640924905374 -1466 17.25158675645508 -1467 17.251532637074973 -1468 17.251478566660765 -1469 17.251424545108385 -1470 17.25137057231402 -1471 17.251316648174047 -1472 17.251262772585086 -1473 17.251208945444002 -1474 17.251155166647866 -1475 17.251101436093972 -1476 17.251047753679856 -1477 17.250994119303268 -1478 17.250940532862188 -1479 17.25088699425482 -1480 17.250833503379564 -1481 17.25078006013509 -1482 17.25072666442024 -1483 17.25067331613412 -1484 17.250620015176015 -1485 17.250566761445473 -1486 17.250513554842215 -1487 17.250460395266213 -1488 17.250407282617644 -1489 17.250354216796897 -1490 17.250301197704587 -1491 17.250248225241542 -1492 17.2501952993088 -1493 17.250142419807617 -1494 17.250089586639454 -1495 17.250036799706002 -1496 17.249984058909153 -1497 17.249931364151006 -1498 17.249878715333878 -1499 17.249826112360292 -1500 17.249773555132997 -1501 17.249721043554924 -1502 17.249668577529235 -1503 17.24961615695928 -1504 17.24956378174864 -1505 17.249511451801087 -1506 17.249459167020603 -1507 17.249406927311373 -1508 17.249354732577782 -1509 17.249302582724436 -1510 17.249250477656137 -1511 17.24919841727789 -1512 17.249146401494883 -1513 17.24909443021254 -1514 17.249042503336472 -1515 17.248990620772485 -1516 17.24893878242659 -1517 17.248886988204994 -1518 17.248835238014113 -1519 17.24878353176056 -1520 17.248731869351126 -1521 17.248680250692836 -1522 17.24862867569287 -1523 17.248577144258647 -1524 17.24852565629774 -1525 17.248474211717962 -1526 17.248422810427275 -1527 17.24837145233387 -1528 17.248320137346116 -1529 17.248268865372577 -1530 17.248217636322014 -1531 17.248166450103373 -1532 17.248115306625806 -1533 17.248064205798634 -1534 17.248013147531385 -1535 17.247962131733782 -1536 17.24791115831571 -1537 17.247860227187285 -1538 17.24780933825877 -1539 17.24775849144064 -1540 17.24770768664355 -1541 17.247656923778347 -1542 17.24760620275606 -1543 17.2475555234879 -1544 17.24750488588528 -1545 17.247454289859782 -1546 17.24740373532317 -1547 17.247353222187403 -1548 17.24730275036463 -1549 17.247252319767156 -1550 17.24720193030751 -1551 17.24715158189835 -1552 17.24710127445256 -1553 17.247051007883186 -1554 17.24700078210347 -1555 17.246950597026803 -1556 17.246900452566784 -1557 17.246850348637174 -1558 17.24680028515194 -1559 17.246750262025188 -1560 17.24670027917123 -1561 17.246650336504555 -1562 17.246600433939808 -1563 17.246550571391833 -1564 17.246500748775635 -1565 17.246450966006396 -1566 17.246401222999488 -1567 17.24635151967044 -1568 17.246301855934966 -1569 17.246252231708954 -1570 17.246202646908436 -1571 17.24615310144967 -1572 17.246103595249046 -1573 17.246054128223136 -1574 17.246004700288694 -1575 17.24595531136263 -1576 17.24590596136203 -1577 17.24585665020415 -1578 17.245807377806425 -1579 17.245758144086444 -1580 17.245708948961973 -1581 17.245659792350942 -1582 17.245610674171456 -1583 17.245561594341797 -1584 17.245512552780383 -1585 17.24546354940582 -1586 17.245414584136874 -1587 17.245365656892503 -1588 17.245316767591774 -1589 17.245267916153978 -1590 17.245219102498538 -1591 17.245170326545043 -1592 17.245121588213255 -1593 17.2450728874231 -1594 17.245024224094664 -1595 17.244975598148176 -1596 17.244927009504078 -1597 17.24487845808291 -1598 17.244829943805414 -1599 17.244781466592492 -1600 17.244733026365193 -1601 17.244684623044737 -1602 17.244636256552486 -1603 17.24458792680999 -1604 17.244539633738928 -1605 17.244491377261163 -1606 17.24444315729869 -1607 17.244394973773694 -1608 17.244346826608485 -1609 17.244298715725552 -1610 17.24425064104754 -1611 17.244202602497232 -1612 17.244154599997586 -1613 17.244106633471702 -1614 17.244058702842857 -1615 17.244010808034446 -1616 17.243962948970065 -1617 17.243915125573416 -1618 17.243867337768393 -1619 17.243819585479013 -1620 17.243771868629477 -1621 17.24372418714412 -1622 17.243676540947423 -1623 17.243628929964025 -1624 17.243581354118742 -1625 17.2435338133365 -1626 17.24348630754239 -1627 17.24343883666167 -1628 17.24339140061973 -1629 17.24334399934211 -1630 17.243296632754507 -1631 17.243249300782775 -1632 17.24320200335289 -1633 17.243154740391 -1634 17.2431075118234 -1635 17.243060317576514 -1636 17.24301315757692 -1637 17.242966031751365 -1638 17.242918940026723 -1639 17.242871882330004 -1640 17.242824858588378 -1641 17.24277786872917 -1642 17.242730912679836 -1643 17.242683990367965 -1644 17.242637101721325 -1645 17.242590246667792 -1646 17.24254342513541 -1647 17.242496637052362 -1648 17.242449882346968 -1649 17.242403160947678 -1650 17.24235647278312 -1651 17.242309817782044 -1652 17.242263195873324 -1653 17.242216606986013 -1654 17.242170051049268 -1655 17.24212352799241 -1656 17.2420770377449 -1657 17.242030580236328 -1658 17.24198415539643 -1659 17.241937763155086 -1660 17.241891403442303 -1661 17.24184507618824 -1662 17.241798781323176 -1663 17.241752518777563 -1664 17.241706288481947 -1665 17.24166009036705 -1666 17.241613924363698 -1667 17.241567790402886 -1668 17.24152168841572 -1669 17.241475618333453 -1670 17.241429580087484 -1671 17.24138357360932 -1672 17.241337598830633 -1673 17.241291655683217 -1674 17.241245744098993 -1675 17.241199864010035 -1676 17.241154015348542 -1677 17.241108198046845 -1678 17.241062412037397 -1679 17.2410166572528 -1680 17.240970933625796 -1681 17.240925241089247 -1682 17.240879579576145 -1683 17.240833949019624 -1684 17.240788349352943 -1685 17.240742780509493 -1686 17.240697242422797 -1687 17.240651735026514 -1688 17.24060625825442 -1689 17.240560812040435 -1690 17.240515396318603 -1691 17.24047001102311 -1692 17.24042465608825 -1693 17.24037933144845 -1694 17.240334037038277 -1695 17.240288772792436 -1696 17.240243538645732 -1697 17.240198334533112 -1698 17.240153160389653 -1699 17.24010801615056 -1700 17.240062901751166 -1701 17.240017817126915 -1702 17.239972762213405 -1703 17.239927736946328 -1704 17.239882741261535 -1705 17.239837775094983 -1706 17.23979283838275 -1707 17.23974793106106 -1708 17.23970305306624 -1709 17.23965820433476 -1710 17.23961338480319 -1711 17.23956859440826 -1712 17.239523833086793 -1713 17.239479100775746 -1714 17.239434397412193 -1715 17.239389722933364 -1716 17.239345077276553 -1717 17.239300460379226 -1718 17.23925587217895 -1719 17.23921131261342 -1720 17.239166781620447 -1721 17.239122279137966 -1722 17.23907780510404 -1723 17.23903335945684 -1724 17.238988942134668 -1725 17.23894455307595 -1726 17.238900192219212 -1727 17.238855859503115 -1728 17.238811554866448 -1729 17.238767278248098 -1730 17.238723029587092 -1731 17.23867880882255 -1732 17.23863461589375 -1733 17.23859045074005 -1734 17.238546313300926 -1735 17.238502203516006 -1736 17.238458121325014 -1737 17.238414066667797 -1738 17.238370039484302 -1739 17.23832603971461 -1740 17.23828206729892 -1741 17.23823812217754 -1742 17.23819420429089 -1743 17.23815031357952 -1744 17.238106449984084 -1745 17.238062613445347 -1746 17.238018803904215 -1747 17.237975021301676 -1748 17.23793126557884 -1749 17.23788753667695 -1750 17.237843834537344 -1751 17.237800159101496 -1752 17.23775651031096 -1753 17.23771288810743 -1754 17.23766929243271 -1755 17.2376257232287 -1756 17.237582180437432 -1757 17.237538664001043 -1758 17.237495173861777 -1759 17.237451709962 -1760 17.23740827224418 -1761 17.237364860650903 -1762 17.237321475124865 -1763 17.237278115608873 -1764 17.237234782045842 -1765 17.237191474378793 -1766 17.23714819255088 -1767 17.237104936505332 -1768 17.237061706185514 -1769 17.23701850153489 -1770 17.236975322497045 -1771 17.236932169015656 -1772 17.236889041034527 -1773 17.236845938497545 -1774 17.23680286134873 -1775 17.236759809532206 -1776 17.23671678299219 -1777 17.236673781673023 -1778 17.236630805519148 -1779 17.236587854475115 -1780 17.236544928485575 -1781 17.2365020274953 -1782 17.236459151449154 -1783 17.236416300292113 -1784 17.236373473969273 -1785 17.236330672425805 -1786 17.236287895607013 -1787 17.236245143458298 -1788 17.236202415925156 -1789 17.236159712953206 -1790 17.236117034488167 -1791 17.236074380475856 -1792 17.23603175086218 -1793 17.235989145593194 -1794 17.235946564615016 -1795 17.23590400787389 -1796 17.23586147531615 -1797 17.235818966888232 -1798 17.235776482536696 -1799 17.23573402220818 -1800 17.235691585849445 -1801 17.23564917340734 -1802 17.235606784828825 -1803 17.235564420060957 -1804 17.235522079050895 -1805 17.2354797617459 -1806 17.235437468093338 -1807 17.23539519804067 -1808 17.23535295153548 -1809 17.235310728525405 -1810 17.23526852895824 -1811 17.235226352781833 -1812 17.235184199944158 -1813 17.235142070393287 -1814 17.235099964077385 -1815 17.235057880944716 -1816 17.235015820943648 -1817 17.23497378402265 -1818 17.23493177013028 -1819 17.234889779215212 -1820 17.2348478112262 -1821 17.234805866112104 -1822 17.234763943821882 -1823 17.2347220443046 -1824 17.23468016750941 -1825 17.234638313385542 -1826 17.234596481882374 -1827 17.234554672949336 -1828 17.23451288653597 -1829 17.23447112259193 -1830 17.234429381066946 -1831 17.23438766191084 -1832 17.234345965073555 -1833 17.23430429050511 -1834 17.234262638155624 -1835 17.234221007975325 -1836 17.234179399914506 -1837 17.23413781392358 -1838 17.23409624995307 -1839 17.234054707953543 -1840 17.234013187875703 -1841 17.23397168967034 -1842 17.233930213288325 -1843 17.233888758680642 -1844 17.233847325798354 -1845 17.233805914592626 -1846 17.2337645250147 -1847 17.233723157015937 -1848 17.233681810547786 -1849 17.233640485561764 -1850 17.233599182009506 -1851 17.233557899842737 -1852 17.233516639013256 -1853 17.23347539947298 -1854 17.233434181173894 -1855 17.233392984068093 -1856 17.233351808107763 -1857 17.233310653245166 -1858 17.233269519432664 -1859 17.233228406622715 -1860 17.23318731476785 -1861 17.23314624382073 -1862 17.23310519373405 -1863 17.23306416446065 -1864 17.233023155953422 -1865 17.23298216816538 -1866 17.232941201049577 -1867 17.23290025455922 -1868 17.232859328647557 -1869 17.23281842326794 -1870 17.232777538373824 -1871 17.232736673918737 -1872 17.232695829856297 -1873 17.232655006140213 -1874 17.23261420272428 -1875 17.232573419562392 -1876 17.232532656608516 -1877 17.23249191381671 -1878 17.232451191141138 -1879 17.23241048853602 -1880 17.23236980595569 -1881 17.232329143354544 -1882 17.232288500687105 -1883 17.23224787790794 -1884 17.232207274971728 -1885 17.232166691833225 -1886 17.23212612844727 -1887 17.232085584768797 -1888 17.232045060752828 -1889 17.23200455635445 -1890 17.231964071528864 -1891 17.231923606231344 -1892 17.231883160417244 -1893 17.231842734041994 -1894 17.231802327061146 -1895 17.231761939430296 -1896 17.23172157110514 -1897 17.231681222041473 -1898 17.23164089219516 -1899 17.231600581522137 -1900 17.231560289978454 -1901 17.23152001752021 -1902 17.231479764103625 -1903 17.231439529684977 -1904 17.231399314220624 -1905 17.231359117667036 -1906 17.23131893998073 -1907 17.23127878111833 -1908 17.231238641036533 -1909 17.23119851969212 -1910 17.231158417041964 -1911 17.231118333043007 -1912 17.23107826765226 -1913 17.231038220826854 -1914 17.230998192523973 -1915 17.230958182700892 -1916 17.230918191314956 -1917 17.230878218323603 -1918 17.230838263684362 -1919 17.230798327354815 -1920 17.230758409292644 -1921 17.230718509455606 -1922 17.23067862780154 -1923 17.23063876428837 -1924 17.23059891887409 -1925 17.230559091516767 -1926 17.230519282174583 -1927 17.230479490805756 -1928 17.230439717368608 -1929 17.230399961821544 -1930 17.230360224123014 -1931 17.230320504231607 -1932 17.230280802105927 -1933 17.2302411177047 -1934 17.230201450986712 -1935 17.230161801910832 -1936 17.230122170436015 -1937 17.23008255652126 -1938 17.2300429601257 -1939 17.230003381208494 -1940 17.229963819728898 -1941 17.229924275646262 -1942 17.229884748919993 -1943 17.229845239509572 -1944 17.229805747374574 -1945 17.229766272474635 -1946 17.229726814769474 -1947 17.22968737421889 -1948 17.229647950782763 -1949 17.229608544421026 -1950 17.229569155093714 -1951 17.22952978276092 -1952 17.229490427382824 -1953 17.229451088919685 -1954 17.22941176733181 -1955 17.229372462579615 -1956 17.22933317462358 -1957 17.229293903424242 -1958 17.229254648942252 -1959 17.22921541113829 -1960 17.229176189973142 -1961 17.22913698540766 -1962 17.229097797402765 -1963 17.229058625919457 -1964 17.229019470918807 -1965 17.22898033236197 -1966 17.228941210210152 -1967 17.228902104424662 -1968 17.228863014966866 -1969 17.228823941798197 -1970 17.22878488488017 -1971 17.22874584417437 -1972 17.22870681964247 -1973 17.228667811246183 -1974 17.22862881894733 -1975 17.228589842707777 -1976 17.228550882489486 -1977 17.228511938254464 -1978 17.228473009964812 -1979 17.228434097582692 -1980 17.22839520107035 -1981 17.228356320390084 -1982 17.228317455504282 -1983 17.228278606375394 -1984 17.228239772965935 -1985 17.22820095523851 -1986 17.22816215315577 -1987 17.228123366680457 -1988 17.22808459577538 -1989 17.228045840403407 -1990 17.228007100527492 -1991 17.227968376110653 -1992 17.22792966711597 -1993 17.227890973506597 -1994 17.227852295245764 -1995 17.22781363229677 -1996 17.227774984622982 -1997 17.22773635218783 -1998 17.227697734954816 -1999 17.227659132887517 -2000 17.22762054594957 diff --git a/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=100.log b/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=100.log deleted file mode 100644 index 13b6eec5..00000000 --- a/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=100.log +++ /dev/null @@ -1,39 +0,0 @@ -2023-12-23T22:36:56.931 -== Config == -INIT_SIZE: 3 -GEN_TYP_SIZE: 2 -PARAMETERIZE_FLIP_GROUPS_BY_SZ: true -EPOCHS: 100 -DistNat: DistUInt32 -TAG: v2_meta_ad - -Building num_apps(gen_expr(...)) computation graph... - 9.576930959 seconds - -Initial adnodes_of_interest: -Dict("tysz2_gen_type_tbool" => 0.5, "tysz1_gen_type_tbool" => 0.5, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.5, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5, "sz1_succ_app" => 0.5, "sz1_succ_abs" => 0.5, "sz3_succ_abs" => 0.5, "sz3_succ_app" => 0.5, "sz2_succ_abs" => 0.5, "sz3_succ_var" => 0.5) -Inferring initial distribution... - 0.369677708 seconds -Saved num_apps dist to examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_before.csv. - -Saving samples... -Saved samples to examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_before.txt. - 5.086195125 seconds - -Initial logprob: -20.238481981031438 - -Training... - 9.154631584 seconds - -Final logprob: -18.54692234466734 -Drawing the target dataset is 5.43x more likely - -Learned adnodes_of_interest: -Dict("tysz2_gen_type_tbool" => 0.4769967684232314, "tysz1_gen_type_tbool" => 0.4962538566537244, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.561559374299581, "sz2_succ_var" => 0.49666005253839807, "sz1_succ_var" => 0.49906693556544923, "sz1_succ_app" => 0.5767350167020707, "sz1_succ_abs" => 0.41080879746746896, "sz3_succ_abs" => 0.432508934977342, "sz3_succ_app" => 0.5595926683247854, "sz2_succ_abs" => 0.4336897457382177, "sz3_succ_var" => 0.5) -Inferring trained distribution... -Saved num_apps dist to examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=100.csv. - -Saving samples... -Saved samples to examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=100.txt. - 2.880630167 seconds - diff --git a/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log b/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log deleted file mode 100644 index 77aa2b8f..00000000 --- a/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log +++ /dev/null @@ -1,39 +0,0 @@ -2023-12-23T22:30:59.092 -== Config == -INIT_SIZE: 3 -GEN_TYP_SIZE: 2 -PARAMETERIZE_FLIP_GROUPS_BY_SZ: true -EPOCHS: 2000 -DistNat: DistUInt32 -TAG: v2_meta_ad - -Building num_apps(gen_expr(...)) computation graph... - 9.476043417 seconds - -Initial adnodes_of_interest: -Dict("tysz2_gen_type_tbool" => 0.5, "tysz1_gen_type_tbool" => 0.5, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.5, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5, "sz1_succ_app" => 0.5, "sz1_succ_abs" => 0.5, "sz3_succ_abs" => 0.5, "sz3_succ_app" => 0.5, "sz2_succ_abs" => 0.5, "sz3_succ_var" => 0.5) -Inferring initial distribution... - 0.376421083 seconds -Saved num_apps dist to examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_before.csv. - -Saving samples... -Saved samples to examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_before.txt. - 5.078510792 seconds - -Initial logprob: -20.238481981031438 - -Training... - 159.195553958 seconds - -Final logprob: -17.22762054594957 -Drawing the target dataset is 20.3x more likely - -Learned adnodes_of_interest: -Dict("tysz2_gen_type_tbool" => 0.34083724764380813, "tysz1_gen_type_tbool" => 0.3950155729504988, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.6151878798944757, "sz2_succ_var" => 0.4346890017115986, "sz1_succ_var" => 0.5103724794228329, "sz1_succ_app" => 0.6841991723159101, "sz1_succ_abs" => 0.21491675399079513, "sz3_succ_abs" => 0.2514968265646618, "sz3_succ_app" => 0.6712638585215596, "sz2_succ_abs" => 0.42361325788008747, "sz3_succ_var" => 0.5) -Inferring trained distribution... -Saved num_apps dist to examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=2000.csv. - -Saving samples... -Saved samples to examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt. - 3.0981125 seconds - diff --git a/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_before.txt b/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_before.txt deleted file mode 100644 index aeb6b187..00000000 --- a/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_before.txt +++ /dev/null @@ -1,200 +0,0 @@ -false -true -(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool. λz:Bool. false)) false -(λx:Bool. false) true -false -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true)) (λx:Bool. (λy:Bool. λz:Bool. false) true) -(λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)) false -λx:Bool -> Bool. x -(λx:(Bool -> Bool) -> Bool. x) ((λx:Bool. λy:Bool -> Bool. false) true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool -> Bool. false) true)) -λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. false) -(λx:(Bool -> Bool) -> Bool. (λy:Bool. false) true) (λx:Bool -> Bool. true) -false -λx:Bool -> Bool. λy:Bool. (λz:Bool -> Bool. true) x -(λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false) -(λx:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) false false) -λx:Bool -> Bool. λy:Bool. y -(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool. λy:Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false))) -(λx:Bool. λy:Bool. λz:Bool. λw:Bool. false) true ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. x)) -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) ((λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool. λz:Bool. false)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. true) (λx:Bool -> Bool. λy:Bool. true) false true -false -(λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. true) (λy:Bool -> Bool. false)) ((λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false))) -λx:Bool. λy:Bool. x -λx:Bool -> Bool. true -true -(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. true)) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. true))) -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) x) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:Bool. λy:Bool. false) false)) -true -true -(λx:Bool. (λy:Bool. true) true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. false) false)) -(λx:Bool. λy:Bool. λz:Bool. λw:Bool. false) true ((λx:Bool. false) false) ((λx:Bool. λy:(Bool -> Bool) -> Bool. false) true ((λx:Bool. λy:Bool -> Bool. true) true)) -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool -> Bool. false) true (λx:Bool -> Bool. x) (λx:Bool. x) -true -λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. y) -true -(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. true) (λx:Bool -> Bool. true) (λx:Bool. x) (λx:Bool. (λy:Bool. λz:Bool. true) true) -λx:Bool -> Bool. false -true -true -true -λx:Bool. false -(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. true) (λx:Bool. λy:Bool. false) (λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. true)) -true -λx:Bool -> Bool. x true -true -false -(λx:Bool. λy:Bool. true) ((λx:Bool. false) true) false -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. false) (x false) -(λx:Bool. λy:Bool. λz:Bool. false) false -(λx:Bool -> Bool. (λy:Bool. λz:Bool -> Bool. false) false) (λx:Bool. x) -false -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false) (λx:Bool. x) -(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. true) x) true -(λx:Bool. λy:Bool. λz:Bool. λw:Bool. true) false false -λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) x (λy:Bool -> Bool. y) -λx:Bool. (λy:Bool. true) ((λy:Bool. true) true) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false) false) -λx:Bool -> Bool. λy:Bool. y -λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. λz:Bool. true) ((λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. true)) -true -λx:Bool -> Bool. (λy:Bool. false) ((λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. false)) -λx:Bool -> Bool. λy:Bool. y -(λx:Bool. λy:Bool. λz:Bool. false) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true)) -false -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) false ((λx:Bool -> Bool. true) (λx:Bool. false))) -false -(λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool. true) true) ((λx:Bool. λy:Bool -> Bool -> Bool. false) false ((λx:Bool. λy:Bool. λz:Bool. true) true)) -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. (λy:Bool. λz:Bool. false) false) -false -(λx:Bool. λy:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) false ((λx:Bool. true) false)) -(λx:Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. false) false false false -(λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. false) true -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. true) false) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) false ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true))) -λx:Bool -> Bool. x -λx:Bool -> Bool. x -λx:Bool. true -true -(λx:(Bool -> Bool) -> Bool. (λy:Bool. true) false) (λx:Bool -> Bool. true) -λx:Bool. true -(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool -> Bool. false) true ((λx:Bool -> Bool. true) (λx:Bool. true))) -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:Bool. false) true) (λx:Bool. (λy:Bool. false) false) -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) false ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. true)) true -λx:Bool -> Bool. true -false -false -(λx:Bool. (λy:Bool. λz:Bool. false) true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. true))) -(λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool. λz:Bool. false) (λy:Bool. true)) ((λx:Bool. λy:Bool. λz:Bool -> Bool. false) false ((λx:Bool. false) false)) -(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool. λy:Bool -> Bool. true) false) ((λx:(Bool -> Bool) -> Bool -> Bool. x) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true)) -(λx:Bool. λy:Bool. false) false true -(λx:Bool. λy:Bool. x) false -λx:Bool -> Bool. false -(λx:(Bool -> Bool) -> Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. false)) -(λx:Bool. x) ((λx:(Bool -> Bool) -> Bool. true) ((λx:Bool. λy:Bool -> Bool. true) false)) -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. x) (λy:Bool -> Bool. true) -λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. λz:Bool. true) ((λy:Bool. false) false) -λx:Bool -> Bool. x -false -λx:Bool -> Bool. x -false -true -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true))) -λx:Bool. (λy:Bool. λz:Bool. false) ((λy:Bool. false) x) -(λx:Bool. λy:Bool. false) true false -true -false -(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. false) false ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true)) true -λx:Bool -> Bool. false -(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. true) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. true)) -true -(λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true) -(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. false) (λx:Bool. λy:Bool. false) false ((λx:Bool. false) false) -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. true) ((λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool. λz:Bool. false)) -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false (λx:Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false))) -(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. false)) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. true)) -λx:Bool -> Bool. λy:Bool. x y -(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. λa:Bool. true) (λx:Bool -> Bool. false) (λx:Bool. x) ((λx:Bool. x) false) -(λx:Bool. (λy:Bool. λz:Bool -> Bool. true) x) ((λx:Bool. false) true) -true -(λx:Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) false ((λx:Bool. λy:Bool. λz:Bool. false) false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. false)) -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. true)) -false -(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. λa:Bool. true) false ((λx:Bool. true) false) ((λx:Bool. λy:Bool -> Bool. false) false) -(λx:Bool -> Bool. (λy:Bool. false) false) (λx:Bool. false) -(λx:(Bool -> Bool) -> Bool -> Bool. x) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. true)) -true -false -λx:Bool. λy:Bool. false -(λx:Bool. x) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. false))) -λx:Bool -> Bool. (λy:Bool -> Bool. false) (λy:Bool. y) -true -λx:Bool. λy:Bool. false -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. false) true (λx:Bool -> Bool. true) true -(λx:Bool. λy:Bool. true) ((λx:Bool. true) false) ((λx:Bool. false) true) -(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) true ((λx:Bool. λy:Bool. λz:Bool. true) true) ((λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) true)) -(λx:(Bool -> Bool) -> Bool -> Bool. x) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) false false) -(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λx:Bool. λy:Bool. true) (λx:Bool -> Bool. x true) -true -(λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) false true -(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) false (λx:Bool. λy:Bool. x) -true -λx:Bool -> Bool. true -(λx:Bool. λy:Bool. y) true -λx:Bool. x -(λx:Bool -> Bool -> Bool. false) (λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. false) (λy:Bool. λz:Bool. true)) -λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. true) x ((λy:Bool. λz:Bool -> Bool. false) x) -λx:Bool. x -λx:Bool. x -false -λx:Bool -> Bool. x -λx:Bool -> Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. false) ((λy:Bool -> Bool. false) x) -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. λy:Bool. false))) -(λx:Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. false) false true ((λx:Bool. true) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false))) -(λx:Bool. (λy:Bool. λz:Bool. false) true) ((λx:Bool. true) true) -λx:Bool. (λy:Bool. λz:Bool. true) true -false -λx:Bool. x -true -(λx:Bool. λy:Bool. λz:Bool. true) ((λx:Bool. x) false) -λx:Bool. x -(λx:Bool. x) ((λx:Bool. false) true) -λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. false) -(λx:(Bool -> Bool) -> Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. false) (λx:Bool -> Bool. false))) -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. true) false -false -(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool. λz:Bool. true)) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true)) -λx:Bool -> Bool. false -(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. true)) ((λx:Bool -> Bool. λy:Bool -> Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. false))) -(λx:(Bool -> Bool) -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false) (λx:Bool. λy:Bool. false)) -false -(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. true) true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. true) ((λx:Bool. false) true)) -λx:Bool -> Bool. λy:Bool. y -true -λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. false) x (λy:Bool -> Bool. λz:Bool. false) -λx:Bool. λy:Bool. (λz:Bool -> Bool -> Bool. true) (λz:Bool. λw:Bool. false) -λx:Bool -> Bool. (λy:Bool. y) false -(λx:Bool -> Bool. (λy:Bool. λz:Bool -> Bool. false) true) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. false) false ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. true))) -(λx:Bool -> Bool -> Bool. (λy:Bool. false) false) (λx:Bool. (λy:Bool. λz:Bool. false) x) -λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. false) (λy:Bool. λz:Bool. true) (λy:Bool. λz:Bool. true) -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. false) (λx:Bool -> Bool. true) ((λx:Bool. true) false) (λx:Bool. λy:Bool. true) -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) true (λx:Bool -> Bool. true) false -(λx:Bool -> Bool. λy:Bool. x) (λx:Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. true)) -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) true) -(λx:Bool. λy:Bool. true) true ((λx:Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. true) true) -true -(λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true)) ((λx:Bool. false) false) -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. false) false (λx:Bool -> Bool. false) true -true -(λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. true)) true -λx:Bool -> Bool. false -(λx:Bool. false) true -false -(λx:Bool. x) ((λx:Bool. λy:Bool. true) true true) -false -(λx:Bool. λy:Bool. false) true -(λx:Bool. λy:Bool. λz:Bool. false) true -true -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool. false) (λx:Bool -> Bool. λy:Bool. true)) -λx:Bool -> Bool. λy:Bool. y -(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. true) false) (λx:Bool -> Bool. x) -(λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. (λy:Bool. λz:Bool. true) true) diff --git a/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=100.txt b/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=100.txt deleted file mode 100644 index a8db166d..00000000 --- a/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=100.txt +++ /dev/null @@ -1,200 +0,0 @@ -true -(λx:Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. true) false ((λx:Bool. λy:Bool. false) true) (λx:Bool -> Bool. λy:Bool. true) -λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) ((λy:Bool. λz:Bool -> Bool. λw:Bool. false) true) -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool. false) true) (λx:Bool -> Bool. λy:Bool. false) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. false) -(λx:Bool. λy:Bool -> Bool. y) ((λx:Bool. x) false) -λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) ((λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool. true)) -λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. false) ((λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool. false)) -(λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool. false)) true -(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) false (λx:Bool. λy:Bool. true) false -λx:Bool -> Bool. λy:Bool. (λz:Bool -> Bool -> Bool. true) (λz:Bool. λw:Bool. true) -(λx:Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. false) true ((λx:Bool. λy:Bool. λz:Bool. false) false) (λx:Bool -> Bool. (λy:Bool. false) true) -λx:Bool -> Bool. x -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool. false) (λy:Bool. false)) (λx:Bool -> Bool. (λy:Bool. λz:Bool. false) true) -(λx:Bool. λy:Bool. λz:Bool. true) false false true -true -(λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true)) -(λx:Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. false) true ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false)) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false))) -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. true)) -(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) true) ((λx:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false)) -(λx:Bool -> Bool. false) (λx:Bool. x) -(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. false) true) -(λx:Bool. x) ((λx:Bool. λy:Bool. true) true ((λx:Bool. false) false)) -(λx:(Bool -> Bool) -> Bool. λy:Bool. y) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false))) -false -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. λy:Bool. true)) ((λx:Bool. λy:Bool -> Bool -> Bool. false) true (λx:Bool. λy:Bool. true)) -(λx:Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) false ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true)) true -true -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false))) -(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. λa:Bool. false) false ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false)) ((λx:Bool. λy:Bool -> Bool. false) false ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false))) -(λx:(Bool -> Bool) -> Bool. (λy:Bool. true) false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true) false) -(λx:Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool. true) (λx:Bool. λy:Bool. false) (λx:Bool. false) -(λx:Bool. (λy:Bool. true) x) true -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true)) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true))) -false -(λx:Bool -> Bool -> Bool. x) ((λx:Bool. λy:Bool. λz:Bool. false) true) false -(λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool. false) (λy:Bool. true)) ((λx:Bool. λy:Bool -> Bool. true) ((λx:Bool. true) true)) -λx:Bool. λy:Bool. x -true -λx:Bool -> Bool. x -λx:Bool -> Bool. false -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. y) -λx:Bool -> Bool. false -λx:Bool -> Bool. true -false -(λx:Bool. (λy:Bool. false) true) false -(λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool. false) (λy:Bool. true)) (λx:Bool -> Bool. true) -λx:Bool -> Bool. x true -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) -true -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. true) true) -(λx:Bool. λy:Bool. y) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. false) true) -true -(λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. x)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. false) false ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:Bool. λy:Bool. false) true)) -λx:Bool. (λy:Bool. x) ((λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. true)) -false -(λx:Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. λa:Bool. true) false ((λx:Bool. λy:Bool. true) true) false -(λx:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. λy:Bool. true))) -λx:Bool. λy:Bool. true -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. true) true (λx:Bool. λy:Bool. x) -(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. false) true (λx:Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. true) false) -(λx:Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) true ((λx:Bool. false) false) ((λx:Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. false) true) -false -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. y) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. x)) -(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) true ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false))) -λx:Bool. true -true -false -false -false -(λx:Bool. (λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false))) -(λx:Bool. λy:Bool -> Bool. y) true -(λx:Bool. λy:Bool -> Bool. false) false -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false))) -true -false -λx:Bool. λy:Bool. (λz:(Bool -> Bool) -> Bool. false) (λz:Bool -> Bool. false) -(λx:Bool. λy:Bool. λz:Bool. true) true false -false -(λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true)) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true)) -true -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false) false false -(λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. false) true (λx:Bool. (λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. false)) -(λx:Bool. λy:Bool. true) false ((λx:Bool. λy:Bool -> Bool -> Bool. true) true (λx:Bool. λy:Bool. true)) -λx:Bool. x -(λx:Bool -> Bool -> Bool. true) (λx:Bool. (λy:Bool. λz:Bool. true) true) -true -(λx:Bool. λy:Bool. λz:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false)) ((λx:Bool. false) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true))) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. false) ((λx:Bool. true) true)) -λx:Bool. (λy:Bool. λz:Bool. λw:Bool. true) x ((λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. true)) -true -true -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. true) false ((λx:Bool. λy:Bool -> Bool. true) true) (λx:Bool -> Bool. false) -(λx:Bool. λy:Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false)) ((λx:Bool -> Bool. false) (λx:Bool. x)) -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true)) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) false ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true))) -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. true) ((λy:Bool -> Bool. true) (λy:Bool. true)) -(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. λa:Bool. false) (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. false) false) (λx:Bool -> Bool. λy:Bool. false) -true -(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool. true) false) ((λx:Bool. λy:Bool. λz:Bool -> Bool. true) true ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false))) -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) true ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true))) -(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) false) false -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. true) false ((λx:Bool. λy:Bool -> Bool. true) true) ((λx:Bool. λy:Bool -> Bool. false) false (λx:Bool. x)) -false -false -λx:Bool -> Bool. x -(λx:Bool. (λy:Bool. false) false) false -(λx:Bool -> Bool -> Bool. x) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. true)) true -false -(λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false)) true -(λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool -> Bool. false)) (λx:Bool. (λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. false)) -λx:Bool. x -false -false -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) x) (λx:Bool -> Bool. x) -true -(λx:Bool. λy:Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false)) -λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. false) true -(λx:Bool. λy:Bool -> Bool. y) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true))) -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) false -(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. false)) (λx:Bool. (λy:Bool. λz:Bool. false) false) -(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) true ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. true)) ((λx:Bool. λy:Bool. λz:Bool. true) ((λx:Bool. false) true)) -(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) false (λx:Bool. λy:Bool. false) ((λx:Bool. λy:Bool. true) false ((λx:Bool. true) false)) -(λx:Bool -> Bool -> Bool. true) (λx:Bool. (λy:Bool. λz:Bool. true) true) -true -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λx:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true)) -λx:Bool. true -λx:Bool. λy:Bool. x -(λx:Bool -> Bool. (λy:Bool. λz:Bool -> Bool. true) true) ((λx:Bool. λy:Bool. λz:Bool. false) true ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false))) -(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. true) x) true -(λx:Bool -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) (λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool -> Bool. true) -false -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) ((λx:(Bool -> Bool) -> Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. true))) -λx:Bool -> Bool. x -false -(λx:Bool -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. false) (λx:Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false)) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) false ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true)) -(λx:Bool. (λy:Bool. true) x) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) true) -(λx:Bool. λy:Bool -> Bool. x) ((λx:Bool. x) false) -(λx:Bool. λy:Bool -> Bool. λz:Bool. λw:Bool -> Bool. false) true (λx:Bool. x) ((λx:Bool. false) true) -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) true (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. true)) -false -(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool. false) (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) true ((λx:Bool. false) false)) -true -true -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. true)) ((λx:Bool. λy:Bool -> Bool. true) true (λx:Bool. x)) -false -λx:Bool -> Bool. false -(λx:Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. false) true ((λx:Bool. λy:Bool. λz:Bool. false) true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. false)) -(λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. false)) -false -λx:Bool -> Bool. true -(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. false) (λx:Bool. λy:Bool. true) (λx:Bool -> Bool. x true) -(λx:Bool. x) false -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool. true) true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. λy:Bool. true)) -(λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. y) -λx:Bool. (λy:Bool. λz:Bool. λw:Bool. false) false x -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. true) false ((λx:Bool. λy:Bool -> Bool. false) true) (λx:Bool. (λy:Bool. true) x) -(λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. false)) -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. false) true)) -true -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. y) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) false ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false))) -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. true) true (λx:Bool -> Bool. x) (λx:Bool -> Bool. λy:Bool. y) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. x) ((λx:Bool. false) false) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. x) (λx:Bool -> Bool. x)) -false -(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. true)) ((λx:Bool. λy:Bool. λz:Bool. λw:Bool. true) false false) -(λx:Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. true) false ((λx:Bool. λy:Bool. false) true) true -λx:Bool -> Bool. false -λx:Bool. true -false -true -λx:Bool. λy:Bool. (λz:(Bool -> Bool) -> Bool -> Bool. true) (λz:Bool -> Bool. λw:Bool. false) -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. true) false ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool. false) true)) -(λx:Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. x)) -(λx:Bool -> Bool. λy:Bool -> Bool -> Bool. true) (λx:Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. true))) -(λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. false) ((λx:Bool. false) true)) -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool. λy:Bool. true) (λx:Bool. x) -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool. λz:Bool. false) true true) -false -λx:Bool. x -(λx:Bool -> Bool -> Bool. (λy:Bool. false) false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. true)) -λx:Bool. λy:Bool. false -(λx:Bool. x) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true)) -false -(λx:Bool. λy:Bool. λz:Bool. λw:Bool. true) true true -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. false) false) true -λx:Bool -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) false (λy:Bool -> Bool. y) -λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. x) (λy:Bool -> Bool. y) -λx:Bool -> Bool. λy:Bool. x y -false -false -λx:Bool -> Bool. true -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true) true ((λx:Bool. λy:Bool. false) true ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false))) -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) ((λx:Bool. λy:Bool -> Bool. true) true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. true)) -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. false) false (λx:Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. x false) -true -λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. false) true ((λy:Bool. λz:Bool -> Bool. λw:Bool. true) x) -(λx:Bool. λy:(Bool -> Bool) -> Bool. true) ((λx:Bool. true) true) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false))) -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false ((λx:Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. false)) ((λx:Bool. x) true) -λx:Bool. x diff --git a/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt b/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt deleted file mode 100644 index 7bdef4e7..00000000 --- a/examples/qc/stlc/output/v2_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt +++ /dev/null @@ -1,200 +0,0 @@ -λx:Bool. x -(λx:Bool. (λy:Bool. false) true) true -(λx:Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. false) true ((λx:Bool. false) false) false -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. true)) (λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. true)) -λx:Bool -> Bool. (λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. true) (λy:Bool. true) (λy:Bool -> Bool. false) -(λx:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool. λz:Bool. true) false)) -(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool. true) x) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. false)) -false -λx:Bool -> Bool. λy:Bool. (λz:Bool. false) false -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. false)) -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false)) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. true)) -(λx:Bool. (λy:Bool. false) false) ((λx:Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true))) -(λx:Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. false) false ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false)) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool. true) false)) -(λx:Bool. (λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. false)) ((λx:Bool. λy:Bool. true) true ((λx:Bool -> Bool. false) (λx:Bool. true))) -(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. λy:Bool. true)) (λx:Bool -> Bool. x) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. true)) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) true ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true))) -λx:Bool -> Bool. true -(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. true) ((λx:Bool. λy:Bool -> Bool. true) true) ((λx:Bool. λy:Bool -> Bool. false) ((λx:Bool. true) true)) -(λx:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false))) -true -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool -> Bool. false)) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool. true) (λx:Bool -> Bool. λy:Bool. true)) -(λx:Bool. x) true -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. false)) (λx:Bool -> Bool. x) -λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. false) x ((λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. true)) -(λx:Bool. λy:Bool -> Bool. y) ((λx:(Bool -> Bool) -> Bool. λy:Bool. false) (λx:Bool -> Bool. false) true) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) true) ((λx:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true))) -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. true)) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true))) -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. false) true (λx:Bool -> Bool. true) (λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. true)) -(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true)) ((λx:Bool. λy:Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true))) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. true)) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) false ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. true))) -(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool -> Bool. false) false) (λx:Bool -> Bool. true) -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool. λy:Bool. false) (λx:Bool. λy:Bool. true) true -false -(λx:Bool -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. false) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. true) false) -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. false)) true -(λx:(Bool -> Bool) -> Bool. (λy:Bool. false) false) (λx:Bool -> Bool. true) -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. λz:Bool. true)) ((λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) false ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false))) -λx:Bool -> Bool. false -λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. false) x (λy:Bool -> Bool. y) -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) x) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. true))) -λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. false) ((λy:Bool. λz:Bool. λw:Bool. true) x) -(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. true) false)) -(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. false)) -λx:Bool. (λy:Bool. λz:Bool. λw:Bool. true) false ((λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) -true -(λx:(Bool -> Bool) -> Bool -> Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. x)) -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) true ((λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true)) true -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) ((λx:Bool. λy:Bool. λz:Bool -> Bool. true) false false) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false))) -(λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. true))) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. true)) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false)) -(λx:(Bool -> Bool) -> Bool. λy:Bool. y) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false)) -λx:Bool -> Bool. x -λx:Bool. λy:Bool. y -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. λa:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. false) false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. true) (λx:Bool. true)) -λx:Bool -> Bool. x -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. false)) ((λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) false ((λx:Bool. λy:Bool. λz:Bool. false) true)) -(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. λy:Bool. false) true true -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true)) (λx:Bool. λy:Bool. y) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. false)) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. true)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) true (λx:Bool -> Bool. λy:Bool. true)) -(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. false) false) ((λx:Bool. λy:Bool. λz:Bool. true) false false) -(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool. false)) (λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool. true)) -(λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. true) true true ((λx:Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. true) true (λx:Bool. true)) -λx:Bool. (λy:Bool. λz:Bool. false) ((λy:Bool. false) x) -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. false) ((λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. false)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. false) (λx:Bool -> Bool. x) -true -λx:Bool -> Bool. λy:Bool. y -λx:Bool -> Bool. λy:Bool. (λz:Bool. true) false -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. true) (λx:Bool. λy:Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool. λy:Bool -> Bool -> Bool. false) false ((λx:Bool. λy:Bool. λz:Bool. false) false)) -(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. false) (λx:Bool. x) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool. λy:Bool. false) false) -(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. true)) (λx:Bool -> Bool. false) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool. λz:Bool. false) false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. false) (λx:Bool. λy:Bool. true)) -(λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false)) true -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool -> Bool. false) x -(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true)) (λx:Bool. λy:Bool. y) -λx:Bool -> Bool. x -λx:Bool. (λy:Bool. λz:Bool. λw:Bool. false) x x -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. false)) (λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. true)) -λx:Bool -> Bool. x -λx:Bool -> Bool. λy:Bool. (λz:Bool. true) false -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool. false) true) (λx:Bool -> Bool. x) -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) false ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. false))) -λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. λz:Bool. true) ((λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. true)) -λx:Bool. λy:Bool. (λz:Bool. true) false -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) false) (λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. true)) -λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. true) ((λy:Bool. false) x) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false)) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) -false -false -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) true ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false)) (λx:Bool -> Bool. x) -(λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool -> Bool. false) (λx:Bool. true)) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) true (λx:Bool -> Bool. λy:Bool. false)) -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. y) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true))) -true -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. λy:Bool. true)) true -(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. true)) -(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. y) ((λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) false (λx:Bool. λy:Bool. false)) -(λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. false)) (λx:Bool. false) -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true))) -(λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. true)) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) (λx:Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. λy:Bool. false))) -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. true) true (λx:Bool -> Bool. true) (λx:Bool. (λy:Bool. λz:Bool. false) x) -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) false ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false) true -false -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool -> Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. λy:Bool. false))) -true -(λx:Bool. λy:Bool. λz:Bool. λw:Bool. true) false true -(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. false)) -(λx:Bool -> Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true))) -(λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. λa:Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true))) -λx:Bool -> Bool. x ((λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. true)) -(λx:(Bool -> Bool) -> Bool. x) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. true)) -(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. false) (λx:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. false)) (λx:Bool -> Bool. (λy:Bool. λz:Bool. false) false) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. false)) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false))) -λx:Bool. (λy:Bool. λz:Bool. false) ((λy:Bool -> Bool. false) (λy:Bool. false)) -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) true (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool -> Bool. true)) -λx:Bool -> Bool. (λy:Bool. y) (x true) -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. true) true (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. false) true ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. true))) -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false)) false -(λx:Bool. λy:Bool. y) false -(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. true) false) ((λx:Bool. λy:Bool -> Bool. true) false) -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false)) (λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. false) (λy:Bool. λz:Bool. false)) -(λx:Bool -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false)) (λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. false) (λy:Bool. λz:Bool. true)) -(λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. false)) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) -(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) -(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool. true) (λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. true))) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λx:Bool -> Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. λy:Bool. true) false) -(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. false)) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) true ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. true))) -(λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false)) true -(λx:Bool. λy:Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true)) -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. false) true ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. true))) -λx:Bool -> Bool. (λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) (λy:Bool. true) ((λy:Bool. λz:Bool -> Bool. false) false) -(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)) false -(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. false)) -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) true (λx:Bool -> Bool. x) true -(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. λa:Bool. true) true false ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) true ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. false))) -(λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. true)) ((λx:Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false))) -λx:Bool -> Bool. x -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) true ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true)) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true)) -λx:Bool -> Bool. λy:Bool. (λz:Bool -> Bool. true) x -(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true)) (λx:Bool -> Bool. x) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. false) true) true -λx:Bool -> Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) false ((λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. true)) -false -(λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false))) -λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. true) (λy:Bool. λz:Bool. false) ((λy:Bool. λz:Bool -> Bool. false) true) -(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true))) -λx:Bool. λy:Bool. false -(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. true) -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true)) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. λy:Bool. true) true) -(λx:Bool. (λy:Bool. false) x) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) true ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true))) -(λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. false) false ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. false)) (λx:Bool. (λy:Bool. λz:Bool. true) false) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false)) true -(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. λy:Bool. false))) -(λx:Bool. (λy:Bool. λz:Bool. true) false) true -(λx:(Bool -> Bool) -> Bool -> Bool. x) (λx:Bool -> Bool. (λy:Bool. λz:Bool. true) true) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. false))) -λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. true) x ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. true)) -(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. false) x) (λx:Bool. (λy:Bool. λz:Bool. true) x) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. true) false)) -(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. true) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false)) ((λx:Bool. λy:Bool. λz:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false))) -(λx:Bool. λy:Bool. λz:Bool. false) ((λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. true))) -true -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false))) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. false) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. true)) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. false)) -(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. false) false ((λx:Bool. true) true) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false))) -(λx:Bool. true) ((λx:Bool. λy:Bool -> Bool. false) true ((λx:Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. false))) -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. false) (λx:Bool -> Bool. true) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false)) (λx:Bool. λy:Bool. x) -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false))) -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. true) (λx:Bool -> Bool. true) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false)) true -(λx:Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false))) -λx:Bool. x -(λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool. false) (λy:Bool. false)) (λx:Bool -> Bool. x true) -λx:Bool. λy:Bool. x -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. true) true) (λx:Bool -> Bool. x) -(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. true) true ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. true))) -(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. true)) (λx:Bool. λy:Bool. true) -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. true) true) -false -(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. true) true) (λx:Bool -> Bool. (λy:Bool. false) true) -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. false)) (λx:Bool -> Bool. λy:Bool. false) -true -(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. true) (λx:Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. true) true) ((λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. false) (λx:Bool. true) false) -(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. false))) -λx:Bool -> Bool. true -(λx:Bool. (λy:Bool. λz:Bool -> Bool. true) true) false -true -false -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true)) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) true (λx:Bool -> Bool. λy:Bool. false)) -(λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. false)) (λx:Bool. (λy:Bool. true) x) -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) false ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false)) ((λx:Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool. false) true)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) -λx:Bool. (λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) (λy:Bool. λz:Bool. false) (λy:Bool -> Bool. true) -(λx:Bool -> Bool. x) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. false))) -λx:Bool. (λy:Bool. λz:Bool. false) x x -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) true -(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. λa:Bool. false) false true ((λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) false (λx:Bool. λy:Bool. true)) -(λx:Bool. λy:Bool. λz:Bool. λw:Bool. true) ((λx:Bool. false) true) false -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false) (λx:Bool -> Bool. x) -(λx:Bool. (λy:Bool. λz:Bool -> Bool. true) x) false diff --git a/examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/learning_curve_param_by_sz=true,epochs=2000.csv b/examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/learning_curve_param_by_sz=true,epochs=2000.csv deleted file mode 100644 index dd679118..00000000 --- a/examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/learning_curve_param_by_sz=true,epochs=2000.csv +++ /dev/null @@ -1,2001 +0,0 @@ -0 -1.164324889768336817765395270065151324652229424763360009858320885423779852711331 -1 -1.16435315855459338388880019438879519823883932190485293203554011659504399213695 -2 -1.164381416145504659583955050833936601756553798163324239840178504643262851050994 -3 -1.164409662546408511420830270385698581963419557959295594296542410500039888985174 -4 -1.164437897762640645005882376732040720882002422204246144732595397120997756545897 -5 -1.164466121799534563245347000780473581315890274616318186010631129297287578249032 -6 -1.164494334662421566532420018914200231101788851130087304023776415301821950704831 -7 -1.164522536356630752935538442160920346697930120622668991464851026346628376935555 -8 -1.164550726887489018387759562853614728966424086206883057814625216170364158392419 -9 -1.164578906260321056877236865836479837467940753708690780115510141008145205065513 -10 -1.164607074480449360638791211745445632054753530091551697088118094834938555134516 -11 -1.164635231553194220346575800371379485383811847223192530176000323531299480561858 -12 -1.164663377483873725307833422595148085103111631821737424292515083834658969078845 -13 -1.164691512277803763657744509867171972405598627656077480988090899004179387330825 -14 -1.164719635940298022555364490689957561512475376689614920454757856976960858758269 -15 -1.164747748476667988380648964050323054181681563676556976394412774171788351449329 -16 -1.164775849892222946932565200238641510917663983088718209456602200514802972339017 -17 -1.164803940192269983628288479985400377224337073780699082622990858459642625435649 -18 -1.164832019382113983703481783340715904710283377517910354477667544100593076717956 -19 -1.164860087467057632413657340220137073534659656270088228215459215898107764399599 -20 -1.164888144452401415236618555040120739697799690377069301568927538404007832787456 -21 -1.164916190343443618075980818368951727886789339939147079378624738509157068678744 -22 -1.1649442251454803274657697190236124025865806587425377457326147398089473303458 -23 -1.164972248863805430776095170550169816331056702200326239057267613995887232934867 -24 -1.165000261503710616419899966534638798449321612162508152224563606262047595621133 -25 -1.165028263070485374060781279702990259415286680993413222884757940732624281942047 -26 -1.16505625356941699482188362028299949870716688120095103212485963378186741811805 -27 -1.165084233005790571495861769616963376537872157390675651427328472098059652598246 -28 -1.16511220138488899875591220553295180539109623222851763728780189349792108290255 -29 -1.165140158711992973367871536503192104325536104765765703000955363480731395015798 -30 -1.165168104992380994403380462141408310713334557112008831740618185534282103405061 -31 -1.165196040231329363454111778116445538585625109743585962799586192671678297824441 -32 -1.165223964434112184847060944087295893116901509725176410884288985674444400449691 -33 -1.165251877606001365860897733794701284978450280980530140337644091951808349326171 -34 -1.165279779752266616943377486976833729272363575568844348604203204688677131238892 -35 -1.165307670878175451929810483311139359436945739212876096626626732204149738910422 -36 -1.165335550988993188262587959121272439795676422078679851388951616248307258770811 -37 -1.165363420089982947211763288127134129214643394971017804300170191953991650264886 -38 -1.165391278186405654096686848057361645568617977223803003069184210061452752626208 -39 -1.165419125283520038508693095487180824362951250364540918279356046140083866060092 -40 -1.165446961386582634534838371810332877940868473344733116970713478571610912155797 -41 -1.165474786500847780982687963801808472317796039218333295374955837916527158117946 -42 -1.165502600631567621606150942778363080007070127194801380446506538825972027468004 -43 -1.165530403783992105332361306916240977518525365381386537756950890440912589069159 -44 -1.165558195963368986489603951840195278925556467633719559911295476622795990338376 -45 -1.165585977174943825036283995154752080544409051379584108344256242074725927440375 -46 -1.165613747423959986790937981147722190039219075906682331981165924391111074292328 -47 -1.165641506715658643663285492457208085011338759682916604542084794586339380433801 -48 -1.165669255055278773886319696056780755387174335520282281596725213954314700238555 -49 -1.165696992448057162249435351479104999917844619253019778063348647644391772506565 -50 -1.165724718899228400332592809766066644291963443318883145442685225596197728464748 -51 -1.165752434414024886741516532203395106413449252472310060670158118940414027585776 -52 -1.16578013899767682734392665846987383822666278690833880612946838808097982466614 -53 -1.165807832655412235506802154405483513257289875978390719730232271293905144335606 -54 -1.165835515392456932334674070179222500229026687594206442102641978210978662775044 -55 -1.165863187214034546908947440215890266452055125496192860359362272142797980895865 -56 -1.165890848125366516528250356821795996202238430159143929881266142114589770980308 -57 -1.165918498131672086949808750032161000381516679903500751284833400306837865398472 -58 -1.165946137238168312631845406787913551065445524976035753026346050620087943357889 -59 -1.16597376545007005697700176313662272014697676502685579080396772147323280696189 -60 -1.166001382772589992576781003741477762583355799015784994402041900294856353502285 -61 -1.166028989210938601457011003573485694530092442756638956796074535528668129143622 -62 -1.166056584770324175324325647255426113079310791713932449445718480912454995484328 -63 -1.166084169455952815813663062121563130993088464923854769003846789457106322803403 -64 -1.166111743273028434736779301654663705740437026406534497930620082646722157246481 -65 -1.166139306226752754331776016561503781749519331800443379961522544193507629887067 -66 -1.166166858322325307513640651349752697964309328941092693773961139563819703619416 -67 -1.166194399564943438125797704872906404900672393579688411485129654819653434744749 -68 -1.166221929959802301192669593915785357262068941015954146500631035903409018211247 -69 -1.166249449512094863173245659501017676122824351432284162423038066661456579468884 -70 -1.16627695822701190221565785620688649054590688990649305832459362748561658111014 -71 -1.166304456109742008412761665398926459620662517519896630252590186878955281501688 -72 -1.166331943165471584058720773891702535165480887572134776594982854380914751601629 -73 -1.166359419399384843906594060173288251169354960811016923192045125192011660588059 -74 -1.166386884816663815426923430943075422433726504734390729389615947439483743830044 -75 -1.16641433942248833906732105133368631138491808507437655975097522067492781858112 -76 -1.166441783222036068513054512809917293808381404245420217022259431456198138508865 -77 -1.166469216220482470948628483361814042060362042463882874788753721511923651022351 -78 -1.166496638423000827320361385235156474505986170340892675728590356383774454324654 -79 -1.166524049834762232599955646070811424508205672947780821613604667702716118177369 -80 -1.166551450460935596049060069954586398883026373597376049862265042876116210025987 -81 -1.166578840306687641484822875511383167630135023809284616067967367855436845146761 -82 -1.166606219377182907546433948811599502898189729737314519003615941341712459543108 -83 -1.166633587677583747962654859493855420183932780994193261447142015411877059607955 -84 -1.16666094521305033182033518914622102901959129107021938028240264044502418680262 -85 -1.16668829198874064383391372162819083990456947581388459487416366637758964291495 -86 -1.166715628009810484615903045657678370733878899628001594294928646970693415809967 -87 -1.166742953281413470948356120631289426946249425392683558756276146659140696130334 -88 -1.166770267808701036055313357292066778281593132353258646789302496397837443612406 -89 -1.166797571596822429876228765506777410378142879898578229472250493171473732952742 -90 -1.166824864650924719340373722064630386199755564679349876886315056662913686773802 -91 -1.166852146976152788642216912061062910989400372336129906406091506981636587933192 -92 -1.166879418577649339517778998083908761414089761363315954665673126203425265531116 -93 -1.166906679460554891521960572074861126922488845856451117030420264551876950371723 -94 -1.166933929630007782306841945396655437018991533518623577394252958635082710402592 -95 -1.166961169091144167900953333295821235935854866679728128142482903284594877520738 -96 -1.166988397849098022989513990612179945667521582428565672118811529299669481644141 -97 -1.167015615909001141195638856249491764980725335790753350682938857338320418670717 -98 -1.16704282327598313536251126458677432715708286425089547781937217921834128344962 -99 -1.167070019955171437836520282676822430064633335686204868385195246819527795937961 -100 -1.167097205951691300751361232747346511782149449188245984376708264725633792728671 -101 -1.167124381270665796313097960190911932405550124767606353859358086270765665020873 -102 -1.167151545917215817086185407902495902751031234430158047259988580142877360721203 -103 -1.167178699896460076280451058497978444258813368209359839375148344585428543258075 -104 -1.167205843213515108039033806623242448252868165162018269490355754621824931046808 -105 -1.167232975873495267727278824241770109529105343919107632651914464007756664394123 -106 -1.167260097881512732222586982468683127687307164341405703607164322636241969934667 -107 -1.167287209242677500205217394201076494318342778773053106111380862850261240381431 -108 -1.167314309962097392450041642478234815714483183481833504785820406449496264901173 -109 -1.167341400044878052119248260190890365783456806426510491336981293681289464784375 -110 -1.167368479496122945055996027446077834913584784123805044901665898117730157373187 -111 -1.167395548320933360079014653583356456267025480913168356729829948406815760471975 -112 -1.167422606524408409278151411529200276002548220855820298480788875463276501325857 -113 -1.167449654111645028310862292869196218913415600118101392904850294868919925783216 -114 -1.167476691087737976699646252712331722619006510294127391502953760244883595532723 -115 -1.167503717457779838130421114118093514534563388321794159690085952711317015855131 -116 -1.167530733226861020751839702555331035190939934023235851431968111847202146594147 -117 -1.167557738400069757475544781561856523990227568005086426073072265032580360475766 -118 -1.167584732982492106277361361475553340154562614190591388497985372704226333546001 -119 -1.167611716979211950499424953811339159541669060687806705476045826785327434000017 -120 -1.167638690395310999153244344563675740355958766350382845726070634133907683100678 -121 -1.167665653235868787223697460421426466889468911028391333028793326336644138459602 -122 -1.167692605505962675973958902590731345720880214871763964979543641968063804316857 -123 -1.167719547210667853251357723632191034858860493448819635337333412427556689006521 -124 -1.167746478355057333794164023431021330860775534085020963945067512974803167560147 -125 -1.167773398944201959539302941132951825869333137363960109788510844277833792350915 -126 -1.167800308983170399930994620594491685834953694419849033719885658419223023874737 -127 -1.167827208477029152230318727613766209154425305397463565796251971413964832423585 -128 -1.167854097430842541825702097927434523967134931908468908105465287219540274130149 -129 -1.167880975849672722544328095680226001015574773008526550138462924007859742020025 -130 -1.167907843738579676964466262796375232109492616706951815135801885742844416223452 -131 -1.167934701102621216728720840406687292860998539742005880353591592794917403221596 -132 -1.167961547946852982858196744211121019734070685938381977570010066083309499220472 -133 -1.16798838427632844606758157638463273906344294396443129630509613941442221523359 -134 -1.168015210096098907081142257363570849275684360803305928044325655537661865751224 -135 -1.168042025411213496949634861581147443073203548076002062091248152159634774094148 -136 -1.168068830226719177368126241953431336065885405108149083192460283680691989806765 -137 -1.168095624547660740994726028651902020772338214019555335260734273808521745507405 -138 -1.16812240837908081177022758843487077486091608447376465392845835947825584059241 -139 -1.168149181726019845238656531548008011046794480029502320857399913605915498746934 -140 -1.168175944593516128868725353943809560590766550003945355044243811869250242177048 -141 -1.168202696986605782376192803311083536550675249553738288847145577855983597603495 -142 -1.168229438910322758047126558148438336826131641590002785720135011361909929743305 -143 -1.16825617036969884106206780986029583694483285045328514233136547909498136617038 -144 -1.168282891369763649821096338600136511131325496444867373819252033783745030237964 -145 -1.168309601915544636269794674333499736485535149422146119593881860609001711980356 -146 -1.168336302012067086226109935342707514438569294950162794593300551033466100849074 -147 -1.168362991664354119708111937146347927766168811658593670680562075366673091140244 -148 -1.168389670877426691262646165559240488412335666299391690328557124847072838407496 -149 -1.1684163396563035902948802083729037756697179148620817307301290297937486458972 -150 -1.168442998006001441398742240892451076726224605236079589865639831136373321931459 -151 -1.168469645931534704688250161323346789458580258064154678419134772185204721822395 -152 -1.168496283437915676129729972760559804273373741573319713789608061479680423908555 -153 -1.168522910530154487874922009293344627813749294189801001164005546740610514898629 -154 -1.168549527213259108594973604501161332931304752876581605631223966428643620987466 -155 -1.16857613349223534381531680138010620935901418963603563233486192907616314185951 -156 -1.168602729372086836251429703504660947335958280157681991849011945408838217790166 -157 -1.168629314857815066145480067996574017792946219560008403885944165317226658551151 -158 -1.168655889954419351603849741641258329822920103138175287296671201679885801860421 -159 -1.168682454666896848935538542262218967700819256215601297959181784663983853701263 -160 -1.168709009000242552991446188235708560817808571914867853365781065173584335392697 -161 -1.168735552959449297504530879801040352159515313306444401710925305214155416128724 -162 -1.168762086549507755430843136596765042471424367585676989672050138012270456769704 -163 -1.168788609775406439291433496629231742587784453186729780698301876550905028157258 -164 -1.168815122642131701515132682657900616618331680904756396857312923402181441739716 -165 -1.168841625154667734782202842761149801356400275597756094494669975255279729449099 -166 -1.168868117317996572368858472627216706467945465963889998536624180645635984766329 -167 -1.168894599137098088492655627897328606335116928602638055910477290145395147155794 -168 -1.168921070616949998658748035672004304975042748530774967289666052347078117721455 -169 -1.168947531762527860007008715076942373879586618587141286196954924560811520776178 -170 -1.16897398257880507166001571757184681910770017684577904085744129169723393691199 -171 -1.169000423070752875071900598473972825235804837099572367429780568852843971198754 -172 -1.16902685324334035437805823195809825311208135102961473374622755369168483430794 -173 -1.16905327310153443674571658258603564560468017053773701537619561286456916001777 -174 -1.169079682650299892725365047211689437083973019474498836630009250953139078824917 -175 -1.169106081894599336603039981902028691209330972901253156980323934521442377152396 -176 -1.169132470839393226753466029310181837254547627435350299834949625369281041469039 -177 -1.169158849489639865994051862734161373841327697853924452165816145381863289738402 -178 -1.169185217850295401939738963893488203287625526214332935143405656240142113234441 -179 -1.169211575926313827358702052256201999145978371027864791303688124361042873083318 -180 -1.169237923722646980528899784550410649840297269244171233102352613832662133282047 -181 -1.169264261244244545595474343897643225153271826337011848724708293718884284196508 -182 -1.169290588496054052928998538809821948833860529757569583839127465043325565192655 -183 -1.169316905483020879484569033097654205572662282232738400304630703296540226329011 -184 -1.169343212210088249161744328545660546450081527038862426461320598307605345449647 -185 -1.169369508682197233165326123017893872752486563612305934267579326858205963540158 -186 -1.169395794904286750366982667468663369472130907765252564743476303106076364654238 -187 -1.169422070881293567667712746144249229203390723554153991683761383896619394796247 -188 -1.169448336618152300361148905074675663521640467448721512379000796587045120268657 -189 -1.16947459211979541249769855476909505794342881100202909271646497234358452050859 -190 -1.169500837391153217249521573844220310545836214321574646691246858729384460405834 -191 -1.169527072437153877276343041132520332269881623396126769244560936902145673368507 -192 -1.16955329726272340509209972463556031452686352293209766836748419071802313588534 -193 -1.169579511872785663432418956507918629330954521715895831996927330485470685225254 -194 -1.169605716272262365622928524078541067849408961441351369207510882435603322271657 -195 -1.169631910466073075948396207739195500742015471965824707538964027651032191023906 -196 -1.16965809445913521002269759735386092040356626302824996869887410667567703673814 -197 -1.169684268256364035159610819668419170383285370251556439339230778769150181729238 -198 -1.169710431862672670744436810026910456701512635886048600371967928861571541723483 -199 -1.169736585282972088606443762528859952102030119457257310913460623595784570708134 -200 -1.169762728522171113392134393591777436776543666542594208978990166265510042442053 -201 -1.169788861585176422939334654713869963812341604093019115241744893525196805202097 -202 -1.169814984476892548652102531064283997314680186264351169330607316222314994759559 -203 -1.169841097202221875876455563361803355350101789604609974489463067602567142441714 -204 -1.169867199766064644276915731337867614797394661705503210186959346425868838878566 -205 -1.169893292173318948213870337916037423879655183006118123370364373548200428723976 -206 -1.169919374428880737121747534077613450338026683799760782764303818356859424583683 -207 -1.169945446537643815888005125222009505407952349211690150103463241898063402865004 -208 -1.169971508504499845232931300670682769248576235140844758470697035448342870628951 -209 -1.169997560334338342090255928804930052300092923779421319625317604600662922425525 -210 -1.170023602032046679988571061170663716020481889372679598732761661507720819985795 -211 -1.170049633602510089433559289727379309178282249626397699251888578171665761631509 -212 -1.170075655050611658291028602263914222730698851116882991758709649070706018278809 -213 -1.170101666381232332170752381850267804462577064912194234605488792551224024631907 -214 -1.170127667599250914811113197042703487959794803064327240878694003626737816852719 -215 -1.17015365870954406846454903040857766989504894366232439333634356699452252597494 -216 -1.170179639716986314283800593787833412570500100338143172938758896111729676129862 -217 -1.170205610626450032708958379559854659551348463349573967308231112324672364287284 -218 -1.170231571442805463855308098037393642208014934878419234288789125816567316754616 -219 -1.170257522170920707901973151963555642047204226165907046890552163099174426959746 -220 -1.170283462815661725481352799943346382657154503416775754491126535214935514725344 -221 -1.170309393381892338069354661498053187545899017055317232627358279782450664349426 -222 -1.170335313874474228376420217288736794566264063737624325623649651964002835388017 -223 -1.170361224298266940739341958914351509281430450161999979367106498902682542729628 -224 -1.170387124658127881513870843550482360649030313033603937228641722213271718384579 -225 -1.170413014958912319468112709556384251747807771203615443286018232353807004618253 -226 -1.1704388952054733861767123100409249417397113249606245735641025605053715072856 -227 -1.170464765402662076415823622242166225499697430677858001205032537473971711624523 -228 -1.170490625555327248558865091440661073854082481855787203120468679785684541218039 -229 -1.170516475668315624973058468993093946499159443734358940181201731993659774249291 -230 -1.170542315746471792416749904940642184636536318630156084102224446786252195234205 -231 -1.170568145794638202437511956515383531233877478124615493413092683762768308547042 -232 -1.170593965817655171771025174738213620538801173393749692659207389002626725368645 -233 -1.170619775820360882740737932173062938848331113095410357499812697624731066684945 -234 -1.170645575807591383658303155774710506248163013310575674810937745152680135005223 -235 -1.170671365784180589224790629641176591643170775036395858657525377031121647479909 -236 -1.170697145754960280932673533356534385341024033154090650319459415627116717680299 -237 -1.170722915724760107468587882486005956045816657608490912467774927066876908432825 -238 -1.170748675698407585116863538662396260576191618791755524203222532039625413235952 -239 -1.170774425680728098163825457581265710040564229450245298740835425290139247962119 -240 -1.170800165676544899302863844101742087571927958334039284038228849620795630824863 -241 -1.170825895690679110040271884530521728934089104537099529276461087009848974210841 -242 -1.170851615727949721101849727048403094147381059055822360211100275091183058280399 -243 -1.170877325793173592840273382121628458435086051848688447015389713941819481796608 -244 -1.170903025891165455643227215624376723857911799453262523752244720809545499075027 -245 -1.17092871602673791034229870828394759548776398325374291041040179723223376472864 -246 -1.170954396204701428622634155946499881290391225764598989865802965238827860878005 -247 -1.170980066429864353433353986048649773370688368853493526411246395414131674245172 -248 -1.171005726707032899398726366568793967133598907557264181858704509724984620640933 -249 -1.171031377041011153230097784621692698397202779127198187288401047713008472149236 -250 -1.171057017436601074138579272750624557655510429378306762005502933554946555944199 -251 -1.171082647898602494248486961863303613545497224941724421107486334538626463615512 -252 -1.171108268431813119011535640650725289073470724939869279605269937804808834815442 -253 -1.171133879041028527621784002222175936178752364505916591194447499402265825715109 -254 -1.17115947973104217343133025958479750557057192843462205299768481245097473257927 -255 -1.17118507050664538436675681249233847521617340009324019739801750651428098216849 -256 -1.171210651372627363346322649085040655072528030511847525798506136804879783425003 -257 -1.171236222333775188697902166641004007270269531051873665342690903148671119252919 -258 -1.171261783394873814577669096658833596549849429793076113135625949537688353019246 -259 -1.171287334560706071389524220391899608835977729689580501307189639686773579747837 -260 -1.171312875836052666205265561856128446885176375777312740601805601497841545373956 -261 -1.171338407225692183185499746235885638371501139758966240044593727472947162198738 -262 -1.171363928734401084001293212516205087958932740820497050569528924450596685116461 -263 -1.171389440366953708256561970074359492172508591354297200599543460713628327951545 -264 -1.171414942128122273911198589869548942508157894554657222336971030022307283301519 -265 -1.171440434022676877704935121776304303456982259611046803326299644257918152339421 -266 -1.171465916055385495581940630515054310168370177713850763874617938141553563590342 -267 -1.171491388231013983116152043542185934506230709782751616344117193328853843289365 -268 -1.1715168505543260759373370051718318743975181732440137589399273283340435484604 -269 -1.171542303030083390157887432112542492733092689683759274616239997583538462750217 -270 -1.171567745663045422800342466513937638727936284738240897243708705553878421017411 -271 -1.171593178457969552225639523531382003621868473055406225056260198843794761567259 -272 -1.171618601419611038562092131330681477916929221965553749100427812886289465348737 -273 -1.171644014552723024135093262369752879991699556492360833680474694128673894503766 -274 -1.17166941786205653389754285571017091387029940938725080286595804970299900524426 -275 -1.171694811352360475860998231028439792096674469840829707397474412136420048362448 -276 -1.171720195028381641527546095914768139994435297378211550816841569905910859587383 -277 -1.171745568894864706322394848966040098981209745953741109055237653954301670442835 -278 -1.171770932956552230027185882099568494938876999577089614227682065753906555090582 -279 -1.171796287218184657214022586435083065785690206942095190342323391993814964771275 -280 -1.171821631684500317680215767014243590206964551613863925875988892789182768990507 -281 -1.171846966360235426883744172549769873818161913224748479210164337320503751784381 -282 -1.17187229125012408637942884732004348368628162890248719275561735295745650960885 -283 -1.171897606358898284255820013249755437940184792559005084648860309984643119563749 -284 -1.171922911691287895572795191142845321966075435672349756924796276178581596091637 -285 -1.171948207252020682799867270960596091210801283323828279314769315525935944992723 -286 -1.171973493045822296255201241965310714695773755351595153819611289962529201292691 -287 -1.171998769077416274545338294478497401765003624243876579796605398099395865950688 -288 -1.172024035351524045005626005931925033133952318826496796824488070342223656865481 -289 -1.172049291872864924141353324820275188749676117562074702112332206054144919693998 -290 -1.172074538646156118069589067095407439092270869638712210507409352417444784242568 -291 -1.172099775676112722961722640474465960116151493933390332526993107482550748401808 -292 -1.172125002967447725486705713067183668819439308533164406789885393615257083176848 -293 -1.172150220524872003254993543661780587212737807161760498995230645745526223970097 -294 -1.172175428353094325263184691943801665007577253643021745237371401008652978642113 -295 -1.172200626456821352339357827858091470433975661679904376159023352116976664720323 -296 -1.172225814840757637589104360260854646002269231210611812421015462293133824684784 -297 -1.172250993509605626842255605946397480525878375917863324054337724029141369060507 -298 -1.172276162468065659100303221071683036101825614208985197717663762182979746950055 -299 -1.172301321720835966984511617941255661791619712013296219010861129159703969233532 -300 -1.172326471272612677184721091055396104248339361027123461503682158297583875420232 -301 -1.17235161112808981090884037726555147629346407655266064635721327689637464939015 -302 -1.172376741291959284333027375823140761262086239429079794468500572531465223473725 -303 -1.172401861768910909052556755050762014616733705255796842531430965948893693662954 -304 -1.172426972563632392533373173308617682693955066253409031078248917140158995482488 -305 -1.172452073680809338564328842873625206316947333952151705329474673205043097562244 -306 -1.172477165125125247710104166294187036212115987633849560294402254092292233157043 -307 -1.172502246901261517764810175729953086545527090271864772979133191734319103302994 -308 -1.172527319013897444206271506733115228292677675004269838304689702856397804675738 -309 -1.172552381467710220650988638875823418425992161516884885029858268331535180641977 -310 -1.172577434267374939309778136577202223911430435077115373321864667329638261569844 -311 -1.172602477417564591444089624433170588119554301343192122921094991170348534606062 -312 -1.172627510922950067822998232302822465356939517545522585188714308660806188332269 -313 -1.172652534788200159180871246356507187699210826579146887053375877394974824056512 -314 -1.172677549017981556675707703242951905054187941640787608923660647897473293580659 -315 -1.17270255361695885234814966548578993930831952734546217560865924787734183039149 -316 -1.172727548589794539581163917173694208426044945469420287448953520585081507758374 -317 -1.172752533941149013560392819962959805402802402318999282376494920233357444781677 -318 -1.172777509675680571735173070366830165949359665139388822424145066554621847571801 -319 -1.17280247579804541428022110026211284064749666747084684664984924658867614248486 -320 -1.17282743231289764455798386350067952201238602694109473616557548741183363432507 -321 -1.172852379224889269581653752471286491380675375553367573073022440963443057669259 -322 -1.172877316538670200478846389415781878778182824598751163888558784432230672054227 -323 -1.172902244258888252955940038263180911877396499611368133558242650283851280618762 -324 -1.172927162390189147763075383705285515809603923093265107510609502949217272556058 -325 -1.17295207093721651115981442519849606893291937019366238285126872866611053339767 -326 -1.172976969904611875381457234538206682665220394175308316427619150714784108221309 -327 -1.173001859297014679106015326614686925165117369883291072939233974476373826973118 -328 -1.173026739119062267921840393922628324984704439687707633020231184588966444334267 -329 -1.173051609375389894795907156360569154829653485081243268942212071809447360403418 -330 -1.173076470070630720542749078821201797253850460936481894946089120086774916144322 -331 -1.173101321209415814294045710039109330499218298353618858267175795060846979490978 -332 -1.173126162796374153968860397128767747781303784821799051803194340525635146344354 -333 -1.173150994836132626744527131212683348134322404641348378148256282046967681720828 -334 -1.173175817333316029528185280507307229483643222322962533303372039537916789479108 -335 -1.173200630292547069428960968202876399927680072056599758821538281447723912648835 -336 -1.173225433718446364230793853442569733303103973101149413793520677467231770833518 -337 -1.17325022761563244286590807467633276899438878417422617997045987533568568458544 -338 -1.173275011988721745888926115635414139646183299731062054804465115195736240147401 -339 -1.173299786842328625951624355145064156957256313398814427449763761951318039642453 -340 -1.173324552181065348278329062964968755086392384450368873283091492671293499057061 -341 -1.173349308009542091141951604819825550387478756782782466510292765099232594270631 -342 -1.173374054332366946340661620756009199211214632469573267582246501654313727233974 -343 -1.173398791154145919675196941934516503355692363335865222935933951173817243671136 -344 -1.173423518479482931426809011945323813400973986956415921148990015082678581537672 -345 -1.173448236312979816835842579703926208598162706880312381537349993999413982140141 -346 -1.173472944659236326580948431967155690165669148923977460257669223743717909966107 -347 -1.173497643522850127258927934482390221727414783164627989482882588987131373714131 -348 -1.173522332908416801865208151761962902150101832955447883017483253997956839402301 -349 -1.173547012820529850274946316452956885126149197393545946753659581482802678572268 -350 -1.173571683263780689724762420251622896417142147288878128114205285685946072493833 -351 -1.173596344242758655295098699291378380615005490843582318530645953817494927176243 -352 -1.173620995762051000393204787913736478472213384659701949596736568220702493867207 -353 -1.173645637826242897236747315712565244156731552673564126787372516756972873335159 -354 -1.173670270439917437338042723723788817040080648991707751368617701003008627104174 -355 -1.17369489360765563198891207661500872964398840296293139619561146587615695013487 -356 -1.173719507334036412746156648712541233945200054393216673435712374827803792507098 -357 -1.173744111623636631917653062687031541136823995976925025866462941919327809418341 -358 -1.173768706481031063049066760703114280909281564237645386023039098193126745706991 -359 -1.173793291910792401411182588823537388057600160981159030594330216119051481645845 -360 -1.173817867917491264487851276443750116427830672085045233358527539789958367907537 -361 -1.173842434505696192464550593519171069535829033829514098455837718713201254310824 -362 -1.173866991679973648717559969334195137245535484118798150299920304221712797915444 -363 -1.17389153944488802030374735754946515926549085272822540009068834539088014135643 -364 -1.173916077805001618450967133252021126459439275995488585426155322849987264798269 -365 -1.173940606764874679049067808721642914579010739914779704404190336588348357935763 -366 -1.173965126329065363141508355616018063483113163569426771847545220624085567005985 -367 -1.173989636502129757417581922267290116637338039725927501427568489651422001672197 -368 -1.174014137288621874705245735773071676071156095736259684745139724207134797315041 -369 -1.174038628693093654464555979556135769349019916189026398802185678504716980956365 -370 -1.174063110720094963281706438058725536774142322781717562908600955417745153117572 -371 -1.174087583374173595363669701229741805231531560019434951950990301535486607670627 -372 -1.174112046659875273033439722455977002979092556657848767829486721909609397849126 -373 -1.174136500581743647225874524582058277447879463376183736758309907170652875730042 -374 -1.174160945144320297984137849657838802794854726688961881349630421045311121447855 -375 -1.174185380352144734956738549046630309585942752822893593572621058770734922864664 -376 -1.174209806209754397895166511522898046536029160913616220501960563697904287297528 -377 -1.174234222721684657152123927983837911596061819060574769169352225464792927269896 -378 -1.17425862989246881418035069239562059169152930033329470265536230423336330157807 -379 -1.174283027726638102032042739592015458850842696815433181712847533736633841743339 -380 -1.174307416228721685858862121540593924017343403258113558751684621796342978786247 -381 -1.174331795403246663412537624689754194144640964918979891406501295671861612229408 -382 -1.174356165254738065546054732008403165788306584295384644768173233443457826813884 -383 -1.174380525787718856715433734329272778808545177270512731761202292356153808130538 -384 -1.174404877006709935482094796606533813391292180214230002864887935371292240374222 -385 -1.174429218916230135015808785698596115701799353733673646722647016560920614925332 -386 -1.174453551520796223598232667287746862344948184577325178689446711152641076324851 -387 -1.17447787482492290512702828054957400857475937807589455436056912739415465211804 -388 -1.174502188833122819620563300186946803938604551108501929064319761784969787954805 -389 -1.17452649354990654372319319644567550273596271900498461995393718187900736281167 -390 -1.174550788979782591211123004731844453200886357164140883748493449419207176188027 -391 -1.174575075127257413498847717454202933469959886983288629080178397861208954817859 -392 -1.174599351996835400146170111718902735863779547993034973821442354661255926279743 -393 -1.17462361959301887936579482750828691237958168631959306608385967404574766641307 -394 -1.17464787792030811853149751198035661905205317884348731062687293182745854088915 -395 -1.174672126983201324686867846530968977369074794425753126392191190999518371961627 -396 -1.174696366786194645054625274266744656501006467698877482916996060282384729334911 -397 -1.17472059733378216754650624654308582687653775708951275588228180090466262728842 -398 -1.174744818630455921273721808228619606661323637027582546109261096648139154978593 -399 -1.174769030680705877057984342364785487896842035728869178243628229475652116354418 -400 -1.17479323348901994794310229589717386524556315277746360584843001079950746705493 -401 -1.174817427059883989707141709163593081151353606303400787921593691140548308107024 -402 -1.174841611397781801375153372832690737322231981437271198930636514489346044906018 -403 -1.17486578650719512573246443699627780120885387196993991074396084250356361495847 -404 -1.174889952392603649838533298128297661887727572803661964327750479042686214509145 -405 -1.174914109058485005541366590633643173630057963986836306870324383080011250749643 -406 -1.174938256509314769992497110720749285474820601619030131894071892863641837944412 -407 -1.174962394749566466162521501343073516217315867707942678626781435874875712159489 -408 -1.174986523783711563357196527966217728117730325726007659747115176965403567240124 -409 -1.175010643616219477734092775929538817927299372432676925831618481654883871712749 -410 -1.175034754251557572819804601183639525972052483530417056846669546464009321800899 -411 -1.175058855694191160027715167198120015322600352407878930138685364780891829150192 -412 -1.175082947948583499176315401847402652653845240525224855520055606920534997754156 -413 -1.175107031019195799008075709096312996242613973829976571176999837458977855963897 -414 -1.175131104910487217708869271321405837483467833105163178430036222062682153986013 -415 -1.175155169626914863427945779118762729977227499560661005256534078231203888540081 -416 -1.175179225172933794798454426464153261148145435647406465608820196374163060234486 -417 -1.175203271552997021458515010107042868787143449275067111825024446498992692884637 -418 -1.175227308771555504572835973095941779037674970174101852678061250000147377769428 -419 -1.175251336833058157354878233349019150096378274958357098338605586162473418812982 -420 -1.175275355741951845589563639200750261069443296612006644620334495788389417452193 -421 -1.17529936550268138815652689487261910859868902822697426193043619614859618260002 -422 -1.1753233661196895575539097998335605924509743356530602754132268926723210749082 -423 -1.175347357597417080422696647033892119460597001565580602922934343479194419659743 -424 -1.17537133994030263807158962601495047404078086768087815355724535486618747976761 -425 -1.175395313152782867002423077915512740751873370564348391112074177143721583763057 -426 -1.17541927723929235943611545041533647474227771353101627226631994034659123789919 -427 -1.17544323220426366383915780167580076066882049871320677003265947857186759124146 -428 -1.175467178052127285450637703357662848151625188051619715649464197003068503541033 -429 -1.175491114787311686809797393816361276906471182061354616906587973976729405368514 -430 -1.17551504241424328828412503359609238918972371678040705515340390469091226309894 -431 -1.175538960937346468597977916365059459631042478117202758250576285181575793249848 -432 -1.175562870361043565361736489455838948236534733438092211995261128733314986233844 -433 -1.175586770689754875601488039196723203410933424867380954253205814740464880930911 -434 -1.175610661927898656289238897242179917130959912516215898079592294340758660220848 -435 -1.175634544079891124873654025133212379526827534798988822942467207733872753527184 -436 -1.175658417150146459811322835341407717478987641196671610324565281632330818304215 -437 -1.175682281143076801098550108073819460553635514144424388649509811351962287611888 -438 -1.175706136063092250803670864139542593577076837159038587325954474974116720754362 -439 -1.175729981914600873599888055202900371028841892353280547602387381811035985395671 -440 -1.175753818702008697298631933772569233604737858592344814102310479122826209352767 -441 -1.175777646429719713383439966300717837893555763991207787259206685054220626329687 -442 -1.175801465102135877544356153791325148992089018038899614803603788310952848779186 -443 -1.175825274723657110212848625342267422653219599066208500298215295366777504202217 -444 -1.175849075298681297097244371071521394551429148882220102193494898572107731196818 -445 -1.175872866831604289718679981903917782515159428418170277545685590368102273500426 -446 -1.175896649326819905947567264721291982893563603901142174646482846041339843044636 -447 -1.175920422788719930540572602405614301091536313447623323250887674319251185072677 -448 -1.175944187221694115678108929331736901930215143969398656118057507101500518739272 -449 -1.175967942630130181502339193893765607788617315704210033641611963725996046673689 -450 -1.175991689018413816655690180676748428079308687209992640361181933619768147577637 -451 -1.176015426390928678819875565913365995831865964909194216901930742245944062558792 -452 -1.176039154752056395255427080893608646024391013279320936782964499968911957797753 -453 -1.176062874106176563341732659024027432530448166315566106658713850756001005846745 -454 -1.176086584457666751117580443262048689540295406588072308833110225819637189484965 -455 -1.176110285810902497822207531680040549159532503529843977307992478861153386271075 -456 -1.176133978170257314436852339943311886354022393070447900294829483075744706603224 -457 -1.176157661540102684226809460516006238942001492116990111212630465993794406438226 -458 -1.17618133592480806328398589943892211404937238969411295300088998065289335596532 -459 -1.176205001328740881069957572553643520126515996119522212532161604865380181218781 -460 -1.176228657756266540959524944077997338722059701794587521172661463889875414597373 -461 -1.176252305211748420784766691468764062827291138427739690162149596857711497531519 -462 -1.176275943699547873379590281538752275505263274669350131773702210441673118083677 -463 -1.176299573224024227124778343826801827112219783667726777784666010141007237028908 -464 -1.176323193789534786493529728251002801762679726473856095144522907670686486530725 -465 -1.176346805400434832597494135107403860481613596693326248640047581106559556693562 -466 -1.176370408061077623733299206508731233062790084173456817137528652681256243967119 -467 -1.17639400177581439592956896939014533297919970609351408567943773065184634364678 -468 -1.176417586548994363494432521241822526365064137590391893264134990127761662604105 -469 -1.176441162384964719563521850761161840328383075383699442232363013676999355826964 -470 -1.176464729288070636648457686650677197496262346059127415550188300530058298922819 -471 -1.176488287262655267185822268821141969194816007614620233460397817961417315021924 -472 -1.176511836313059744086617937293301112083484540945307724078600786180583501448069 -473 -1.176535376443623181286210435125453762067653715965137633761913506025455490060815 -474 -1.176558907658682674294755822728432781171631411961583143368614795297903199227992 -475 -1.176582429962573300748109901963964270630498293324097239961313931619046915544745 -476 -1.176605943359628120959219049457076366209621527603645036800838025717216172790361 -477 -1.176629447854178178469991359588139615726944850676093281140777821665402371789377 -478 -1.176652943450552500603646998665257806559801387631613623961490050106828549896777 -479 -1.176676430153078099017546672813085171766512664929246746521904400960865567657896 -480 -1.176699907966079970256497113149720373117605052837244974584737830523187972795141 -481 -1.176723376893881096306532482859116460154107793497788050322446817981356387259756 -482 -1.176746836940802445149170611802446065276192713167081849610428633166610861633056 -483 -1.176770288111162971316142965348069351277772898472519422242497657151959135929773 -484 -1.176793730409279616444597255136165621698491983286058169976946028042425377105085 -485 -1.176817163839467309832771600530704984429379182637189719885493416088082647833066 -486 -1.176840588406038968996139150548250980291724914694038814683647206608226019099181 -487 -1.176864004113305500224022077090095612458830185602667904152592370698884818167312 -488 -1.17688741096557579913667385134143170778967887964813598105841460650241092446186 -489 -1.17691080896715675124282871623866098210395375512016480303442112625514101926202 -490 -1.176934198122353232497717268943516549385125151108840571958460817215814056555969 -491 -1.176957578435468109861547068300442897607894949442428250113056033400138977081408 -492 -1.176980949910802241858447183291621545617780532156737281111382526248298346452765 -493 -1.177004312552654479135875599542153697023200360919565035104184474018296135541295 -494 -1.177027666365321665024488401966209225677632958523581281555275618558732308307244 -495 -1.177051011353098636098469652683421276814247207062123509115106283290747041016263 -496 -1.177074347520278222736320884373444668525224278930748155381062549900298298798525 -497 -1.177097674871151249682109130275401156819543422365664883413965486497288140618063 -498 -1.177120993410006536607172413077902517197308830748855745115735731703251798534595 -499 -1.177144303141130898672281615984470336275986427767555129789460890437241331257421 -500 -1.177167604068809147090257660278456444698542738535419472020820445398577909045533 -501 -1.177190896197324089689042914751007110018773935228300559495705578700333755297813 -502 -1.177214179530956531475225763395204504632284653884109023905588860927831745975565 -503 -1.17723745407398527519801725880925763469853739922178780282689627221380509130603 -504 -1.177260719830687121913678789791498933429601053387778155065769924976482380938947 -505 -1.177283976805336871550399692649969164602494797088841534359924102755816951502438 -506 -1.177307225002207323473623736789539234625319066976501989996455091614214271309302 -507 -1.177330464425569277051823416179820065331589075818327839231227864439685438310352 -508 -1.177353695079691532222720979347547932703936375414203673640975846452191213493094 -509 -1.177376916968840890059955131577699733176659606625863487832766218183905731725268 -510 -1.17740013009728215334019234404828760969769773427676340909158744304488641409858 -511 -1.177423334469278127110681705664602371422561736660459397670381591583707791778874 -512 -1.177446530089089619257252254399617297255266627208019768602977446972382841520266 -513 -1.177469716960975441072751725988325354340285061584731178286891183167128001327127 -514 -1.177492895089192407825925658864960724341846681300311613342504386719846279297889 -515 -1.177516064477995339330735795273346955614949517095960750769589562556861038195827 -516 -1.17753922513163706051611671952201619725884220536552407152586103921023458095559 -517 -1.177562377054368401996169675397253977015897951727297082337884389644159470323909 -518 -1.177585520250438200640792505788839020883558221978877571390890623071446361629596 -519 -1.177608654724093300146744658624964846365187820605399481308032913117806087819735 -520 -1.177631780479578551609146204254646468086616794997430236199956668668553167956123 -521 -1.177654897521136814093409810457828715001312776940145783237770873165372905480537 -522 -1.177678005853008955207604622305419559908628392890302841505782535254188588021792 -523 -1.177701105479433851675250995133569698178652436608769267574627831941769624763442 -524 -1.177724196404648389908545029938705583422764489230585221400862719770885605049767 -525 -1.177747278632887466582011861542094439721094562654055453821494755819067276368547 -526 -1.177770352168383989206586650915073635602377104634590303639234415930723128472385 -527 -1.177793417015368876704122234098510443283883848900168464618027695708091923274707 -528 -1.177816473178071059982322381192568843059450807104248908248412211494254321264008 -529 -1.177839520660717482510099619935444898831241267215669713957169600787581757539381 -530 -1.177862559467533100893356579432388564588310766924363875176117555968925338302983 -531 -1.177885589602740885451189810639054827422499983204765080589852209914428673717021 -532 -1.177908611070561820792515041246018101022032100132735683254676274877410160998731 -533 -1.177931623875214906393112823654138011374268738002455980322647935994120647997879 -534 -1.177954628020917157173093535773379426811050907525931712264124931620772336764669 -535 -1.17797762351188360407478069542066204699775389413638854597358284443044366381503 -536 -1.178000610352327294641011550135342355734940834049603652121919078837122048579728 -537 -1.178023588546459293593853905274010542517426902511393284106734649145253083245635 -538 -1.178046558098488683413738154289414395955868840010343536381946421537811498366223 -539 -1.178069519012622564919003476141498462949241353778047676888912435489010318869475 -540 -1.178092471293066057845857165831767251697948396878230511341908205967339788983977 -541 -1.178115414944022301428746065095443241312915450960908306534740923113141198163564 -542 -1.178138349969692454981139061329191259197002036206141248610782360280480087423024 -543 -1.17816127637427569847671962387551771908197728247965452909736889905016994088833 -544 -1.17818419416196923313098734782832360336117024415206592957575477273978176269121 -545 -1.178207103336968281983267476567491255156527727064727085629169904638626405071666 -546 -1.178230003903466090479127375273814356612884293800569212830760392142796816692667 -547 -1.178252895865653927053198928719035254651547562862726204328606323425448827718959 -548 -1.178275779227721083712405837669231404479831790232848551868113814018592485105151 -549 -1.178298653993854876619594789283290491387306441850507131721071185295230039357391 -550 -1.178321520168240646677569477931729125806128965643286281950834955605902062361962 -551 -1.178344377755061760113526453904640254507371267946418564991774547635579330072824 -552 -1.178367226758499609063891778521096967569898863202142218595501908171008904025896 -553 -1.178390067182733612159557465195892587996079076056919223290400020843946811115459 -554 -1.178412899031941215111516687063056196337198126340388162259507853906566626849483 -555 -1.178435722310297891296896732799146460377692680682296063279519583569967324616772 -556 -1.178458537021977142345388693332892209920849804570096499677449104261090845040495 -557 -1.178481343171150498726072863171313025286197491570981197204234385795898573514434 -558 -1.178504140761987520334638841116014607688110525075954132210883396932892715848599 -559 -1.178526929798655797080999316186909288778932335038991405584846604684787279738367 -560 -1.178549710285320949477296525614159140009921030474347313318430061064770376921806 -561 -1.178572482226146629226300372802675190924326646255186208317326187685016713906263 -562 -1.178595245625294519810197194217028696010627664066106378548954342612540128480653 -563 -1.178618000486924337079768165178136645393057194958729034841042888517215384804665 -564 -1.178640746815193829843956335606571244618565180494197645023928748912734300214776 -565 -1.178663484614258780459821287790809348420630712904800785765785920419805284786369 -566 -1.178686213888273005422880409302180284009922430932023757657078331579808561741045 -567 -1.17870893464138835595783577522168660866540375811116749342153661238531951454359 -568 -1.178731646877754718609685634887259587773323115252634183510039092253965829000107 -569 -1.178754350601520015835219499413367032666261816701580528466402400014238253936296 -570 -1.178777045816830206594895827278213088408966279335242498130633120585492087815558 -571 -1.178799732527829286945101306317055101893146640704547656236391116814136485489899 -572 -1.178822410738659290630790731503409328136858059773249427696794300848474976301407 -573 -1.1788450804534602896785064789431224514924052005607595260623615500371248821515 -574 -1.178867741676370394989776577549447218560495840938930804932690139055327645811516 -575 -1.178890394411525756934890380910375417045661341390060282518411935592269320935317 -576 -1.178913038663060565947050842902547511668081677206532617332961417495082350383624 -577 -1.178935674435107053116902401649072992704290767838906015985929101489826328640707 -578 -1.178958301731795490787433477461556438927031969830292798977476120362534909420022 -579 -1.178980920557254193149252591449528984838638927901559841676851481877904320793786 -580 -1.179003530915609516836237112523330858344963419388688203865448346681456317917184 -581 -1.179026132810985861521553641559275471610410844673234445291347385581498584881142 -582 -1.179048726247505670514049042538646762985284370194495509502529135110707007698126 -583 -1.179071311229289431355011131514736665818171324127392318733790222964837880115651 -584 -1.179093887760455676415298035304716290863617346042141132338076268083634697610967 -585 -1.179116455845120983492835232845650229058911503880346246008744654576338621894091 -586 -1.179139015487399976410479293196405892842227643709693979539266191746756421522618 -587 -1.179161566691405325614247325209576605058786172264196448773426922654866124755523 -588 -1.179184109461247748771911154939825808959314299948552611863826107174541929650727 -589 -1.179206643801036011371955247897267910902795969213065032693106276893599175391574 -590 -1.179229169714876927322897394296626485153576814359969406013973261221391739339156 -591 -1.179251687206875359552971176494950479578583476157909577377238768157360028366043 -592 -1.179274196281134220610169238852621280011616798444462606304753077737819639893095 -593 -1.179296696941754473262646381294245643400518565533140943664557151239410305788924 -594 -1.179319189192835131099481498887799225359482328910690252033391419326753912772453 -595 -1.179341673038473259131797390802060342104328253204807131545612676981780141526272 -596 -1.179364148482763974394237463043951361559684245554030046187854469747410995969543 -597 -1.179386615529800446546798350418883361208832050954197879827735665243713648330044 -598 -1.179409074183673898477017484198576074426805436804387847219320662534410639899963 -599 -1.179431524448473606902514633022097331908243195332290785435340612698334252499803 -600 -1.179453966328286902973886445597031855575885542478153876184381633146990530797409 -601 -1.179476399827199172877953024808746050118690739914110882891847858417831792297302 -602 -1.179498824949293858441355563886661039021952253506397951980194280828781385651683 -603 -1.179521241698652457734504076317278290447031171840439437190527118703039052580633 -604 -1.179543650079354525675874252234418462290315246624153643469287578388225918175158 -605 -1.179566050095477674636652475057732259751625166379879503123012538946801498338646 -606 -1.179588441751097575045728033191019843173774214779211208036751515690251991192372 -607 -1.179610825050287955995031562632250355023511311250325864918614207523629322940424 -608 -1.179633199997120605845218757387403164753175873631102191279287123539951243965265 -609 -1.179655566595665372831698385620355176826443444425555396506813623557688427705044 -610 -1.179677924849990165671003650511011734149220155537733073007996366661659874973639 -611 -1.179700274764160954167505935833720006074476587155752167162661399302436083871907 -612 -1.179722616342241769820469977307711012415210471391579379644025927839566480084468 -613 -1.179744949588294706431449501810887343675025863517222793038798731183727859590307 -614 -1.179767274506379920712022377587705939961289266102807521439886262784569188214581 -615 -1.179789591100555632891864319621196739543202835491799195259674515876384131487105 -616 -1.179811899374878127327160195378306361303015567914515058501707389038115604306235 -617 -1.179834199333401753109351977176759007727828930042067250758809908432891320555167 -618 -1.179856490980178924674222388460482236698545437392101619628165962430999960602595 -619 -1.179878774319260122411313292309350927012987168359341400214411085978223450296555 -620 -1.179901049354693893273677871547556435952006430125554512379773261776731524965778 -621 -1.179923316090526851387965650853307404632217187814804631360116142541536669930277 -622 -1.179945574530803678664839412310811701503607623657098591259955653857183875441621 -623 -1.179967824679567125409723056883573405000032833527303372688174655393168268707566 -624 -1.179990066540858010933879465325962317622520589786555842571181947280470051409773 -625 -1.180012300118715224165817413087774085941679153607169749058495017715907462927452 -626 -1.180034525417175724263026594804094390176963311334092968141557899891851794412925 -627 -1.18005674244027454122403981500020868488960016904569137072989966449803084899582 -628 -1.18007895119204477650082140267855744636015294202044044642042523283121611107676 -629 -1.180101151676517603611480908491823645556948764705647818361934274133948116096251 -630 -1.180123343897722268753311144243152057075534532730299536935082303174744040963282 -631 -1.180145527859686091416149625491236878564536686545276211969270390607792347847271 -632 -1.180167703566434464996062479074572822150612716061591007040198449814260117177272 -633 -1.180189871021990857409349878405543205106932719614310109489877084944414045437062 -634 -1.180212030230376811706872070421214473012932894369034492336958252770038015711914 -635 -1.180234181195611946688695059113717902123084904827448965891787470208159389485763 -636 -1.180256323921713957519055011598923821445550835171637242186993302064506550954308 -637 -1.180278458412698616341640453717749447618788893569387738713964416295756767997231 -638 -1.180300584672579772895191323199886221194141176196010763137993065345025357705137 -639 -1.180322702705369355129413949454984261144854611627057175391241858827852636634121 -640 -1.18034481251507736982121103009138811071074478730290672740797858418146054076987 -641 -1.180366914105711903191225675297377233054110057564461808393342598666437313611051 -642 -1.180389007481279121520698592254524636258462045467238460797761583826355579045555 -643 -1.180411092645783271768637482787245476162901325461643341617740689236576688870038 -644 -1.180433169603226682189297728486862420204290473269830503540955456446424834049577 -645 -1.180455238357609762949973438582563879239717464473019534627460038441862857565911 -646 -1.180477298912931006749097936865472856229436660698728384829373389839834747204024 -647 -1.180499351273186989434652765005676055238410740889087157832512239907195802038604 -648 -1.180521395442372370622884280635482981595362099464120259642633778517872152485645 -649 -1.180543431424479894317326929605390989927362442274007643381348914120662180784865 -650 -1.180565459223500389528132272852222552416963045223585009186477910522006693382822 -651 -1.180587478843422770891702849351673381808393726290340273942726647614719726568852 -652 -1.180609490288234039290629957660062414762455318704081143301360717978953628650522 -653 -1.180631493561919282473934439582405009004873539642955499444744664119622744966816 -654 -1.180653488668461675677609550536037005737131590388411365906858803329892049601505 -655 -1.180675475611842482245465002210897535910922083355116477540026059759527906993836 -656 -1.180697454396041054250271264159230589650947741835563173865428375055328090041683 -657 -1.180719425025034833115203211978887412297381658297395552537012905641333640651616 -658 -1.180741387502799350235582210785601733681438708798835887988890134891256435928454 -659 -1.180763341833308227600915723700565680291916210578891473457918439255233274239756 -660 -1.180785288020533178417233536110353969371172889386298823774472843614924201641527 -661 -1.180807226068444007729719687486725651610089794850507104079143909102239125022266 -662 -1.180829155981008613045639203584074272380756402749774163524838154484343906910588 -663 -1.180851077762192984957558722862296883207090007454934035856385719446918739796402 -664 -1.180872991415961207766860112012607883741016612370259184451606124923239900216346 -665 -1.180894896946275460107546166493333243651522068294836239053528532754985091888798 -666 -1.180916794357096015570337493011982282757803683737779936779038558787971563571728 -667 -1.180938683652381243327059671918905921096625458765134734898062331251767604920938 -668 -1.180960564836087608755319798506610198490294465619728214237766648333057239654499 -669 -1.180982437912169674063471503237299961082745387648835065048955863507598599968866 -670 -1.181004302884580098915867551949477981162221227995560094449524305061215788155494 -671 -1.181026159757269641058399128122417482726043754910652522374157547994559100607899 -672 -1.1810480085341871569443209003050591604059759236501784300736212601856192202288 -673 -1.181069849219279602360360978843355380698638256280900282407016479582183526163897 -674 -1.181091681816492033053114867067292424461268236606382787342137387832651874515259 -675 -1.181113506329767605355722513125764456248704811729341176471964733514232191191059 -676 -1.181135322763047576814827569684148482568729278923813974070416629214729519173591 -677 -1.18115713112027130681781796972583598617468538218194806598764313407850998473654 -678 -1.18117893140537625722034692772511230111351728866316894665704481901114812849444 -679 -1.181200723622297992974133476484637232775877003895462398840114382677138988139766 -680 -1.181222507774970182755041650956368043372616720763437787504129496841741746955431 -681 -1.181244283867324599591437431390076836149617761480468564256743793486583920811869 -682 -1.181266051903291121492822559178646706645285941095973995031964252575143423483322 -683 -1.181287811886797732078744339794082917113858714121381960671743543258062988948296 -684 -1.181309563821770521207980548232644926924515905411222120566552759985052844038944 -685 -1.181331307712133685607998553411690518655623176532126359461380111441902865314293 -686 -1.181353043561809529504687778984722643395556110238046495693953529319064029261356 -687 -1.181374771374718465252364619064741121395533634862111508791749208788412552104413 -688 -1.181396491154779013964048928369323132946559066897680094190581943044259995766663 -689 -1.181418202905907806142011207323886681707449335927397372893774507202586777896257 -690 -1.181439906632019582308589603682328076507196852799528545620252347748082478786961 -691 -1.18146160233702719363727585324666613096631120777485055950416457430784668261574 -692 -1.181483290024841602584069283289470401475614517688637283858399656339771477581062 -693 -1.18150496969937188351909800330469655674096334758690466520103963236393435392298 -694 -1.181526641364525223358506408734097085101685563772072632738652427908873798722417 -695 -1.181548305024206922196608124337618193254619374857263133253193619784848942487408 -696 -1.181569960682320393938303514897132131195238898184399696456643990828534288998304 -697 -1.181591608342767166931760891963486497681328733002138650837448149554412384396659 -698 -1.181613248009446884601360546377176548112997254904375211428321909286831995358667 -699 -1.181634879686257306080900737312961357399461239364258198801547183369780500455221 -700 -1.181656503377094306847064769618448104348867974168264921526052314848246440226734 -701 -1.181678119085851879353148292236058966773135071090700717664228098749887049961218 -702 -1.181699726816422133663045951516870378438790416629679976350000077510519129753167 -703 -1.181721326572695298085496534253572935996110266477193072556728585248933788596635 -704 -1.181742918358559719808585736278240297040021345235103712014027454262451120852172 -705 -1.181764502177901865534505693488715225626198782909759281444023172333558663205127 -706 -1.181786078034606322114570413185218770177798344849410602494913562007940098603193 -707 -1.181807645932555797184486244616262657222734653985438781555355337831148428108218 -708 -1.181829205875631119799876528650093614398849939094995005093920879011081614623432 -709 -1.181850757867711241072059567504719764398150798515318693427338934089659999642495 -710 -1.181872301912673234804079056486061729870789161271342555810574205829925597012008 -711 -1.181893838014392298126986120699932934782593342712404429874387577178994054661784 -712 -1.181915366176741752136372100719383062446252464562572934071557447896348936715882 -713 -1.18193688640359304252915123220443402166969935136090139578839031936822529589384 -714 -1.181958398698815740240592365486397372537106339888052724210844327501176755646871 -715 -1.181979903066277542081598872143784269709657733474942557393795988252259496349982 -716 -1.18200139950984427137623588661130189634937443301539687570135728562623500051789 -717 -1.182022888033379878599504031877572393460111079305477619570321238324198077410521 -718 -1.182044368640746442015358779341009750314537625066720598901377692762354140653656 -719 -1.182065841335804168314974593906745329475165439452207551183679467444140926932406 -720 -1.182087306122411393255253016420601977566438951949598359235862929365789423594104 -721 -1.182108763004424582297573836548878348316037686628292728782595899996698501397382 -722 -1.182130211985698331246788510225117470409410038701954722809340679973292106462158 -723 -1.182151653070085366890454976797095067387761555009489951321155662209413823563026 -724 -1.182173086261436547638313032018972023197642312829358597932834620673633389388352 -725 -1.182194511563600864161999414044910033129977492439854482688939503665999002744905 -726 -1.182215928980425440035001760591448238849417638213042070766329302131490461992754 -727 -1.182237338515755532372850596446579876107137706226725783914156687646393939831269 -728 -1.182258740173434532473548511513750027654738157358450908357836715410732855577717 -729 -1.182280133957303966458235690588916839936742380244801758103368416859738254845952 -730 -1.182301519871203495912090957078377403430209760348489482725010564279780167325764 -731 -1.182322897918970918525467493874254291103707635530624033122335571806314950899998 -732 -1.182344268104442168735262405613367880444294806294567657483612510999126569198637 -733 -1.182365630431451318366519287553681439881544638805508236754459951589643755067095 -734 -1.182386984903830577274262967310598933217371645536493879883641196433931803661206 -735 -1.18240833152541029398556558670311798380184886534660775140992425161539552709941 -736 -1.18242967030001895634184319196719084658039082720583618631182695214071436559634 -737 -1.182451001231483192141382001600622968621269176663573033455493995230362452970574 -738 -1.182472324323627769782093522110440190094443753344327883647659156870022640948584 -739 -1.182493639580275598904497682939880265621339190142047565430056635858288751780132 -740 -1.182514947005247731034933162858010593079683943759182665102561966142326761085004 -741 -1.182536246602363360228994081100440250870871608052606835894028391893368471618501 -742 -1.182557538375439823715192227554679097789135790398033990399299111392426479900262 -743 -1.182578822328292602538844007288398219321203825929495637885195999429567588759437 -744 -1.182600098464735322206181275723162852693291423291005325120199363965912228836107 -745 -1.182621366788579753328685241760139537395629572915928834020656875689586270597872 -746 -1.182642627303635812267642617167822070257317509987480929938997201484091663500957 -747 -1.182663880013711561778923191544974351290943861846432601875197702942127278663528 -748 -1.182685124922613211657978013174750850215316267884258701060070426730297473775627 -749 -1.182706362034145119385057357088325670390221270052214503837408215591382947592089 -750 -1.182727591352109790770647662658337508302861443635014330024529677801391085663463 -751 -1.182748812880307880601126624044038679016768790581220308665907396377361925061242 -752 -1.182770026622538193284635617811220282250473597131763385419893980878202220523418 -753 -1.182791232582597683497168653050771005942329679437310657680208310807074389450208 -754 -1.182812430764281456828877030320112495047179006938264163393750416668681567680858 -755 -1.182833621171382770430588896731738148480497622486599864634254339821432916361882 -756 -1.182854803807693033660542885512663146962606297203931697720144188496768126901727 -757 -1.18287597867700180873133502935776996420433909384018876861063100535369938325013 -758 -1.182897145783096811357078137898804083392496430030285139679328985655564195709165 -759 -1.182918305129763911400772830609137645038880861843385761970059564279494472171199 -760 -1.182939456720787133521889417462372810488085799654305588306703257465693300339929 -761 -1.182960600559948657824159820660400262043577426884635462615637435035831070191465 -762 -1.18298173665102882050357873174366000483859882231851676650165765194897565277976 -763 -1.183002864997806114496613199393070021072963000005323062021892847579117574050995 -764 -1.18302398560405719012861984422939189263191460264676045500208866838893563791107 -765 -1.183045098473556855762468897911689796712836504317162395252477386211369482457649 -766 -1.183066203610078078447374264832008838957233084964737078128206803711684822535484 -767 -1.18308730101739198456792880569844907249316428174599349103881779860946576409587 -768 -1.183108390699267860493344043293441316730398640928294133576446939153715212213164 -769 -1.183129472659473153226893491688238598922285959296339121775123911619491501118656 -770 -1.183150546901773471055558811188421261324812907195795040204781427975115821940738 -771 -1.183171613429932584199877992278573078852180161904853870897068362606899231973744 -772 -1.183192672247712425463994772827218692747582465218920383949440873751319898696168 -773 -1.18321372335887309088590849380561786593889627822005202732918459029299414726573 -774 -1.183234766767172840387923599766088091088836779224851760013835611948522145668799 -775 -1.183255802476368098427297991317172523203714652806799507855279482208333657711304 -776 -1.183276830490213454647089437824183660021589194241085487000439415234591859707416 -777 -1.183297850812461664527199259554433254901054972912947471272757667983852137278373 -778 -1.183318863446863650035612489476804222864867118758208809797707170448674340806558 -779 -1.18333986839716850027983372591522939974671665059474784647695878635099320204351 -780 -1.183360865667123472158517888245113550605966501314711745691623917391631029251815 -781 -1.183381855260473991013295088810767614900732408863021276168719215055424874197654 -782 -1.183402837180963651280788835230516445149233450109441082790602075250471393856655 -783 -1.183423811432334217144826778244291870378733578196262908021425043631810024191663 -784 -1.183444778018325623188843221246230427580317986956932197390398245040779936690208 -785 -1.183465736942675975048472608632058190272432707217564634633225521667020269169502 -786 -1.183486688209121550064333211077862424332150815224272211469485185399843460796764 -787 -1.183507631821396797935000226853219963268240449846638251824913052103880547715268 -788 -1.183528567783234341370167519257573868446949712634467387525800773718153866373106 -789 -1.183549496098364976743997211254221779370354566731425189278403346003378541000726 -790 -1.183570416770517674748656359361300024439000700133790237041386355510024453523598 -791 -1.183591329803419581048039929843715717749559398799407207244141116585390165556834 -792 -1.183612235200796016931679301234093380974537851154339245009141075725379457017016 -793 -1.183633132966370479968835518194461774373829208419350567268978794567945793735957 -794 -1.183654023103864644662776522713609275157806771771880416132874621864449736431922 -795 -1.183674905616998363105237589617780986943956827015566889225247968332259901741412 -796 -1.183695780509489665631064194354676487626141931433338708282868477030750265369292 -797 -1.183716647785054761473036541992532415819958519019412733721977293391466922933044 -798 -1.183737507447408039416874987357437653874592171982937715330722871683380893358043 -799 -1.183758359500262068456425577212929388461992722798887272162293229411885804283686 -800 -1.183779203947327598449024946366354522667415882516522052746728984623905154169532 -801 -1.183800040792313560771043800566451485491945336212001711881498059316664650014394 -802 -1.183820870038927068973608220036111149392063969960830120211012970601213613713183 -803 -1.183841691690873419438498018463311042045035805116282640270015010347120526325454 -804 -1.183862505751856092034221393251783047522747216773136243887021492880593520769954 -805 -1.183883312225576750772265103811070061514098549284067640062946059369904498778264 -806 -1.183904111115735244463519415643250326635603792804806510697526627284225517643582 -807 -1.183924902426029607374877048960758163128124734083333850342216593476846853857433 -808 -1.183945686160156059886005371546405267702028707653120133743653898231799304597299 -809 -1.183966462321809009146291076542906423734526225837124827581513723300397252605752 -810 -1.183987230914681049731956586834936098628951953792771446438203751045580546140257 -811 -1.18400799194246296430334742866198675251296816542535148935993479446327621208108 -812 -1.184028745408843724262389818075064504579804346567420425807873154079746797585559 -813 -1.184049491317510490410217704824541861657262787592451917350931933673761197233408 -814 -1.184070229672148613604968519240289274804544913804629009047603391340393547074051 -815 -1.184090960476441635419746868638526125048691479401243547197197253171081618024251 -816 -1.184111683734071288800755430762666124315578844248441183000797462546740611644539 -817 -1.184132399448717498725592292737780832086079486854638741951051887014877854644994 -818 -1.184153107624058382861713984990166816576210625090512448659827770109469789828575 -819 -1.184173808263770252225063460554875719912639615664498360360018364001643207046286 -820 -1.184194501371527611838862271164950912808135501569295943111510504191880735845476 -821 -1.184215186951003161392566192486508342929189842419616856636481786497997503311412 -822 -1.184235865005867795900983551833701394114028845763396480207352665691855915988252 -823 -1.184256535539790606363555512667018886790596011670571706547108276450698962430219 -824 -1.184277198556438880423797571147280573623662374010027358859339959949902508549603 -825 -1.184297854059478103028901520986114433159581336061393192752724114094209533956924 -826 -1.184318502052571957089497143801623556909439083301111671026006738601487434416806 -827 -1.184339142539382324139572883155376285083915829096025561156772647947189974019416 -828 -1.184359775523569284996554761413780300520723541879286003308769206935443817985167 -829 -1.184380401008791120421542799543328470962715121698822470165200446971110137546401 -830 -1.184401018998704311779704200915130172759237344403329839285889273628225408181103 -831 -1.184421629496963541700822561159565474548311997268470510513859850498928145512002 -832 -1.184442232507221694740002367076819752064624185872188590075029302397014156363934 -833 -1.184462828033129858038528048573471893691327879329744340115116746031623095626678 -834 -1.184483416078337321984876848559219093759854355182237229176983784218114375947445 -835 -1.184503996646491580875884776701224174165840812945416166088843523783910021756107 -836 -1.184524569741238333578064913896466286105550879667091162146364338493577263687951 -837 -1.184545135366221484189077335284861588363112177718834606696732729622984288222599 -838 -1.184565693525083142699349920587795946527590232262464347909540445473182715823446 -839 -1.184586244221463625653849321518075722931918416517714306255402101481366872493304 -840 -1.184606787459001456814001356968154208325960754866126200586387504901798529282723 -841 -1.184627323241333367819760107643829065860696415826375420233501277004692897654163 -842 -1.184647851572094298851824982770429202593993033962848133190399683817237645991754 -843 -1.18466837245491739929400503245781664433497301734824245871498644615384093740572 -844 -1.184688885893434028395729780269319161300716356408206742952376771488211258650956 -845 -1.184709391891273755934705851497981474008852643979379576054305799450249199739309 -846 -1.18472989045206436287971867361127576447394051891678043480397218144825751740277 -847 -1.18475038157943184205357852628264483466735763207607683216749271452479832716887 -848 -1.184770865277000398796210219384962504037028335615087167265406348140458231491758 -849 -1.184791341548392451627885678277184636499238919991124527126654768777543293224552 -850 -1.184811810397228632912598716671129454674695459087128088080432020313946478796089 -851 -1.184832271827127789521581278320466459332543984893770141190041821102962062822755 -852 -1.184852725841706983496960429728608253232876921546356730894636550488954626336665 -853 -1.184873172444581492715555387026287803132670169527632043859538113887556189828752 -854 -1.184893611639364811552813861123164098056201218564677146419950496698087515454757 -855 -1.184914043429668651546887006190830716537450753868541509085098800454390742376357 -856 -1.184934467819102942062842257487103445014941775364215790014051150943055959514483 -857 -1.184954884811275830957013345483433742575471745465119342304136801219474915766819 -858 -1.18497529440979368524148677420873347655209942495767651647403588420535428070732 -859 -1.18499569661826109174872405267380191589962778457132176474197213198335076354704 -860 -1.185016091440280857796318969190917425672873738801738243110194391618705887369162 -861 -1.185036478879454011851889199352992621246473396694707679894509837866739078081219 -862 -1.18505685893937980419810153938599188411203867741763658921646660785374550174582 -863 -1.185077231623655707597830057537073085179241491515893079098726148668045340094127 -864 -1.185097596935877417959446457109140083532747340785469095316898578027660682020115 -865 -1.185117954879638855002241945700178049621479100428464021946060121634086798574185 -866 -1.185138305458532162921979906152888886961758553714929551518189191861697650896434 -867 -1.185158648676147711056578665666747984712343170996645665915347629269117481798402 -868 -1.185178984536074094551923660470665218020681483746735053040499915238257317040279 -869 -1.185199313041898135027808294399951520934762790036256636552329744442777192488268 -870 -1.185219634197204881244002790666266489001067534041364225424021525020796537708961 -871 -1.185239948005577609766450337053651330485032861656699409299227135072879911113726 -872 -1.185260254470597825633589825717634085489150301422520787307856385909790717916335 -873 -1.185280553595845263022804489707729384105596406831724648612060305818380942998803 -874 -1.185300845384897885916995739276442135085676389997389463000510562686918724273258 -875 -1.185321129841331888771281501980122446251035466151192126085819650359102656479254 -876 -1.185341406968721697179818371518706801871412264569663315988333425515014995635789 -877 -1.185361676770639968542746871202517089289638261538109345379296822012403265912939 -878 -1.185381939250657592733259138874873509917677030997976820956527477388997565646892 -879 -1.185402194412343692764788341059308765013855832002843903137330521777715043827981 -880 -1.185422442259265625458319125039648214955213220350095226408816785579943674167806 -881 -1.185442682794988982109818418520143016525228483215947023117546060884489388108736 -882 -1.185462916023077589157785887451209594435268700042651637431521067750531440943319 -883 -1.185483141947093508850923363544138253174029566561903225323646342962518495959363 -884 -1.185503360570597039915922553935385339509175286807243745339607773308399701783305 -885 -1.185523571897146718225370346397756184608389569672041211027656180385764144606766 -886 -1.185543775930299317465771024431919151738190769984699915157162179132298814180175 -887 -1.185563972673609849805684707507263558642165554619769632623666542379835645449215 -888 -1.185584162130631566563981332656125104661737603735603553823404930591235061172069 -889 -1.185604344304915958878209494559850786963194318844790315440828687401356997151898 -890 -1.18562451920001275837307946219906021724342434285511155696570938891393043770714 -891 -1.185644686819469937829059691073780833213662570829966449146496374107012682058264 -892 -1.185664847166833711851086150931889825049519424129071473418369660725476135920213 -893 -1.185685000245648537537383789876484756717764826179059038311450412353132290705605 -894 -1.185705146059457115148399456654426950336904538739630661275015851539438572757081 -895 -1.185725284611800388775845603859355817003801195212063076924330999999292365807933 -896 -1.185745415906217547011854095712957562132877460376894636947299909279866950092407 -897 -1.185765539946246023618239445018187173417405280664716522100635054841499939666007 -898 -1.185785656735421498195870804807487424935875173201350897835847561766453826973123 -899 -1.185805766277277896854152041137821915377572759945469501762120795663616459167276 -900 -1.185825868575347392880609214412540019315714711054291924820837101271579718549527 -901 -1.18584596363316040741058479753771918915064470280866309109127572412835153452878 -902 -1.185866051454245610097037960147683426780935814255864478105940023329675416227275 -903 -1.185886132042129919780450249060875076995567760929944559740475622804184501214425 -904 -1.185906205400338505158835996053159511524995971539434549146490335517251506451816 -905 -1.185926271532394785457856784960967909895897816749001382850750097602208961653535 -906 -1.185946330441820431101039311051431340693379920160758415093474734214599866178645 -907 -1.185966382132135364380095966520828848264966691692228734781830782234932672682351 -908 -1.185986426606857760125347486906262402745151170880759766945174429046505365569963 -909 -1.186006463869504046376246994118481526696029365481859832688054995559571479035974 -910 -1.186026493923588905052004772726209324515971769878186483020655939283781146213525 -911 -1.186046516772625272622313117044168669633978516048691079383735135258483087567311 -912 -1.186066532420124340778170587498271611647140141202063414023400828994454916570421 -913 -1.186086540869595557102805015662115816925665632897774490142079602233893543695106 -914 -1.186106542124546625742694598279028221438892042231015769204072246879980447285232 -915 -1.186126536188483508078686421503407226955784606586211234310472265980781932193435 -916 -1.186146523064910423397211757514039888321599479479655152804317934918437966703838 -917 -1.186166502757329849561597476570408800846358223670245902078755734000742422265652 -918 -1.186186475269242523683472918500753987252264358875189584962868736486557922717277 -919 -1.186206440604147442794271568527817191054942666794006407935594788763628816640438 -920 -1.186226398765541864516826883254768799276376527718603793240499902997943837366358 -921 -1.186246349756921307737061613549800337217980952294750824262284341660700684729023 -922 -1.186266293581779553275769971983257300499195151786396993302914807720647751303553 -923 -1.186286230243608644560491993385987217148764764552957682279841444606133967122316 -924 -1.186306159745898888297479438011785471293759372554030624099463470302751273291067 -925 -1.18632608209213885514375258770043577960253471889219619404060208721932755620582 -926 -1.186345997285815380379247286350862505378611534904881709602835594084837515057083 -927 -1.186365905330413564579051576926337439941392129760534328937372858652112265107828 -928 -1.186385806229416774285731288125513497120808189543348229139250624360945519866059 -929 -1.186405699986306642681743924764291178369048465690205176684379205302221754652575 -930 -1.186425586604563070261940216824159900757916613871243084713540650017440172338912 -931 -1.186445466087664225506152683032694569154568881130858050924840478025288399695231 -932 -1.186465338439086545551870565751327351879007478084069509581917923468510516052574 -933 -1.186485203662304736867000494854354724422758427663946106704764940163614597949026 -934 -1.186505061760791775922712239191379720173212465302639209829140294468520124531195 -935 -1.186524912738018909866368905133028215903497448818191215353459348416028037196701 -936 -1.18654475659745565719454094260681523194580535459009210887279096420774834711794 -937 -1.186564593342569808426103319936471894883335160200345152452890359220094850971037 -938 -1.186584422976827426775415229703875150206365506934975200697443509792301602916576 -939 -1.186604245503692848825581688757949783126003121933904855285730096240185562598984 -940 -1.186624060926628685201796396399535070573291333923115527078133752443171128711401 -941 -1.186643869249095821244765215675225712777128202169800381431605364330775500641059 -942 -1.186663670474553417684209643616607848647687152883109895682190076333091206204009 -943 -1.186683464606458911312449637164115218912178621502960127327160305085692477277137 -944 -1.186703251648268015658065162416927181453082552484565690060515439959350172395341 -945 -1.186723031603434721659635835751918584951733427785940928765803265146926877348515 -946 -1.186742804475411298339558026255650753571994360435498985621074925797702727154142 -947 -1.186762570267648293477938789813762314315946767558714054792837508897669758910287 -948 -1.186782328983594534286566006101877600582135392042062190424730711770017363073183 -949 -1.186802080626697128082954090621298184536160843941007192447107408876174827466929 -950 -1.186821825200401462964464654821279024778923588127477505596580689054889102782525 -951 -1.186841562708151208482501488247614065514900624239065698209431308484158878853275 -952 -1.186861293153388316316779237554566193449757929672504068758382783566597852304722 -953 -1.186881016539553020949665158113872556867911539170388418680573691252375865164348 -954 -1.1869007328700838403405933148506376890504528169498120204038336826758191654275 -955 -1.186920442148417576600550609831392970089117378521449177816063080039598857829109 -956 -1.186940144377989316666634015024451025325841156778613447165867495766897655053485 -957 -1.186959839562232432976678389546917016582533066129655485521038181708627760980395 -958 -1.186979527704578584143954261606334758907423710401302839754660688540962634161021 -959 -1.1869992088084577156319349562379435189942686842696769873793119751974349687187 -960 -1.187018882877298060429132450830900553339789127949274853468055220173905830055287 -961 -1.187038549914526139724001341328584259566801086641381538963701934315100235106681 -962 -1.187058209923566763579910302879232581485420863975218484689199794806430402551146 -963 -1.187077862907843031610180429603690369071903657674440743826361960789552521462884 -964 -1.187097508870776333653189839036937093636259629254833492031450160068888228774618 -965 -1.18711714781578635044754392768934200438414620730811642611358258534320691409647 -966 -1.187136779746291054307310665062246837043537028806998137816142305083963677971554 -967 -1.187156404665706709797320314340505903233088574233842109642903901127985735643642 -968 -1.187176022577447874408528968872019159124000362113269948867659534679199048858613 -969 -1.187195633484927399233445294431075035327167137533919305716227776871398162779718 -970 -1.187215237391556429641619868148475771762244750608221020103329871825181905979476 -971 -1.187234834300744405955196505876948109770993877358148473023792459750535271676318 -972 -1.187254424215899064124524970645245820449823107799189868603091515882468226772704 -973 -1.187274007140426436403834455738627067904915227773406246079368210192245047836476 -974 -1.187293583077730852026967236827038396963374578633380148109875801633114787520691 -975 -1.187313152031214937883171888445357578161170810753753619977856820259156876595432 -976 -1.187332714004279619192955461012439023192385020389514553393523776831040953509891 -977 -1.187352269000324120183994015457467389320335240323496890386806207380017694998216 -978 -1.187371817022745964767100913403256712645778265962474737183614711649085633989734 -979 -1.187391358074940977212252261736633341970454204346347139534063494738157253717158 -980 -1.187410892160303282824668911275910484892786465147697351889563814874424215533613 -981 -1.187430419282225308620954410124699726564168951123727782947702806011551831115318 -982 -1.187449939444097784005288313179909843280574637269522909462869771785625699480031 -983 -1.187469452649309741445674250139755015064283390162693680445067130637911762465958 -984 -1.187488958901248517150242155234932554094354608389881218500324543963980760993715 -985 -1.187508458203299751743604062782833922966453367122272962441784957648936313072413 -986 -1.1875279505588473909432628735407215351950261041342996734905565815659182759834 -987 -1.187547435971273686236073497709237030197194699370173155801376317903922137226469 -988 -1.187566914443959195554755781312403819486490035086784920774321423810305918912935 -989 -1.187586385980282783954458623554447136402370592228255923998014675720183124403193 -990 -1.187605850583621624289374693627278018026851808153991815529885455986822856872531 -991 -1.1876253082573511978894051563153730377762794227553230639733830169413733488186 -992 -1.187644759004845295236873816617028626446877907711013282089796452706902628606743 -993 -1.187664202829476016643290094472576907332056720719076206056566992460851139815363 -994 -1.187683639734613772926160241561118569658241081183167468814499391082388892353864 -995 -1.187703069723627286085846212997656859384224373802382849736436168830805901698179 -996 -1.187722492799883589982471607632204725889592209318560098714977682134974917763917 -997 -1.187741908966748031012874091521483978879913664313823606690561655428510768709827 -998 -1.187761318227584268787603720012240436719335244701256850676663520500633548479642 -999 -1.18778072058575427680796657474296194323762526608053764671343711125963214344232 -1000 -1.187800116044618343143113132737906255828303424144124579745930128270745544971789 -1001 -1.187819504607535071107170785633822627437535786880931570808294517512645870703896 -1002 -1.187838886277861379936419927945583886014404667881605045801156504575455039579361 -1003 -1.187858261058952505466513034142134427414110357130833814551496748664225824431406 -1004 -1.187877628954162000809736145168703254960044228115706707610668060769973943006734 -1005 -1.187896989966841737032312185915129497296768256580862633260007010741726075493767 -1006 -1.187916344100341903831745535993400195290468561938012137564096540029601041977875 -1007 -1.187935691358011010214207277050106051105181301917815111040339940975903623354191 -1008 -1.187955031743195885171960540701479763806413015219875469001347984989105380120948 -1009 -1.187974365259241678360825382039993024572325815249352877024895938351454820468528 -1010 -1.187993691909491860777682604522151702522907551887242862477423778028659819958133 -1011 -1.188013011697288225438015962907143714042435156882067496838860025112414548325222 -1012 -1.188032324625970888053492171775360032033083731547714463496841218401094740991448 -1013 -1.188051630698878287709578148014525757584460045133203663345917395512589185789433 -1014 -1.188070929919347187543194916519244648879212987645025847991032050318527421228609 -1015 -1.188090222290712675420407609207176487593740498260074294872698476760376385878892 -1016 -1.188109507816308164614150988311831671415042161392222146190757038536258144041086 -1017 -1.188128786499465394481989925768080965397903863457194240871510222009335203047108 -1018 -1.188148058343514431143914271361939940540722788994429278507526333016169995348501 -1019 -1.18816732335178366816016754317099679395886024731653687678351375377658427541743 -1020 -1.188186581527599827209108874676008503156183768724510823764394901103429296581712 -1021 -1.188205832874287958765107653777693141886106167042113035342814432645115285298811 -1022 -1.188225077395171442776470289805595204667247106849763371715933541531292535639434 -1023 -1.188244315093571989343398545458095481850440792481163775470490319832343143879055 -1024 -1.188263545972809639395978871464176930851803581482007528236356021257345844162576 -1025 -1.188282770036202765372202182608442638347272712418670314015796031759403128661886 -1026 -1.188301987287068071896013514611110902385156435223350553376540442570501410726488 -1027 -1.188321197728720596455391002204285224967642950700972891881803535373198345477299 -1028 -1.188340401364473710080453619594713140061587403546915348808266728366063293924195 -1029 -1.188359598197639118021597125351506857527484628050828922543670777866868967341075 -1030 -1.188378788231526860427657654604900231323888552265628439411906971127931083181835 -1031 -1.188397971469445313024102402289060114683238775774939855151297673897227860308008 -1032 -1.188417147914701187791246842008255302798459547812556946777809435354607393321625 -1033 -1.188436317570599533642497925951312544839691730952965426107221247413488266463572 -1034 -1.188455480440443737102622712124256094660272802732588740130228072947251009886616 -1035 -1.188474636527535522986041866015334529058807261623465979153283244373800488351375 -1036 -1.188493785835174955075147484650285662526897636805402308563286400522627966119662 -1037 -1.188512928366660436798644691838676899489451225749448156520701487917926346913881 -1038 -1.188532064125288711909916454254483863462426460043119342924025195359108731130773 -1039 -1.188551193114354865165411068835734204497579994823336143794250220888609988356567 -1040 -1.188570315337152323003051772829045691795317564657058315936898919021609348633102 -1041 -1.188589430796972854220667928645227630332986764296170676892175437135605154206004 -1042 -1.188608539497106570654447236531791884506285371733118245872027013023454083411012 -1043 -1.188627641440841927857408428907233936680673621258615580550960588252534094332098 -1044 -1.188646736631465725777893901040295045591743194301871929724971767823383250440577 -1045 -1.18866582507226310943808173359510329293539694883001221858478652473678402817293 -1046 -1.18868490676651756961251656340011371328426820187570134348826316613670624027187 -1047 -1.188703981717510943506658759635125392500581343828049857716512280041782161950923 -1048 -1.188723049928523415435451363466345995736684392327076673270458130166698512819145 -1049 -1.188742111402833517501904249994501253370211069175895791002218170594280957759147 -1050 -1.188761166143718130275694972215348100050939941540387191005109264470953209016271 -1051 -1.188780214154452483471785747525645039466702925182017131319074837875865752951282 -1052 -1.188799255438310156629056048140661509271924692499997086260831928143525991020992 -1053 -1.188818289998563079788950257621669163444173195802328797813470917554130278839748 -1054 -1.188837317838481534174139856543551692488833642405494163516749821531627246518185 -1055 -1.18885633896133415286719960116369568750867733540618294384194134084488456993123 -1056 -1.188875353370387921489297159783682747058202632843229925871452378063474167417071 -1057 -1.188894361068908178878895672324992153526127384856233345873584654065707114710018 -1058 -1.188913362060158617770468699468943638890599689213917665922017775976164095407853 -1059 -1.188932356347401285473227028539460651165111804625144950461105713932584998247451 -1060 -1.188951343933896584549856804134915758524474745324123771347478255517560418641852 -1061 -1.188970324822903273495268452342331026520371176647469991830429785360480243887432 -1062 -1.188989299017678467415355868193547016234829128517371734685440361051914681935913 -1063 -1.189008266521477638705765336848644121660313466413688609829496071561303733345341 -1064 -1.189027227337554617730673659816898939726817323416862660621230625973943779847419 -1065 -1.189046181469161593501574958349885895610045555891026926972919541537652818743932 -1066 -1.189065128919549114356075626964990081336065376994147457454509048272735489479554 -1067 -1.189084069691966088636696910880580862021028222905677415486160714813693178644228 -1068 -1.189103003789659785369684581966406918806913804035932777914642982425657263984226 -1069 -1.189121931215875834943825188634411690809666284794226258292112652792185227462048 -1070 -1.189140851973858229789268355916133312989308561192840413845323045551480965362099 -1071 -1.18915976606684932505635461279314478825212502633002654471441174662611513834164 -1072 -1.189178673498089839294448224666607948431056039696617547312564539247264277250401 -1073 -1.18919757427081885513077450967095842084308609649491793715172581475561227896458 -1074 -1.189216468388273819949261118355007998319463074836470369330676027362111754715243 -1075 -1.189235355853690546569382757071345187014703902855520564568107509391102417407445 -1076 -1.189254236670303213925008836231833956627012771154444479460619251527277064161862 -1077 -1.189273110841344367743253525403254523238331726461145988782712703209743938545434 -1078 -1.189291978370044921223327698032698039762052416398927647716502495374195283190824 -1079 -1.189310839259634155715392249407219039542705425357258251307086452682408536360463 -1080 -1.189329693513339721399412272266465064168000521591810001664687242473912579641411 -1081 -1.189348541134387637964011575300541798817797132687654036651711333173926571342919 -1082 -1.189367382126002295285327030578233931874478025163412365674037568489913436938895 -1083 -1.189386216491406454105862236762886547035553613702024727173042902483742289531627 -1084 -1.18940504423382124671333998578475884537022997632013997676854235024243617964398 -1085 -1.189423865356466177619553021449491083796627647327441947177771971671296752171344 -1086 -1.189442679862559124239212579272476510050340694743733678728176663825104367887493 -1087 -1.189461487755316337568794197638402479662682497935092899113826655131936916730584 -1088 -1.189480289037952442865380291194018567626597768987291451909770754986887566005612 -1089 -1.189499083713680440325498978190304048715983717347315311528948726676466186014102 -1090 -1.189517871785711705763958654297642330808166466333918104741129213776299567314065 -1091 -1.189536653257255991292677806224365502553717283693454180297199722312529572794356 -1092 -1.189555428131521425999509559275107820397085004604773786839139471430536349347711 -1093 -1.189574196411714516627060453790802432864450825049404060784993295494843044847237 -1094 -1.189592958101040148251502946216870647319081147949574610182948501467775287579982 -1095 -1.189611713202701584961381131350187313679239625022222506849099703599354581142346 -1096 -1.189630461719900470536409183118759161056235999412804805449812111891023393474133 -1097 -1.189649203655836829126262012050724909568261766367662087655943768308520430920113 -1098 -1.189667939013709065929357638391276425892303841890687161553921424606743963958141 -1099 -1.189686667796713967871630780627408835104022850788610711712564413551812345823325 -1100 -1.189705390008046704285297159981034083189982161565184610958906006232082276707107 -1101 -1.189724105650900827587608022230936706951730159642342471326708944901563298986197 -1102 -1.189742814728468273959594379023312255992652550104492118744372435671501671381412 -1103 -1.189761517243939364024800471629207672698085448838691811401333032316579059839062 -1104 -1.189780213200502803528005960905078720669175233215816068637102088688363356586853 -1105 -1.189798902601345684013936348009892012498275097254235118643923364301811074754398 -1106 -1.189817585449653483505961131228728079084027446988408949407956627997238470661218 -1107 -1.189836261748610067184779205048687002336540980305368472647796698922634424775932 -1108 -1.189854931501397688067091008428059161023422489376669168425225627779535896227346 -1109 -1.18987359471119698768425692999420037800365647960825669649699044255020601969701 -1110 -1.189892251381186996760941478699342970972091071459382558128963138325530859835802 -1111 -1.189910901514545135893742729256681665306364475165536194030617774442886519357879 -1112 -1.189929545114447216229806552471495796308672958363000579443246727455087670864976 -1113 -1.189948182184067440145425141373806481123702723267022378944095445907913707787611 -1114 -1.189966812726578401924619344850119252361160674468772226716801079738632401584419 -1115 -1.189985436745151088437704321262168792833746423566630974991242472397856236765139 -1116 -1.190004054242954879819838025330262673117783660526956693205858563562337489006718 -1117 -1.19002266522315755014955204234781515252862604662342442993829334130025703878412 -1118 -1.190041269688925268127264284581969943641119370637152536548202179184265424655055 -1119 -1.190059867643422597753773065502832147126104948321080313611662304650346759652331 -1120 -1.190078459089812499008732068270764126245305248345459458630431400748172055491048 -1121 -1.190097044031256328529105725697447700050243877032555353412132450907117595047005 -1122 -1.190115622470913840287604529681975484734951235795967147625656075063419921156942 -1123 -1.190134194411943186271099788908107299627809009198012074286474057435571989541494 -1124 -1.190152759857500917159017354373013076261945763304110167122482915080066606391799 -1125 -1.190171318810741983001709833101321466473672186481664876158374235144290526032214 -1126 -1.190189871274819733898806811181103141527075245354834854416304006893758845033761 -1127 -1.19020841725288592067754260804053941417196990586416894114274477272096406686972 -1128 -1.190226956748090695571061084665460106967572334548416641455463977606167560114161 -1129 -1.190245489763582612896697029238679343129283343329560493534312556621808315424647 -1130 -1.19026401630250862973423364446211396288716578669253264428774832390100977458609 -1131 -1.190282536368014106604135661602036383505319411831345367859251399918680838660174 -1132 -1.190301049963242808145757607076491741636014741567432417790992449440820593697472 -1133 -1.190319557091336903795526748181897901811537578210693987401362737009348605812316 -1134 -1.190338057755436968465100245333146206150820056055775436280410713860114819562068 -1135 -1.190356551958681983219496038968130501612339621368043627346083611284136221192675 -1136 -1.190375039704209335955197000043551838483787720575471796769640696440215437086069 -1137 -1.190393520995154822078227873824076115670515974227919249390580850401899075524668 -1138 -1.19041199583465264518220454744146168541462347314525250858570681490291219312316 -1139 -1.190430464225835417726355172474123355303076336525276814800633231356545493788275 -1140 -1.190448926171834161713512674570758174031700089647793187292337914586140434829885 -1141 -1.190467381675778309368078182914126696868913564471234960382756513087409825052156 -1142 -1.190485830740795703813954913092860936851228399825900236558755664355085582388119 -1143 -1.190504273370012599752452037720256760434753240899551787599275780623014207728383 -1144 -1.1905227095665536641401580799094039258610320850219748901842465861461412952446 -1145 -1.190541139333541976866783365483711135348717250793654357612652414446533705210891 -1146 -1.190559562674099031432971070570896227105937736892753566660114500646457287349806 -1147 -1.190577979591344735628076401996832821011305722022830746353512883319101386084388 -1148 -1.190596390088397412207913448663274205796791688342268085664759425763814822321874 -1149 -1.19061479416837379957246924286041287106316265887616415294355883395511355476226 -1150 -1.190633191834389052443584571231479702060317325024841841166651697000403405621718 -1151 -1.190651583089556742542601075872140328669242981537432641675287673087846867288256 -1152 -1.190669967936988859267974186812307314429172574715265237955228021774523265522778 -1153 -1.190688346379795810372851427892155650958243374706510821553097548822190143131877 -1154 -1.19070671842108642264261563880760525410422704982046592707843390074720368636931 -1155 -1.190725084063967942572392656863317709204234804783413731117958988051345893444405 -1156 -1.190743443311546037044523002733345254678651384076233309399001909599969054312226 -1157 -1.190761796166924794005997115290967798758890774215299223863957847634959089613938 -1158 -1.190780142633206723145853681329958508543488066195516715594893069186230725602417 -1159 -1.190798482713492756572540606759530071048367137601629976041616049552879756016871 -1160 -1.190816816410882249491238176614531981878514199451766398692684563810442624345158 -1161 -1.19083514372847298088114395198109405016586560260846507322053173999631126784867 -1162 -1.190853464669361154172718952695842602205196229388987312753983033309592933321209 -1163 -1.190871779236641397924894675434053506631107605473857854908725746591691270504696 -1164 -1.190890087433406766502240497558650019006163539427425300326245826911658200691729 -1165 -1.1909083892627487407520910178578034434551214757308005860044591918852803932535 -1166 -1.190926684727757228681632886054050625731046878820642643984486099114301175417839 -1167 -1.190944973831520566134950673722304220204197616464930219243504977800280615833699 -1168 -1.190963256577125517470031340007899409207252659179966420343021825744650270855415 -1169 -1.190981532967657276235726846288894195543744919629336348408972502357261016802783 -1170 -1.190999803006199465848674474679219438467820518555354862722796003018609387972635 -1171 -1.191018066695834140270174406020959362869125549349910437870740073681783782140205 -1172 -1.19103632403964178468302411376503324563691588265301640254135381763902873530625 -1173 -1.19105457504070131616830913088984427921106167023462975050083224170923641706277 -1174 -1.191072819702090084382149747757062139216322344847374492765134956245404907267674 -1175 -1.19109105802688387223240319955261145195984784240016839282111684331406549889052 -1176 -1.191109290018156896555320902709149081662694860471714125165263549351594455883083 -1177 -1.191127515678981808792160300453828851873975561299866043090528570467660784312293 -1178 -1.191145735012429695665750878371972897922930148963135706913187926175341259977003 -1179 -1.191163948021570079857013911623394236898441485540145245799897594929191295057813 -1180 -1.191182154709470920681435506193545259957611007720482918006540130824319264403711 -1181 -1.191200355079198614765492497306401622251690877700184964427970066468113911383089 -1182 -1.191218549133817996723030768870030353956767742786953374984964421951419023804647 -1183 -1.191236736876392339831595558569134869381897481347891038506232479500053287109352 -1184 -1.191254918309983356708713313961517839503391110748182145380657233407813297404701 -1185 -1.191273093437651199988124665677355548170650346287205305301203952855848985896752 -1186 -1.19129126226245446299596808456143430729665560463190899225246046733737102297993 -1187 -1.191309424787450180426913790339060697250343257011344740975019739941557985567729 -1188 -1.191327581015693829020247480126222763084026317938805407728172511673401388432509 -1189 -1.191345730950239328235903445843748774836819037854452400344743143708145152436681 -1190 -1.191363874594139040930446650333683692634407607957991978159665479055625085916164 -1191 -1.191382011950443774033003332713881008330570334151609391158005951695152868450664 -1192 -1.191400143022202779221139714243889110669956143396551365748145863892130547880926 -1193 -1.191418267812463753596688376711596688042256925215257660115812267882613536883177 -1194 -1.191436386324272840361521886085790891471503643467280396500092768814352557974371 -1195 -1.19145449856067462949327323491477498214106021242258207289133786835911230176336 -1196 -1.191472604524712158421002677685488936063972344793512184814203427417775658171351 -1197 -1.191490704219426912700810534091176929002227925244944195547919161326023283596922 -1198 -1.191508797647858826691395535888549734908252356903887910364230861147558788064451 -1199 -1.191526884813046284229558293757597800452016850024137169279972347039734726900983 -1200 -1.191544965718026119305649461308722068000169976490017699697414697245694560168793 -1201 -1.1915630403658336167389621741126644730654820327266302929526434388493970033427 -1202 -1.19158110875950251285306834235883840501958163421084660050819750627379579917595 -1203 -1.191599170902064996151098376477081258966446250538163049117821902178785379827139 -1204 -1.191617226796551707990963925786576491243313191700611008379473676294780016131518 -1205 -1.191635276445991743260523210963721292107421015793142581819076313317012264834411 -1206 -1.191653319853412651052688531848048079756920525728891513303413770710504815274159 -1207 -1.191671357021840435340475532831943474810839626616160921069571779998385434399217 -1208 -1.191689387954299555651993808805847210532319979937733640779809394384633459547123 -1209 -1.191707412653812927745378435355855550120347395550963017279912416112297748342121 -1210 -1.191725431123401924283662007635199198914437041883766130016145602047148751267655 -1211 -1.191743443366086375509586773054914398843437771641580666082466333550415656274888 -1212 -1.191761449384884569920356443662177859280668629583179007482894821761033232762288 -1213 -1.191779449182813254942327274797231398902524567697232550778907780238226954823073 -1214 -1.191797442762887637605637997341580635323668220894559840256156810070752078087318 -1215 -1.191815430128121385218778191591213753208802143948917339125599124365688684182205 -1216 -1.191833411281526626043094691508951299116311578968480075404322544752402322321463 -1217 -1.191851386226113949967235608829706086253005192698798338349090343935812369864214 -1218 -1.191869354964892409181531567211403640209718934225703639873713900663127321460332 -1219 -1.191887317500869518852313737342588175055419045952797058166521275736737409978965 -1220 -1.191905273837051257796168264635316857191197715903791110625587196074362536052767 -1221 -1.191923223976442069154126681848826093246626494867083644683495832181057950102928 -1222 -1.191941167922044861065791899705637771018681115950026714938097144937136116032139 -1223 -1.191959105676861007343399369277260793820242673081688011924551407580473798376475 -1224 -1.191977037243890348145813010631433885261458782484264916484299667009317564775214 -1225 -1.191994962626131190652455502946949511896620169280330544722907233458374995910516 -1226 -1.192012881826580309737172532015495885613530044411818380536494197082324557698617 -1227 -1.192030794848232948642030591762654378216820916787638622377182801227080682875731 -1228 -1.192048701694082819651047937132193321264964069351806617130229785861399512642192 -1229 -1.192066602367122104763858286389106090570043108106273532627717308836756828992952 -1230 -1.192084496870341456369306871607451604365630309521505926245227840360582895984232 -1231 -1.192102385206729997918978436818968916291027884156177169771957617418476904827135 -1232 -1.192120267379275324600656784007654480118373488111955978207153916713608121024463 -1233 -1.192138143390963504011715467844010925435401556462398774282862309168522038689569 -1234 -1.192156013244779076832439240760499836942971880584485655283646714985055512329885 -1235 -1.192173876943705057499275850676858101059183408360068921650803473544902319490204 -1236 -1.192191734490722934878017794390367900336892552364433694231540795826112190052847 -1237 -1.192209585888812672936913630351904428759377980611234109241734030454047809474894 -1238 -1.192227431140952711419708455253622901000260073650656259876981436724690756778618 -1239 -1.192245270250119966518613149558487469694194756563704369204286729201903110640878 -1240 -1.192263103219289831547201997805489281890191115173471555490212916137204335180634 -1241 -1.192280930051436177613238290227349136120992661344232053673722005276683979055371 -1242 -1.19229875074953135429142751291975208363183152034136091826959892453587510485522 -1243 -1.192316565316546190296097734502716891717920138233976650144327458560395795057779 -1244 -1.192334373755449994153806797915562596001302473746485938324298765588552288706588 -1245 -1.192352176069210554875875926687097455739498970379319629599311596892660157229922 -1246 -1.192369972260794142630849355722122537527671507154589607819826883411983576184497 -1247 -1.192387762333165509416879597344112935376544415968459722183020684700001126348287 -1248 -1.192405546289287889734037954032014338175847126297551760396441183889909158984059 -1249 -1.192423324132123001256549889986471329750714442376647503815981699234061747795131 -1250 -1.192441095864631045504954874357486504551996908347711086378187927885961843227986 -1251 -1.192458861489770708518190309661496257654355947404284683178650701213208948408969 -1252 -1.19247662101049916152559915961114001702503931851582899841826965739247697338299 -1253 -1.192494374429772061618860891275594786516463409876205495660637766078021251417018 -1254 -1.192512121750543552423845347183246218955992925310255007150319276986237243919168 -1255 -1.192529862975766264772389163671671100964440059202719294875450506273988555065233 -1256 -1.192547598108391317373994352482414167312957514567994075457721601426149973000224 -1257 -1.192565327151368317487448663289854636977959205326152608103796810906401902054495 -1258 -1.192583050107645361592367345544574841492210741574945922223469500503611478588072 -1259 -1.192600766980169036060655928702064866294314383161303647192908602252938376255256 -1260 -1.192618477771884417827893640597323316781115840818991292226449478094135574064038 -1261 -1.192636182485735075064637084414945223551692541677602577180269582165489312328014 -1262 -1.192653881124663067847643795392623788427468514426852221243222855344130313963854 -1263 -1.192671573691608948831015299083633218412235857288051075927438465339808912581009 -1264 -1.192689260189511763917259293690805374627080123235825241780349498667124656840925 -1265 -1.192706940621309052928270579670763454859449848952202828064311343368312970488439 -1266 -1.192724614989936850276230360492731510771711046818905598996071212829474556437729 -1267 -1.192742283298329685634423539121099354714493955226375002044169222475123226358396 -1268 -1.192759945549420584607973635475088418794549884542998457905620101544439472544279 -1269 -1.19277760174614106940449495080233547428024000306205115434737843059574159827649 -1270 -1.192795251891421159504661605585987888124104424527990208483879482965165140014802 -1271 -1.192812895988189372332693078286986372479933322887199351493195138039485704176246 -1272 -1.192830534039372723926755872904599061330324494730031268447262292490012990498022 -1273 -1.192848166047896729609280944018964316054454513927271215334453765646387091080809 -1274 -1.192865792016685404657196508659399010880389564477218498827325951721143013977655 -1275 -1.192883411948661264972075875021534273193923356828447961924472013640532759739909 -1276 -1.192901025846745327750199918734951847710841049283278437904544432872612826677836 -1277 -1.192918633713857112152533838060911514233298178131282885160913802590517293664787 -1278 -1.192936235552914639974617820076983414348207257105208901814316389984146627039013 -1279 -1.192953831366834436316371250581928832799056878919790951536280047872908840972377 -1280 -1.19297142115853153025181010113000903574922419831661467316332832804048975776695 -1281 -1.192989004930919455498677127279044293690705058479075892546136665114344678229559 -1282 -1.193006582686910251087984512810994315828243180495661783721180987809429719060042 -1283 -1.193024154429414462033468595357587101426402254100979353637638115349166578701981 -1284 -1.193041720161341140000956309536585779433358234862229299215533106658828585017861 -1285 -1.193059279885597843977642984376652469818630201687039891274008531576206855249264 -1286 -1.193076833605090640941281132480444669148047666333202004046963775421062937257042 -1287 -1.19309438132272410652927986904656325116582634555033980990261030307341634025399 -1288 -1.193111923041401325707714599541261994286512374465402034279207468644872274917375 -1289 -1.193129458764023893440246615480426717168084369759245707564954758585379053483786 -1290 -1.19314698849349191535695223845123773771006194600467288996864093555961951372559 -1291 -1.193164512232704008423061153171142588180066759633375247386052686565705751123188 -1292 -1.193182029984557301607603571049286839512113311751352608749521633177852169689279 -1293 -1.193199541751947436551965866382379632438927749063221901589938334981060028373931 -1294 -1.193217047537768568238354327983107204819101707935930223964147339909512762171162 -1295 -1.193234547344913365658166669704652467595112765778546522284505721252888700372726 -1296 -1.193252041176273012480270943989631642059936531053382816982073092876383534818145 -1297 -1.193269529034737207719191503235820255796018880564785498393499383993475949602879 -1298 -1.193287010923194166403201654434410532542388894900999308688002497301470628032415 -1299 -1.193304486844530620242322653199220532584646515897103465575999708279605249909812 -1300 -1.19332195680163181829622868396726243676440500055181846851864821836801966117809 -1301 -1.193339420797381527642057473812373252056067419995715662201140763882142764805519 -1302 -1.193356878834662034042126187974216084512376959223129904978216931810858282365159 -1303 -1.193374330916354142611552255864874112350703893272206871134454055929389044517885 -1304 -1.193391777045337178485778776974482635611764746472154476200005568216151405572775 -1305 -1.193409217224488987488004156755877218196863484867452105400359615249136498439535 -1306 -1.193426651456685936796515623226078113653124973212498086388688969099666710871516 -1307 -1.19344407974480291561192627567958301974742774809178846804692127044966632755769 -1308 -1.193461502091713335824315317564901882007933976101965236986908981288243898334725 -1309 -1.193478918500289132680271126231539107812272203971281839508610989520033459365691 -1310 -1.193496328973400765449836812909710306490176785491147863746761833777624280671042 -1311 -1.193513733513917218093357926939472684939663455520939534608079133632948122462272 -1312 -1.19353113212470599992823195891965065150658289844978370390931112523531461243949 -1313 -1.193548524808633146295559298099951163843342212466029693679145185777243019692456 -1314 -1.193565911568563219226695299991987051053879982928185257427399774304285251364239 -1315 -1.193583292407359308109703120826561099968980428944831621121833576707247626086412 -1316 -1.193600667327883030355706976135509274605004066753869970223550963877231291118952 -1317 -1.193618036332994532065145481386658192868062051782781736234514973818501363720574 -1318 -1.193635399425552488693924733250020072899963759452809497686662430917438169680551 -1319 -1.193652756608414105719470790722227942040505921488759166728307044323263616438075 -1320 -1.193670107884435119306681215984405134510385565305345321088661084235076193385313 -1321 -1.193687453256469796973775335516166151292475550535841509591095342056866858039249 -1322 -1.193704792727370938258042882635260980379177301878074724684051588299534874902073 -1323 -1.193722126299989875381490683278502142009133903892737723215645798641039885325976 -1324 -1.193739453977176473916387047485053197558913151980358078132145611015291841095164 -1325 -1.193756775761779133450703529687909409573412958005504416316571771053498388226608 -1326 -1.193774091656644788253453721563465832565461502985530646422280989122894028855827 -1327 -1.193791401664618907939928741832445519602660785028309874548996601811324024027065 -1328 -1.19380870578854549813682908804815091959557508229260037775601235108420399243841 -1329 -1.193826004031267101147292516050005087224687060767205727419572331184033631075582 -1330 -1.193843296395624796615817613401666205559934042475561754786024051254334351342004 -1331 -1.193860582884458202193082733773629305944748265476398017985507990985853450836349 -1332 -1.193877863500605474200659959870173137283714738210793797561309920628076300248634 -1333 -1.193895138246903308295623763139768065471147717462979475532874253018964004674726 -1334 -1.19391240712618694013505402914663285263941874491192675016404687450562291762341 -1335 -1.193929670141290146040433118119014355829392399134352941431144670484480740851915 -1336 -1.193946927295045243661936630826964777551666737376438494386730657506527471742195 -1337 -1.193964178590283092642617550578906279795365999005885978928763140520184439047655 -1338 -1.193981424029833095282483432762102722943845103750485358222604422883609805763617 -1339 -1.19399866361652319720246631398730319767655030580684261370850867628693256288457 -1340 -1.1940158973531798880082850135322820684819170267569954320105508817886357085776 -1341 -1.194033125242628201954199500412775630387735380778463573114333290590836774485311 -1342 -1.194050347287691718606657000042406385740640827078673922646568153637907571599443 -1343 -1.194067563491192563507829515075592566436588538134793212714578029901179085191217 -1344 -1.194084773855951408839042435659163051310110058533863099535533682868306962402919 -1345 -1.19410197838478747408409391494943645210800465173075046154829147065917093284772 -1346 -1.194119177080518526692464686381878059560420402851779449613758516532445882273336 -1347 -1.194136369945960882742417999810119749753883286449243024831896695150301509657142 -1348 -1.194153556983929407603989354260116047814867844399901395268137372416280793315993 -1349 -1.194170738197237516601865705673514529606353463264197597774329075006838488927431 -1350 -1.194187913588697175678153828641940812766086459190183106735692051251037725703799 -1351 -1.194205083161118902055037511760837747277794141639981073373274413261658350751584 -1352 -1.194222246917311764897323266857755265426401032860986635332662735205344807825608 -1353 -1.194239404860083385974874232975561895259610692382712345859735717011432085723599 -1354 -1.194256556992239940324931956615941385624478752063625321203021051265915993593865 -1355 -1.194273703316586156914325730372748440777474248663713797041856668223585851477084 -1356 -1.194290843835925319301569172708326426029907804767604110021537902630189389318605 -1357 -1.194307978553059266298843732248737291674663876231766518563795706031446084834728 -1358 -1.194325107470788392633868800596020080565377240410759033981904697268302373487529 -1359 -1.194342230591911649611658118277079446435348341805920564848006788870359508717959 -1360 -1.19435934791922654577616215906960982782579254238749636895762833262424239022555 -1361 -1.194376459455529147571796178565584510038100680472227757092763838788731599021764 -1362 -1.194393565203614080004853613452281979746791065251594875567017068370620617919894 -1363 -1.194410665166274527304804518609584949936465065069756645240617700835685254435857 -1364 -1.194427759346302233585478729740370423994694152836552313939685676214720848056821 -1365 -1.194444847746487503506133439868212395646447290356661653798888520994736930761692 -1366 -1.194461930369619202932404878653342465699311541152956812923024370160073830595232 -1367 -1.194479007218484759597143784093858018225175191160767808476360291587661609344482 -1368 -1.194496078295870163761134356794532859970055125552119955302931225272925478063933 -1369 -1.194513143604559968873696387600271610786306252571848174435867491538053533445629 -1370 -1.194530203147337292233170250005256864233738067447765105738048945123672878941504 -1371 -1.19454725692698381564728444936216744189373317777685687417814103668198006676174 -1372 -1.194564304946279786093405421528497169257359594868138617338755501628345122637008 -1373 -1.194581347208004016378669274198976733333368392161127932343945796728210357079987 -1374 -1.194598383714933885799995164784396571594321181919343631468941881332878148312739 -1375 -1.194615414469845340803980009307746618925273514703416320199230884155764182165578 -1376 -1.194632439475512895646674217398529335408909724638992435355974176029987667161353 -1377 -1.194649458734709633053238149075365985782488672566680273512459441581446030734607 -1378 -1.194666472250207204877478989615602875099544242981783989331004142307152633321544 -1379 -1.194683480024775832761267739418534399538712807370072676717826120218563430530515 -1380 -1.19470048206118430879383601637609358258683831831951143864991467710811562309561 -1381 -1.194717478362199996170952368871418472291115052376150937899345263358747289711595 -1382 -1.194734468930588829853977798131584613373122592436911437767260538238830485537485 -1383 -1.19475145376911531722880018926600001831022094773742861486754631512266456462748 -1384 -1.194768432880542538764647350926489884733530987523166501749569102542942103989391 -1385 -1.194785406267632148672778364128953984512062925555630995724018926984644415144079 -1386 -1.194802373933144375565052941379660425659947006467542768768899584951299134759732 -1387 -1.194819335879838023112378497851745605809909642391097514833705951280645642866147 -1388 -1.194836292110470470703034636959321880650378941599018870631650384456365388010295 -1389 -1.194853242627797674100874753277752008748906487012860310213557610572141349322133 -1390 -1.194870187434574166103404456359133053013978143169267907221435115591371406044112 -1391 -1.194887126533553057199736519591842367220046775332246391325410572074340587066045 -1392 -1.194904059927486036228422058852134823178582672256045400072262050247143790089093 -1393 -1.194920987619123371035157646294243791021743065125849567718922096585469769353095 -1394 -1.194937909611213909130368065223228823510642213442642366792810619883451671565638 -1395 -1.194954825906505078346664412591930768214269165947009584334050064572774381939162 -1396 -1.194971736507742887496177256259840392842636063148012679383436523309298696138786 -1397 -1.194988641417671927027764554747459814057504725192163385997296649548560628785512 -1398 -1.195005540639035369684094047814837324905074421049817384093360256491595028517556 -1399 -1.195022434174574971158599826787385877872956943811983581639238794007903302540707 -1400 -1.195039322027031070752312794145853757797172113151932833033249291649224343259392 -1401 -1.195056204199142592030564722490403130831569167095391296151689019645475304398679 -1402 -1.195073080693647043479565623581168442905399400005771740721945380661263879916533 -1403 -1.19508995151328051916285413874941232506003718011061151289235803960638929449655 -1404 -1.195106816660777699377620662564472006356644810381703725115401479314615056035334 -1405 -1.195123676138871851310902912232094501321101555739413943988915452703422984983341 -1406 -1.195140529950294829695653655789494292829955509286992546624208199032967516506274 -1407 -1.195157378097777077466680312751533138678051167074495816437693705338433934431727 -1408 -1.195174220584047626416456141450818257585108500062799485374907511637710481082656 -1409 -1.195191057411834097850802727902242765915266183709889033186429318179213874600846 -1410 -1.195207888583862703244443491609551108757338597638122340645218874899845416708148 -1411 -1.195224714102858244896427924317902628134055509312756579047506559433506324391221 -1412 -1.195241533971544116585426278302128607894935357188663703720383238003765815239118 -1413 -1.195258348192642304224894421365432401244474813283024096119765064336412070369224 -1414 -1.195275156768873386518108576307668855831927924172662293780676617577015804987385 -1415 -1.195291959702956535613069663206058476866550719767414512792603376163531300378917 -1416 -1.195308756997609517757276963434243885823227554302325585740606196071503418139555 -1417 -1.195325548655548693952370824927981416979707454902029920069170068019728861141313 -1418 -1.195342334679489020608644128787479423297946293726237958269665814313053290052328 -1419 -1.195359115072144050199422237887447315052256270888531629008161649722490029415072 -1420 -1.19537588983622593191531114874630580814084462213223887211456324104388436376099 -1421 -1.195392658974445412318313568485729594216831262489299499783925907861811956557662 -1422 -1.195409422489511835995812639290748942655607457508216606439050202659003659760758 -1423 -1.195426180384133146214423033359026886943231632831434962029725506957719868330661 -1424 -1.195442932661015885573709141905653918317892866622735796053949382553671731982648 -1425 -1.195459679322865196659770082366862791398876456418442850143369539859799702265885 -1426 -1.195476420372384822698691248522462425050133558266925583922558295438911525241268 -1427 -1.19549315581227710820986212883252224277980969357279576183157372186825933736441 -1428 -1.195509885645242999659160118858906927476881774958692526269183802393104030581804 -1429 -1.195526609873982046112000054216666753104497471864738664378881568761581821999636 -1430 -1.195543328501192399886249191074030689945483414446345494776049435629099743751093 -1431 -1.195560041529570817205007361792828649929769200021536128412100301515466240418352 -1432 -1.195576748961812658849252033873585835225876515986948674619499928453574264551475 -1433 -1.195593450800611890810348000941286468364137153704866539847283517444928009603776 -1434 -1.195610147048661084942421435078896508344744507476499302718114782053527674127971 -1435 -1.19562683770865141961459803038616558808430306165585648665967338500325796560413 -1436 -1.195643522783272680363104968210997638730351605701948249180758310208015675888134 -1437 -1.195660202275213260543236435069787791326037813508357178991254297869700630926161 -1438 -1.19567687618716016198118242484157046247643494419210850825325561626018737044486 -1439 -1.195693544521798995625720557388610335428298250647175799346681644731739038675566 -1440 -1.195710207281813982199770646323194539631990852258163049655725818358485032127335 -1441 -1.195726864469887952851811749206851009641340886400129122476468192296930687879001 -1442 -1.195743516088702349807161434034025068282241457975907317746777712520214108503947 -1443 -1.195760162140937227019116996417394030462840048259079637705230945236901320558884 -1444 -1.195776802629271250819958362456488364803815788421311493978016153067456436989121 -1445 -1.195793437556381700571812412835117983347425742226242445266950987490694468461301 -1446 -1.195810066924944469317378464256273858780539059791422624768204831057262979688699 -1447 -1.19582669073763406443051464488568869860913699795861545390544531597222084160664 -1448 -1.195843308997123608266684901037096142183285605424028423128910632205115260446287 -1449 -1.195859921706084838813266372893426195926762260511633700624274835754338349851584 -1450 -1.195876528867188110339716877618715692006193144844028787236810660679849061686353 -1451 -1.195893130483102394047602238775396754306730869612540504308877199830489615785953 -1452 -1.195909726556495278720483201520853892181768675264699199896291015785540089897961 -1453 -1.19592631709003297137366167361571172711722458600885923718972075758274341111885 -1454 -1.195942902086380297903786032834230801184964370531341698518827670182037845978951 -1455 -1.195959481548200703738315241924448730824233628770644630284850392453597600702141 -1456 -1.195976055478156254484841512822308467831334134624268402684662069470196550043558 -1457 -1.195992623878907636580271262379964925077232474408559718103442291583517372511179 -1458 -1.196009186753114157939864102423756031902286202563574093489469992887262371336873 -1459 -1.196025744103433748606129607511964718716412204257666905278834610437608340466759 -1460 -1.196042295932522961397581604316484708285760421598831472171506572006900592589641 -1461 -1.196058842243036972557349727105835629598332250034476594172249137604590949538049 -1462 -1.196075383037629582401647984359652187013847086795839209867278226535363277890672 -1463 -1.19609191831895321596810008209679823141491080944029449423218826839991937320124 -1464 -1.196108448089658923663921250050629910935864723590431529276180087715331745926434 -1465 -1.196124972352396381913956317375652947049320227762130277569271875466877557369419 -1466 -1.196141491109813893808573785119887808679835001211636485733826328942808983458355 -1467 -1.196158004364558389751415643246673464772538910715837589294879153722081768688179 -1468 -1.196174512119275428107002680538405807393174157547277760615828694942885800311605 -1469 -1.196191014376609195848195036262821076831475081062723914930015175932898366700599 -1470 -1.196207511139202509203507743029898012010458440782936850309102316559573571454639 -1471 -1.196224002409696814304281010814265319287071294732871648486073615902768127490181 -1472 -1.196240488190732187831705002664163726807257083950049989569095474801051891295616 -1473 -1.196256968484947337663698853163524697115617285300838010375713265008697583182774 -1474 -1.196273443294979603521643681258591135700298001448641799297711665959054676450467 -1475 -1.196289912623464957616969349604719486377228549389720067751262609386920723398841 -1476 -1.196306376473038005297594723132567775496790190112481957592983129191810238348364 -1477 -1.196322834846331985694221180075790786312327741557088608832325771698415527380302 -1478 -1.196339287745978772366479129244631943711918963596846477798886229807927064094655 -1479 -1.196355735174608873948927287871421999913962004725433437538614861386727802968537 -1480 -1.196372177134851434796904474894967566494941325557319472271228643912868651854129 -1481 -1.196388613629334235632233675091138270882584976963263676500520376626410442422718 -1482 -1.196405044660683694188778129996640160631671337019884888634140064134490381460295 -1483 -1.196421470231524865857849212111995271615727595794528307669738526703009457357262 -1484 -1.196437890344481444333465839408133352716006616585618396687197583232459856367927 -1485 -1.19645430500217576225746518769874193645400499892117621820672832600684521125032 -1486 -1.196470714207228791864464458977615599861197200789454412216530009156520589250154 -1487 -1.196487117962260145626673464356694711053532728838648563976015593997860089739654 -1488 -1.196503516269888076898557780776288543597514546340829949424984779004020639577155 -1489 -1.196519909132729480561352241194137702710200965736223537794782431928862975772888 -1490 -1.196536296553399893667424518494486685286926255680606775527204386253095462839757 -1491 -1.196552678534513496084488563892209431123327758063792219738047619419431934738731 -1492 -1.196569055078683111139667661140259257680464350737813872955778734724036313167257 -1493 -1.196585426188520206263406858381299948281057045679475092811065510219556949292236 -1494 -1.196601791866634893633234540016317327425333051165167890415290592608297092010667 -1495 -1.196618152115635930817372901494310751434214527334121311526117646048965865616375 -1496 -1.196634506938130721418197090457821913073660485937298446217447168028531181012003 -1497 -1.196650856336725315715542778209074551142186238570002967720735503269455870044959 -1498 -1.196667200314024411309861925990873416913590807772165524597335815590400858526319 -1499 -1.196683538872631353765226511105144526259622662539297265667961487698255945781698 -1500 -1.196699872015148137252179978420091667411843279655106637641200643808685318511508 -1501 -1.19671619974417540519043618334439668857264798456898133694744055371680092686508 -1502 -1.196732522062312450891425592873703606598803426416416072313885383705006477311117 -1503 -1.196748838972157218200688511840799408132664852872737968461953064386294111980076 -1504 -1.196765150476306302140115102026437908948316318580176511637542998295143260211944 -1505 -1.196781456577354949550031962312647547737273221183632819649631366341895163737454 -1506 -1.196797757277897059731135038584619869626312876272750218312803403146206667330501 -1507 -1.196814052580525185086268632610893055660854482717766076120737308807209335817704 -1508 -1.196830342487830531762050279654524531277697556421605097150758713900944410884475 -1509 -1.196846627002402960290341265090288794118678098374454299666477837053289343315259 -1510 -1.196862906126830986229562550824641494798002624112859597098849358146111588981217 -1511 -1.196879179863701780805855882836258839532054095615962265881981995768459891680021 -1512 -1.196895448215601171554089851675392917675049738599879649023884147961000903675519 -1513 -1.19691171118511364295871067828007894768017278960736307700975941915762265802877 -1514 -1.196927968774822337094437497986390040023242211439579799320880535025070272377241 -1515 -1.196944220987309054266801916128459254077670561301087014012384024316090247037396 -1516 -1.196960467825154253652531609141877837399001874312358478432384472876301166656028 -1517 -1.196976709290937053939777745601332940635969999883451409412654864198878703422901 -1518 -1.196992945387235233968186002139968160288743527557750743155558153057675733805171 -1519 -1.197009176116625233368810949713936336421600286196997727705820646096525827877056 -1520 -1.197025401481682153203873586190966485523371193938564199427911959904535642623481 -1521 -1.197041621484979756606361791756485942987270565751901319701468727295515473247578 -1522 -1.197057836129090469419473484144925088817943281037032798749250892098913112187515 -1523 -1.197074045416585380835902251217285798503667821939147508784269840209659288845874 -1524 -1.197090249350034244036965238918876363518936470535768172886031132021375482477072 -1525 -1.197106447932005476831573073163305428314808373300486933570451587966020555341426 -1526 -1.19712264116506616229504159470038585924078344703396032322157444695217782106293 -1527 -1.197138829051782049407745186536526762610461255270210519098886747928612521131601 -1528 -1.197155011594717553693611473986488471717754516076784999014532848272550660418386 -1529 -1.197171188796435757858457177945041594327731833368829989856822380117880448699 -1530 -1.197187360659498412428164902476107521953214199264324360363493441224601568749548 -1531 -1.197203527186465936386700638325364519679283063149806172271658714917648413484516 -1532 -1.197219688379897417813971764470081010651568222652026539700149979810309195118634 -1533 -1.19723584424235061452352533032708631348088999678740957055291215506623945129439 -1534 -1.197251994776381954700086401746309255255650159437523785304440852551840005414494 -1535 -1.197268139984546537536936254423207139749398405312069356831772603664394416181189 -1536 -1.197284279869398133873130198868671872552511351840857280231848324355679084480747 -1537 -1.197300414433489186830554821579637005662534841566297412424370611915388978197388 -1538 -1.197316543679370812450824427557619437583641783490470576405221530905860091842268 -1539 -1.197332667609592800332016469825812865882794308998331667959337338549359030502758 -1540 -1.197348786226703614265245752098107212721491625584109724839055150875239293609322 -1541 -1.197364899533250392871077191255539506039544687323602346957295360744569021259018 -1542 -1.197381007531778950235776926787187476339669065078129031510184102901089305259623 -1543 -1.197397110224833776547401564853397798550992117917469148610225689320587275243222 -1544 -1.197413207614958038731725345129496847988868260171954558200055897707413747718016 -1545 -1.197429299704693581088005019087763427338839845330837895054343312534220364359149 -1546 -1.197445386496580925924582228874450536840684364270857549507158528437788092927643 -1547 -1.197461467993159274194323176437027282003376733459517430232949167538815364996318 -1548 -1.197477544196966506129895373054572822412463456183275994243743703875998424320474 -1549 -1.197493615110539181878881259921392242263921367318298644728494506469197430430351 -1550 -1.197509680736412542138728490930439749533587706178705217128491964119806378021107 -1551 -1.197525741077120508791536669299028068120907853730109125212898224750309479466964 -1552 -1.197541796135195685538680330174574658431217834831644262021444116170743208713446 -1553 -1.197557845913169358535267961852785869809471123886703494579574720942072983750603 -1554 -1.197573890413571497024436858734709676721181328295485837889521863473684369247405 -1555 -1.197589929638930753971483599642496663885167655414047498627593684805209842869413 -1556 -1.197605963591774466697829945606497788567382314743195252861619697657735332060938 -1557 -1.197621992274628657514823951728496546391041655636901623651536912848582476494703 -1558 -1.197638015690018034357376088217422886323614983025075497846322912973106067567291 -1559 -1.197654033840465991417430166184826947554172840555882255694948638818919529200064 -1560 -1.197670046728494609777268864277702812930800724961368990283768622376342855548834 -1561 -1.197686054356624658042653652715946378207632791698610847023284272177838720344082 -1562 -1.1977020567273755929757989117908075118370275170390063715768981696372446899171 -1563 -1.197718053843265560128180042369155315276398750847661396175679748658757663175904 -1564 -1.197734045706811394473175366436216878159917573240256148943678980808976757447699 -1565 -1.197750032320528621038541616196674846165536557182843784235532765950571791460586 -1566 -1.197766013686931455538722810740617772491881188936188025173987532167177533786431 -1567 -1.197781989808532805006992319766829997600692634508062956964280418331552054427201 -1568 -1.197797960687844268427427914341285087878120906047233770325085073661801298568914 -1569 -1.197813926327376137366719605153469054265305694025217042266973764115017132116506 -1570 -1.197829886729637396605810069217307059389395041045565189575909978094435669247855 -1571 -1.197845841897135724771367466447000499512884789066265390719819959191860310472065 -1572 -1.197861791832377494967090448021000609470149330066310672098355337721136724772327 -1573 -1.197877736537867775404845158929650478966703213062170204885497343679329771346525 -1574 -1.197893676016110330035634037583719982001109191699696750924320346774519740181035 -1575 -1.197909610269607619180396215842138003081569008249887450624177565693057459245062 -1576 -1.197925539300860800160639323297693890224567112178070136466785876081926751024105 -1577 -1.197941463112369727928902500139335671839808361286643062143262844890217023211431 -1578 -1.197957381706632955699050423388936639442707611579568033643285696898855191407035 -1579 -1.197973295086147735576398151789034818129182034265711808046679916719034834917582 -1580 -1.197989203253410019187666595096072019848958412511894172741840011191973502911091 -1581 -1.198005106210914458310768414011070999187139282638711066566406487279731335005762 -1582 -1.198021003961154405504424157456491106583537206839592758875097144448047306555296 -1583 -1.198036896506621914737608444384195159166969409491833828696565083676386929888955 -1584 -1.198052783849807742018825997775043424643973100443329719573587377405106127597033 -1585 -1.198068665993201346025217338965605039447375994122007179239285253319896167632852 -1586 -1.198084542939290888731493950911843259608886091608613913985382485094898471666456 -1587 -1.198100414690563236038702719473389073057807927325729517497220616290497044460779 -1588 -1.19811628124950395840281946227516828724650249472323158937142375475454772265191 -1589 -1.198132142618597331463171355175690648636025103821330472952906476768017217920144 -1590 -1.19814799880032633667068806684324625360612379371954099704288945291977864332135 -1591 -1.198163849797172661915981412412584877233471961579087477832134396364781309236793 -1592 -1.198179695611616702157253337665378281046549366720455794000288255360802106488472 -1593 -1.19819553624613756004803204564788446773329183783822061524062977388811628511283 -1594 -1.198211371703213046564736078108746634746746995870604528013107147628900769397666 -1595 -1.19822720198531968163406616460876864520020021451797221103549132988995392121296 -1596 -1.198243027094932694760224652622813589217255512404942912315087852949798688177333 -1597 -1.198258847034526025651962332421672858327374348682970016119646341437654355012678 -1598 -1.198274661806572324849452470988850506366657813749840502144733702999432596427642 -1599 -1.198290471413542954350991869693701929918080187954853848139984709299171495205739 -1600 -1.198306275857907988239528760908257477330981871293391779127256126361724952558817 -1601 -1.198322075142136213309017359220350895985164796056108541355143872504175996525923 -1602 -1.198337869268695129690598883360359961359444649534886438588367399869157633146223 -1603 -1.198353658240050951478608865422952607734895109500679219792596718798949061284932 -1604 -1.198369442058668607356410564428716808571590409194124041345344150018148706074964 -1605 -1.198385220727011741222054301733436744759741459380886615084567893411924709480709 -1606 -1.198400994247542712813762536255061861527647411259127626415419470011004645959853 -1607 -1.198416762622722598335240497950099660703952140345615900707732022658430495337697 -1608 -1.198432525855011191080812198432247915640186403256269109385402785993041438679916 -1609 -1.198448283946867002060381638086567843204755368935870947023313504963802289966808 -1610 -1.198464036900747260624219029492387033105650273882791053559336081310210771216579 -1611 -1.198479784719107915087571857427410032069075504477229672755926720476635586619536 -1612 -1.198495527404403633355100596184205822213960841670054791427494861064924429083259 -1613 -1.198511264959087803545138905388335432870887635269552971054021737800934512429894 -1614 -1.19852699738561253461377812596487999708268315504250215100957359602713132862764 -1615 -1.198542724686428656978775898357030122506320436745615881713275001344789546124853 -1616 -1.19855844686398572314328872555670190625203759056542690609862747463470126477175 -1617 -1.198574163920732008319428303962853699610386524214789424727038371420184079175745 -1618 -1.198589875859114511051641445538291237317902172047817341099073603195839246588612 -1619 -1.198605582681578953839913415190267403103611149206710611565584766246972363993359 -1620 -1.198621284390569783762794507754107125265391522289085168966143574427994884687017 -1621 -1.198636980988530173100249689412418099885994436971454121412572606382694153874181 -1622 -1.198652672477902019956331128835184642364779768040900034946186007761722256845456 -1623 -1.19866835886112594888167344377818538797470965069308428319837039617373721161657 -1624 -1.198684040140641311495811489328726217324747748625590656037260358370465905037389 -1625 -1.198699716318886187109320514438638091491132259579552786265010630635193360591704 -1626 -1.198715387398297383345778513834855863156065586613519559811257673771385673645056 -1627 -1.198731053381310436763550602847669003739365018661895229147522845457299886588276 -1628 -1.198746714270359613477395243145918972006555021775080489630524476395876516049124 -1629 -1.198762370067877909779892147817011067161306715722485965166926650917382209691373 -1630 -1.198778020776297052762691694677611479550857340506949013859950548288666385182063 -1631 -1.198793666398047500937585677148313295791864638672474181988092102687515278486767 -1632 -1.198809306935558444857399222472378853712564514121640552057095871455116584404248 -1633 -1.198824942391257807736703707504900497744035239906100955690758709925328441320164 -1634 -1.198840572767572246072350502744367879402926988789581953085107118496120990318402 -1635 -1.198856198066927150263825375723687902797200067651646880630495004507279475270554 -1636 -1.19887181829174664523342338532217365454289256378209552611820984764968719459021 -1637 -1.198887433444453591046244099003901604369777795007905659394068279197426223444064 -1638 -1.198903043527469583530006965431132440659205808055212825540312424096876508519094 -1639 -1.198918648543214954894686675344200538214606545646012576262532651222632954933893 -1640 -1.198934248494108774351968344041400668101910680741721711025528926811560670237446 -1641 -1.198949843382568848734522349233938576170824880658157443446853511258942917863439 -1642 -1.198965433211011723115098658491964903003027685211885363147043658012432973925383 -1643 -1.198981017981852681425440480938080019019497587487689548117159666057702677178646 -1644 -1.198996597697505747075017078284481130168722025388996944217869096810209562624239 -1645 -1.199012172360383683569575570749122898223441491356454213766786392379391231303262 -1646 -1.199027741972897995129511573824879241807232137264021677828290666986981818168266 -1647 -1.199043306537458927308058502313727366781199863027867319256658954837630321387949 -1648 -1.199058866056475467609295378475425844826935191121954202247542320670265174240352 -1649 -1.199074420532355346105972981577027144598070148227777304027676869823365702387645 -1650 -1.199089969967505036057158176565851848662335739326261842271029388790357177510239 -1651 -1.19910551436432975452569626002425728994945561015836935866230147421317374986867 -1652 -1.199121053725233462995491161999657942233335264640103187822483985536862795618352 -1653 -1.199136588052618867988603342737799029328750427860044903911813241772134995391284 -1654 -1.199152117348887421682165223781248906533001874191631906885101844177589391527883 -1655 -1.199167641616439322525113993328460245090495565025839956107982209278291397253104 -1656 -1.199183160857673515854741626181555346138292770332103793115496087088274977135056 -1657 -1.199198675074987694513061959043217455073233775477677492845937206072211980648474 -1658 -1.199214184270778299462994662354718171268521024870075511372689476626939976158881 -1659 -1.199229688447440520404365950298181382592139008110912620936546532453332594261731 -1660 -1.199245187607368296389725871016677030601779679754981664195757878128294511205034 -1661 -1.199260681752954316439982019535653862297603844767431516115734974923217981706347 -1662 -1.199276170886590020159849516298559579915629563600173909151515111623897522785972 -1663 -1.199291655010665598353117094658259893772970209460105165686365126774714850980084 -1664 -1.199307134127569993637729141094055347283351961159238562478466766471101396524514 -1665 -1.199322608239690901060683532351706850916655012786770313100268348591428486440371 -1666 -1.199338077349414768712745114130918066364403105300977599357723288116292952200536 -1667 -1.199353541459126798342974666371185557092261879913197101421032642066609155266921 -1668 -1.199369000571210945973073200612816400720028601557536086616961643568715708830517 -1669 -1.199384454688049922511541435335228176487789998142396644354680048335673195606795 -1670 -1.199399903812025194367654295599388331969452286101430530031224950410157835592402 -1671 -1.199415347945516984065250283745419332012268425591662104610050401833323148151139 -1672 -1.199430787090904270856335568319993134746791872687227461709945810519198284310682 -1673 -1.19944622125056479133450263883116385986022677144548898121871735040524383231457 -1674 -1.199461650426875040048163374350741448890577934981678767660719311636850661679308 -1675 -1.19947707462221027011359637440619210210923390123704399665318942087640560224807 -1676 -1.199492493838944493827808401025363747940243530070421326853230782368999111531771 -1677 -1.199507908079450483281209781218077195432823002006488722836003704965345872550524 -1678 -1.199523317346099770970103619598796374967418186103087803033727696301938307165971 -1679 -1.199538721641262650408988671274194624331384407149205573477412796450381342436635 -1680 -1.199554120967308176742675725538468764031012777718589858687895701883558048027355 -1681 -1.19956951532660416735821735133771916497972851023056522752930466293139260236841 -1682 -1.199584904721517202496650855882612581567807914380864014868652398163831191918531 -1683 -1.199600289154412625864554308205875641907383789106529388318955394895473490390923 -1684 -1.199615668627654545245415479877930993366779812916708191811311170754449618363618 -1685 -1.19963104314360583311081355551018563424574264919883496930185139380268351267471 -1686 -1.199646412704628127231413466091112360757796817894947963881059648733547467014688 -1687 -1.199661777313081831287772698615330961810068022800503492029996023161075269413804 -1688 -1.199677136971326115480960435880396242107314990073413733730704207708310309975094 -1689 -1.199692491681718917142988880739935586826873864769180438369668041414201020549906 -1690 -1.199707841446616941347056619515150038752553174765124025775611911316606054175535 -1691 -1.19972318626837566151760387967950018182054892591103117319091958518155734386479 -1692 -1.19973852614934932004017953734364195428406109561380760026175054343974159064835 -1693 -1.199753861091890928871119730479358291170954630684395425285828059634523884993579 -1694 -1.199769191098352270147037934232350660674614761598466776788347770597570820725972 -1695 -1.199784516171083896794126355084310554122859631137962182305846703918924717607156 -1696 -1.19979983631243513313726850103468525600886833442557284596731191156676719271369 -1697 -1.199815151524754075508962785381985201289800480146569405864119740011474728047409 -1698 -1.199830461810387592858057022093352364062187416431258676184410982613331639859266 -1699 -1.199845767171681327358293671159420857356211861041735132081445463392948454843847 -1700 -1.199861067610979695016665692739252700948557918733192354742989285534726675787889 -1701 -1.199876363130625886281582869307323975815523868609539684433576019610094198029718 -1702 -1.199891653732961866650848455421169773417558244313579888337052772966967169472422 -1703 -1.199906939420328377279446015134370908947494674890639048599551214831323358000926 -1704 -1.199922220195064935587136307485081743750973410634714723142557479878504538464332 -1705 -1.199937496059509835865864080895257097339649679278295519709435909793118853361657 -1706 -1.199952767016000149886974637720137568002049446137012984009252119169718516367251 -1707 -1.199968033066871727508240030591397067443135792992812245490860884035105417012773 -1708 -1.199983294214459197280694752600644453853237650602516328787590884973929068528725 -1709 -1.199998550461095967055280783772703264251169158650429906003383041033312484044621 -1710 -1.200013801809114224589301856680270146024206621409994228456504700557354721924564 -1711 -1.200029048260844938152686804453174114684155235867408818914348473842037481709506 -1712 -1.200044289818617857134061854836525665583206992028865003801624665889397641843858 -1713 -1.200059526484761512646631734352557487517082632889946418294194813034078120417497 -1714 -1.200074758261603218133869447020917511837855602973726392674742188828980677625826 -1715 -1.200089985151469069975014592491580728175175799229917912899628424917412186711482 -1716 -1.200105207156683948090380088843399053609298585942023320716497412613723527279382 -1717 -1.200120424279571516546467165699609002854130783532659568971761227723303351350762 -1718 -1.200135636522454224160888493709365419608129885541948126869120967989394742645996 -1719 -1.200150843887653305107099316841566540841139738205551953558768373054606184890076 -1720 -1.200166046377488779518936454333881623741184140009452775657661582888945338740971 -1721 -1.200181243994279454094965039535987716889367613194095521167773299135791557491478 -1722 -1.200196436740342922702632863281567350711447294246297337275773366970697456215414 -1723 -1.200211624617995566982232189818614405323211909563095575767814254532188254823732 -1724 -1.200226807629552556950668913722041634697355368424599009456019243589208416684395 -1725 -1.200241985777327851605038926606480732986020946765772919028834598891059832921491 -1726 -1.20025715906363419952601156285051487038789768850311800033179164436856709764821 -1727 -1.200272327490783139481019993936384750900469351038261981510948434148721660806627 -1728 -1.200287491061085001027258441401462901590256372234083077683504590470405410380446 -1729 -1.20030264977684890511448607878949754178307555670587278150867364725800763120043 -1730 -1.200317803640382764687637493380787450150013515841672233749247392179102724391831 -1731 -1.200332952653993285289239578871063197559842593818300470159958445521118751335537 -1732 -1.200348096819985965661634730558918393489422840087401297845819288738205580336057 -1733 -1.200363236140665098349010214991157653620417710577824355034569913413868481419542 -1734 -1.200378370618333770299233586404406286077582561364980053749314906237173785553626 -1735 -1.20039350025529386346549402268976066383736134916810248549022079312267251399004 -1736 -1.200408625053846055407749453995148351592399189911910207395447038425371101348837 -1737 -1.200423745016289819893979357467413737413388656504971760037210908024491704725832 -1738 -1.200438860144923427501243092022948633696891708332062588323079368077692279343326 -1739 -1.200453970442043946216543647421948509094073402821864837836804376004311202431919 -1740 -1.200469075909947242037496682307094144521736676724826459919669827832809350978298 -1741 -1.200484176550927979572804726252636023276436282147105022727988630290174129721682 -1742 -1.200499272367279622642536421254495119187499810405661978933984752449312888460816 -1743 -1.200514363361294434878210678476089389306433572311325088005929145760051268179252 -1744 -1.200529449535263480322685626448150660655862814343480702327288784835868073511499 -1745 -1.200544530891476624029852227303812176033028040124262495397937346043562091760292 -1746 -1.200559607432222532664132438012723283926145914093045640199604145010925337839711 -1747 -1.200574679159788675099781793959885074563176087732980257826443138028015600505152 -1748 -1.200589746076461323019996292596299630437851151220315742310504542501355649978232 -1749 -1.200604808184525551515823455269386427971259359960203750339340562773136467882507 -1750 -1.200619865486265239684877445721442750049045205628223338304892458517614398525241 -1751 -1.200634917983963071229858124124211199959130969959432353049334495763222807230976 -1752 -1.200649965679900535056873915896866998830280969171081362121365082475847727566896 -1753 -1.200665008576357925873568374933451154276454594272137142751185194389530593383332 -1754 -1.200680046675614344787050321243953260973770972168457004621797693298492617813338 -1755 -1.200695079979947699901627433390890087871822860755218916815165531589722155825287 -1756 -1.200710108491634706916343176480333675350877713272566975721508556415732855435261 -1757 -1.200725132212950889722316946842915862707425730288454085099709642587199040501719 -1758 -1.200740151146170580999887314916375445851533963287341105019097697697339490484421 -1759 -1.200755165293566922815558248216719981140553292201305168082885552049731314068039 -1760 -1.200770174657411867218748196660047058104307798663831071912446704877894243162601 -1761 -1.200785179239976176838341922871510115824119681240726523198241694520611538677394 -1762 -1.200800179043529425479044960491822029435121566450124631886352034569376715512877 -1763 -1.200815174070339998717540583865066199285957144712301259786783279871088596001812 -1764 -1.200830164322675094498449172864430190502644194333292249835220282796676667874334 -1765 -1.200845149802800723730089856984791549985704945813338888840181443912669448066504 -1766 -1.20086013051298171088004432320286972627281699805818855749442410035612216954595 -1767 -1.200875106455481694570522672476912490402259379195472316163274319726430389936642 -1768 -1.200890077632563128173531210128610358220649253852188133302054202412511121293389 -1769 -1.200905044046487280405842055720128701921861086204267412320872117740749505943154 -1770 -1.200920005699514235923764458408814966535600202883041793286034366012874903689727 -1771 -1.200934962593902895917717704131278131278295022407155410140099729218582342439584 -1772 -1.200949914731910978706605501337149731930016663973509738817344246259932395696808 -1773 -1.200964862115795020331991732360920844621478637150056749210828013130786365484619 -1774 -1.200979804747810375152077457887807879633867912463069141725767632112500074736628 -1775 -1.200994742630211216435479062336632302175379011695714219710903916215398181183476 -1776 -1.201009675765250536954807428349205941859352688384526687501699292080153945984897 -1777 -1.201024604155180149580048028941694830139181762458270450568279041465711113753328 -1778 -1.201039527802250687871741826238890971734210937533111050539954804139811914469648 -1779 -1.201054446708711606673966866077253568696969260993388738400581105868047988914475 -1780 -1.201069360876811182707120458126989430920575229793563217913640715955109826896967 -1781 -1.201084270308796515160501831547327081366914761291179995348850774500681867060469 -1782 -1.201099175006913526284695156552500855016042090471868090114610327645154339978556 -1783 -1.201114074973406961983752822628800554502423430533890009131425023262648657341054 -1784 -1.201128970210520392407178864505359419722205160249285349509632304986644041819833 -1785 -1.201143860720496212541712427343148750575003039816933124698888075542488149002089 -1786 -1.201158746505575642802911162967921948748876319843281663729836006611118256267187 -1787 -1.201173627567998729626534449333604473469464435035350861542903740622040028438896 -1788 -1.201188503910004346059726325762859694909671165967174400107519270796229097662042 -1789 -1.201203375533830192351998036871274335083844858815112995581073625936483209903837 -1790 -1.20121824244171279654601007844080156721077024711235628993422839539471981508368 -1791 -1.201233104635887515068153638866775358493659410101713797957031451184189789192207 -1792 -1.201247962118588533318931330160966745891938879019427483342882171264601537155556 -1793 -1.201262814892048866263137102850791887695219707125767898447318409519617054217058 -1794 -1.201277662958500359019835239471903393586144533675927235485657226444001294512661 -1795 -1.201292506320173687452138321708001060511549579688459137991380732525698601866334 -1796 -1.201307344979298358756784066587786189268753664169341021069881282436572364974347 -1797 -1.201322178938102712053510927504555585534954702716078959081253777500661739146059 -1798 -1.201337008198813918974232356178987617481311408883892207269346958044295261757991 -1799 -1.201351832763657984252009622040213768555923746413559689247607363492626143474267 -1800 -1.201366652634859746309823085854295447004693197907895199962782738195035901787362 -1801 -1.201381467814642877849141824782737851814032165134709814067949764722519429423772 -1802 -1.201396278305229886438291506406670906666202310788153973704336147324283887754628 -1803 -1.201411084108842115100620409604812117930328980204798703948292110840240383697253 -1804 -1.201425885227699742902463490525298148474055324205837527870419377573377718295635 -1805 -1.201440681664021785540904392242931385045644129892247689909053101388731264833332 -1806 -1.201455473420026095931335297044335272085005566716498887344458868167305632161567 -1807 -1.201470260497929364794814520633948148081678908326634687044720365653553891287626 -1808 -1.201485042899947121245221747903710211079976345738474960414635145656286553796177 -1809 -1.201499820628293733376210810258712516771299325821987718627098475898884977190563 -1810 -1.20151459368518240884795990483998103500784481419192827172854216241403942998485 -1811 -1.201529362072825195473719156333963217777656009876858615781635787695685463274938 -1812 -1.201544125793432981806155422406169723014264786706512354616711570420048544269079 -1813 -1.201558884849215497723494244143800353448507693489263561397744708278597631599819 -1814 -1.201573639242381315015458843239051367474985412183428421467409373191340162638605 -1815 -1.201588388975137847969006067991161559185183111523913514208149912337544074364292 -1816 -1.201603134049691353953859190551107346850749083077527911305915450392421113230359 -1817 -1.201617874468246934007837458178203012812858005878982208036939938861810909158482 -1818 -1.201632610233008533421982301622701662586304044801419937399343357151103016976125 -1819 -1.201647341346178942325480104092825876708227509385136577707351314558674153058433 -1820 -1.201662067809959796270381434608484875186924140766196038386779375693301671629204 -1821 -1.2016767896265515768161166498872577611178552606960498500373730038865025546343 -1822 -1.201691506798153612113807769251040516958293246122049151666029102499863511677691 -1823 -1.201706219326964077490376527384068353958809857305273621659654100194147184504274 -1824 -1.201720927215179996032448510114835222250745369176895220749744835947061296807336 -1825 -1.201735630464997239170053278735739236036083629896250769586989606658599770986859 -1826 -1.201750329078610527260120388715086915211112388643472678639639533480370856266011 -1827 -1.201765023058213430169771208996390951606906599836752301426810387468947221976599 -1828 -1.201779712405998367859406448419696134913418641042245992543343799545696418865621 -1829 -1.201794397124156610965589296138966580370147491517098388798761012544681078433912 -1830 -1.201809077214878281383724083248364947588940774399741274347489778642037788151994 -1831 -1.20182375268035235285053037316855138758964030853960567988747807748137145385015 -1832 -1.201838423522766651526312388681926963474059141146162452635324685134347896267742 -1833 -1.201853089744307856577023683843043719364725323867347019086131691005573887257801 -1834 -1.201867751347161500756126969327201882546641005363703120042356080586755681889204 -1835 -1.201882408333511970986249000116554335454474283871443431304103698953176944905317 -1836 -1.201897060705542508940630434758839947551059374835643913537340782126643995293089 -1837 -1.201911708465435211624370575769171072576860300937715492422870315824844570040039 -1838 -1.201926351615371031955466901080106954467943719865246040148502089156011816990397 -1839 -1.201940990157529779345649296779554405817215909642545673364747354764561015812961 -1840 -1.201955624094090120281008901709850386485500514256026321700251339880790218582267 -1841 -1.201970253427229578902421474834698477269515252001503136693447529521264220526897 -1842 -1.201984878159124537585765196613453174834423407636815145084679452064028363567581 -1843 -1.201999498291950237521932815954572889866971026455259422495881671574822547574988 -1844 -1.202014113827880779296638054651894971063641292993420704486190181901083008883826 -1845 -1.202028724769089123470016181538724463612602973286004139905581982417427744859557 -1846 -1.202043331117747091156018668925573102746499377182984690535335170889420544470262 -1847 -1.202057932876025364601601844217736701234169761946164509892914392770425884155243 -1848 -1.202072530046093487765709449938758074851616634408621229843879599976390064942079 -1849 -1.202087122630119866898049025715189422442578547833338275415077801000586184572618 -1850 -1.202101710630271771117662026106943097670539217680434391311403506881535340703879 -1851 -1.202116294048715332991287588495903438506159879723694286820654776775690671972531 -1852 -1.20213087288761554911151986557336521842059292828762926912165462547971208538534 -1853 -1.202145447149136280674758837294266810702636293633814165184512814887731769694498 -1854 -1.202160016835440254058954517493098774824738684073579271607065643231685713925192 -1855 -1.202174581948689061401144470682791741888510519925688867092490490306809370096002 -1856 -1.202189142491043161174784554883821655422930668361346015455100356227614828825502 -1857 -1.202203698464661878766872806656216074724142848851201854019481675044483993044934 -1858 -1.202218249871703407054866384832102831047600353331001128006822765547831673717154 -1859 -1.202232796714324806983391489770912302819787648320686357547165543743156201961071 -1860 -1.202247338994682008140746175283327405150458869617265944136411539841981339510385 -1861 -1.20226187671492980933519597069357153181285909509532328246522911680948401037864 -1862 -1.202276409877221879171062230832634605025992001717252579207533171133926138001113 -1863 -1.202290938483710756624603132077561540317360612666718079769497375547967557462542 -1864 -1.202305462536547851619687232873966280953621236095484467821797259203327054512275 -1865 -1.202319982037883445603259517500488559375089591558139159720931994280352326516506 -1866 -1.202334496989866692120599842154980162219570541312476559636788446607491670306373 -1867 -1.202349007394645617390373702762793171318575807825918696302408604088116777753401 -1868 -1.202363513254367120879475244227644885925923357049791961048254791182084024074999 -1869 -1.202378014571176975877662431165153361809275724322840792431131315576789711346693 -1870 -1.202392511347219830071984300478274191095469602341520227004898232116663215138836 -1871 -1.202407003584639206121000216452523753287192434096151471406702729635062876971588 -1872 -1.202421491285577502228791049367047153017714485819314673840816437085020154703316 -1873 -1.20243597445217599271876219893528088421617962663338374136308630765611485642016 -1874 -1.202450453086574828607238384206171383729530678871877967814256006259036341211757 -1875 -1.202464927190913038176850121873641520375369694843172286590168668820382013039206 -1876 -1.202479396767328527549711815258248168144340449546816143420669324394380713628752 -1877 -1.202493861817958081260391376540745795065719098470868618183386631206339747453931 -1878 -1.20250832234493736282867130514256392230270294895053816498991055183635051503452 -1879 -1.202522778350400915332101145463020831532243758937061438791916359115009789664818 -1880 -1.202537229836482161978341247497432482735794272195485423342443133802983829074322 -1881 -1.202551676805313406677297754174134709298220686389075181028377128776883411673446 -1882 -1.202566119259025834613048739561818842865977582192810418305801853475466950495252 -1883 -1.202580557199749512815561422411486446802269272999093273433811661526636168153877 -1884 -1.20259499062961339073220037980975826431120875567257846607692593844393668497892 -1885 -1.202609419550745300799026686032226275363691418173987697298357493839493233845639 -1886 -1.202623843965271959011887901997016365386300974807469456736331114328431257570161 -1887 -1.202638263875318965497298841029732998174089301808130357102891155936063597097464 -1888 -1.202652679283010805083113036961486915521944277998255275139145286708878325184072 -1889 -1.202667090190470847868984840891762716460143853647244089278216643693649827556415 -1890 -1.202681496599821349796622073257465659508340741015817429428262518732779962902495 -1891 -1.202695898513183453219829158158596641766318884678506194451679482927612007399106 -1892 -1.20271029593267718747434066719964149863289168059754538596630550970779857436622 -1893 -1.202724688860421469447445200413925997134405323513579484225765163471719418676015 -1894 -1.202739077298534104147399532145881623853113971702554910911071066311742317599816 -1895 -1.20275346124913178527263295007338995482722976182361744378191308989412163722261 -1896 -1.202767840714330095780741715859125499053989585985313988505062643940730514970606 -1897 -1.202782215696243508457273576226098888820009789517702262914071666735422166888529 -1898 -1.202796586196985386484302253558414608413901112613188276459386782115179347413027 -1899 -1.202810952218667984008791845433600567196843364507725444038379307003712807327642 -1900 -1.202825313763402446710751062797741192816581324174645523750338553857628633825653 -1901 -1.202839670833298812371177236799051804793749435158569203446572302700735276230859 -1902 -1.20285402343046601143979002459947028697574165705601808450787701645787957817438 -1903 -1.202868371557011867602554744787312968575114859324446647031276049219804916941843 -1904 -1.202882715215043098348995273317045606761667574598209044748369122075847334075106 -1905 -1.202897054406665315539296431204757898076005822763223096363289136624323488932029 -1906 -1.202911389133983025971195795510001490233848579648463999707004479177240824299917 -1907 -1.202925719399099631946664865436257479089817200341318203241479693377151233702936 -1908 -1.202940045204117431838379515683440316460210331802118869258941024364649888661899 -1909 -1.202954366551137620655979669486521381936350555755878644542392644486026464623191 -1910 -1.202968683442260290612118124074567644459326581154191605996271065074130742999132 -1911 -1.202982995879584431688298461584239315913853407251011449436857767109084772420345 -1912 -1.202997303865207932200501978761075637907646118142746041559860894062274329988508 -1913 -1.203011607401227579364603569080720402739795959538211941846796505963724786138436 -1914 -1.203025906489739059861576491220598948765256058074091918988644948459916784198575 -1915 -1.203040201132836960402485958110456647301188079254569168496162032724166280725456 -1916 -1.203054491332614768293271481087605771192419318545428889268967878478248051231306 -1917 -1.203068777091164871999317903979703562383710047522749168659212598921583798901759 -1918 -1.203083058410578561709815062234399755489242689860644196591560098181203653275844 -1919 -1.203097335292946029901906002511247224484184202426186801973732508063383057101747 -1920 -1.203111607740356371904623698446865258273914015795805193016653233275156085877837 -1921 -1.203125875754897586462616198599481695952184151380503140610506788019576626782205 -1922 -1.203140139338656576299660142873658221891732499839728905017770309119815056720628 -1923 -1.203154398493719148681962584020222992193325264704667831611906419490224567912457 -1924 -1.203168653222170015981251051100196895146416793759969201771578689090661945503475 -1925 -1.203182903526092796237651792094804596841042518224786470543709715434421006319915 -1926 -1.20319714940757001372235613313650954644953188972153900999421778154592468628711 -1927 -1.203211390868683099500074892128403771419313782162266274962761989609820127766332 -1928 -1.203225627911512391991280784811219038252475151493605003206399553771416202882841 -1929 -1.203239860538137137534238761628706246977609266901936258985403983877557879068577 -1930 -1.203254088750635490946824214033155224043414817635965994215164586558985006567221 -1931 -1.203268312551084516088128989163397836293806708152081077540110873377722928425006 -1932 -1.203282531941560186419855152117754024946049360017932865524934304071514930927492 -1933 -1.203296746924137385567496435334043410023442117940758200059746342700190139114277 -1934 -1.203310957500889907881307314877994999339929049545148482011515328337720320103709 -1935 -1.203325163673890458997059653730144708652961801015168009556999468608633857193213 -1936 -1.203339365445210656396586852449615317659039569044445166135227818963789407138438 -1937 -1.203353562816921029968115447881026606677349733052703907194777516416332419233342 -1938 -1.203367755791091022566384100858185197631348345443416140726354970375968342161397 -1939 -1.203381944369788990572549914145154516682221095568885500473776454285092064469393 -1940 -1.203396128555082204453882022141805760882993295108243274854133246153580152951242 -1941 -1.203410308349036849323242394167001243702440591398104511652192670255455600856304 -1942 -1.203424483753718025498353793418162470311527134919719488656215539059400710393994 -1943 -1.203438654771189749060854833991127209131332468311017209419590921641895222608127 -1944 -1.203452821403514952415142078628903137210647399838380640540289888886428889796307 -1945 -1.203466983652755484846999120152180799333834159219758085404806563728166512244015 -1946 -1.203481141520972113082012589808276090054287953152801317636714798746592803400151 -1947 -1.203495295010224521843775036058532699702991177261647720378414557894795074945258 -1948 -1.203509444122571314411874617607128415329297072300748368451322211969007468557191 -1949 -1.203523588860070013179671554756696290882330999869306274503167200185106689784894 -1950 -1.203537729224777060211861283458192953021449573897900490730865585913856307346994 -1951 -1.203551865218747817801824256704022144932373846855908019989673595014753415576071 -1952 -1.203565996844036569028762338194552485494415402719623334639058789639860888848165 -1953 -1.203580124102696518314621733488854790058380137271476019129881741946931645847806 -1954 -1.203594246996779791980802404130726616810291407074372583973792120160809069538908 -1955 -1.20360836552833743880465391052087042395940129928221119100970160102647923228633 -1956 -1.203622479699419430575757629585447302435850171086407070585000790636720896666097 -1957 -1.203636589512074662651995293570141140938065962543964473550052515781796437868593 -1958 -1.203650694968350954515403796567338739444392783451873161942857570837662518464764 -1959 -1.203664796070295050327816215662060267995953272899880986919783635764541404378073 -1960 -1.203678892819952619486288993859862023852530931621442306980250166472372671378747 -1961 -1.20369298521936825717831523223708012608923478391372733723918175729924321584354 -1962 -1.203707073270585484936824039030490056291666876105239880122147239956076598641472 -1963 -1.203721156975646751194965883659723261056985350876564262284104919424905853667674 -1964 -1.20373523633659343184068390395160883023540657321474893233009853340786671508188 -1965 -1.20374931135546583077107111511099600785020657711807823796971257359140089467484 -1966 -1.203763382034303180446513469257562433893269440955237470851094526017350954453594 -1967 -1.203777448375143642444618714622624008066106315310608307392578101303133462199548 -1968 -1.203791510380024308013931003774035564259865498323696418725291375154559032248368 -1969 -1.203805568050981198627431200510907600256519297967646102716532420980198441074944 -1970 -1.203819621390049266535822835343063573778117674055429572738731650594040867772945 -1971 -1.203833670399262395320603659742925206478442924350544795903933058491848145529665 -1972 -1.20384771508065340044692274962984028450312768049902256407595900407423652355505 -1973 -1.203861755436254029816223108818759060455811219261217276099150789984646300776091 -1974 -1.203875791468094964318669723436621999487782534152243998779130347000362363121858 -1975 -1.203889823178205818385363018580843724137564276668206585731683941701067164259622 -1976 -1.203903850568615140540337668764866050717120211666249402771497949160418473615529 -1977 -1.203917873641350413952346713965907426575356509545593753568170046611637494292976 -1978 -1.203931892398438056986430933359757324439445353758534891163374657605880677603226 -1979 -1.203945906841903423755273429096752679081046745235616278477231233472915436793512 -1980 -1.203959916973770804670339372741929714486402535055731947983324038496891920942347 -1981 -1.203973922796063426992800867270768958102168058219320309555486131027014545947211 -1982 -1.20398792431080345538424687777994432402449579446782062715523739980528804706917 -1983 -1.204001921520011992457178184340049320504322878168991828885435849138776055143425 -1984 -1.204015914425709079325287310684405150028483700441423556867995347121199486885343 -1985 -1.204029903029913696153523382694757173539176860857549491555758668140777200286772 -1986 -1.204043887334643762707941870910938354971184512609569366759137349091227994554683 -1987 -1.204057867341916138905339171557421338976665104904845701276345105166586132752163 -1988 -1.204071843053746625362671980845095194091940771058233993713288495223640307954576 -1989 -1.204085814472149963946261417571589026160292324183819793252987308747792151556293 -1990 -1.204099781599139838320781849308023082899527490004714619511694843122791299046145 -1991 -1.204113744436728874498034377724199080291693505578773341906257166086489614878444 -1992 -1.204127702986928641385504938867945735031147759329467908196767692086254786192813 -1993 -1.204141657251749651334706974477613334509529091483525382394877390408983782382406 -1994 -1.204155607233201360689308630669563066511277838908806733976468907522753121133839 -1995 -1.204169552933292170333044440604923214565744071157084201191572160126393051749686 -1996 -1.204183494354029426237411448001885651230510665692367145294083751943045417755437 -1997 -1.204197431497419420009149728621392779797835551852173516708125693312848695123143 -1998 -1.204211364365467389437507267115217634207351917642686731205977136288800067059744 -1999 -1.204225292960177519041289146886168696350584158550979998894004987920992663315481 -2000 -1.204239217283552940615691010870456578354822609696087403680814419213565666895828 diff --git a/examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/log_param_by_sz=true,epochs=2000.log b/examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/log_param_by_sz=true,epochs=2000.log deleted file mode 100644 index c28e515f..00000000 --- a/examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/log_param_by_sz=true,epochs=2000.log +++ /dev/null @@ -1,31 +0,0 @@ -2023-12-26T17:04:32.794 -== Config == -INIT_SIZE: 2 -GEN_TYP_SIZE: 1 -PARAMETERIZE_FLIP_GROUPS_BY_SZ: true -EPOCHS: 2000 -DistNat: DistUInt32 -TAG: v3_opt_meta_ad - -Building (gen_expr(...)) computation graph... - 7.216795583 seconds - -Initial adnodes_of_interest: -Dict("sz1_succ_abs" => 0.5, "tysz1_gen_type_tbool" => 0.5, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.5, "sz2_succ_abs" => 0.5, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5, "sz1_succ_app" => 0.5) -Saving samples... -Saved samples to examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/terms_before.txt. - 1.970943042 seconds - -Initial entropy: 1.164324889768336817765395270065151324652229424763360009858320885423779852711331 - -Training... - 117.817972375 seconds - -Final entropy: 1.204239217283552940615691010870456578354822609696087403680814419213565666895828 - -Learned adnodes_of_interest: -Dict{String, BigFloat}("sz1_succ_abs" => 0.4869180714585302048570691232081182505035314975712561891330706457265077292495624, "tysz1_gen_type_tbool" => 0.4032244342636440581314631791189805529647330199176391995559655804680627593107093, "sz0_zero_pr_var2" => 0.5363102627524367109315280385158543365485249142267061685217095391137725521451866, "sz2_succ_app" => 0.5310888332267741651410380935576152249841616557040295523185300153916628485459204, "sz2_succ_abs" => 0.4668556352115892728646660044489504476059097249154731008664729006580142980245938, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5333202372740048442191299519771065502391005550942749484340712888669154670773755, "sz1_succ_app" => 0.4779235071274206156476036536648448358274716682736680104217035231776925978595043) -Saving samples... -Saved samples to examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/terms_trained_param_by_sz=true,epochs=2000.txt. - 0.253028375 seconds - diff --git a/examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/terms_before.txt b/examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/terms_before.txt deleted file mode 100644 index de77bab7..00000000 --- a/examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/terms_before.txt +++ /dev/null @@ -1,200 +0,0 @@ -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -(λx:Bool. λy:Bool. false) false -(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -false -λx:Bool. (λy:Bool. false) x -(λx:Bool. x) false -λx:Bool. x -(λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) (λx:Bool. x) -true -(λx:Bool. λy:Bool. true) true ((λx:Bool. false) false) -(λx:Bool. λy:Bool. false) false -λx:Bool. x -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) false -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) false -(λx:Bool. λy:Bool. λz:Bool. true) true ((λx:Bool. true) false) -false -λx:Bool. true -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -(λx:Bool. λy:Bool. true) true ((λx:Bool. true) true) -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) false -true -true -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) (λx:Bool. true) -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) -λx:Bool. false -(λx:Bool. λy:Bool. false) false true -(λx:Bool. λy:Bool. false) ((λx:Bool. true) true) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. true)) -λx:Bool. (λy:Bool. false) x -(λx:Bool. λy:Bool. true) ((λx:Bool. true) true) -λx:Bool. (λy:Bool. false) true -true -true -true -(λx:Bool. λy:Bool. true) false ((λx:Bool. false) true) -(λx:Bool. λy:Bool -> Bool. true) true (λx:Bool. true) -(λx:Bool. true) true -(λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool. true) true) -(λx:Bool. x) ((λx:Bool -> Bool. true) (λx:Bool. true)) -false -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. false) -(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -λx:Bool. false -false -false -(λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -λx:Bool. (λy:Bool. true) x -(λx:Bool. x) true -true -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) false -true -λx:Bool. x -(λx:Bool -> Bool. x) (λx:Bool. true) -(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -true -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) false -(λx:Bool. λy:Bool. true) false false -true -false -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. true)) -λx:Bool. x -true -true -false -λx:Bool. true -(λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. true)) -true -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. x) -false -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) -λx:Bool. (λy:Bool. false) true -false -λx:Bool. false -(λx:Bool. λy:Bool. true) false -(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. true) true) -true -λx:Bool. x -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. false) -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool. false) false) -λx:Bool. (λy:Bool. false) x -false -(λx:Bool. x) ((λx:Bool. false) true) -true -λx:Bool. true -false -λx:Bool. false -λx:Bool. x -λx:Bool. true -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) (λx:Bool. true) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. true) true) -true -false -λx:Bool. true -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) (λx:Bool. x) -(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -(λx:Bool -> Bool. x) (λx:Bool. x) -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) -true -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) true -false -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. false) true) -true -(λx:Bool -> Bool. true) (λx:Bool. x) -λx:Bool. x -(λx:Bool. λy:Bool -> Bool. true) true ((λx:Bool. λy:Bool. true) true) -false -(λx:Bool -> Bool. false) (λx:Bool. x) -(λx:Bool. x) false -λx:Bool. (λy:Bool. true) false -(λx:Bool. λy:Bool. false) false ((λx:Bool -> Bool. false) (λx:Bool. true)) -λx:Bool. (λy:Bool. true) x -true -(λx:Bool. λy:Bool. λz:Bool. true) true true -true -(λx:Bool. λy:Bool. false) false ((λx:Bool -> Bool. false) (λx:Bool. false)) -(λx:Bool -> Bool. true) (λx:Bool. false) -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true (λx:Bool. x) -λx:Bool. x -true -(λx:Bool -> Bool. false) (λx:Bool. x) -(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -false -false -λx:Bool. true -true -λx:Bool. true -false -false -(λx:Bool. x) true -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) (λx:Bool. false) -(λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) false -(λx:Bool. λy:Bool. false) false ((λx:Bool -> Bool. true) (λx:Bool. false)) -(λx:Bool. λy:Bool -> Bool. false) true ((λx:Bool. λy:Bool. true) false) -λx:Bool. (λy:Bool. true) x -(λx:Bool. λy:Bool -> Bool. false) true ((λx:Bool. λy:Bool. false) true) -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) -false -(λx:Bool -> Bool. false) (λx:Bool. x) -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) (λx:Bool. x) -true -true -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. true) true) -true -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) true -(λx:Bool. x) ((λx:Bool -> Bool. true) (λx:Bool. true)) -λx:Bool. true -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) (λx:Bool. x) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) (λx:Bool. false) -(λx:Bool -> Bool. true) (λx:Bool. false) -false -(λx:Bool. x) ((λx:Bool. true) false) -(λx:Bool -> Bool. x) (λx:Bool. x) -true -(λx:Bool. λy:Bool -> Bool. true) false (λx:Bool. false) -(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -λx:Bool. true -λx:Bool. x -true -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) false) -false -false -(λx:Bool. λy:Bool. false) false ((λx:Bool. false) true) -(λx:Bool -> Bool. false) (λx:Bool. x) -false -(λx:Bool. λy:Bool. true) ((λx:Bool. false) false) -true -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) -λx:Bool. x -λx:Bool. x -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. false) true) -(λx:Bool. λy:Bool. true) false true -true -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) (λx:Bool. false) -(λx:Bool. λy:Bool. λz:Bool. false) false ((λx:Bool -> Bool. false) (λx:Bool. false)) -false -(λx:Bool. λy:Bool. false) true -λx:Bool. x -(λx:Bool. λy:Bool. false) true -(λx:Bool. λy:Bool -> Bool. true) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -true -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -true -(λx:Bool -> Bool. x) (λx:Bool. true) -(λx:Bool. λy:Bool -> Bool. true) false ((λx:Bool. λy:Bool. true) true) -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) true -λx:Bool. (λy:Bool. false) true -true -λx:Bool. x -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) true -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false (λx:Bool. x) -false -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) false) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. true) true) -λx:Bool. x -(λx:Bool. λy:Bool. true) false false diff --git a/examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/terms_trained_param_by_sz=true,epochs=2000.txt b/examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/terms_trained_param_by_sz=true,epochs=2000.txt deleted file mode 100644 index b7e3735a..00000000 --- a/examples/qc/stlc/output/v3_opt_meta_ad/entropy/sz=2,tysz=1/terms_trained_param_by_sz=true,epochs=2000.txt +++ /dev/null @@ -1,200 +0,0 @@ -λx:Bool. x -false -(λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) (λx:Bool. x) -(λx:Bool. λy:Bool. false) false ((λx:Bool -> Bool. true) (λx:Bool. true)) -λx:Bool. (λy:Bool. true) false -λx:Bool. x -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool. false) true) -(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -true -false -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool. false) true) -(λx:Bool. x) ((λx:Bool -> Bool. true) (λx:Bool. true)) -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) false -(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -true -false -(λx:Bool. λy:Bool. true) false -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool. λy:Bool. false) false) -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) false -false -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. true) true) -true -false -(λx:Bool. λy:Bool -> Bool. false) false (λx:Bool. true) -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -λx:Bool. false -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -λx:Bool. x -(λx:Bool. λy:Bool. true) true ((λx:Bool. false) false) -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -λx:Bool. x -(λx:Bool. λy:Bool -> Bool. false) false (λx:Bool. x) -false -(λx:Bool. λy:Bool. false) ((λx:Bool. true) false) -false -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) false) -λx:Bool. x -λx:Bool. x -λx:Bool. (λy:Bool. true) x -λx:Bool. (λy:Bool. false) x -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -(λx:Bool -> Bool. true) (λx:Bool. x) -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false ((λx:Bool. λy:Bool. false) false) -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -false -λx:Bool. true -λx:Bool. true -λx:Bool. x -λx:Bool. false -false -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) false -false -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) (λx:Bool. false) -λx:Bool. true -true -λx:Bool. x -(λx:Bool. λy:Bool. false) true -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. x) -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) -(λx:Bool. λy:Bool. false) true -(λx:Bool. λy:Bool -> Bool. false) false ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -(λx:Bool -> Bool. false) (λx:Bool. x) -false -λx:Bool. x -λx:Bool. x -λx:Bool. x -true -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) true -true -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true (λx:Bool. true) -(λx:Bool. λy:Bool -> Bool. false) true (λx:Bool. x) -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true (λx:Bool. true) -(λx:Bool. x) ((λx:Bool. true) false) -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) -(λx:Bool. true) false -(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) -(λx:Bool. false) true -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -(λx:Bool -> Bool. true) (λx:Bool. x) -λx:Bool. (λy:Bool. false) false -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. x) -false -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) false) -(λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool -> Bool. true) (λx:Bool. true)) -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. true)) -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) (λx:Bool. x) -(λx:Bool. x) ((λx:Bool. false) true) -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) true -(λx:Bool -> Bool. x) (λx:Bool. false) -true -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) true -true -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) -(λx:Bool -> Bool. false) (λx:Bool. x) -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) (λx:Bool. x) -true -λx:Bool. false -false -λx:Bool. false -(λx:Bool. λy:Bool. false) true true -λx:Bool. false -λx:Bool. false -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) -λx:Bool. (λy:Bool. true) x -λx:Bool. x -λx:Bool. false -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) -λx:Bool. x -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool. true) false) -λx:Bool. false -(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -false -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) -λx:Bool. x -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. false) false) -(λx:Bool. false) true -(λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool. true) false) -(λx:Bool. true) false -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) true) -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) -λx:Bool. true -(λx:Bool. λy:Bool. true) false false -λx:Bool. x -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. x) -(λx:Bool. λy:Bool. λz:Bool. true) true false -false -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) -λx:Bool. (λy:Bool. false) false -true -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. true)) -true -true -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) false) -false -(λx:Bool -> Bool. true) (λx:Bool. x) -(λx:Bool. x) true -(λx:Bool. λy:Bool. true) false -(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool. false) false) -false -λx:Bool. x -false -(λx:Bool -> Bool. true) (λx:Bool. x) -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) (λx:Bool. x) -(λx:Bool -> Bool. false) (λx:Bool. true) -λx:Bool. x -(λx:Bool -> Bool. x) (λx:Bool. x) -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool. true) false) -λx:Bool. x -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) (λx:Bool. x) -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) true -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) true -(λx:Bool. x) ((λx:Bool. false) true) -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false (λx:Bool. x) -(λx:Bool. λy:Bool. true) true -(λx:Bool -> Bool. x) (λx:Bool. x) -(λx:Bool. λy:Bool. λz:Bool. true) false false -(λx:Bool. λy:Bool. true) ((λx:Bool. false) true) -λx:Bool. x -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) false -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) -(λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool. true) true) -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool. true) false) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) (λx:Bool. x) -false -λx:Bool. x -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true (λx:Bool. x) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. false) true) -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -λx:Bool. (λy:Bool. false) x -false -(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -(λx:Bool. λy:Bool. false) true true -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) -(λx:Bool. true) ((λx:Bool. true) true) -λx:Bool. x -(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. true)) -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -(λx:Bool. λy:Bool. false) true -true -λx:Bool. x -λx:Bool. (λy:Bool. true) false -(λx:Bool. λy:Bool. false) ((λx:Bool. false) true) diff --git a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_before.csv b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_before.csv deleted file mode 100644 index d1440ff9..00000000 --- a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_before.csv +++ /dev/null @@ -1,9 +0,0 @@ -num_apps probability -0 0.3784722222222223 -1 0.10286458333333337 -2 0.1511501736111112 -3 0.14680989583333343 -4 0.11425781250000003 -5 0.06738281250000001 -6 0.03125 -7 0.007812500000000002 diff --git a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=100.csv b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=100.csv deleted file mode 100644 index 9700f62e..00000000 --- a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=100.csv +++ /dev/null @@ -1,9 +0,0 @@ -num_apps probability -0 0.3125572704145472 -1 0.07735489491608907 -2 0.13610854147514473 -3 0.15261066940220364 -4 0.1404676330301102 -5 0.10049392046673733 -6 0.059517793091192275 -7 0.020889277203975522 diff --git a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=2000.csv b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=2000.csv deleted file mode 100644 index 1d895580..00000000 --- a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=2000.csv +++ /dev/null @@ -1,9 +0,0 @@ -num_apps probability -0 0.16486577196496097 -1 0.047180881871368596 -2 0.10888985265933444 -3 0.15080968983713247 -4 0.1723462128044957 -5 0.16286665359517 -6 0.10749048574248583 -7 0.0855504515250517 diff --git a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=100.csv b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=100.csv deleted file mode 100644 index 07b81577..00000000 --- a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=100.csv +++ /dev/null @@ -1,101 +0,0 @@ -0 20.238481981031438 -1 20.212172303759335 -2 20.186130303707692 -3 20.160352655808524 -4 20.13483608957884 -5 20.10957738797502 -6 20.084573386274748 -7 20.059820970985776 -8 20.035317078780828 -9 20.01105869545803 -10 19.98704285492616 -11 19.96326663821411 -12 19.939727172504014 -13 19.916421630187337 -14 19.893347227943366 -15 19.870501225839668 -16 19.847880926453747 -17 19.82548367401553 -18 19.8033068535701 -19 19.781347890160117 -20 19.759604248027554 -21 19.738073429834124 -22 19.716752975899983 -23 19.69564046346033 -24 19.674733505939265 -25 19.654029752240692 -26 19.633526886055623 -27 19.613222625185664 -28 19.59311472088216 -29 19.57320095720061 -30 19.55347915036999 -31 19.533947148176708 -32 19.514602829362616 -33 19.495444103036867 -34 19.47646890810131 -35 19.457675212688983 -36 19.439061013615365 -37 19.42062433584222 -38 19.402363231953522 -39 19.384275781643346 -40 19.366360091215263 -41 19.34861429309307 -42 19.331036545342528 -43 19.313625031203838 -44 19.296377958634594 -45 19.279293559862914 -46 19.262370090950622 -47 19.245605831366078 -48 19.22899908356645 -49 19.212548172589344 -50 19.19625144565336 -51 19.180107271767454 -52 19.16411404134893 -53 19.148270165849734 -54 19.13257407739097 -55 19.11702422840531 -56 19.101619091287258 -57 19.086357158050944 -58 19.07123693999531 -59 19.05625696737652 -60 19.04141578908743 -61 19.026711972343875 -62 19.012144102377746 -63 18.997710782136487 -64 18.983410631989088 -65 18.969242289438228 -66 18.955204408838533 -67 18.94129566112076 -68 18.92751473352176 -69 18.913860329320084 -70 18.90033116757713 -71 18.886925982883632 -72 18.87364352511144 -73 18.8604825591704 -74 18.84744186477028 -75 18.834520236187473 -76 18.821716482036646 -77 18.809029425046884 -78 18.796457901842444 -79 18.784000762727977 -80 18.77165687147802 -81 18.759425105130767 -82 18.74730435378595 -83 18.735293520406767 -84 18.723391520625718 -85 18.71159728255436 -86 18.6999097465967 -87 18.688327865266398 -88 18.676850603007427 -89 18.66547693601835 -90 18.654205852079894 -91 18.64303635038597 -92 18.631967441377867 -93 18.620998146581776 -94 18.61012749844918 -95 18.599354540200554 -96 18.58867832567188 -97 18.578097919164094 -98 18.567612395295384 -99 18.557220838856253 -100 18.54692234466734 diff --git a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv deleted file mode 100644 index cf0ca477..00000000 --- a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/learning_curve_param_by_sz=true,epochs=2000.csv +++ /dev/null @@ -1,2001 +0,0 @@ -0 20.238481981031438 -1 20.21217230375934 -2 20.186130303707692 -3 20.160352655808524 -4 20.13483608957884 -5 20.10957738797502 -6 20.084573386274744 -7 20.059820970985772 -8 20.035317078780828 -9 20.011058695458033 -10 19.98704285492616 -11 19.96326663821411 -12 19.939727172504014 -13 19.916421630187337 -14 19.89334722794337 -15 19.870501225839668 -16 19.847880926453747 -17 19.82548367401553 -18 19.8033068535701 -19 19.781347890160117 -20 19.759604248027557 -21 19.738073429834124 -22 19.716752975899986 -23 19.69564046346033 -24 19.67473350593927 -25 19.654029752240692 -26 19.633526886055627 -27 19.613222625185664 -28 19.593114720882163 -29 19.573200957200605 -30 19.55347915036999 -31 19.533947148176708 -32 19.514602829362612 -33 19.495444103036867 -34 19.47646890810131 -35 19.457675212688983 -36 19.43906101361537 -37 19.420624335842213 -38 19.40236323195352 -39 19.384275781643346 -40 19.366360091215263 -41 19.34861429309307 -42 19.331036545342528 -43 19.313625031203838 -44 19.29637795863459 -45 19.279293559862914 -46 19.262370090950622 -47 19.24560583136608 -48 19.22899908356645 -49 19.212548172589344 -50 19.19625144565336 -51 19.180107271767454 -52 19.164114041348927 -53 19.14827016584974 -54 19.132574077390966 -55 19.11702422840531 -56 19.101619091287258 -57 19.086357158050944 -58 19.071236939995302 -59 19.05625696737652 -60 19.041415789087427 -61 19.02671197234388 -62 19.012144102377746 -63 18.99771078213649 -64 18.983410631989088 -65 18.969242289438228 -66 18.955204408838537 -67 18.941295661120762 -68 18.92751473352176 -69 18.913860329320084 -70 18.90033116757712 -71 18.886925982883632 -72 18.87364352511144 -73 18.8604825591704 -74 18.84744186477028 -75 18.834520236187476 -76 18.821716482036646 -77 18.809029425046884 -78 18.79645790184244 -79 18.784000762727977 -80 18.771656871478015 -81 18.759425105130767 -82 18.747304353785957 -83 18.735293520406767 -84 18.723391520625718 -85 18.71159728255436 -86 18.6999097465967 -87 18.688327865266398 -88 18.676850603007427 -89 18.665476936018347 -90 18.654205852079894 -91 18.64303635038597 -92 18.63196744137787 -93 18.620998146581783 -94 18.610127498449177 -95 18.59935454020055 -96 18.588678325671882 -97 18.578097919164094 -98 18.567612395295384 -99 18.557220838856253 -100 18.54692234466734 -101 18.53671601743976 -102 18.52660097163817 -103 18.51657633134632 -104 18.506641230135045 -105 18.49679481093267 -106 18.48703622589783 -107 18.477364636294574 -108 18.467779212369717 -109 18.458279133232367 -110 18.4488635867357 -111 18.439531769360762 -112 18.430282886102344 -113 18.421116150356927 -114 18.412030783812543 -115 18.403026016340597 -116 18.394101085889545 -117 18.385255238380466 -118 18.376487727604392 -119 18.367797815121406 -120 18.35918477016153 -121 18.350647869527197 -122 18.342186397497485 -123 18.333799645733908 -124 18.325486913187763 -125 18.317247506009117 -126 18.309080737457222 -127 18.30098592781247 -128 18.29296240428975 -129 18.285009500953276 -130 18.277126558632794 -131 18.269312924841117 -132 18.261567953693017 -133 18.253891005825448 -134 18.246281448319014 -135 18.23873865462068 -136 18.231262004467727 -137 18.223850883812947 -138 18.216504684750916 -139 18.20922280544552 -140 18.202004650058527 -141 18.194849628679325 -142 18.187757157255724 -143 18.180726657525792 -144 18.17375755695076 -145 18.16684928864893 -146 18.160001291330616 -147 18.153213009233987 -148 18.146483892061983 -149 18.139813394920026 -150 18.133200978254763 -151 18.12664610779371 -152 18.12014825448571 -153 18.1137068944423 -154 18.10732150887994 -155 18.10099158406309 -156 18.094716611248028 -157 18.088496086627543 -158 18.082329511276427 -159 18.076216391097645 -160 18.070156236769392 -161 18.06414856369279 -162 18.058192891940337 -163 18.05228874620515 -164 18.046435655750777 -165 18.040633154361792 -166 18.034880780295072 -167 18.029178076231652 -168 18.023524589229382 -169 18.017919870676018 -170 18.01236347624314 -171 18.00685496584056 -172 18.00139390357143 -173 17.995979857687814 -174 17.990612400546976 -175 17.985291108568216 -176 17.98001556219019 -177 17.974785345828845 -178 17.969600047835975 -179 17.96445926045808 -180 17.959362579796068 -181 17.954309605765154 -182 17.949299942055553 -183 17.94433319609342 -184 17.939408979002494 -185 17.934526905566063 -186 17.929686594189505 -187 17.92488766686325 -188 17.920129749126218 -189 17.915412470029658 -190 17.91073546210153 -191 17.90609836131124 -192 17.901500807034814 -193 17.89694244202053 -194 17.89242291235494 -195 17.88794186742929 -196 17.883498959906373 -197 17.879093845687763 -198 17.87472618388141 -199 17.870395636769665 -200 17.8661018697777 -201 17.86184455144215 -202 17.85762335338035 -203 17.85343795025974 -204 17.84928801976772 -205 17.84517324258182 -206 17.841093302340255 -207 17.83704788561274 -208 17.83303668187173 -209 17.8290593834639 -210 17.82511568558201 -211 17.821205286237095 -212 17.817327886230917 -213 17.813483189128753 -214 17.80967090123247 -215 17.805890731553966 -216 17.802142391788827 -217 17.798425596290308 -218 17.794740062043587 -219 17.791085508640368 -220 17.787461658253623 -221 17.7838682356128 -222 17.7803049679791 -223 17.776771585121203 -224 17.773267819291142 -225 17.769793405200453 -226 17.7663480799966 -227 17.76293158323973 -228 17.75954365687949 -229 17.75618404523228 -230 17.752852494958624 -231 17.749548755040866 -232 17.74627257676104 -233 17.743023713678998 -234 17.739801921610763 -235 17.73660695860714 -236 17.733438584932504 -237 17.73029656304382 -238 17.727180657569917 -239 17.72409063529093 -240 17.721026265118013 -241 17.71798731807316 -242 17.714973567269396 -243 17.711984787890973 -244 17.70902075717396 -245 17.70608125438688 -246 17.703166060811668 -247 17.7002749597247 -248 17.697407736378143 -249 17.694564177981384 -250 17.69174407368273 -251 17.688947214551227 -252 17.686173393558708 -253 17.683422405562016 -254 17.680694047285364 -255 17.677988117302952 -256 17.675304416021667 -257 17.67264274566401 -258 17.67000291025121 -259 17.66738471558644 -260 17.664787969238244 -261 17.662212480524154 -262 17.659658060494397 -263 17.65712452191584 -264 17.65461167925602 -265 17.65211934866738 -266 17.64964734797169 -267 17.647195496644496 -268 17.64476361579987 -269 17.64235152817524 -270 17.639959058116325 -271 17.63758603156231 -272 17.635232276031093 -273 17.632897620604705 -274 17.630581895914894 -275 17.62828493412877 -276 17.62600656893469 -277 17.623746635528196 -278 17.62150497059816 -279 17.61928141231297 -280 17.61707580030697 -281 17.614887975666935 -282 17.61271778091868 -283 17.61056506001387 -284 17.608429658316876 -285 17.606311422591816 -286 17.604210200989666 -287 17.60212584303555 -288 17.600058199616118 -289 17.598007122967022 -290 17.595972466660584 -291 17.593954085593495 -292 17.591951835974704 -293 17.58996557531337 -294 17.587995162406948 -295 17.5860404573294 -296 17.5841013214195 -297 17.582177617269252 -298 17.580269208712412 -299 17.578375960813162 -300 17.576497739854787 -301 17.57463441332861 -302 17.572785849922873 -303 17.570951919511838 -304 17.569132493144963 -305 17.5673274430361 -306 17.56553664255294 -307 17.563759966206415 -308 17.561997289640303 -309 17.560248489620857 -310 17.558513444026584 -311 17.556792031838086 -312 17.55508413312801 -313 17.55338962905108 -314 17.55170840183426 -315 17.55004033476694 -316 17.548385312191293 -317 17.54674321949263 -318 17.54511394308995 -319 17.54349737042648 -320 17.541893389960403 -321 17.540301891155536 -322 17.538722764472237 -323 17.53715590135831 -324 17.535601194240016 -325 17.53405853651318 -326 17.53252782253437 -327 17.531008947612115 -328 17.529501807998315 -329 17.528006300879603 -330 17.526522324368866 -331 17.525049777496836 -332 17.523588560203713 -333 17.52213857333093 -334 17.520699718612953 -335 17.519271898669125 -336 17.517855016995718 -337 17.51644897795785 -338 17.515053686781677 -339 17.51366904954655 -340 17.51229497317723 -341 17.51093136543626 -342 17.509578134916328 -343 17.508235191032746 -344 17.506902444015942 -345 17.505579804904134 -346 17.5042671855359 -347 17.502964498543015 -348 17.50167165734317 -349 17.500388576132877 -350 17.499115169880422 -351 17.49785135431879 -352 17.49659704593882 -353 17.495352161982257 -354 17.494116620434966 -355 17.49289034002021 -356 17.49167324019189 -357 17.490465241127996 -358 17.489266263724 -359 17.488076229586355 -360 17.48689506102605 -361 17.48572268105221 -362 17.48455901336579 -363 17.483403982353295 -364 17.482257513080555 -365 17.48111953128656 -366 17.479989963377392 -367 17.478868736420157 -368 17.47775577813697 -369 17.476651016899066 -370 17.475554381720894 -371 17.474465802254276 -372 17.47338520878265 -373 17.472312532215348 -374 17.47124770408191 -375 17.470190656526476 -376 17.469141322302217 -377 17.468099634765807 -378 17.46706552787198 -379 17.466038936168083 -380 17.465019794788716 -381 17.464008039450448 -382 17.463003606446488 -383 17.46200643264149 -384 17.461016455466396 -385 17.460033612913286 -386 17.459057843530296 -387 17.45808908641657 -388 17.45712728121732 -389 17.45617236811882 -390 17.455224287843553 -391 17.454282981645335 -392 17.453348391304484 -393 17.452420459123108 -394 17.451499127920336 -395 17.450584341027643 -396 17.449676042284235 -397 17.448774176032416 -398 17.447878687113068 -399 17.44698952086112 -400 17.446106623101088 -401 17.445229940142614 -402 17.44435941877613 -403 17.44349500626843 -404 17.442636650358438 -405 17.44178429925288 -406 17.440937901622057 -407 17.440097406595687 -408 17.439262763758705 -409 17.43843392314715 -410 17.437610835244115 -411 17.43679345097565 -412 17.43598172170681 -413 17.435175599237628 -414 17.434375035799224 -415 17.43357998404987 -416 17.432790397071155 -417 17.432006228364127 -418 17.431227431845524 -419 17.430453961843988 -420 17.42968577309635 -421 17.428922820743946 -422 17.428165060328944 -423 17.427412447790715 -424 17.426664939462263 -425 17.425922492066633 -426 17.42518506271341 -427 17.42445260889519 -428 17.423725088484158 -429 17.42300245972862 -430 17.422284681249618 -431 17.421571712037533 -432 17.420863511448793 -433 17.42016003920252 -434 17.419461255377257 -435 17.41876712040773 -436 17.418077595081623 -437 17.417392640536374 -438 17.416712218256027 -439 17.416036290068092 -440 17.41536481814043 -441 17.414697764978193 -442 17.41403509342076 -443 17.413376766638706 -444 17.41272274813084 -445 17.412073001721197 -446 17.411427491556147 -447 17.41078618210142 -448 17.410149038139263 -449 17.409516024765544 -450 17.408887107386988 -451 17.408262251718252 -452 17.407641423779246 -453 17.407024589892316 -454 17.40641171667952 -455 17.405802771059953 -456 17.405197720246985 -457 17.404596531745696 -458 17.403999173350165 -459 17.403405613140887 -460 17.402815819482193 -461 17.40222976101964 -462 17.401647406677558 -463 17.401068725656437 -464 17.400493687430465 -465 17.39992226174508 -466 17.39935441861447 -467 17.3987901283192 -468 17.39822936140375 -469 17.397672088674188 -470 17.39711828119572 -471 17.396567910290457 -472 17.396020947535025 -473 17.395477364758253 -474 17.394937134038944 -475 17.394400227703596 -476 17.39386661832414 -477 17.39333627871576 -478 17.392809181934688 -479 17.39228530127599 -480 17.39176461027146 -481 17.391247082687443 -482 17.39073269252274 -483 17.390221414006497 -484 17.38971322159613 -485 17.38920808997524 -486 17.388705994051616 -487 17.388206908955162 -488 17.387710810035937 -489 17.387217672862132 -490 17.3867274732181 -491 17.386240187102434 -492 17.385755790725995 -493 17.38527426051003 -494 17.38479557308425 -495 17.38431970528495 -496 17.38384663415316 -497 17.383376336932773 -498 17.382908791068726 -499 17.382443974205202 -500 17.381981864183786 -501 17.38152243904173 -502 17.381065677010167 -503 17.380611556512356 -504 17.380160056161966 -505 17.379711154761313 -506 17.37926483129973 -507 17.378821064951822 -508 17.378379835075805 -509 17.37794112121186 -510 17.377504903080514 -511 17.377071160580925 -512 17.376639873789394 -513 17.376211022957662 -514 17.37578458851139 -515 17.375360551048566 -516 17.37493889133793 -517 17.37451959031751 -518 17.37410262909299 -519 17.373687988936275 -520 17.37327565128396 -521 17.372865597735867 -522 17.37245781005354 -523 17.372052270158814 -524 17.371648960132354 -525 17.371247862212236 -526 17.37084895879252 -527 17.370452232421847 -528 17.37005766580204 -529 17.36966524178673 -530 17.36927494337997 -531 17.368886753734923 -532 17.368500656152463 -533 17.36811663407988 -534 17.36773467110954 -535 17.367354750977615 -536 17.36697685756272 -537 17.366600974884697 -538 17.366227087103304 -539 17.36585517851698 -540 17.365485233561564 -541 17.365117236809084 -542 17.364751172966507 -543 17.36438702687456 -544 17.364024783506487 -545 17.363664427966878 -546 17.36330594549047 -547 17.362949321440997 -548 17.362594541310003 -549 17.36224159071572 -550 17.361890455401895 -551 17.361541121236705 -552 17.361193574211562 -553 17.3608478004401 -554 17.360503786156993 -555 17.360161517716914 -556 17.35982098159344 -557 17.35948216437797 -558 17.359145052778672 -559 17.358809633619465 -560 17.35847589383893 -561 17.358143820489296 -562 17.357813400735427 -563 17.3574846218538 -564 17.3571574712315 -565 17.356831936365232 -566 17.35650800486033 -567 17.356185664429788 -568 17.355864902893273 -569 17.35554570817619 -570 17.355228068308715 -571 17.354911971424862 -572 17.354597405761535 -573 17.35428435965764 -574 17.35397282155312 -575 17.35366277998808 -576 17.35335422360187 -577 17.35304714113222 -578 17.352741521414305 -579 17.352437353379926 -580 17.352134626056607 -581 17.35183332856677 -582 17.35153345012681 -583 17.351234980046346 -584 17.350937907727314 -585 17.35064222266319 -586 17.350347914438093 -587 17.35005497272605 -588 17.349763387290178 -589 17.349473147981808 -590 17.3491842447398 -591 17.348896667589692 -592 17.348610406642926 -593 17.3483254520961 -594 17.34804179423019 -595 17.347759423409812 -596 17.34747833008243 -597 17.347198504777655 -598 17.346919938106495 -599 17.34664262076062 -600 17.34636654351163 -601 17.346091697210372 -602 17.345818072786187 -603 17.345545661246256 -604 17.345274453674847 -605 17.34500444123266 -606 17.344735615156132 -607 17.34446796675678 -608 17.344201487420484 -609 17.343936168606863 -610 17.34367200184857 -611 17.343408978750706 -612 17.343147090990108 -613 17.342886330314734 -614 17.34262668854301 -615 17.342368157563246 -616 17.342110729332934 -617 17.3418543958782 -618 17.34159914929315 -619 17.341344981739276 -620 17.341091885444847 -621 17.340839852704327 -622 17.340588875877756 -623 17.340338947390183 -624 17.340090059731093 -625 17.339842205453795 -626 17.3395953771749 -627 17.33934956757371 -628 17.3391047693917 -629 17.338860975431917 -630 17.338618178558466 -631 17.33837637169596 -632 17.338135547828948 -633 17.33789570000144 -634 17.337656821316315 -635 17.337418904934793 -636 17.337181944076015 -637 17.336945932016384 -638 17.336710862089156 -639 17.33647672768389 -640 17.336243522245958 -641 17.336011239276043 -642 17.335779872329635 -643 17.33554941501658 -644 17.33531986100056 -645 17.335091203998587 -646 17.33486343778062 -647 17.334636556168995 -648 17.33441055303801 -649 17.334185422313464 -650 17.333961157972162 -651 17.333737754041504 -652 17.333515204599 -653 17.333293503771863 -654 17.3330726457365 -655 17.33285262471816 -656 17.332633434990424 -657 17.332415070874813 -658 17.332197526740362 -659 17.331980797003187 -660 17.33176487612606 -661 17.331549758618024 -662 17.331335439033936 -663 17.331121911974087 -664 17.330909172083803 -665 17.330697214053046 -666 17.330486032615994 -667 17.330275622550662 -668 17.33006597867852 -669 17.3298570958641 -670 17.3296489690146 -671 17.32944159307953 -672 17.329234963050336 -673 17.329029073959987 -674 17.32882392088266 -675 17.32861949893335 -676 17.328415803267497 -677 17.328212829080638 -678 17.32801057160806 -679 17.327809026124452 -680 17.327608187943504 -681 17.327408052417642 -682 17.32720861493762 -683 17.327009870932216 -684 17.32681181586787 -685 17.326614445248367 -686 17.326417754614514 -687 17.32622173954379 -688 17.326026395650036 -689 17.325831718583117 -690 17.325637704028626 -691 17.325444347707574 -692 17.325251645376035 -693 17.325059592824864 -694 17.324868185879392 -695 17.324677420399127 -696 17.324487292277414 -697 17.324297797441186 -698 17.324108931850635 -699 17.32392069149892 -700 17.323733072411905 -701 17.323546070647826 -702 17.323359682297028 -703 17.323173903481695 -704 17.322988730355544 -705 17.322804159103573 -706 17.322620185941737 -707 17.322436807116752 -708 17.322254018905745 -709 17.32207181761604 -710 17.321890199584853 -711 17.321709161179072 -712 17.321528698794957 -713 17.32134880885789 -714 17.32116948782215 -715 17.3209907321706 -716 17.320812538414497 -717 17.320634903093204 -718 17.320457822773943 -719 17.32028129405157 -720 17.320105313548318 -721 17.319929877913566 -722 17.31975498382359 -723 17.31958062798132 -724 17.319406807116142 -725 17.31923351798361 -726 17.31906075736528 -727 17.318888522068413 -728 17.318716808925803 -729 17.318545614795546 -730 17.31837493656079 -731 17.318204771129537 -732 17.318035115434416 -733 17.317865966432485 -734 17.31769732110498 -735 17.31752917645715 -736 17.317361529518013 -737 17.317194377340154 -738 17.317027716999533 -739 17.316861545595252 -740 17.316695860249393 -741 17.316530658106768 -742 17.316365936334783 -743 17.316201692123173 -744 17.31603792268385 -745 17.315874625250697 -746 17.31571179707936 -747 17.315549435447117 -748 17.31538753765259 -749 17.315226101015664 -750 17.31506512287722 -751 17.314904600598997 -752 17.3147445315634 -753 17.31458491317331 -754 17.314425742851924 -755 17.314267018042536 -756 17.314108736208446 -757 17.31395089483268 -758 17.313793491417904 -759 17.31363652348619 -760 17.313479988578912 -761 17.313323884256516 -762 17.313168208098396 -763 17.313012957702703 -764 17.3128581306862 -765 17.312703724684084 -766 17.312549737349848 -767 17.312396166355114 -768 17.31224300938945 -769 17.312090264160254 -770 17.311937928392574 -771 17.311785999828945 -772 17.311634476229283 -773 17.311483355370694 -774 17.31133263504733 -775 17.311182313070255 -776 17.311032387267282 -777 17.31088285548286 -778 17.31073371557786 -779 17.310584965429552 -780 17.310436602931325 -781 17.310288625992644 -782 17.31014103253887 -783 17.30999382051116 -784 17.30984698786627 -785 17.30970053257648 -786 17.309554452629413 -787 17.309408746027948 -788 17.309263410790045 -789 17.309118444948645 -790 17.30897384655153 -791 17.308829613661196 -792 17.308685744354722 -793 17.308542236723657 -794 17.308399088873873 -795 17.308256298925457 -796 17.308113865012615 -797 17.307971785283485 -798 17.307830057900077 -799 17.30768868103814 -800 17.307547652887006 -801 17.30740697164953 -802 17.30726663554195 -803 17.307126642793737 -804 17.306986991647555 -805 17.30684768035909 -806 17.30670870719694 -807 17.30657007044254 -808 17.306431768390038 -809 17.306293799346157 -810 17.30615616163013 -811 17.306018853573566 -812 17.30588187352035 -813 17.305745219826537 -814 17.305608890860274 -815 17.305472885001638 -816 17.305337200642608 -817 17.305201836186896 -818 17.305066790049885 -819 17.304932060658533 -820 17.304797646451238 -821 17.3046635458778 -822 17.30452975739925 -823 17.304396279487825 -824 17.304263110626817 -825 17.304130249310525 -826 17.30399769404412 -827 17.303865443343575 -828 17.3037334957356 -829 17.303601849757463 -830 17.303470503957016 -831 17.30333945689252 -832 17.303208707132583 -833 17.303078253256086 -834 17.302948093852073 -835 17.30281822751968 -836 17.302688652868056 -837 17.30255936851625 -838 17.30243037309315 -839 17.302301665237405 -840 17.30217324359732 -841 17.3020451068308 -842 17.30191725360524 -843 17.30178968259747 -844 17.301662392493675 -845 17.301535381989282 -846 17.30140864978895 -847 17.301282194606397 -848 17.301156015164413 -849 17.301030110194738 -850 17.300904478438007 -851 17.30077911864364 -852 17.300654029569813 -853 17.300529209983356 -854 17.300404658659694 -855 17.300280374382755 -856 17.300156355944928 -857 17.300032602146985 -858 17.299909111797984 -859 17.29978588371522 -860 17.299662916724174 -861 17.299540209658396 -862 17.2994177613595 -863 17.299295570677042 -864 17.29917363646848 -865 17.2990519575991 -866 17.298930532941963 -867 17.298809361377828 -868 17.298688441795093 -869 17.29856777308972 -870 17.29844735416519 -871 17.298327183932436 -872 17.298207261309766 -873 17.298087585222824 -874 17.297968154604515 -875 17.29784896839494 -876 17.297730025541362 -877 17.2976113249981 -878 17.29749286572653 -879 17.297374646694973 -880 17.297256666878685 -881 17.29713892525975 -882 17.297021420827065 -883 17.296904152576253 -884 17.296787119509627 -885 17.296670320636153 -886 17.29655375497133 -887 17.29643742153722 -888 17.29632131936232 -889 17.29620544748156 -890 17.29608980493622 -891 17.295974390773885 -892 17.29585920404842 -893 17.295744243819875 -894 17.29562950915446 -895 17.29551499912449 -896 17.29540071280833 -897 17.29528664929036 -898 17.29517280766091 -899 17.295059187016214 -900 17.294945786458367 -901 17.29483260509527 -902 17.29471964204059 -903 17.29460689641372 -904 17.294494367339716 -905 17.29438205394924 -906 17.294269955378564 -907 17.294158070769466 -908 17.294046399269224 -909 17.293934940030542 -910 17.293823692211557 -911 17.293712654975725 -912 17.293601827491837 -913 17.29349120893393 -914 17.293380798481287 -915 17.293270595318365 -916 17.293160598634756 -917 17.293050807625168 -918 17.292941221489354 -919 17.292831839432086 -920 17.292722660663124 -921 17.29261368439714 -922 17.292504909853733 -923 17.29239633625735 -924 17.29228796283725 -925 17.29217978882747 -926 17.2920718134668 -927 17.29196403599873 -928 17.2918564556714 -929 17.29174907173761 -930 17.291641883454734 -931 17.291534890084684 -932 17.291428090893916 -933 17.29132148515336 -934 17.291215072138378 -935 17.291108851128786 -936 17.291002821408718 -937 17.290896982266695 -938 17.290791332995504 -939 17.290685872892244 -940 17.290580601258224 -941 17.290475517398967 -942 17.290370620624184 -943 17.290265910247694 -944 17.290161385587435 -945 17.290057045965426 -946 17.2899528907077 -947 17.28984891914434 -948 17.28974513060936 -949 17.28964152444076 -950 17.289538099980422 -951 17.28943485657414 -952 17.28933179357154 -953 17.28922891032608 -954 17.289126206195 -955 17.289023680539334 -956 17.2889213327238 -957 17.28881916211686 -958 17.28871716809063 -959 17.288615350020898 -960 17.288513707287045 -961 17.288412239272027 -962 17.28831094536242 -963 17.288209824948265 -964 17.288108877423156 -965 17.288008102184158 -966 17.28790749863176 -967 17.287807066169925 -968 17.28770680420596 -969 17.287606712150595 -970 17.287506789417865 -971 17.287407035425147 -972 17.287307449593104 -973 17.28720803134568 -974 17.287108780110046 -975 17.2870096953166 -976 17.286910776398937 -977 17.286812022793814 -978 17.28671343394114 -979 17.286615009283942 -980 17.286516748268333 -981 17.286418650343524 -982 17.286320714961743 -983 17.286222941578277 -984 17.286125329651398 -985 17.28602787864235 -986 17.285930588015347 -987 17.285833457237544 -988 17.28573648577899 -989 17.285639673112634 -990 17.2855430187143 -991 17.28544652206265 -992 17.285350182639164 -993 17.28525399992813 -994 17.285157973416638 -995 17.285062102594505 -996 17.284966386954316 -997 17.28487082599136 -998 17.284775419203626 -999 17.284680166091796 -1000 17.28458506615919 -1001 17.28449011891178 -1002 17.284395323858153 -1003 17.284300680509492 -1004 17.284206188379553 -1005 17.284111846984686 -1006 17.28401765584374 -1007 17.283923614478102 -1008 17.283829722411674 -1009 17.283735979170817 -1010 17.283642384284384 -1011 17.28354893728367 -1012 17.283455637702374 -1013 17.283362485076644 -1014 17.283269478944998 -1015 17.283176618848337 -1016 17.28308390432992 -1017 17.282991334935335 -1018 17.28289891021252 -1019 17.28280662971169 -1020 17.282714492985377 -1021 17.282622499588363 -1022 17.28253064907768 -1023 17.28243894101265 -1024 17.282347374954746 -1025 17.282255950467693 -1026 17.28216466711741 -1027 17.282073524471958 -1028 17.281982522101583 -1029 17.281891659578662 -1030 17.281800936477715 -1031 17.28171035237535 -1032 17.28161990685028 -1033 17.281529599483306 -1034 17.281439429857297 -1035 17.281349397557157 -1036 17.281259502169846 -1037 17.281169743284327 -1038 17.281080120491584 -1039 17.28099063338458 -1040 17.280901281558286 -1041 17.280812064609588 -1042 17.280722982137355 -1043 17.2806340337424 -1044 17.280545219027438 -1045 17.28045653759709 -1046 17.280367989057883 -1047 17.280279573018237 -1048 17.280191289088393 -1049 17.280103136880502 -1050 17.28001511600852 -1051 17.279927226088255 -1052 17.279839466737315 -1053 17.279751837575102 -1054 17.279664338222826 -1055 17.27957696830347 -1056 17.279489727441778 -1057 17.279402615264253 -1058 17.279315631399104 -1059 17.27922877547632 -1060 17.27914204712758 -1061 17.279055445986256 -1062 17.27896897168742 -1063 17.27888262386783 -1064 17.27879640216591 -1065 17.278710306221726 -1066 17.278624335677012 -1067 17.278538490175116 -1068 17.278452769361024 -1069 17.278367172881314 -1070 17.278281700384174 -1071 17.278196351519384 -1072 17.27811112593829 -1073 17.278026023293823 -1074 17.277941043240443 -1075 17.27785618543419 -1076 17.277771449532608 -1077 17.27768683519478 -1078 17.277602342081295 -1079 17.27751796985424 -1080 17.277433718177228 -1081 17.27734958671532 -1082 17.277265575135058 -1083 17.27718168310446 -1084 17.277097910292966 -1085 17.27701425637151 -1086 17.2769307210124 -1087 17.2768473038894 -1088 17.276764004677702 -1089 17.27668082305388 -1090 17.276597758695896 -1091 17.276514811283118 -1092 17.276431980496273 -1093 17.27634926601747 -1094 17.276266667530184 -1095 17.276184184719195 -1096 17.27610181727068 -1097 17.276019564872097 -1098 17.27593742721226 -1099 17.27585540398129 -1100 17.275773494870595 -1101 17.275691699572896 -1102 17.275610017782206 -1103 17.27552844919379 -1104 17.275446993504225 -1105 17.2753656504113 -1106 17.275284419614103 -1107 17.27520330081295 -1108 17.27512229370939 -1109 17.275041398006206 -1110 17.274960613407394 -1111 17.274879939618184 -1112 17.27479937634499 -1113 17.274718923295442 -1114 17.274638580178344 -1115 17.274558346703685 -1116 17.274478222582648 -1117 17.27439820752755 -1118 17.2743183012519 -1119 17.274238503470336 -1120 17.274158813898655 -1121 17.274079232253786 -1122 17.273999758253783 -1123 17.273920391617835 -1124 17.273841132066238 -1125 17.273761979320394 -1126 17.27368293310282 -1127 17.273603993137108 -1128 17.27352515914796 -1129 17.273446430861135 -1130 17.27336780800349 -1131 17.273289290302934 -1132 17.273210877488438 -1133 17.27313256929003 -1134 17.27305436543879 -1135 17.272976265666824 -1136 17.272898269707287 -1137 17.27282037729435 -1138 17.27274258816323 -1139 17.272664902050114 -1140 17.272587318692246 -1141 17.272509837827844 -1142 17.272432459196118 -1143 17.272355182537297 -1144 17.27227800759257 -1145 17.272200934104106 -1146 17.27212396181505 -1147 17.27204709046952 -1148 17.27197031981258 -1149 17.271893649590268 -1150 17.271817079549557 -1151 17.27174060943834 -1152 17.271664239005496 -1153 17.271587968000798 -1154 17.271511796174963 -1155 17.271435723279623 -1156 17.271359749067322 -1157 17.271283873291505 -1158 17.271208095706545 -1159 17.27113241606769 -1160 17.27105683413109 -1161 17.270981349653777 -1162 17.270905962393684 -1163 17.270830672109586 -1164 17.27075547856116 -1165 17.27068038150894 -1166 17.270605380714326 -1167 17.270530475939555 -1168 17.270455666947743 -1169 17.270380953502833 -1170 17.270306335369618 -1171 17.270231812313718 -1172 17.270157384101594 -1173 17.27008305050054 -1174 17.270008811278636 -1175 17.26993466620484 -1176 17.269860615048852 -1177 17.26978665758124 -1178 17.269712793573348 -1179 17.269639022797307 -1180 17.26956534502606 -1181 17.269491760033336 -1182 17.269418267593643 -1183 17.269344867482285 -1184 17.269271559475307 -1185 17.269198343349565 -1186 17.269125218882643 -1187 17.26905218585294 -1188 17.268979244039564 -1189 17.26890639322238 -1190 17.268833633182034 -1191 17.2687609636999 -1192 17.268688384558086 -1193 17.268615895539448 -1194 17.268543496427576 -1195 17.26847118700676 -1196 17.268398967062073 -1197 17.268326836379252 -1198 17.268254794744774 -1199 17.268182841945833 -1200 17.268110977770327 -1201 17.268039202006843 -1202 17.267967514444706 -1203 17.267895914873893 -1204 17.267824403085108 -1205 17.26775297886974 -1206 17.26768164201984 -1207 17.267610392328177 -1208 17.267539229588156 -1209 17.267468153593903 -1210 17.267397164140167 -1211 17.267326261022415 -1212 17.267255444036735 -1213 17.267184712979887 -1214 17.267114067649295 -1215 17.267043507843045 -1216 17.266973033359843 -1217 17.266902643999064 -1218 17.266832339560725 -1219 17.266762119845467 -1220 17.26669198465458 -1221 17.266621933789978 -1222 17.266551967054223 -1223 17.26648208425047 -1224 17.266412285182522 -1225 17.26634256965479 -1226 17.26627293747232 -1227 17.266203388440736 -1228 17.2661339223663 -1229 17.266064539055865 -1230 17.265995238316897 -1231 17.265926019957462 -1232 17.26585688378621 -1233 17.265787829612396 -1234 17.26571885724586 -1235 17.265649966497044 -1236 17.26558115717696 -1237 17.26551242909719 -1238 17.26544378206993 -1239 17.265375215907916 -1240 17.265306730424484 -1241 17.265238325433526 -1242 17.265170000749478 -1243 17.265101756187413 -1244 17.265033591562876 -1245 17.264965506692032 -1246 17.264897501391584 -1247 17.264829575478775 -1248 17.264761728771415 -1249 17.264693961087843 -1250 17.264626272246975 -1251 17.26455866206823 -1252 17.264491130371596 -1253 17.26442367697759 -1254 17.26435630170724 -1255 17.26428900438215 -1256 17.264221784824407 -1257 17.264154642856653 -1258 17.264087578302043 -1259 17.264020590984256 -1260 17.263953680727486 -1261 17.263886847356446 -1262 17.26382009069636 -1263 17.26375341057297 -1264 17.26368680681252 -1265 17.263620279241753 -1266 17.263553827687932 -1267 17.2634874519788 -1268 17.263421151942627 -1269 17.263354927408155 -1270 17.263288778204632 -1271 17.263222704161787 -1272 17.26315670510985 -1273 17.26309078087954 -1274 17.263024931302045 -1275 17.26295915620905 -1276 17.262893455432717 -1277 17.262827828805673 -1278 17.262762276161038 -1279 17.2626967973324 -1280 17.262631392153814 -1281 17.262566060459815 -1282 17.262500802085388 -1283 17.26243561686599 -1284 17.262370504637552 -1285 17.262305465236448 -1286 17.262240498499523 -1287 17.262175604264076 -1288 17.262110782367834 -1289 17.262046032649025 -1290 17.261981354946307 -1291 17.261916749098752 -1292 17.261852214945925 -1293 17.261787752327812 -1294 17.261723361084844 -1295 17.261659041057897 -1296 17.261594792088278 -1297 17.261530614017726 -1298 17.261466506688432 -1299 17.26140246994301 -1300 17.261338503624483 -1301 17.26127460757634 -1302 17.26121078164248 -1303 17.261147025667203 -1304 17.26108333949527 -1305 17.261019722971845 -1306 17.260956175942503 -1307 17.260892698253254 -1308 17.260829289750504 -1309 17.26076595028109 -1310 17.26070267969225 -1311 17.26063947783163 -1312 17.260576344547303 -1313 17.26051327968772 -1314 17.26045028310175 -1315 17.260387354638688 -1316 17.260324494148165 -1317 17.26026170148028 -1318 17.26019897648552 -1319 17.260136319014727 -1320 17.260073728919163 -1321 17.260011206050493 -1322 17.259948750260747 -1323 17.259886361402373 -1324 17.25982403932818 -1325 17.259761783891385 -1326 17.259699594945573 -1327 17.259637472344725 -1328 17.25957541594319 -1329 17.25951342559571 -1330 17.259451501157386 -1331 17.25938964248372 -1332 17.259327849430573 -1333 17.259266121854186 -1334 17.259204459611166 -1335 17.259142862558488 -1336 17.259081330553506 -1337 17.259019863453936 -1338 17.258958461117864 -1339 17.258897123403734 -1340 17.258835850170353 -1341 17.258774641276897 -1342 17.258713496582892 -1343 17.258652415948216 -1344 17.258591399233136 -1345 17.25853044629824 -1346 17.258469557004492 -1347 17.25840873121319 -1348 17.258347968786005 -1349 17.258287269584933 -1350 17.25822663347234 -1351 17.258166060310938 -1352 17.258105549963766 -1353 17.258045102294222 -1354 17.25798471716605 -1355 17.25792439444333 -1356 17.25786413399047 -1357 17.257803935672246 -1358 17.257743799353747 -1359 17.257683724900406 -1360 17.257623712178 -1361 17.257563761052616 -1362 17.257503871390703 -1363 17.257444043059024 -1364 17.25738427592468 -1365 17.257324569855083 -1366 17.257264924717994 -1367 17.25720534038149 -1368 17.257145816713983 -1369 17.25708635358418 -1370 17.257026950861153 -1371 17.25696760841426 -1372 17.256908326113198 -1373 17.256849103827978 -1374 17.256789941428924 -1375 17.256730838786677 -1376 17.256671795772206 -1377 17.256612812256783 -1378 17.256553888111984 -1379 17.256495023209716 -1380 17.256436217422188 -1381 17.256377470621914 -1382 17.256318782681728 -1383 17.256260153474763 -1384 17.256201582874446 -1385 17.256143070754536 -1386 17.256084616989078 -1387 17.256026221452416 -1388 17.255967884019213 -1389 17.255909604564426 -1390 17.255851382963293 -1391 17.255793219091377 -1392 17.255735112824528 -1393 17.25567706403888 -1394 17.25561907261088 -1395 17.255561138417256 -1396 17.25550326133505 -1397 17.255445441241573 -1398 17.255387678014426 -1399 17.255329971531516 -1400 17.255272321671033 -1401 17.255214728311458 -1402 17.255157191331545 -1403 17.25509971061034 -1404 17.255042286027198 -1405 17.25498491746172 -1406 17.254927604793806 -1407 17.254870347903648 -1408 17.254813146671705 -1409 17.254756000978716 -1410 17.25469891070571 -1411 17.25464187573398 -1412 17.254584895945115 -1413 17.25452797122096 -1414 17.254471101443634 -1415 17.254414286495557 -1416 17.254357526259398 -1417 17.254300820618106 -1418 17.254244169454893 -1419 17.25418757265326 -1420 17.254131030096964 -1421 17.254074541670022 -1422 17.254018107256744 -1423 17.253961726741682 -1424 17.253905400009668 -1425 17.25384912694579 -1426 17.253792907435418 -1427 17.253736741364158 -1428 17.253680628617904 -1429 17.253624569082795 -1430 17.25356856264523 -1431 17.253512609191883 -1432 17.253456708609676 -1433 17.253400860785792 -1434 17.25334506560766 -1435 17.253289322962978 -1436 17.253233632739708 -1437 17.253177994826046 -1438 17.25312240911045 -1439 17.253066875481622 -1440 17.253011393828555 -1441 17.25295596404043 -1442 17.25290058600674 -1443 17.252845259617185 -1444 17.252789984761737 -1445 17.252734761330608 -1446 17.252679589214253 -1447 17.252624468303377 -1448 17.25256939848894 -1449 17.25251437966213 -1450 17.2524594117144 -1451 17.252404494537434 -1452 17.25234962802314 -1453 17.2522948120637 -1454 17.252240046551528 -1455 17.25218533137927 -1456 17.252130666439818 -1457 17.252076051626297 -1458 17.25202148683207 -1459 17.251966971950758 -1460 17.251912506876188 -1461 17.251858091502434 -1462 17.251803725723818 -1463 17.25174940943487 -1464 17.251695142530394 -1465 17.251640924905377 -1466 17.25158675645508 -1467 17.251532637074973 -1468 17.25147856666077 -1469 17.251424545108392 -1470 17.25137057231402 -1471 17.25131664817405 -1472 17.25126277258509 -1473 17.251208945444 -1474 17.251155166647866 -1475 17.251101436093972 -1476 17.251047753679856 -1477 17.250994119303268 -1478 17.250940532862188 -1479 17.25088699425482 -1480 17.25083350337956 -1481 17.25078006013509 -1482 17.25072666442024 -1483 17.25067331613412 -1484 17.25062001517602 -1485 17.250566761445473 -1486 17.25051355484221 -1487 17.250460395266213 -1488 17.250407282617644 -1489 17.250354216796897 -1490 17.250301197704594 -1491 17.250248225241545 -1492 17.250195299308803 -1493 17.250142419807617 -1494 17.250089586639454 -1495 17.250036799706006 -1496 17.249984058909156 -1497 17.249931364151006 -1498 17.24987871533388 -1499 17.249826112360292 -1500 17.249773555133 -1501 17.24972104355492 -1502 17.249668577529235 -1503 17.249616156959277 -1504 17.24956378174864 -1505 17.249511451801087 -1506 17.2494591670206 -1507 17.249406927311366 -1508 17.24935473257778 -1509 17.249302582724436 -1510 17.24925047765614 -1511 17.24919841727789 -1512 17.249146401494883 -1513 17.24909443021254 -1514 17.249042503336476 -1515 17.24899062077248 -1516 17.248938782426585 -1517 17.248886988204994 -1518 17.248835238014117 -1519 17.248783531760562 -1520 17.248731869351136 -1521 17.248680250692836 -1522 17.248628675692874 -1523 17.248577144258643 -1524 17.24852565629774 -1525 17.248474211717962 -1526 17.248422810427282 -1527 17.248371452333867 -1528 17.248320137346116 -1529 17.24826886537258 -1530 17.24821763632201 -1531 17.248166450103373 -1532 17.248115306625802 -1533 17.248064205798634 -1534 17.24801314753139 -1535 17.247962131733786 -1536 17.247911158315716 -1537 17.24786022718729 -1538 17.24780933825877 -1539 17.247758491440642 -1540 17.247707686643555 -1541 17.247656923778347 -1542 17.247606202756057 -1543 17.247555523487904 -1544 17.247504885885277 -1545 17.247454289859782 -1546 17.24740373532317 -1547 17.247353222187407 -1548 17.247302750364632 -1549 17.24725231976716 -1550 17.24720193030751 -1551 17.24715158189835 -1552 17.247101274452564 -1553 17.247051007883186 -1554 17.247000782103466 -1555 17.2469505970268 -1556 17.246900452566777 -1557 17.246850348637174 -1558 17.246800285151938 -1559 17.246750262025188 -1560 17.24670027917123 -1561 17.24665033650455 -1562 17.24660043393981 -1563 17.24655057139183 -1564 17.246500748775635 -1565 17.246450966006396 -1566 17.24640122299949 -1567 17.246351519670444 -1568 17.246301855934966 -1569 17.24625223170895 -1570 17.246202646908447 -1571 17.246153101449668 -1572 17.246103595249046 -1573 17.246054128223136 -1574 17.246004700288687 -1575 17.245955311362625 -1576 17.245905961362034 -1577 17.24585665020415 -1578 17.245807377806422 -1579 17.24575814408644 -1580 17.24570894896197 -1581 17.245659792350942 -1582 17.245610674171466 -1583 17.245561594341797 -1584 17.245512552780376 -1585 17.24546354940582 -1586 17.24541458413688 -1587 17.245365656892503 -1588 17.245316767591774 -1589 17.24526791615398 -1590 17.245219102498535 -1591 17.245170326545043 -1592 17.245121588213255 -1593 17.245072887423103 -1594 17.245024224094657 -1595 17.24497559814818 -1596 17.244927009504075 -1597 17.2448784580829 -1598 17.244829943805406 -1599 17.244781466592492 -1600 17.244733026365193 -1601 17.244684623044733 -1602 17.244636256552486 -1603 17.24458792680999 -1604 17.244539633738928 -1605 17.244491377261163 -1606 17.24444315729869 -1607 17.244394973773694 -1608 17.24434682660849 -1609 17.244298715725556 -1610 17.24425064104754 -1611 17.244202602497225 -1612 17.244154599997586 -1613 17.244106633471702 -1614 17.244058702842857 -1615 17.24401080803445 -1616 17.243962948970065 -1617 17.24391512557342 -1618 17.24386733776839 -1619 17.243819585479017 -1620 17.243771868629477 -1621 17.243724187144117 -1622 17.24367654094742 -1623 17.24362892996403 -1624 17.243581354118742 -1625 17.243533813336498 -1626 17.243486307542398 -1627 17.243438836661667 -1628 17.24339140061973 -1629 17.24334399934211 -1630 17.243296632754507 -1631 17.243249300782768 -1632 17.24320200335289 -1633 17.243154740391 -1634 17.2431075118234 -1635 17.24306031757651 -1636 17.24301315757692 -1637 17.24296603175137 -1638 17.242918940026726 -1639 17.24287188233 -1640 17.24282485858838 -1641 17.24277786872917 -1642 17.242730912679832 -1643 17.242683990367965 -1644 17.24263710172133 -1645 17.242590246667792 -1646 17.24254342513541 -1647 17.242496637052355 -1648 17.242449882346964 -1649 17.24240316094768 -1650 17.242356472783126 -1651 17.242309817782044 -1652 17.242263195873324 -1653 17.24221660698601 -1654 17.242170051049264 -1655 17.24212352799241 -1656 17.242077037744902 -1657 17.242030580236328 -1658 17.24198415539643 -1659 17.241937763155086 -1660 17.241891403442303 -1661 17.241845076188234 -1662 17.241798781323183 -1663 17.241752518777563 -1664 17.24170628848195 -1665 17.241660090367052 -1666 17.241613924363705 -1667 17.241567790402886 -1668 17.241521688415716 -1669 17.241475618333457 -1670 17.241429580087484 -1671 17.24138357360932 -1672 17.24133759883063 -1673 17.24129165568322 -1674 17.241245744098997 -1675 17.241199864010035 -1676 17.241154015348542 -1677 17.241108198046838 -1678 17.241062412037394 -1679 17.241016657252796 -1680 17.2409709336258 -1681 17.240925241089247 -1682 17.24087957957614 -1683 17.240833949019624 -1684 17.24078834935294 -1685 17.240742780509493 -1686 17.240697242422794 -1687 17.24065173502651 -1688 17.240606258254417 -1689 17.24056081204044 -1690 17.24051539631861 -1691 17.240470011023106 -1692 17.240424656088244 -1693 17.24037933144845 -1694 17.240334037038284 -1695 17.24028877279244 -1696 17.24024353864573 -1697 17.240198334533112 -1698 17.240153160389653 -1699 17.240108016150568 -1700 17.24006290175117 -1701 17.240017817126915 -1702 17.239972762213405 -1703 17.23992773694633 -1704 17.239882741261532 -1705 17.239837775094983 -1706 17.23979283838275 -1707 17.23974793106106 -1708 17.239703053066236 -1709 17.239658204334752 -1710 17.239613384803185 -1711 17.23956859440826 -1712 17.23952383308679 -1713 17.23947910077575 -1714 17.2394343974122 -1715 17.23938972293336 -1716 17.23934507727656 -1717 17.23930046037922 -1718 17.239255872178955 -1719 17.23921131261342 -1720 17.239166781620444 -1721 17.23912227913797 -1722 17.239077805104046 -1723 17.23903335945684 -1724 17.238988942134668 -1725 17.23894455307595 -1726 17.238900192219212 -1727 17.238855859503115 -1728 17.23881155486645 -1729 17.238767278248098 -1730 17.238723029587096 -1731 17.238678808822552 -1732 17.238634615893748 -1733 17.238590450740038 -1734 17.238546313300926 -1735 17.23850220351601 -1736 17.238458121325017 -1737 17.238414066667794 -1738 17.2383700394843 -1739 17.238326039714607 -1740 17.23828206729892 -1741 17.23823812217754 -1742 17.23819420429089 -1743 17.238150313579517 -1744 17.23810644998408 -1745 17.23806261344535 -1746 17.238018803904215 -1747 17.23797502130167 -1748 17.237931265578837 -1749 17.237887536676954 -1750 17.23784383453735 -1751 17.237800159101496 -1752 17.237756510310966 -1753 17.237712888107428 -1754 17.23766929243271 -1755 17.2376257232287 -1756 17.237582180437435 -1757 17.237538664001043 -1758 17.237495173861777 -1759 17.237451709961995 -1760 17.23740827224418 -1761 17.237364860650906 -1762 17.23732147512487 -1763 17.23727811560887 -1764 17.23723478204584 -1765 17.237191474378793 -1766 17.23714819255088 -1767 17.237104936505332 -1768 17.237061706185514 -1769 17.23701850153489 -1770 17.23697532249704 -1771 17.23693216901566 -1772 17.236889041034523 -1773 17.236845938497545 -1774 17.23680286134873 -1775 17.236759809532202 -1776 17.23671678299219 -1777 17.236673781673026 -1778 17.236630805519145 -1779 17.23658785447511 -1780 17.236544928485575 -1781 17.2365020274953 -1782 17.236459151449154 -1783 17.236416300292113 -1784 17.23637347396927 -1785 17.236330672425805 -1786 17.23628789560701 -1787 17.236245143458294 -1788 17.236202415925156 -1789 17.236159712953214 -1790 17.236117034488167 -1791 17.236074380475856 -1792 17.236031750862182 -1793 17.23598914559319 -1794 17.23594656461502 -1795 17.23590400787389 -1796 17.23586147531615 -1797 17.23581896688824 -1798 17.235776482536693 -1799 17.235734022208177 -1800 17.23569158584944 -1801 17.235649173407346 -1802 17.23560678482882 -1803 17.235564420060957 -1804 17.23552207905089 -1805 17.2354797617459 -1806 17.23543746809334 -1807 17.23539519804067 -1808 17.235352951535482 -1809 17.235310728525402 -1810 17.235268528958237 -1811 17.235226352781833 -1812 17.235184199944158 -1813 17.235142070393284 -1814 17.23509996407738 -1815 17.235057880944716 -1816 17.235015820943644 -1817 17.234973784022653 -1818 17.234931770130288 -1819 17.234889779215216 -1820 17.234847811226203 -1821 17.234805866112108 -1822 17.234763943821886 -1823 17.234722044304604 -1824 17.234680167509396 -1825 17.234638313385545 -1826 17.234596481882374 -1827 17.234554672949333 -1828 17.234512886535974 -1829 17.23447112259193 -1830 17.234429381066942 -1831 17.234387661910844 -1832 17.234345965073555 -1833 17.23430429050511 -1834 17.234262638155627 -1835 17.23422100797532 -1836 17.234179399914506 -1837 17.234137813923585 -1838 17.234096249953065 -1839 17.234054707953543 -1840 17.234013187875703 -1841 17.23397168967034 -1842 17.23393021328832 -1843 17.233888758680642 -1844 17.233847325798354 -1845 17.23380591459262 -1846 17.2337645250147 -1847 17.233723157015937 -1848 17.233681810547786 -1849 17.23364048556176 -1850 17.233599182009506 -1851 17.233557899842737 -1852 17.23351663901326 -1853 17.233475399472983 -1854 17.233434181173898 -1855 17.233392984068104 -1856 17.233351808107763 -1857 17.233310653245166 -1858 17.233269519432667 -1859 17.233228406622715 -1860 17.233187314767854 -1861 17.233146243820727 -1862 17.233105193734055 -1863 17.23306416446065 -1864 17.23302315595343 -1865 17.23298216816538 -1866 17.23294120104958 -1867 17.23290025455922 -1868 17.232859328647553 -1869 17.23281842326794 -1870 17.232777538373824 -1871 17.232736673918737 -1872 17.232695829856297 -1873 17.232655006140213 -1874 17.232614202724285 -1875 17.232573419562396 -1876 17.232532656608512 -1877 17.232491913816713 -1878 17.232451191141138 -1879 17.23241048853602 -1880 17.23236980595569 -1881 17.232329143354544 -1882 17.2322885006871 -1883 17.23224787790794 -1884 17.232207274971724 -1885 17.232166691833225 -1886 17.232126128447266 -1887 17.232085584768797 -1888 17.232045060752828 -1889 17.232004556354454 -1890 17.231964071528868 -1891 17.23192360623134 -1892 17.231883160417247 -1893 17.23184273404199 -1894 17.231802327061146 -1895 17.231761939430292 -1896 17.23172157110514 -1897 17.23168122204148 -1898 17.23164089219516 -1899 17.231600581522137 -1900 17.23156028997845 -1901 17.231520017520214 -1902 17.23147976410362 -1903 17.231439529684977 -1904 17.231399314220624 -1905 17.231359117667036 -1906 17.231318939980728 -1907 17.23127878111833 -1908 17.231238641036533 -1909 17.231198519692125 -1910 17.231158417041964 -1911 17.231118333043003 -1912 17.23107826765226 -1913 17.231038220826854 -1914 17.230998192523977 -1915 17.23095818270089 -1916 17.230918191314963 -1917 17.230878218323603 -1918 17.230838263684362 -1919 17.23079832735482 -1920 17.230758409292644 -1921 17.23071850945561 -1922 17.23067862780155 -1923 17.230638764288372 -1924 17.230598918874087 -1925 17.23055909151677 -1926 17.230519282174587 -1927 17.230479490805756 -1928 17.23043971736861 -1929 17.230399961821544 -1930 17.23036022412301 -1931 17.230320504231603 -1932 17.230280802105927 -1933 17.2302411177047 -1934 17.230201450986712 -1935 17.230161801910832 -1936 17.230122170436008 -1937 17.23008255652126 -1938 17.230042960125697 -1939 17.230003381208494 -1940 17.229963819728898 -1941 17.22992427564626 -1942 17.229884748919996 -1943 17.229845239509576 -1944 17.229805747374574 -1945 17.229766272474627 -1946 17.229726814769478 -1947 17.22968737421889 -1948 17.229647950782763 -1949 17.229608544421026 -1950 17.229569155093714 -1951 17.22952978276092 -1952 17.229490427382828 -1953 17.22945108891968 -1954 17.22941176733181 -1955 17.229372462579615 -1956 17.229333174623576 -1957 17.22929390342424 -1958 17.22925464894225 -1959 17.22921541113829 -1960 17.229176189973145 -1961 17.229136985407663 -1962 17.22909779740277 -1963 17.229058625919457 -1964 17.229019470918807 -1965 17.22898033236197 -1966 17.228941210210156 -1967 17.22890210442467 -1968 17.228863014966866 -1969 17.228823941798197 -1970 17.22878488488017 -1971 17.228745844174373 -1972 17.22870681964247 -1973 17.228667811246183 -1974 17.22862881894733 -1975 17.228589842707784 -1976 17.228550882489486 -1977 17.228511938254464 -1978 17.228473009964812 -1979 17.228434097582692 -1980 17.22839520107035 -1981 17.228356320390088 -1982 17.228317455504286 -1983 17.22827860637539 -1984 17.228239772965935 -1985 17.22820095523851 -1986 17.22816215315577 -1987 17.22812336668046 -1988 17.22808459577538 -1989 17.22804584040341 -1990 17.228007100527496 -1991 17.22796837611065 -1992 17.227929667115966 -1993 17.2278909735066 -1994 17.227852295245768 -1995 17.227813632296773 -1996 17.227774984622982 -1997 17.22773635218783 -1998 17.227697734954816 -1999 17.227659132887513 -2000 17.22762054594957 diff --git a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=100.log b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=100.log deleted file mode 100644 index c3aaba04..00000000 --- a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=100.log +++ /dev/null @@ -1,39 +0,0 @@ -2023-12-23T22:38:13.431 -== Config == -INIT_SIZE: 3 -GEN_TYP_SIZE: 2 -PARAMETERIZE_FLIP_GROUPS_BY_SZ: true -EPOCHS: 100 -DistNat: DistUInt32 -TAG: v3_opt_meta_ad - -Building num_apps(gen_expr(...)) computation graph... - 9.797323125 seconds - -Initial adnodes_of_interest: -Dict("tysz2_gen_type_tbool" => 0.5, "tysz1_gen_type_tbool" => 0.5, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.5, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5, "sz1_succ_app" => 0.5, "sz1_succ_abs" => 0.5, "sz3_succ_abs" => 0.5, "sz3_succ_app" => 0.5, "sz2_succ_abs" => 0.5, "sz3_succ_var" => 0.5) -Inferring initial distribution... - 0.368995208 seconds -Saved num_apps dist to examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_before.csv. - -Saving samples... -Saved samples to examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_before.txt. - 5.36046275 seconds - -Initial logprob: -20.238481981031438 - -Training... - 7.11384975 seconds - -Final logprob: -18.54692234466734 -Drawing the target dataset is 5.43x more likely - -Learned adnodes_of_interest: -Dict("tysz2_gen_type_tbool" => 0.4769967684232314, "tysz1_gen_type_tbool" => 0.4962538566537244, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.561559374299581, "sz2_succ_var" => 0.49666005253839807, "sz1_succ_var" => 0.49906693556544923, "sz1_succ_app" => 0.5767350167020707, "sz1_succ_abs" => 0.41080879746746896, "sz3_succ_abs" => 0.432508934977342, "sz3_succ_app" => 0.5595926683247854, "sz2_succ_abs" => 0.4336897457382177, "sz3_succ_var" => 0.5) -Inferring trained distribution... -Saved num_apps dist to examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=100.csv. - -Saving samples... -Saved samples to examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=100.txt. - 3.144126583 seconds - diff --git a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log deleted file mode 100644 index 1ec7db2b..00000000 --- a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/log_param_by_sz=true,epochs=2000.log +++ /dev/null @@ -1,39 +0,0 @@ -2023-12-24T14:57:33.753 -== Config == -INIT_SIZE: 3 -GEN_TYP_SIZE: 2 -PARAMETERIZE_FLIP_GROUPS_BY_SZ: true -EPOCHS: 2000 -DistNat: DistUInt32 -TAG: v3_opt_meta_ad - -Building num_apps(gen_expr(...)) computation graph... - 9.788417833 seconds - -Initial adnodes_of_interest: -Dict("tysz2_gen_type_tbool" => 0.5, "tysz1_gen_type_tbool" => 0.5, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.5, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5, "sz1_succ_app" => 0.5, "sz1_succ_abs" => 0.5, "sz3_succ_abs" => 0.5, "sz3_succ_app" => 0.5, "sz2_succ_abs" => 0.5, "sz3_succ_var" => 0.5) -Inferring initial distribution... - 0.371381167 seconds -Saved num_apps dist to examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_before.csv. - -Saving samples... -Saved samples to examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_before.txt. - 4.67617525 seconds - -Initial logprob: -20.238481981031438 - -Training... - 15.66972375 seconds - -Final logprob: -17.22762054594957 -Drawing the target dataset is 20.3x more likely - -Learned adnodes_of_interest: -Dict("tysz2_gen_type_tbool" => 0.34083724764380813, "tysz1_gen_type_tbool" => 0.39501557295049883, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.6151878798944755, "sz2_succ_var" => 0.43468900171159874, "sz1_succ_var" => 0.5103724794228329, "sz1_succ_app" => 0.68419917231591, "sz1_succ_abs" => 0.2149167539907951, "sz3_succ_abs" => 0.25149682656466177, "sz3_succ_app" => 0.6712638585215596, "sz2_succ_abs" => 0.4236132578800875, "sz3_succ_var" => 0.5) -Inferring trained distribution... -Saved num_apps dist to examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/dist_trained_param_by_sz=true,epochs=2000.csv. - -Saving samples... -Saved samples to examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt. - 2.335930042 seconds - diff --git a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_before.txt b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_before.txt deleted file mode 100644 index e275f274..00000000 --- a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_before.txt +++ /dev/null @@ -1,200 +0,0 @@ -λx:Bool. x -λx:Bool -> Bool. true -(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. false) false (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. λz:Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false))) -(λx:(Bool -> Bool) -> Bool. (λy:Bool. false) true) (λx:Bool -> Bool. false) -(λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool. λz:Bool. false)) (λx:Bool. true) -(λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool. true) true ((λx:Bool. false) true)) -(λx:Bool. λy:Bool. x) true -true -(λx:Bool. (λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. true) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true))) -(λx:Bool. λy:Bool. λz:Bool. true) false true -(λx:Bool. true) false -true -λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. true) false -(λx:Bool. false) true -(λx:Bool. x) false -false -false -(λx:Bool. λy:Bool -> Bool. false) true -true -λx:Bool -> Bool. true -(λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. false) (λx:Bool. false) true ((λx:Bool. λy:Bool. λz:Bool. false) false) -(λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. x) -λx:Bool -> Bool. x -(λx:Bool -> Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) false) (λx:Bool. (λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. false)) -λx:Bool. x -λx:Bool -> Bool. λy:Bool. true -(λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. x) -(λx:Bool. λy:(Bool -> Bool) -> Bool. true) true ((λx:Bool. λy:Bool -> Bool. true) false) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. false) false -λx:Bool. false -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) ((λy:Bool. λz:Bool -> Bool. λw:Bool. false) false) -λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) x ((λy:Bool -> Bool -> Bool. λz:Bool. false) (λy:Bool. λz:Bool. false)) -(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. true) ((λx:Bool. λy:Bool -> Bool. false) false) (λx:Bool -> Bool. x false) -false -(λx:Bool. true) ((λx:Bool -> Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. false))) -λx:Bool. λy:Bool. y -λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. λz:Bool. false) ((λy:Bool. true) x) -(λx:Bool. λy:Bool -> Bool. x) false -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false)) false -λx:Bool. (λy:(Bool -> Bool) -> Bool. x) ((λy:Bool. λz:Bool -> Bool. true) x) -λx:Bool. λy:Bool. true -λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. true) -(λx:Bool -> Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. false))) -true -(λx:Bool. true) ((λx:(Bool -> Bool) -> Bool. false) ((λx:Bool. λy:Bool -> Bool. true) true)) -(λx:Bool. λy:Bool. x) true -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. false) true ((λx:Bool. false) false) -true -λx:Bool. (λy:Bool. λz:Bool. λw:Bool. true) x ((λy:Bool. true) x) -(λx:Bool. λy:Bool. λz:Bool. true) false true ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false)) -λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. false) (λy:Bool. λz:Bool. true) ((λy:Bool. λz:Bool -> Bool. false) true) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) -true -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. false) false ((λx:Bool. λy:Bool -> Bool. false) true) (λx:Bool. (λy:Bool -> Bool. λz:Bool. true) (λy:Bool. false)) -true -false -(λx:Bool. (λy:Bool. λz:Bool. false) x) false -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. true) false -λx:Bool -> Bool. (λy:Bool -> Bool. false) ((λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool -> Bool. false)) -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. true) false ((λx:Bool. λy:Bool -> Bool. true) false) (λx:Bool -> Bool. λy:Bool. y) -(λx:Bool. λy:Bool -> Bool. true) true ((λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool. false) false)) -λx:Bool. false -false -(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true) false ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. true))) -λx:Bool. λy:Bool. (λz:Bool. false) y -false -(λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) true ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. false)) -(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool. true) true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true))) -false -(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) x) ((λx:Bool. λy:(Bool -> Bool) -> Bool. true) true (λx:Bool -> Bool. false)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. x) -(λx:Bool. λy:(Bool -> Bool) -> Bool. true) false (λx:Bool -> Bool. true) -(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) false) ((λx:Bool. λy:Bool -> Bool. false) false) -(λx:Bool. false) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true)) -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. false) ((λy:Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool. false)) -(λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool. false)) (λx:Bool. (λy:Bool. false) x) -(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) ((λx:Bool -> Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool. false) true)) -(λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) true ((λx:Bool. false) false) (λx:Bool. x) -λx:Bool -> Bool. true -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) -(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. λy:Bool. false) -false -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. true) (λx:Bool -> Bool. false) false ((λx:Bool. λy:Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true))) -(λx:Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) (λx:Bool. true) ((λx:Bool. true) true) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. false)) -λx:Bool. (λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. true) x ((λy:Bool. λz:Bool. λw:Bool. false) true) -λx:Bool. (λy:Bool. λz:Bool. λw:Bool. false) true ((λy:Bool. true) x) -false -λx:Bool -> Bool. λy:Bool. y -true -(λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. false)) ((λx:Bool -> Bool. false) (λx:Bool. false)) -true -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true)) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) -false -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool. true) (λy:Bool. true)) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:Bool. λy:Bool. true) false)) -(λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) true -λx:Bool -> Bool. x -(λx:Bool -> Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false))) -(λx:Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) false)) -false -true -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. false) true (λx:Bool -> Bool. (λy:Bool. true) true) -true -λx:Bool. false -(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. true)) ((λx:Bool. λy:(Bool -> Bool) -> Bool. false) true ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. true))) -true -(λx:Bool. λy:Bool. true) ((λx:Bool. false) true) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. false) (λx:Bool -> Bool. true)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. x) -(λx:Bool. x) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. false) (λx:Bool -> Bool. false) (λx:Bool. λy:Bool. false)) -(λx:Bool. λy:(Bool -> Bool) -> Bool. true) false (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. false)) -(λx:Bool. λy:Bool -> Bool. x) ((λx:Bool. false) true) -true -(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool. true) false)) -(λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool. λz:Bool. false)) ((λx:Bool. λy:Bool. λz:Bool -> Bool. false) false ((λx:Bool -> Bool. false) (λx:Bool. false))) -false -false -(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λx:Bool. false) (λx:Bool -> Bool. (λy:Bool. true) true) -(λx:Bool -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. true)) ((λx:Bool. λy:Bool. λz:Bool -> Bool. true) false ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false))) -λx:Bool. (λy:Bool. false) ((λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. true)) -(λx:Bool -> Bool. false) ((λx:Bool -> Bool. x) ((λx:(Bool -> Bool) -> Bool. λy:Bool. false) (λx:Bool -> Bool. false))) -(λx:Bool. λy:Bool -> Bool. y) true -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. true)) ((λx:Bool. x) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. false))) -λx:Bool. x -λx:Bool -> Bool. (λy:Bool. λz:Bool. false) true false -λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) (λy:Bool -> Bool. false) ((λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool. λz:Bool. false)) -λx:Bool -> Bool. x -false -(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false) true (λx:Bool. λy:Bool. y) -(λx:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x)) -λx:Bool. (λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. false) -(λx:Bool. x) true -(λx:Bool. x) true -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. (λy:Bool. λz:Bool. true) x) -false -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. false) true -λx:Bool. (λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. true) -λx:Bool. (λy:Bool. λz:Bool. λw:Bool. true) x false -true -(λx:Bool. (λy:Bool. λz:Bool. true) false) true -λx:Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. false) true -(λx:Bool. λy:Bool. λz:Bool -> Bool. false) ((λx:Bool. false) false) ((λx:Bool. true) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false))) -(λx:(Bool -> Bool) -> Bool. (λy:Bool. false) false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false))) -true -false -λx:Bool. false -(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. false) (λx:Bool. λy:Bool. false) (λx:Bool -> Bool. false) -(λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. false) false ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. false)) -(λx:Bool. λy:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) false true) -true -(λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) true ((λx:Bool. true) false) (λx:Bool. x) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. x) false -λx:Bool. (λy:Bool. λz:Bool. true) ((λy:Bool. true) x) -λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool. false) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) true ((λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true))) -λx:Bool -> Bool. false -(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. false) (λx:Bool. λy:Bool. false) true true -false -λx:Bool. false -(λx:Bool -> Bool -> Bool. (λy:Bool. true) false) (λx:Bool. λy:Bool. y) -false -false -true -(λx:Bool. λy:(Bool -> Bool) -> Bool. true) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false)) ((λx:Bool. λy:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true))) -true -(λx:Bool. λy:Bool -> Bool. x) ((λx:Bool. x) ((λx:Bool. true) true)) -true -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false) ((λx:Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. λy:Bool. false)) -(λx:Bool. x) true -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false) (λx:Bool -> Bool. λy:Bool. y) -false -(λx:Bool. λy:Bool -> Bool. y) false -true -λx:Bool. false -λx:Bool -> Bool. λy:Bool. (λz:(Bool -> Bool) -> Bool. false) (λz:Bool -> Bool. true) -λx:Bool. λy:Bool. (λz:Bool -> Bool -> Bool. true) (λz:Bool. λw:Bool. true) -false -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) (λx:Bool. x) ((λx:Bool -> Bool. true) (λx:Bool. x)) -(λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) false true -false -true -false -true -(λx:Bool. λy:Bool. λz:Bool. true) true ((λx:Bool. false) false) ((λx:Bool. false) ((λx:Bool. false) false)) -(λx:Bool. λy:Bool. false) ((λx:Bool. false) true) ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true))) -λx:Bool. true -false -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. x) -λx:Bool. λy:Bool. y -(λx:Bool. λy:Bool -> Bool. x) true -(λx:Bool -> Bool -> Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) ((λx:Bool. false) false)) -(λx:(Bool -> Bool) -> Bool. (λy:Bool. true) true) (λx:Bool -> Bool. x false) -(λx:Bool. x) true -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. false) false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true) -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false)) -true -(λx:Bool. λy:Bool. λz:Bool. false) true false true -(λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. x) -true -false -λx:Bool. λy:Bool. (λz:Bool. true) true -(λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. true)) diff --git a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=100.txt b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=100.txt deleted file mode 100644 index cbb23a76..00000000 --- a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=100.txt +++ /dev/null @@ -1,200 +0,0 @@ -(λx:Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. λa:Bool. true) (λx:Bool. false) (λx:Bool. λy:Bool. true) (λx:Bool. false) -true -(λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool. true) false ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false))) -(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. false)) ((λx:Bool. λy:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false))) -(λx:Bool. λy:Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false)) ((λx:Bool. x) ((λx:Bool -> Bool. true) (λx:Bool. true))) -false -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. false) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool. x) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. true)) -λx:Bool. λy:Bool. x -(λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. true) false) -(λx:Bool. x) ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true))) -false -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. λy:Bool. y) -(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) false) ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. false) false) -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool. false) true) true -λx:Bool -> Bool. (λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. true) false ((λy:Bool. λz:Bool. λw:Bool. false) true) -(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true))) -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. true) (λx:Bool. λy:Bool. false) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false))) -(λx:Bool. x) true -λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. true) (λy:Bool -> Bool. true) ((λy:Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool. false)) -(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool. λy:Bool -> Bool. true) true) -(λx:Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. false) true (λx:Bool -> Bool. λy:Bool. true)) -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. true)) true -(λx:Bool -> Bool -> Bool. false) (λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. false) (λy:Bool. λz:Bool. false)) -false -λx:Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. true) false -(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. false) true ((λx:Bool -> Bool. false) (λx:Bool. false)) ((λx:(Bool -> Bool) -> Bool. x) (λx:Bool -> Bool. false)) -(λx:Bool. x) false -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) false ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true)) -(λx:Bool. true) false -false -false -λx:Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. true) x -(λx:Bool -> Bool. (λy:Bool. λz:Bool -> Bool. true) true) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. true) false ((λx:Bool. λy:Bool -> Bool. true) true)) -λx:Bool -> Bool. x -(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) false ((λx:Bool. true) false)) -false -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. true) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false)) (λx:Bool -> Bool. (λy:Bool. λz:Bool. false) true) -(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. false) false) (λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. false) (λy:Bool. λz:Bool. true)) -false -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. true) (λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. false)) -(λx:Bool. λy:(Bool -> Bool) -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool -> Bool. false) -(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) false (λx:Bool. λy:Bool. x) -λx:Bool -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. true) false (λy:Bool -> Bool. true) -(λx:Bool. (λy:Bool. λz:Bool. true) false) ((λx:Bool. λy:Bool. true) true false) -λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. false) (λy:Bool. λz:Bool. true) ((λy:Bool. λz:Bool. λw:Bool. true) false) -λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. false) ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. true)) -(λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) ((λx:Bool. true) true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. true) false) -λx:Bool. λy:Bool. (λz:Bool. true) x -(λx:Bool. x) false -true -(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool. true) (λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λx:Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. false) true)) -true -true -λx:Bool. λy:Bool. y -(λx:Bool. (λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. true)) ((λx:Bool. x) false) -false -true -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. false) true ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. true)) ((λx:Bool. λy:Bool. false) false true) -false -false -λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. false) (λy:Bool -> Bool. false) ((λy:Bool. λz:Bool. λw:Bool. true) true) -(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. false) false ((λx:Bool. false) true) ((λx:Bool. λy:Bool -> Bool. false) true) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool. true) ((λx:Bool. λy:Bool -> Bool. false) false)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true) false -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. false) -(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool. true) ((λx:Bool. λy:Bool -> Bool. false) true) ((λx:Bool. λy:Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true))) -(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. true) false ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false))) -false -false -(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true)) (λx:Bool. λy:Bool. true) -(λx:Bool. λy:Bool -> Bool. false) true (λx:Bool. true) -(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. false) false true (λx:Bool -> Bool. false) -(λx:Bool. λy:Bool. λz:Bool. false) false -(λx:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. false) true ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true))) -(λx:(Bool -> Bool) -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. false) false) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool. false) false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) false) -false -(λx:Bool -> Bool. (λy:Bool. false) true) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. λy:Bool. true) false) -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. λa:Bool. false) true ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true)) ((λx:Bool. true) true) -(λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. λz:Bool. false)) (λx:Bool -> Bool. true) -(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) x) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) (λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true))) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool. λy:Bool. true) (λx:Bool. x)) -(λx:Bool. x) true -(λx:Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. true) true ((λx:Bool -> Bool. false) (λx:Bool. true)) ((λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false))) -true -λx:Bool. λy:Bool. true -(λx:(Bool -> Bool) -> Bool. (λy:Bool. false) true) (λx:Bool -> Bool. false) -(λx:Bool. λy:Bool. λz:Bool. true) false true ((λx:Bool. λy:Bool. true) false true) -(λx:Bool. x) false -(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. λz:Bool. true)) (λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool. true)) -true -true -(λx:Bool. (λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. false)) ((λx:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true))) -λx:Bool -> Bool. (λy:Bool. λz:Bool. true) true true -(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true)) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) false true) -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. false) -λx:Bool. (λy:Bool. true) x -(λx:Bool. λy:Bool. true) false -(λx:Bool. λy:Bool. false) false -λx:Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool. true) false true -(λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. false) -λx:Bool. x -false -λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. false) -(λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. true) ((λx:Bool. λy:Bool. true) true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. true) false) -(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. false) false) -false -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false)) false -(λx:Bool. λy:Bool -> Bool. y) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true)) -(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. false) (λx:Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false)) (λx:Bool. (λy:Bool. true) true) -true -λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. false) ((λy:Bool. false) x) -(λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. true) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false)) -(λx:Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool. true) false ((λx:Bool -> Bool -> Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) false)) -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. true)) false -λx:Bool. (λy:Bool. λz:Bool. false) x -false -(λx:Bool. λy:Bool. true) false true -false -λx:Bool. λy:Bool. true -(λx:Bool -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. false) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. false)) ((λx:Bool. λy:Bool -> Bool. true) true) -(λx:Bool -> Bool. x) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. false)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true))) -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. true) (λx:Bool. false)) -λx:Bool -> Bool. true -(λx:Bool. x) ((λx:Bool. λy:Bool. true) true true) -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool. true) true) ((λx:Bool. λy:Bool. false) false ((λx:Bool. false) false)) -(λx:Bool. λy:Bool -> Bool. y) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) -(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false (λx:Bool. true)) -(λx:Bool. x) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) false (λx:Bool -> Bool. λy:Bool. false)) -λx:Bool -> Bool. false -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. false) (λx:Bool -> Bool. false) ((λx:Bool. false) true) ((λx:Bool. λy:Bool. true) true) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. false) true) false -λx:Bool -> Bool. (λy:Bool -> Bool. x) ((λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool -> Bool. true)) -false -λx:Bool -> Bool. false -true -(λx:Bool. x) true -(λx:Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. false) (λx:Bool. false) false ((λx:Bool -> Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true))) -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. false) false) (λx:Bool -> Bool. (λy:Bool. λz:Bool. false) false) -(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool. false) x) (λx:Bool -> Bool. x false) -λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. true)) -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. true) ((λx:Bool. true) false) false -(λx:Bool. true) ((λx:Bool. λy:Bool. false) true ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true))) -(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool. false) x) ((λx:Bool. λy:Bool. λz:Bool -> Bool. false) true ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true))) -(λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. false) true true ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false)) -(λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. true) ((λx:Bool. true) true)) -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. true) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false)) -λx:Bool -> Bool. false -(λx:Bool. λy:Bool -> Bool. true) ((λx:Bool. false) true) (λx:Bool. false) -(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. true) x) ((λx:Bool. λy:Bool. false) true true) -λx:Bool. λy:Bool. (λz:Bool. false) x -(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. false) x) true -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false)) ((λx:Bool. λy:Bool. λz:Bool. true) ((λx:Bool. false) false)) -false -(λx:Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) true (λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false) -(λx:Bool. λy:(Bool -> Bool) -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. false))) -λx:Bool. true -λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. true) -(λx:Bool -> Bool. (λy:Bool. true) false) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. true))) -λx:Bool. (λy:Bool. λz:Bool -> Bool -> Bool. true) x (λy:Bool. λz:Bool. true) -λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. true) x -(λx:Bool -> Bool -> Bool. x) ((λx:Bool. λy:Bool. λz:Bool. false) true) -(λx:(Bool -> Bool) -> Bool. x (λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false))) -false -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool. true) false) (λx:Bool -> Bool. x) -λx:Bool -> Bool. x -(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. false) true (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. x)) -(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) (λx:Bool. λy:Bool. false) -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true))) -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false))) -λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. true) x ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. true)) -true -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false (λx:Bool. true) false -false -(λx:Bool. (λy:Bool. false) x) true -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true)) -true -λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. true) true ((λy:Bool. λz:Bool -> Bool. false) true) -(λx:Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. true) false ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true)) ((λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. false) false)) -true -(λx:Bool -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λx:Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) true (λx:Bool -> Bool. x)) -λx:Bool. x -(λx:Bool -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool. true) false) (λx:Bool. λy:Bool. y) -(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) true (λx:Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. false))) -(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool. false)) -true -λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. true) ((λy:Bool. λz:Bool. λw:Bool. false) false) -true -(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool. λz:Bool. false)) false -(λx:Bool. λy:Bool. λz:Bool. false) ((λx:Bool. true) true) false -(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true)) -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) false -(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. false) x) ((λx:Bool -> Bool. false) (λx:Bool. x)) -(λx:Bool -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool. true) false) (λx:Bool. λy:Bool. x) -λx:Bool. λy:Bool. true -(λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool. λz:Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool. true) true)) -false -true -true diff --git a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt deleted file mode 100644 index ed28ba40..00000000 --- a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=3,tysz=2/terms_trained_param_by_sz=true,epochs=2000.txt +++ /dev/null @@ -1,200 +0,0 @@ -(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool. λz:Bool. false)) ((λx:Bool. λy:Bool. true) false ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false))) -(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool. false) false)) -(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. y) ((λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. true) false ((λx:Bool. λy:Bool. false) true)) -(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. true)) (λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. false)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. false) true) (λx:Bool. x) -(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. false)) (λx:Bool. λy:Bool. y) -λx:Bool -> Bool. λy:Bool. (λz:Bool. true) y -λx:Bool -> Bool. λy:Bool. y -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) true) (λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false)) -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. true)) ((λx:Bool -> Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool. false) false)) -(λx:Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. false)) true -(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. false) false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true))) -true -(λx:Bool -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool -> Bool. x true) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. x) (λx:Bool -> Bool. x) -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. λa:Bool. true) false ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false) ((λx:Bool. λy:(Bool -> Bool) -> Bool. false) true (λx:Bool -> Bool. false)) -(λx:Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. λa:Bool. false) true (λx:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false))) -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. true)) (λx:Bool -> Bool. x) -true -false -(λx:Bool -> Bool. (λy:Bool. true) true) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. true) true ((λx:Bool. λy:Bool -> Bool. true) false)) -true -false -(λx:Bool. λy:Bool. λz:Bool. λw:Bool. false) false ((λx:Bool. false) true) false -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true))) -false -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. false) false) (λx:Bool -> Bool. x) -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) true ((λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false))) -false -(λx:(Bool -> Bool) -> Bool. λy:Bool. y) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool. false) false)) -false -(λx:Bool -> Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) true) ((λx:Bool. λy:(Bool -> Bool) -> Bool. true) false ((λx:Bool. λy:Bool -> Bool. false) false)) -λx:Bool -> Bool. x ((λy:Bool. true) false) -λx:Bool -> Bool. x -false -λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λy:Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. true) -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) false (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) false (λx:Bool -> Bool. λy:Bool. true)) -(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true))) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false) ((λx:Bool. λy:Bool. true) false ((λx:Bool. true) false)) -(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool -> Bool. true) false) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) false (λx:Bool -> Bool. λy:Bool. true)) -(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. true)) (λx:Bool -> Bool. false) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false)) ((λx:Bool. x) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true))) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. x) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. false)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true))) -(λx:Bool -> Bool -> Bool. false) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) -(λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool. false) false) true -(λx:Bool. (λy:Bool. λz:Bool -> Bool. false) false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. false) (λx:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. false))) -(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. false) (λx:Bool -> Bool. false) (λx:Bool. x) ((λx:Bool. λy:Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false))) -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) true ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false)) true -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. false) ((λx:Bool. true) true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true)) -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. false) false) (λx:Bool -> Bool. (λy:Bool. λz:Bool. false) false) -(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) false) false -(λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true)) true -(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool. λy:Bool. false) (λx:Bool -> Bool. x) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. true))) -(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) true ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. false)) -(λx:Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) false ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. false)) false -λx:Bool -> Bool. x -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. true) true) (λx:Bool. (λy:Bool. true) x) -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) true ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) false ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false))) -(λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. true) true ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true)) (λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. true)) -λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. true) ((λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. true) (λy:Bool -> Bool. false)) -true -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool -> Bool. false) ((λx:Bool. true) false) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) false ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. λy:Bool. true))) -(λx:Bool -> Bool -> Bool. (λy:Bool. true) false) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. true)) -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. true) ((λx:Bool. λy:Bool. λz:Bool. true) true) (λx:Bool. λy:Bool. x) -(λx:(Bool -> Bool) -> Bool. λy:Bool. y) (λx:Bool -> Bool. (λy:Bool. false) false) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. false)) ((λx:Bool. false) ((λx:Bool. true) true)) -(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. false) (λy:Bool. λz:Bool. false)) (λx:Bool. λy:Bool. false) -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool. λz:Bool. false)) ((λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true))) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) false (λx:Bool -> Bool. true) -(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. false)) false -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool. λz:Bool. true)) (λx:Bool -> Bool. x) -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. false)) -(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool -> Bool. (λy:Bool. false) false) -λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. false) true -λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. false) x -(λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. false))) -λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. false) ((λy:Bool. λz:Bool. λw:Bool. true) true) -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true)) true -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. false) (λy:Bool -> Bool. false) ((λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. false)) -(λx:Bool. x) false -false -λx:Bool. (λy:Bool. λz:Bool. false) true x -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. y) (λx:Bool -> Bool. x) -(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. true) false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. x)) -true -(λx:Bool -> Bool -> Bool. (λy:Bool. λz:Bool. false) false) ((λx:Bool. λy:Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true))) -(λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) ((λx:Bool. λy:Bool. true) false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false))) -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. x) ((λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. true)) -(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. true)) (λx:Bool. λy:Bool. false) -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. true) (λx:Bool -> Bool. false) ((λx:Bool. true) false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. x)) -(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λx:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. false))) -false -(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. true))) -(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool. λz:Bool. true)) ((λx:Bool -> Bool. λy:Bool -> Bool -> Bool. false) (λx:Bool. true) (λx:Bool. λy:Bool. false)) -(λx:Bool. λy:Bool. λz:Bool. true) false -true -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. true)) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool. false) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false))) -λx:Bool -> Bool. x -(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. false)) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. false) (λx:Bool. λy:Bool. true) false) -(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. false)) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool. true) false)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. false) ((λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool. false) ((λx:Bool. true) false)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. false))) -(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool -> Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. true)) -true -(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool. false)) (λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. false)) -λx:Bool. λy:Bool. true -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. false)) false -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. true)) -true -(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) true ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. λy:Bool. false))) -λx:Bool -> Bool. (λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool. true) (λy:Bool. false) -(λx:Bool. x) false -λx:Bool. λy:Bool. x -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. false))) -(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool. λz:Bool. true)) true -(λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true)) true -(λx:Bool. λy:Bool. λz:Bool. true) false ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. true))) -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. true)) (λx:Bool -> Bool. (λy:Bool -> Bool. λz:Bool. false) (λy:Bool. true)) -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. true))) -(λx:Bool. λy:Bool. λz:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) false -(λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. false)) (λx:Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. true)) -(λx:Bool. λy:Bool. λz:Bool. true) false -(λx:Bool. (λy:Bool. false) false) true -(λx:Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool. true) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true)) -λx:Bool. false -(λx:Bool. x) true -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. true) true)) -(λx:(Bool -> Bool) -> Bool -> Bool. x) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool. true)) -(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool -> Bool. x) -λx:Bool -> Bool. false -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true ((λx:(Bool -> Bool) -> Bool. λy:Bool. false) (λx:Bool -> Bool. false)) true -(λx:Bool -> Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false)) -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. λy:Bool. false))) -(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. true) ((λx:Bool. λy:Bool. λz:Bool. λw:Bool. false) true ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false))) -λx:Bool -> Bool. true -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. x) true -λx:Bool -> Bool. false -(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. true)) (λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. false)) -(λx:Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. false) true ((λx:Bool. true) true) true -λx:Bool -> Bool. x true -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. false) (λx:Bool -> Bool. true) ((λx:Bool. true) false) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. false) false (λx:Bool -> Bool. λy:Bool. true)) -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. false) true ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. true)) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) true ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false)) -λx:Bool -> Bool. x -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) ((λy:Bool. λz:Bool -> Bool. λw:Bool. true) true) -(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) true ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. λy:Bool. false))) -(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. false) (λx:Bool. λy:Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. false))) -true -true -λx:Bool -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) true (λy:Bool -> Bool. λz:Bool. false) -λx:Bool -> Bool. λy:Bool. (λz:Bool -> Bool -> Bool. false) (λz:Bool. λw:Bool. true) -(λx:Bool -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. true) true) (λx:Bool. (λy:Bool -> Bool. λz:Bool. true) (λy:Bool. true)) -(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool -> Bool. false) x) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. true) true)) -true -(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. false) true ((λx:Bool. true) true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool. λz:Bool. false) false)) -λx:Bool. λy:Bool. y -(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) ((λx:Bool. λy:Bool. λz:Bool. true) false) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) false (λx:Bool -> Bool. λy:Bool. false)) -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true))) -λx:Bool -> Bool. λy:Bool. (λz:Bool -> Bool -> Bool. true) (λz:Bool. λw:Bool. true) -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false) ((λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool. λz:Bool. false)) -true -λx:Bool -> Bool. x ((λy:Bool. false) true) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. x)) -(λx:Bool. λy:Bool. λz:Bool. false) false ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. true)) ((λx:Bool. λy:Bool. false) true ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true))) -false -(λx:Bool. λy:Bool. λz:Bool. true) false false ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false))) -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. x) (λy:Bool -> Bool. true) -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. true) ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. true)) -λx:Bool. λy:Bool. x -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false)) (λx:Bool. λy:Bool. x) -true -(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. false) (λx:Bool -> Bool. false))) -(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. true))) -λx:Bool -> Bool. λy:Bool. false -(λx:Bool. (λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. false)) ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false))) -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. true) -(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. true)) (λx:Bool -> Bool. x true) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. true) true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:Bool. λy:Bool -> Bool. false) true)) -λx:Bool. λy:Bool. true -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false)) -(λx:Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. true) true (λx:Bool. λy:Bool. true) (λx:Bool -> Bool. true) -(λx:Bool -> Bool -> Bool. false) (λx:Bool. (λy:Bool. λz:Bool. false) true) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. λy:Bool. false)) (λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. true)) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. false) (λx:Bool. true) (λx:Bool -> Bool. x) -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. x) ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. true)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. false) (λx:Bool. x)) -λx:Bool. λy:Bool. x -(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) true)) -(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. λz:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. true))) -(λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool. λz:Bool. false) (λy:Bool. true)) ((λx:Bool -> Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) (λx:Bool. true) ((λx:Bool. λy:Bool. λz:Bool. false) false)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool. true) true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. true) (λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) false)) -false -(λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool -> Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. x)) -(λx:Bool -> Bool -> Bool. x) ((λx:Bool. λy:Bool. λz:Bool. λw:Bool. true) false ((λx:(Bool -> Bool) -> Bool. true) (λx:Bool -> Bool. false))) -(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. λa:Bool. false) (λx:Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. true)) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. λy:Bool. false))) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. true)) -(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool -> Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. false) false)) -true -true -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. true) ((λx:Bool. false) false)) diff --git a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=5,tysz=3/log_param_by_sz=true,epochs=2000.log b/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=5,tysz=3/log_param_by_sz=true,epochs=2000.log deleted file mode 100644 index 509efbbb..00000000 --- a/examples/qc/stlc/output/v3_opt_meta_ad/num_apps/uniform/sz=5,tysz=3/log_param_by_sz=true,epochs=2000.log +++ /dev/null @@ -1,15 +0,0 @@ -2023-12-24T11:39:43.590 -== Config == -INIT_SIZE: 5 -GEN_TYP_SIZE: 3 -PARAMETERIZE_FLIP_GROUPS_BY_SZ: true -EPOCHS: 2000 -DistNat: DistUInt32 -TAG: v3_opt_meta_ad - -Building num_apps(gen_expr(...)) computation graph... - 121.455475375 seconds - -Initial adnodes_of_interest: -Dict("tysz2_gen_type_tbool" => 0.5, "sz4_succ_var" => 0.5, "tysz1_gen_type_tbool" => 0.5, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.5, "sz4_succ_abs" => 0.5, "sz5_succ_var" => 0.5, "sz5_succ_abs" => 0.5, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5, "sz1_succ_app" => 0.5, "sz1_succ_abs" => 0.5, "sz3_succ_abs" => 0.5, "sz3_succ_app" => 0.5, "sz5_succ_app" => 0.5, "sz4_succ_app" => 0.5, "sz2_succ_abs" => 0.5, "sz3_succ_var" => 0.5, "tysz3_gen_type_tbool" => 0.5) -Inferring initial distribution... From 575c8c0c2f8430def6a6f55d4bd177f9700ad7bd Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 14 Jan 2024 22:18:49 -0800 Subject: [PATCH 032/231] qc benchmarks small changes --- examples/qc/benchmarks/benchmarks.jl | 72 +- examples/qc/benchmarks/lib/dist.jl | 16 + examples/qc/benchmarks/main.jl | 17 +- .../learning_curve.csv | 246 +- .../epochs=2000,learning_rate=0.03/log.log | 15 +- .../terms_before.txt | 288 +-- .../terms_trained.txt | 252 +-- .../learning_curve.csv | 2001 +++++++++++++++++ .../epochs=2000,learning_rate=0.03/log.log | 28 +- .../terms_before.txt | 200 ++ .../terms_trained.txt | 200 ++ src/autodiff_pr/losses.jl | 4 +- src/dist/vector.jl | 1 + 13 files changed, 2881 insertions(+), 459 deletions(-) create mode 100644 examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/learning_curve.csv create mode 100644 examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/terms_before.txt create mode 100644 examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/terms_trained.txt diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index ad12d3b3..e12ceef9 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -6,7 +6,9 @@ abstract type Generation{T} end abstract type STLC <: Benchmark end +################################## # STLC generation +################################## struct STLCGenerationParams <: GenerationParams{STLC} param_vars_by_size::Bool @@ -16,11 +18,11 @@ struct STLCGenerationParams <: GenerationParams{STLC} end struct STLCGeneration <: Generation{STLC} e::DistI{Opt{DistI{Expr}}} - constructors_overapproximation::Vector{DistInt32} + constructors_overapproximation::Vector{DistI{Opt{DistI{Expr}}}} end function to_subpath(p::STLCGenerationParams) [ - "STLC", + "stlc", if p.param_vars_by_size "by_sz" else "not_by_sz" end, "sz=$(p.size),tysz=$(p.ty_size)", ] @@ -28,7 +30,7 @@ end function generate(p::STLCGenerationParams) constructors_overapproximation = [] function add_ctor(v::DistI{Opt{DistI{Expr}}}) - push!(constructors_overapproximation, opt_ctor_to_id(v)) + push!(constructors_overapproximation, v) v end e = gen_expr( @@ -42,34 +44,24 @@ function generate(p::STLCGenerationParams) STLCGeneration(e, constructors_overapproximation) end +################################## # Approx STLC constructor entropy loss +################################## struct ApproxSTLCConstructorEntropy <: LossParams{STLC} end -to_subpath(p::ApproxSTLCConstructorEntropy) = ["approx_entropy"] +to_subpath(::ApproxSTLCConstructorEntropy) = ["approx_entropy"] function build_loss(::ApproxSTLCConstructorEntropy, generation::STLCGeneration) - function neg_entropy2(p::Dist, domain::Set{<:Dist}) - sum(domain) do x - pe = prob_equals(p, x) - if length(support_mixed(pe)) == 1 - Dice.Constant(0) - else - LogPr(pe) * exp(LogPr(pe)) - end - end - end loss = sum( - neg_entropy2(ctor, Set([DistInt32(i) for i in 0:3])) + neg_entropy(opt_ctor_to_id(ctor), values(stlc_ctor_to_id), ignore_non_support=true) for ctor in generation.constructors_overapproximation - if begin - sup = support_mixed(ctor) - ct = sum(1 for i in 0:3 if i in sup) - ct > 1 - end ) loss, nothing end +################################## # MLE loss +################################## + abstract type Metric{T} end abstract type TargetDist end @@ -110,35 +102,17 @@ function metric_loss(metric::Dist, ::Linear) ]) end -#== -starter code for STLC exact entropy loss: - -to_id = Dict( - "Var" => DistUInt32(1), - "Boolean" => DistUInt32(2), - "App" => DistUInt32(3), - "Abs" => DistUInt32(4), -) +################################## +# Exact STLC constructor entropy loss +################################## -# 99% \x. x ["Var", "Abs"] -# 1% (\x. x) y ["Var", "Var", "Abs", "App"] - -# dist(collect_constructors(e)) -# Var => 0.99 * 1/2 + 0.01 * 2/4 -# Abs => 0.99 * 1/2 + 0.01 * 1/4 -# App => 0.01 * 1/4 - -function collect_constructors(e) - match(e, [ - "Var" => (i) -> DistVector([to_id["Var"]]), - "Boolean" => (b) -> DistVector([to_id["Boolean"]]), - "App" => (f, x) -> prob_append(prob_extend(collect_constructors(f), collect_constructors(x)), to_id["App"]), - "Abs" => (ty, e′) -> prob_append(collect_constructors(e′), to_id["Abs"]), +struct STLCConstructorEntropy <: LossParams{STLC} end +to_subpath(::STLCConstructorEntropy) = ["entropy"] +function build_loss(::STLCConstructorEntropy, generation::STLCGeneration) + random_term = match(generation.e, [ + "Some" => e -> DistSome(choice(collect_constructors(e))), + "None" => () -> DistNone(DistInt32), ]) + loss = neg_entropy(random_term, Set([DistSome(i) for i in values(stlc_ctor_to_id)])) + loss, nothing end -random_term = match(e, [ - "None" => () -> DistNone(DistUInt32), - "Some" => e -> DistSome(choice(collect_constructors(e))) -]) -loss = neg_entropy(random_term, Set([DistSome(i) for i in values(to_id)])) -==# \ No newline at end of file diff --git a/examples/qc/benchmarks/lib/dist.jl b/examples/qc/benchmarks/lib/dist.jl index cc429cc8..3a6f4f3c 100644 --- a/examples/qc/benchmarks/lib/dist.jl +++ b/examples/qc/benchmarks/lib/dist.jl @@ -72,6 +72,22 @@ function opt_ctor_to_id(opt_ctor) ]) end +stlc_ctor_to_id = Dict( + "Var" => DistInt32(0), + "Boolean" => DistInt32(1), + "App" => DistInt32(2), + "Abs" => DistInt32(3), +) + +function collect_constructors(e) + match(e, [ + "Var" => (i) -> DistVector([stlc_ctor_to_id["Var"]]), + "Boolean" => (b) -> DistVector([stlc_ctor_to_id["Boolean"]]), + "App" => (f, x) -> prob_append(prob_extend(collect_constructors(f), collect_constructors(x)), stlc_ctor_to_id["App"]), + "Abs" => (ty, e′) -> prob_append(collect_constructors(e′), stlc_ctor_to_id["Abs"]), + ]) +end + # https://stackoverflow.com/questions/59338968/printing-lambda-expressions-in-haskell parens(b, s) = if b "($(s))" else s end diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 9406787d..4186a6bd 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -23,6 +23,7 @@ loss_params = MLELossParams( target_dist=Uniform(), ) loss_params = ApproxSTLCConstructorEntropy() +# loss_params = STLCConstructorEntropy() EPOCHS = 2000 LEARNING_RATE = if loss_params isa ApproxSTLCConstructorEntropy 0.03 else 0.003 end @@ -41,7 +42,7 @@ path = joinpath( ["epochs=$(EPOCHS),learning_rate=$(LEARNING_RATE)"], ) ) -OUT_DIR = "examples/qc/benchmarks/stlc/output/$(path)" +OUT_DIR = "examples/qc/benchmarks/output/$(path)" ########################### @@ -79,12 +80,14 @@ function register_weight!(s) weight end -println_flush(io, "Building computation graph...") -time_build = @elapsed begin - generation = generate(generation_params) - loss, extra = build_loss(loss_params, generation) -end -println(io, " $(time_build) seconds") +println_flush(io, "Building generation computation graph...") +time_build_generation = @elapsed generation = generate(generation_params) +println(io, " $(time_build_generation) seconds") +println(io) + +println_flush(io, "Building generation loss computation graph...") +time_build_loss = @elapsed loss, extra = build_loss(loss_params, generation) +println(io, " $(time_build_loss) seconds") println(io) diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/learning_curve.csv b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/learning_curve.csv index 1aa65fc9..585bb280 100644 --- a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/learning_curve.csv +++ b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/learning_curve.csv @@ -2,7 +2,7 @@ 1 -8.074420028242267 2 -8.07621267169211 3 -8.077940280375184 -4 -8.079606156892174 +4 -8.079606156892172 5 -8.081213420458718 6 -8.082765016963194 7 -8.084263728525322 @@ -26,7 +26,7 @@ 25 -8.10459612652169 26 -8.105456318100485 27 -8.106295923744682 -28 -8.107115795651932 +28 -8.10711579565193 29 -8.107916740831168 30 -8.108699523691415 31 -8.109464868480455 @@ -65,7 +65,7 @@ 64 -8.128068549565718 65 -8.128492822583404 66 -8.128911273975463 -67 -8.129324037173292 +67 -8.12932403717329 68 -8.129731240581302 69 -8.130133007829029 70 -8.130529458008965 @@ -78,7 +78,7 @@ 77 -8.13316488046991 78 -8.133522605563813 79 -8.133875914451453 -80 -8.134224891344392 +80 -8.13422489134439 81 -8.134569617801441 82 -8.1349101728487 83 -8.135246633093084 @@ -90,7 +90,7 @@ 89 -8.137183414767826 90 -8.137493174347792 91 -8.137799376649667 -92 -8.13810208071528 +92 -8.138102080715278 93 -8.138401344018266 94 -8.138697222526748 95 -8.138989770762759 @@ -114,7 +114,7 @@ 113 -8.143740962228346 114 -8.143979019914228 115 -8.144214603867884 -116 -8.144447747873226 +116 -8.144447747873228 117 -8.144678485044635 118 -8.144906847846785 119 -8.145132868113665 @@ -131,7 +131,7 @@ 130 -8.147473008145429 131 -8.147673194282708 132 -8.147871401712374 -133 -8.14806765505921 +133 -8.148067655059208 134 -8.148261978527135 135 -8.148454395909418 136 -8.14864493059855 @@ -149,7 +149,7 @@ 148 -8.15079250378479 149 -8.150960525863052 150 -8.151126955468076 -151 -8.15129181096721 +151 -8.151291810967209 152 -8.151455110447788 153 -8.151616871722903 154 -8.151777112336996 @@ -166,7 +166,7 @@ 165 -8.153444159910276 166 -8.153587430286482 167 -8.15372938592318 -168 -8.153870041114713 +168 -8.153870041114715 169 -8.154009409955027 170 -8.154147506341348 171 -8.154284343977796 @@ -246,10 +246,10 @@ 245 -8.161677367719488 246 -8.16174846708018 247 -8.16181897012511 -248 -8.161888882247236 +248 -8.16188888224724 249 -8.16195820878255 250 -8.162026955010818 -251 -8.16209512615634 +251 -8.162095126156341 252 -8.162162727388683 253 -8.162229763823406 254 -8.162296240522773 @@ -267,7 +267,7 @@ 266 -8.163052074432148 267 -8.163111712210657 268 -8.163170855900571 -269 -8.163229509842486 +269 -8.163229509842488 270 -8.163287678333614 271 -8.16334536562832 272 -8.163402575938651 @@ -284,7 +284,7 @@ 283 -8.164001572197897 284 -8.164053372520687 285 -8.164104746991555 -286 -8.16415569928136 +286 -8.164155699281363 287 -8.164206233025673 288 -8.164256351825188 289 -8.164306059246131 @@ -298,9 +298,9 @@ 297 -8.164689325870578 298 -8.164735485871486 299 -8.16478126834578 -300 -8.164826676505776 +300 -8.164826676505774 301 -8.164871713533739 -302 -8.16491638258227 +302 -8.164916382582268 303 -8.164960686774595 304 -8.165004629204923 305 -8.165048212938744 @@ -329,7 +329,7 @@ 328 -8.165958284414616 329 -8.165994109673814 330 -8.166029644399972 -331 -8.166064891011796 +331 -8.166064891011798 332 -8.166099851906504 333 -8.16613452946002 334 -8.166168926027211 @@ -337,7 +337,7 @@ 336 -8.16623688551805 337 -8.16627045304803 338 -8.166303748804761 -339 -8.166336775040955 +339 -8.166336775040957 340 -8.166369533989506 341 -8.166402027863695 342 -8.166434258857368 @@ -370,13 +370,13 @@ 369 -8.167212642206445 370 -8.16723833011567 371 -8.167263811119382 -372 -8.167289086909205 +372 -8.167289086909204 373 -8.167314159162377 374 -8.167339029541896 375 -8.167363699696644 376 -8.16738817126152 377 -8.167412445857575 -378 -8.167436525092132 +378 -8.167436525092134 379 -8.167460410558926 380 -8.16748410383821 381 -8.167507606496894 @@ -407,7 +407,7 @@ 406 -8.168037545176368 407 -8.168056600725777 408 -8.16807550333487 -409 -8.168094254242204 +409 -8.168094254242202 410 -8.168112854676057 411 -8.168131305854534 412 -8.168149608985642 @@ -419,7 +419,7 @@ 418 -8.168256385177166 419 -8.168273684971926 420 -8.16829084603064 -421 -8.168307869474404 +421 -8.168307869474406 422 -8.168324756415066 423 -8.16834150795531 424 -8.168358125188737 @@ -431,7 +431,7 @@ 430 -8.16845506826329 431 -8.16847077522333 432 -8.168486356307701 -433 -8.168501812531717 +433 -8.16850181253172 434 -8.168517144902363 435 -8.168532354418364 436 -8.168547442070256 @@ -448,7 +448,7 @@ 447 -8.168705638516398 448 -8.168719338174744 449 -8.168732928131986 -450 -8.168746409271105 +450 -8.168746409271106 451 -8.168759782467893 452 -8.168773048590994 453 -8.168786208501965 @@ -460,7 +460,7 @@ 459 -8.16886298488333 460 -8.168875424850746 461 -8.168887765250666 -462 -8.168900006883547 +462 -8.168900006883545 463 -8.16891215054333 464 -8.168924197017516 465 -8.168936147087194 @@ -483,7 +483,7 @@ 482 -8.169125275322354 483 -8.16913561669379 484 -8.16914587535407 -485 -8.169156051966931 +485 -8.16915605196693 486 -8.16916614719074 487 -8.169176161678546 488 -8.16918609607811 @@ -506,14 +506,14 @@ 505 -8.169343330329221 506 -8.169351928140294 507 -8.169360457222929 -508 -8.16936891812793 +508 -8.169368918127931 509 -8.169377311401664 510 -8.169385637586096 511 -8.169393897218816 512 -8.169402090833092 513 -8.169410218957886 514 -8.169418282117899 -515 -8.16942628083361 +515 -8.169426280833612 516 -8.169434215621305 517 -8.169442086993103 518 -8.169449895457008 @@ -552,25 +552,25 @@ 551 -8.169675379404234 552 -8.169681323918388 553 -8.169687220950262 -554 -8.169693070879765 +554 -8.169693070879763 555 -8.169698874083743 556 -8.169704630936016 557 -8.169710341807415 558 -8.169716007065784 559 -8.16972162707602 -560 -8.16972720220009 +560 -8.169727202200091 561 -8.169732732797058 562 -8.16973821922311 -563 -8.169743661831566 +563 -8.169743661831564 564 -8.169749060972913 565 -8.169754416994834 566 -8.169759730242218 567 -8.169765001057183 568 -8.169770229779113 -569 -8.16977541674466 +569 -8.169775416744661 570 -8.169780562287784 571 -8.169785666739758 -572 -8.169790730429208 +572 -8.169790730429206 573 -8.169795753682113 574 -8.169800736821855 575 -8.169805680169206 @@ -615,20 +615,20 @@ 614 -8.16997058108021 615 -8.169974168430223 616 -8.169977727145682 -617 -8.169981257455403 +617 -8.169981257455401 618 -8.169984759586374 619 -8.169988233763771 620 -8.169991680210963 621 -8.16999509914953 622 -8.16999849079928 -623 -8.170001855378265 +623 -8.170001855378263 624 -8.170005193102782 625 -8.170008504187408 626 -8.170011788844995 627 -8.170015047286698 628 -8.170018279721976 629 -8.170021486358616 -630 -8.170024667402739 +630 -8.170024667402737 631 -8.170027823058817 632 -8.17003095352969 633 -8.170034059016569 @@ -646,7 +646,7 @@ 645 -8.170069447189992 646 -8.170072245480156 647 -8.170075021439999 -648 -8.170077775247895 +648 -8.170077775247897 649 -8.170080507080794 650 -8.17008321711422 651 -8.170085905522303 @@ -658,7 +658,7 @@ 657 -8.170101591415602 658 -8.170104133206234 659 -8.17010665471532 -660 -8.170109156104852 +660 -8.17010915610485 661 -8.170111637535513 662 -8.170114099166716 663 -8.170116541156588 @@ -672,7 +672,7 @@ 671 -8.170135388550687 672 -8.170137660679123 673 -8.170139914679625 -674 -8.170142150696964 +674 -8.170142150696966 675 -8.170144368874748 676 -8.170146569355435 677 -8.17014875228034 @@ -693,7 +693,7 @@ 692 -8.170179482176843 693 -8.170181402533904 694 -8.170183307571918 -695 -8.170185197413199 +695 -8.1701851974132 696 -8.170187072179075 697 -8.170188931989912 698 -8.170190776965104 @@ -722,7 +722,7 @@ 721 -8.170229377597947 722 -8.170230899966638 723 -8.170232410193499 -724 -8.170233908375442 +724 -8.17023390837544 725 -8.170235394608612 726 -8.170236868988384 727 -8.170238331609374 @@ -736,7 +736,7 @@ 735 -8.17024962036787 736 -8.17025098129461 737 -8.170252331368097 -738 -8.170253670674953 +738 -8.170253670674951 739 -8.170254999301106 740 -8.170256317331802 741 -8.170257624851605 @@ -779,14 +779,14 @@ 778 -8.170299328396515 779 -8.17030029295511 780 -8.170301249823453 -781 -8.170302199062904 +781 -8.170302199062906 782 -8.17030314073433 783 -8.170304074898112 784 -8.17030500161415 785 -8.17030592094186 786 -8.170306832940193 787 -8.170307737667624 -788 -8.170308635182156 +788 -8.170308635182158 789 -8.170309525541342 790 -8.170310408802262 791 -8.17031128502155 @@ -803,7 +803,7 @@ 802 -8.17032047443645 803 -8.170321270412211 804 -8.170322060042661 -805 -8.17032284337842 +805 -8.170322843378422 806 -8.170323620469702 807 -8.170324391366318 808 -8.170325156117684 @@ -823,7 +823,7 @@ 822 -8.170335244138132 823 -8.17033592237961 824 -8.17033659521491 -825 -8.170337262687147 +825 -8.170337262687148 826 -8.170337924839101 827 -8.170338581713203 828 -8.170339233351552 @@ -843,7 +843,7 @@ 842 -8.170347829324413 843 -8.170348407255691 844 -8.17034898058082 -845 -8.170349549336537 +845 -8.170349549336539 846 -8.170350113559284 847 -8.170350673285208 848 -8.17035122855017 @@ -866,7 +866,7 @@ 865 -8.17036001892553 866 -8.170360499710052 867 -8.17036097666312 -868 -8.170361449815289 +868 -8.17036144981529 869 -8.170361919196868 870 -8.170362384837919 871 -8.17036284676827 @@ -893,7 +893,7 @@ 892 -8.170371740505226 893 -8.170372127883963 894 -8.170372512176 -895 -8.17037289340594 +895 -8.170372893405943 896 -8.170373271598201 897 -8.170373646777001 898 -8.17037401896636 @@ -905,7 +905,7 @@ 904 -8.170376190645708 905 -8.170376542565775 906 -8.170376891681823 -907 -8.170377238016211 +907 -8.17037723801621 908 -8.170377581591111 909 -8.170377922428527 910 -8.170378260550276 @@ -919,11 +919,11 @@ 918 -8.17038087032227 919 -8.170381184956794 920 -8.170381497084533 -921 -8.170381806725471 -922 -8.170382113899427 +921 -8.17038180672547 +922 -8.170382113899429 923 -8.17038241862607 924 -8.17038272092491 -925 -8.170383020815292 +925 -8.17038302081529 926 -8.170383318316418 927 -8.170383613447335 928 -8.170383906226936 @@ -945,7 +945,7 @@ 944 -8.170388285767803 945 -8.170388541324183 946 -8.170388794844683 -947 -8.170389046345528 +947 -8.17038904634553 948 -8.170389295842817 949 -8.170389543352513 950 -8.170389788890466 @@ -972,7 +972,7 @@ 971 -8.17039451646819 972 -8.170394722390236 973 -8.17039492667198 -974 -8.170395129326485 +974 -8.170395129326486 975 -8.170395330366725 976 -8.170395529805559 977 -8.170395727655752 @@ -983,7 +983,7 @@ 982 -8.170396693516679 983 -8.170396882097377 984 -8.17039706917596 -985 -8.170397254764401 +985 -8.1703972547644 986 -8.170397438874572 987 -8.170397621518253 988 -8.17039780270713 @@ -1017,7 +1017,7 @@ 1016 -8.170402329980789 1017 -8.170402473667354 1018 -8.170402616209527 -1019 -8.170402757616431 +1019 -8.17040275761643 1020 -8.170402897897109 1021 -8.170403037060535 1022 -8.17040317511561 @@ -1034,11 +1034,11 @@ 1033 -8.170404623046274 1034 -8.170404748470201 1035 -8.170404872895242 -1036 -8.170404996329356 +1036 -8.170404996329358 1037 -8.170405118780442 1038 -8.170405240256324 1039 -8.170405360764775 -1040 -8.170405480313505 +1040 -8.170405480313503 1041 -8.170405598910154 1042 -8.170405716562312 1043 -8.170405833277501 @@ -1048,7 +1048,7 @@ 1047 -8.170406290916981 1048 -8.170406403058113 1049 -8.170406514306183 -1050 -8.170406624668304 +1050 -8.170406624668306 1051 -8.170406734151534 1052 -8.170406842762874 1053 -8.170406950509273 @@ -1056,7 +1056,7 @@ 1055 -8.170407163434742 1056 -8.17040726862743 1057 -8.17040737298241 -1058 -8.170407476506355 +1058 -8.170407476506353 1059 -8.170407579205882 1060 -8.17040768108756 1061 -8.170407782157907 @@ -1081,12 +1081,12 @@ 1080 -8.170409556637136 1081 -8.170409642771974 1082 -8.170409728220918 -1083 -8.170409812989428 +1083 -8.17040981298943 1084 -8.17040989708293 1085 -8.170409980506793 1086 -8.170410063266356 1087 -8.170410145366908 -1088 -8.170410226813699 +1088 -8.170410226813697 1089 -8.170410307611938 1090 -8.170410387766788 1091 -8.170410467283377 @@ -1094,7 +1094,7 @@ 1093 -8.17041062442206 1094 -8.170410702054204 1095 -8.170410779068176 -1096 -8.170410855468907 +1096 -8.170410855468905 1097 -8.170410931261273 1098 -8.170411006450129 1099 -8.170411081040276 @@ -1109,7 +1109,7 @@ 1108 -8.170411726184208 1109 -8.17041179504339 1110 -8.170411863354282 -1111 -8.170411931121247 +1111 -8.170411931121249 1112 -8.170411998348621 1113 -8.1704120650407 1114 -8.170412131201749 @@ -1117,10 +1117,10 @@ 1116 -8.17041226194763 1117 -8.170412326540827 1118 -8.170412390619708 -1119 -8.170412454188368 +1119 -8.17041245418837 1120 -8.170412517250877 -1121 -8.170412579811261 -1122 -8.170412641873522 +1121 -8.17041257981126 +1122 -8.17041264187352 1123 -8.170412703441624 1124 -8.170412764519506 1125 -8.170412825111072 @@ -1141,7 +1141,7 @@ 1140 -8.17041367818837 1141 -8.170413731505212 1142 -8.170413784397548 -1143 -8.17041383686876 +1143 -8.170413836868759 1144 -8.170413888922198 1145 -8.170413940561195 1146 -8.170413991789045 @@ -1177,7 +1177,7 @@ 1176 -8.170415352785595 1177 -8.170415392769812 1178 -8.170415432435698 -1179 -8.170415471785788 +1179 -8.17041547178579 1180 -8.1704155108226 1181 -8.170415549548624 1182 -8.170415587966337 @@ -1191,7 +1191,7 @@ 1190 -8.170415884499393 1191 -8.170415920250473 1192 -8.170415955716932 -1193 -8.170415990901034 +1193 -8.170415990901033 1194 -8.17041602580503 1195 -8.170416060431151 1196 -8.170416094781608 @@ -1202,7 +1202,7 @@ 1201 -8.170416262475156 1202 -8.170416295217121 1203 -8.170416327698426 -1204 -8.170416359921143 +1204 -8.170416359921145 1205 -8.170416391887338 1206 -8.170416423599049 1207 -8.170416455058302 @@ -1217,7 +1217,7 @@ 1216 -8.170416727157484 1217 -8.170416756200131 1218 -8.170416785011572 -1219 -8.17041681359365 +1219 -8.170416813593652 1220 -8.170416841948194 1221 -8.170416870077009 1222 -8.170416897981898 @@ -1230,7 +1230,7 @@ 1229 -8.170417087194126 1230 -8.170417113370597 1231 -8.170417139338687 -1232 -8.170417165100051 +1232 -8.170417165100055 1233 -8.170417190656341 1234 -8.170417216009184 1235 -8.170417241160203 @@ -1253,7 +1253,7 @@ 1252 -8.17041763935697 1253 -8.170417661137911 1254 -8.170417682745466 -1255 -8.170417704181014 +1255 -8.170417704181013 1256 -8.170417725445928 1257 -8.170417746541567 1258 -8.170417767469273 @@ -1278,7 +1278,7 @@ 1277 -8.170418134905304 1278 -8.170418152741528 1279 -8.170418170435772 -1280 -8.170418187989167 +1280 -8.170418187989165 1281 -8.170418205402834 1282 -8.170418222677888 1283 -8.17041823981543 @@ -1302,7 +1302,7 @@ 1301 -8.170418525983546 1302 -8.170418540706764 1303 -8.170418555312787 -1304 -8.170418569802548 +1304 -8.170418569802546 1305 -8.170418584176968 1306 -8.170418598436973 1307 -8.170418612583468 @@ -1322,7 +1322,7 @@ 1321 -8.170418799209232 1322 -8.170418811757614 1323 -8.170418824206115 -1324 -8.170418836555529 +1324 -8.170418836555527 1325 -8.170418848806644 1326 -8.170418860960243 1327 -8.170418873017104 @@ -1347,7 +1347,7 @@ 1346 -8.170419084705527 1347 -8.170419094981456 1348 -8.170419105175593 -1349 -8.17041911528859 +1349 -8.170419115288592 1350 -8.170419125321093 1351 -8.170419135273741 1352 -8.170419145147171 @@ -1379,8 +1379,8 @@ 1378 -8.170419376017637 1379 -8.170419383974886 1380 -8.170419391868801 -1381 -8.170419399699886 -1382 -8.170419407468641 +1381 -8.170419399699885 +1382 -8.17041940746864 1383 -8.17041941517556 1384 -8.17041942282114 1385 -8.170419430405865 @@ -1388,21 +1388,21 @@ 1387 -8.17041944539469 1388 -8.170419452799749 1389 -8.170419460145867 -1390 -8.170419467433517 +1390 -8.170419467433515 1391 -8.17041947466316 1392 -8.170419481835262 1393 -8.17041948895028 1394 -8.17041949600867 1395 -8.170419503010876 1396 -8.170419509957355 -1397 -8.170419516848543 +1397 -8.170419516848542 1398 -8.170419523684883 1399 -8.17041953046681 1400 -8.17041953719476 1401 -8.170419543869162 1402 -8.17041955049044 1403 -8.170419557059018 -1404 -8.170419563575315 +1404 -8.170419563575317 1405 -8.170419570039751 1406 -8.170419576452733 1407 -8.170419582814674 @@ -1412,7 +1412,7 @@ 1411 -8.170419607760097 1412 -8.170419613872859 1413 -8.170419619936968 -1414 -8.170419625952814 +1414 -8.170419625952812 1415 -8.170419631920778 1416 -8.170419637841242 1417 -8.170419643714586 @@ -1434,7 +1434,7 @@ 1433 -8.1704197315767 1434 -8.170419736704002 1435 -8.170419741790496 -1436 -8.170419746836506 +1436 -8.170419746836505 1437 -8.170419751842354 1438 -8.170419756808364 1439 -8.170419761734847 @@ -1467,16 +1467,16 @@ 1466 -8.170419880902129 1467 -8.170419884840967 1468 -8.170419888748457 -1469 -8.170419892624848 +1469 -8.170419892624846 1470 -8.170419896470387 1471 -8.170419900285323 -1472 -8.170419904069892 +1472 -8.170419904069893 1473 -8.170419907824344 1474 -8.170419911548915 1475 -8.170419915243842 -1476 -8.170419918909364 +1476 -8.170419918909362 1477 -8.17041992254571 -1478 -8.170419926153116 +1478 -8.170419926153118 1479 -8.170419929731814 1480 -8.170419933282027 1481 -8.170419936803988 @@ -1490,7 +1490,7 @@ 1489 -8.170419963989092 1490 -8.170419967266662 1491 -8.17041997051815 -1492 -8.170419973743757 +1492 -8.170419973743758 1493 -8.170419976943695 1494 -8.170419980118163 1495 -8.17041998326737 @@ -1513,12 +1513,12 @@ 1512 -8.170420033127183 1513 -8.170420035854509 1514 -8.17042003856013 -1515 -8.17042004124422 +1515 -8.170420041244219 1516 -8.170420043906946 1517 -8.170420046548482 1518 -8.170420049168992 1519 -8.170420051768652 -1520 -8.17042005434762 +1520 -8.170420054347618 1521 -8.170420056906062 1522 -8.170420059444142 1523 -8.170420061962027 @@ -1535,7 +1535,7 @@ 1534 -8.170420088370646 1535 -8.170420090658315 1536 -8.170420092927777 -1537 -8.17042009517918 +1537 -8.170420095179182 1538 -8.170420097412666 1539 -8.170420099628375 1540 -8.170420101826451 @@ -1546,7 +1546,7 @@ 1545 -8.1704201125572 1546 -8.170420114652384 1547 -8.17042011673089 -1548 -8.170420118792855 +1548 -8.170420118792856 1549 -8.170420120838411 1550 -8.170420122867691 1551 -8.170420124880819 @@ -1587,7 +1587,7 @@ 1586 -8.170420186100415 1587 -8.170420187610315 1588 -8.170420189108198 -1589 -8.170420190594161 +1589 -8.17042019059416 1590 -8.170420192068296 1591 -8.170420193530699 1592 -8.170420194981466 @@ -1609,11 +1609,11 @@ 1608 -8.1704202166843 1609 -8.170420217950804 1610 -8.17042021920723 -1611 -8.170420220453657 +1611 -8.170420220453655 1612 -8.170420221690161 1613 -8.170420222916828 1614 -8.170420224133732 -1615 -8.170420225340953 +1615 -8.170420225340951 1616 -8.170420226538566 1617 -8.170420227726646 1618 -8.170420228905273 @@ -1635,7 +1635,7 @@ 1634 -8.17042024653703 1635 -8.170420247565962 1636 -8.170420248586703 -1637 -8.170420249599323 +1637 -8.170420249599324 1638 -8.170420250603883 1639 -8.17042025160045 1640 -8.170420252589084 @@ -1647,7 +1647,7 @@ 1646 -8.170420258357847 1647 -8.170420259292705 1648 -8.170420260220125 -1649 -8.170420261140162 +1649 -8.170420261140164 1650 -8.170420262052879 1651 -8.170420262958332 1652 -8.170420263856581 @@ -1655,11 +1655,11 @@ 1654 -8.170420265631687 1655 -8.17042026650866 1656 -8.170420267378656 -1657 -8.170420268241724 +1657 -8.170420268241726 1658 -8.170420269097928 1659 -8.170420269947314 1660 -8.170420270789943 -1661 -8.170420271625868 +1661 -8.170420271625867 1662 -8.170420272455138 1663 -8.17042027327781 1664 -8.170420274093933 @@ -1667,14 +1667,14 @@ 1666 -8.170420275706748 1667 -8.170420276503544 1668 -8.170420277293998 -1669 -8.170420278078161 +1669 -8.17042027807816 1670 -8.170420278856085 1671 -8.170420279627816 1672 -8.170420280393408 1673 -8.170420281152907 1674 -8.17042028190636 1675 -8.170420282653817 -1676 -8.170420283395327 +1676 -8.170420283395325 1677 -8.170420284130936 1678 -8.17042028486069 1679 -8.170420285584637 @@ -1695,7 +1695,7 @@ 1694 -8.170420295777527 1695 -8.170420296414598 1696 -8.170420297046599 -1697 -8.17042029767357 +1697 -8.170420297673571 1698 -8.170420298295554 1699 -8.170420298912587 1700 -8.170420299524707 @@ -1729,7 +1729,7 @@ 1728 -8.170420314821008 1729 -8.170420315306531 1730 -8.170420315788192 -1731 -8.170420316266018 +1731 -8.17042031626602 1732 -8.170420316740044 1733 -8.170420317210295 1734 -8.170420317676806 @@ -1737,7 +1737,7 @@ 1736 -8.170420318598719 1737 -8.17042031905418 1738 -8.170420319506016 -1739 -8.170420319954257 +1739 -8.170420319954259 1740 -8.17042032039893 1741 -8.170420320840066 1742 -8.17042032127769 @@ -1747,18 +1747,18 @@ 1746 -8.17042032299364 1747 -8.170420323414127 1748 -8.17042032383127 -1749 -8.17042032424509 +1749 -8.170420324245088 1750 -8.170420324655616 1751 -8.170420325062876 1752 -8.170420325466898 1753 -8.170420325867703 1754 -8.170420326265317 1755 -8.17042032665977 -1756 -8.170420327051081 +1756 -8.170420327051083 1757 -8.17042032743928 1758 -8.170420327824388 1759 -8.170420328206433 -1760 -8.170420328585438 +1760 -8.170420328585436 1761 -8.170420328961423 1762 -8.170420329334421 1763 -8.170420329704449 @@ -1779,7 +1779,7 @@ 1778 -8.1704203349143 1779 -8.170420335239925 1780 -8.170420335562957 -1781 -8.170420335883419 +1781 -8.17042033588342 1782 -8.170420336201332 1783 -8.170420336516715 1784 -8.170420336829586 @@ -1792,7 +1792,7 @@ 1791 -8.170420338951077 1792 -8.170420339244576 1793 -8.170420339535742 -1794 -8.170420339824588 +1794 -8.17042033982459 1795 -8.170420340111137 1796 -8.170420340395408 1797 -8.170420340677413 @@ -1821,10 +1821,10 @@ 1820 -8.170420346578862 1821 -8.170420346811662 1822 -8.17042034704261 -1823 -8.170420347271717 +1823 -8.170420347271719 1824 -8.170420347499006 1825 -8.17042034772448 -1826 -8.170420347948166 +1826 -8.170420347948165 1827 -8.17042034817007 1828 -8.170420348390207 1829 -8.170420348608593 @@ -1853,7 +1853,7 @@ 1852 -8.170420353178677 1853 -8.170420353358958 1854 -8.170420353537803 -1855 -8.170420353715228 +1855 -8.170420353715226 1856 -8.170420353891238 1857 -8.170420354065847 1858 -8.170420354239067 @@ -1861,13 +1861,13 @@ 1860 -8.170420354581385 1861 -8.170420354750503 1862 -8.170420354918274 -1863 -8.170420355084712 -1864 -8.170420355249824 +1863 -8.170420355084714 +1864 -8.170420355249826 1865 -8.170420355413626 1866 -8.17042035557612 -1867 -8.170420355737324 +1867 -8.170420355737322 1868 -8.170420355897242 -1869 -8.17042035605589 +1869 -8.170420356055889 1870 -8.170420356213274 1871 -8.170420356369405 1872 -8.170420356524296 @@ -1889,7 +1889,7 @@ 1888 -8.170420358841394 1889 -8.17042035897661 1890 -8.170420359110754 -1891 -8.17042035924383 +1891 -8.170420359243831 1892 -8.170420359375845 1893 -8.170420359506812 1894 -8.170420359636735 @@ -1912,7 +1912,7 @@ 1911 -8.170420361693767 1912 -8.170420361806286 1913 -8.170420361917913 -1914 -8.17042036202865 +1914 -8.170420362028649 1915 -8.170420362138506 1916 -8.170420362247487 1917 -8.1704203623556 @@ -1933,7 +1933,7 @@ 1932 -8.170420363877811 1933 -8.170420363972951 1934 -8.170420364067336 -1935 -8.17042036416097 +1935 -8.170420364160968 1936 -8.170420364253857 1937 -8.170420364346004 1938 -8.17042036443742 @@ -1963,7 +1963,7 @@ 1962 -8.170420366425901 1963 -8.170420366500764 1964 -8.170420366575033 -1965 -8.170420366648711 +1965 -8.17042036664871 1966 -8.170420366721803 1967 -8.17042036679431 1968 -8.170420366866244 @@ -1991,7 +1991,7 @@ 1990 -8.1704203683117 1991 -8.170420368371557 1992 -8.170420368430939 -1993 -8.170420368489848 +1993 -8.170420368489847 1994 -8.170420368548287 1995 -8.170420368606262 1996 -8.170420368663777 diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/log.log b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/log.log index 96c9a547..375d01fb 100644 --- a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/log.log +++ b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/log.log @@ -1,4 +1,4 @@ -2024-01-14T19:01:50.834 +2024-01-14T19:40:06.750 == Config == TAG: v4_infra STLCGenerationParams(true, 2, 1) @@ -7,19 +7,22 @@ EPOCHS: 2000 LEARNING_RATE: 0.03 DistNat: DistUInt32 -Building computation graph... - 13.642789785 seconds +Building generation computation graph... + 10.417825655 seconds + +Building generation loss computation graph... + 2.362158481 seconds Initial adnodes_of_interest: Dict("sz1_succ_abs" => 0.5, "tysz1_gen_type_tbool" => 0.5, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.5, "sz2_succ_abs" => 0.5, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5, "sz1_succ_app" => 0.5) Saving samples... Saved samples to examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/terms_before.txt. - 2.850190577 seconds + 2.837110962 seconds Initial loss: -8.072558853466411 Training... - 3.10815305 seconds + 3.247644987 seconds Final loss: -8.170420368889292 @@ -27,5 +30,5 @@ Learned adnodes_of_interest: Dict("sz1_succ_abs" => 0.5598030152826101, "tysz1_gen_type_tbool" => 0.5395457933590109, "sz0_zero_pr_var2" => 0.5271444904668267, "sz2_succ_app" => 0.3185816526602986, "sz2_succ_abs" => 0.6350128152410152, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5000874628748793, "sz1_succ_app" => 0.43209667095380405) Saving samples... Saved samples to examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/terms_trained.txt. - 0.17076016 seconds + 0.171530594 seconds diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/terms_before.txt b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/terms_before.txt index e75b73ed..2b47234d 100644 --- a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/terms_before.txt +++ b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/terms_before.txt @@ -1,200 +1,200 @@ true -(λx:Bool. λy:Bool. true) ((λx:Bool. true) false) -(λx:Bool. x) true true -(λx:Bool. λy:Bool. false) false true +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) ((λx:Bool. false) false) true -(λx:Bool. false) ((λx:Bool. true) false) -λx:Bool. x -λx:Bool. true -λx:Bool. x -(λx:Bool -> Bool. x) (λx:Bool. x) -(λx:Bool. λy:Bool -> Bool. false) false ((λx:Bool. λy:Bool. false) false) +(λx:Bool -> Bool. true) (λx:Bool. false) +(λx:Bool. λy:Bool. false) ((λx:Bool. true) true) +(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) false -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -(λx:Bool. λy:Bool. λz:Bool. false) true false +(λx:Bool. false) ((λx:Bool. false) false) +(λx:Bool -> Bool. true) (λx:Bool. x) +true +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) (λx:Bool. false) λx:Bool. false +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. x) +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) λx:Bool. x -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) (λx:Bool. x) -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false (λx:Bool. true) -λx:Bool. x -λx:Bool. (λy:Bool. true) x λx:Bool. true -false -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) true) -(λx:Bool. x) ((λx:Bool. true) true) -(λx:Bool -> Bool. true) (λx:Bool. true) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) (λx:Bool. true) λx:Bool. true -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true (λx:Bool. x) -(λx:Bool. x) true -λx:Bool. x +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false ((λx:Bool. λy:Bool. false) false) +(λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) false) false false -λx:Bool. false -(λx:Bool. λy:Bool. true) true true -(λx:Bool -> Bool. true) (λx:Bool. false) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) ((λx:Bool. true) false) -λx:Bool. x -λx:Bool. true -(λx:Bool. x) true -λx:Bool. true -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) false -(λx:Bool. true) true -λx:Bool. true -(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. false) true) -(λx:Bool. true) ((λx:Bool. true) false) -λx:Bool. (λy:Bool. true) x -λx:Bool. x +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) +λx:Bool. (λy:Bool. false) true +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) +true +(λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) λx:Bool. x +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) +true +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. true)) +(λx:Bool. λy:Bool -> Bool. false) true ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +false +(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +false +(λx:Bool. x) false λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) +(λx:Bool. x) ((λx:Bool. true) true) +(λx:Bool. λy:Bool. true) true ((λx:Bool. true) false) +(λx:Bool. x) ((λx:Bool. true) true) +λx:Bool. false +(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) true +(λx:Bool -> Bool. false) (λx:Bool. x) false -λx:Bool. true λx:Bool. x +(λx:Bool -> Bool. x) (λx:Bool. x) +(λx:Bool. λy:Bool -> Bool. false) false ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. true) false) false -(λx:Bool. x) ((λx:Bool -> Bool. false) (λx:Bool. false)) -(λx:Bool. x) true -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) -false -(λx:Bool. λy:Bool. false) false -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) ((λx:Bool. true) false) true -(λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -λx:Bool. x +(λx:Bool -> Bool. x) (λx:Bool. true) +(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. true) true) +(λx:Bool -> Bool. true) (λx:Bool. false) true -λx:Bool. x -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +(λx:Bool. λy:Bool. true) true true -(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) -false -λx:Bool. x -(λx:Bool. true) ((λx:Bool. true) true) -λx:Bool. true -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +(λx:Bool. x) false +(λx:Bool. false) ((λx:Bool. true) false) +λx:Bool. false true -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) true -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) true -λx:Bool. true true -(λx:Bool. λy:Bool. λz:Bool. true) false true -(λx:Bool. λy:Bool. false) ((λx:Bool. true) false) -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) -(λx:Bool. λy:Bool. true) false true -(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. true) true) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. true)) -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) (λx:Bool. x) -(λx:Bool. λy:Bool -> Bool. true) false ((λx:Bool. λy:Bool. true) true) -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) false -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool. false) false) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool. true) false) -(λx:Bool -> Bool. x) (λx:Bool. x) -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -(λx:Bool. λy:Bool. false) ((λx:Bool. true) false) -λx:Bool. x -λx:Bool. true +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) true +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) (λx:Bool. x) +(λx:Bool. true) false +(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. false) true) λx:Bool. x -true +(λx:Bool. λy:Bool. true) true +(λx:Bool. λy:Bool. false) ((λx:Bool. false) true) +(λx:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. true)) false -(λx:Bool. λy:Bool. λz:Bool. true) true ((λx:Bool. false) false) -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) (λx:Bool. true) +(λx:Bool. x) ((λx:Bool -> Bool. true) (λx:Bool. true)) +(λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) +λx:Bool. false +(λx:Bool. true) ((λx:Bool. true) false) +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) (λx:Bool. false) +(λx:Bool. λy:Bool. λz:Bool. false) false true +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) ((λx:Bool. λy:Bool. true) false) true -(λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -(λx:Bool. λy:Bool. false) true true false -(λx:Bool. x) false -λx:Bool. x -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) (λx:Bool. x) -λx:Bool. true -(λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool -> Bool. true) (λx:Bool. false)) +(λx:Bool. λy:Bool. false) ((λx:Bool. true) false) false -(λx:Bool. λy:Bool -> Bool. true) false ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -true +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +(λx:Bool -> Bool. false) (λx:Bool. x) +(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. false) true) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. true)) +(λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. true)) λx:Bool. false -(λx:Bool -> Bool. false) (λx:Bool. false) -(λx:Bool. λy:Bool. false) ((λx:Bool. true) true) +false +(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +(λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool -> Bool. false) (λx:Bool. true)) +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) (λx:Bool. false) +(λx:Bool -> Bool. x) (λx:Bool. true) +(λx:Bool. λy:Bool. true) true ((λx:Bool -> Bool. false) (λx:Bool. false)) +λx:Bool. (λy:Bool. false) true true +(λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. false) false) false -(λx:Bool -> Bool. false) (λx:Bool. true) -(λx:Bool -> Bool. false) (λx:Bool. x) -λx:Bool. x -(λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool -> Bool. true) (λx:Bool. false)) -λx:Bool. (λy:Bool. true) false -(λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool. true) true) -(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false (λx:Bool. x) -λx:Bool. true +(λx:Bool. false) ((λx:Bool. false) false) +false +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) true -λx:Bool. true -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false)) -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. false) false) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) ((λx:Bool. true) true) -(λx:Bool. λy:Bool. true) false -(λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) true) +(λx:Bool -> Bool. x) (λx:Bool. false) true +false +(λx:Bool. x) ((λx:Bool. false) true) +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) true true -λx:Bool. true -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. true)) -λx:Bool. false -(λx:Bool. λy:Bool. true) false ((λx:Bool -> Bool. true) (λx:Bool. true)) -λx:Bool. (λy:Bool. true) x -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. x) +(λx:Bool. x) true false -(λx:Bool. λy:Bool. true) false true +(λx:Bool -> Bool. x) (λx:Bool. true) +(λx:Bool. λy:Bool -> Bool. false) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +(λx:Bool. false) ((λx:Bool. true) false) false -λx:Bool. x -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -λx:Bool. (λy:Bool. true) false -λx:Bool. (λy:Bool. true) true -λx:Bool. x -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) false -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) ((λx:Bool. true) false) -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) true false +false +false +λx:Bool. false +λx:Bool. false true -(λx:Bool. x) ((λx:Bool -> Bool. true) (λx:Bool. true)) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +λx:Bool. x +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) false +(λx:Bool -> Bool. x) (λx:Bool. true) false -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -(λx:Bool. true) true -(λx:Bool -> Bool. true) (λx:Bool. x) +(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. true)) +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. false) false) λx:Bool. false +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool. true) false) +λx:Bool. (λy:Bool. false) true true +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) true +λx:Bool. false +(λx:Bool. λy:Bool. true) false ((λx:Bool. false) false) +(λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +(λx:Bool. λy:Bool. false) true false +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) +(λx:Bool -> Bool. true) (λx:Bool. false) true -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) (λx:Bool. false) true -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) true -λx:Bool. false -(λx:Bool. λy:Bool. false) ((λx:Bool. false) false) +(λx:Bool -> Bool. true) (λx:Bool. false) +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool. true) true) +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. true)) +λx:Bool. x +λx:Bool. x +false +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool. λy:Bool. false) false) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) false +(λx:Bool. λy:Bool. true) true true +λx:Bool. true +(λx:Bool. λy:Bool. false) true true true -(λx:Bool. λy:Bool. false) false false λx:Bool. x -(λx:Bool. λy:Bool. true) true false -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) (λx:Bool. false) -(λx:Bool. λy:Bool. false) true -true λx:Bool. x -λx:Bool. true -(λx:Bool. λy:Bool. false) false true -λx:Bool. true +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +(λx:Bool. λy:Bool. λz:Bool. true) true false +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) (λx:Bool. true) +false +λx:Bool. (λy:Bool. false) false true +(λx:Bool. λy:Bool. false) true +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) false -λx:Bool. (λy:Bool. false) x +λx:Bool. true +λx:Bool. x +false +λx:Bool. x +(λx:Bool. true) false +λx:Bool. x true +λx:Bool. false +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false (λx:Bool. x) +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool. false) true) +λx:Bool. true true -(λx:Bool. false) true -(λx:Bool. λy:Bool. true) true -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) true -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) ((λx:Bool. true) true) -(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +(λx:Bool. λy:Bool -> Bool. true) true (λx:Bool. x) +false λx:Bool. false +true +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) (λx:Bool. false) +λx:Bool. (λy:Bool. false) x false +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) false true +(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false)) +λx:Bool. true +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) (λx:Bool. x) diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/terms_trained.txt b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/terms_trained.txt index 9e4757aa..a983a33a 100644 --- a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/terms_trained.txt +++ b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/terms_trained.txt @@ -1,200 +1,200 @@ -(λx:Bool. λy:Bool. false) false -λx:Bool. true -λx:Bool. true -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) true) -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. true) false) -false λx:Bool. x +false +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) (λx:Bool. false) +(λx:Bool -> Bool. true) (λx:Bool. x) +false λx:Bool. true -λx:Bool. false -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) (λx:Bool. x) -(λx:Bool -> Bool. false) (λx:Bool. x) -λx:Bool. (λy:Bool. true) x +false true -λx:Bool. x +false +false +(λx:Bool -> Bool. x) (λx:Bool. true) +λx:Bool. false +λx:Bool. true false true true -(λx:Bool. λy:Bool. λz:Bool. false) true false λx:Bool. x -true -false -λx:Bool. false -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) true -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) (λx:Bool. x) λx:Bool. x true -λx:Bool. (λy:Bool. false) x -λx:Bool. x -(λx:Bool. λy:Bool. λz:Bool. true) true true +(λx:Bool. λy:Bool. true) false true λx:Bool. x -(λx:Bool. λy:Bool. true) true false +(λx:Bool -> Bool. true) (λx:Bool. true) +λx:Bool. (λy:Bool. true) true true +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false (λx:Bool. x) +(λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. false) false) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) false +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. true)) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) ((λx:Bool. false) true) true λx:Bool. x -λx:Bool. false -true false -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) -false -(λx:Bool -> Bool. false) (λx:Bool. x) -(λx:Bool. false) ((λx:Bool. true) false) -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) true +(λx:Bool. λy:Bool. λz:Bool. false) false false +λx:Bool. x +true +(λx:Bool. λy:Bool -> Bool. false) false ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) λx:Bool. false +false +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool. x) -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool. λy:Bool. false) true) -true +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) false -(λx:Bool. x) false +true +true +(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) false +λx:Bool. (λy:Bool. false) x false -(λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. true)) +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) +(λx:Bool. x) ((λx:Bool. true) false) +(λx:Bool. λy:Bool. false) true λx:Bool. x true -false +(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) true -λx:Bool. x +λx:Bool. true true false true -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +(λx:Bool. λy:Bool. true) true true +false λx:Bool. x -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) -λx:Bool. true +false λx:Bool. x -λx:Bool. true -(λx:Bool -> Bool. x) (λx:Bool. true) -true -(λx:Bool. λy:Bool. λz:Bool. false) false true +false λx:Bool. x +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true (λx:Bool. x) true +false true +λx:Bool. (λy:Bool. false) x +false +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) false +false +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) true +λx:Bool. x +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) false +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. true)) +λx:Bool. x +(λx:Bool. λy:Bool. false) ((λx:Bool. true) true) +(λx:Bool. x) true true -λx:Bool. false true +(λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) λx:Bool. true -λx:Bool. false -(λx:Bool -> Bool. false) (λx:Bool. x) -false +(λx:Bool. true) false true false -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) ((λx:Bool. true) true) -λx:Bool. x +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) +(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. true)) λx:Bool. false -(λx:Bool. λy:Bool. false) false ((λx:Bool -> Bool. true) (λx:Bool. true)) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. x) true -false -(λx:Bool -> Bool. λy:Bool. true) ((λx:Bool. λy:Bool. true) false) -false λx:Bool. false -false -false -false -λx:Bool. (λy:Bool. true) x -λx:Bool. true -λx:Bool. x -(λx:Bool. x) false +(λx:Bool. x) ((λx:Bool -> Bool. true) (λx:Bool. false)) +(λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) true) +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +λx:Bool. false λx:Bool. true +(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) false +λx:Bool. false λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) +(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +(λx:Bool. x) ((λx:Bool -> Bool. true) (λx:Bool. true)) false +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) +(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +true +λx:Bool. false +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) λx:Bool. true -(λx:Bool. x) ((λx:Bool. true) true) -false true -(λx:Bool. false) ((λx:Bool. false) false) -λx:Bool. x -λx:Bool. x -(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -false -false -false +(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) +true +(λx:Bool. false) true +(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) true -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) (λx:Bool. true) -λx:Bool. (λy:Bool. false) true false false -λx:Bool. true true -λx:Bool. (λy:Bool. false) false false -true +false +(λx:Bool. λy:Bool. true) false +(λx:Bool. λy:Bool. false) ((λx:Bool. false) false) +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. true)) λx:Bool. false -λx:Bool. x -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) -(λx:Bool. false) false -(λx:Bool. x) ((λx:Bool. true) true) -(λx:Bool. x) false -(λx:Bool. x) true -λx:Bool. (λy:Bool. false) false -(λx:Bool. true) false -(λx:Bool. λy:Bool. false) ((λx:Bool. true) true) -λx:Bool. true -(λx:Bool. true) ((λx:Bool. true) false) -λx:Bool. x -(λx:Bool. λy:Bool -> Bool. true) false (λx:Bool. false) -(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false)) -(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -λx:Bool. x -(λx:Bool. x) true -(λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) +(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false (λx:Bool. x) λx:Bool. (λy:Bool. true) x +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. x) +λx:Bool. false false false -false -(λx:Bool -> Bool. true) (λx:Bool. true) -(λx:Bool. x) false +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) +λx:Bool. true +(λx:Bool. λy:Bool -> Bool. true) true (λx:Bool. true) +(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) +(λx:Bool. λy:Bool. false) false true +true +true +true +λx:Bool. (λy:Bool. false) false +(λx:Bool. λy:Bool. false) true +λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) false λx:Bool. x λx:Bool. x -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -λx:Bool. x -(λx:Bool. λy:Bool. false) true false -false true false -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) -λx:Bool. true -λx:Bool. true -(λx:Bool. λy:Bool. true) false false false +(λx:Bool. λy:Bool. false) false true +(λx:Bool. λy:Bool. false) true false +(λx:Bool. λy:Bool. false) true true true -λx:Bool. (λy:Bool. true) true +true +(λx:Bool. true) false +λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) +(λx:Bool. λy:Bool. false) false false false false -λx:Bool. x -(λx:Bool -> Bool. true) (λx:Bool. x) +(λx:Bool. x) false +λx:Bool. true +(λx:Bool. x) false +true +(λx:Bool -> Bool. false) (λx:Bool. true) +λx:Bool. true +λx:Bool. false true λx:Bool. x -(λx:Bool. x) ((λx:Bool. true) true) -λx:Bool. x -λx:Bool. x -(λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool -> Bool. true) (λx:Bool. true)) +(λx:Bool -> Bool. false) (λx:Bool. x) +(λx:Bool. λy:Bool. false) true true true +(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false ((λx:Bool. λy:Bool. true) true) +(λx:Bool -> Bool. false) (λx:Bool. true) +λx:Bool. true +false true true -(λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) true) -(λx:Bool. x) true -(λx:Bool. λy:Bool. λz:Bool. true) true false +λx:Bool. (λy:Bool. true) x +λx:Bool. true +λx:Bool. (λy:Bool. true) true +false true +(λx:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) (λx:Bool -> Bool. true) (λx:Bool. x) -true -λx:Bool. (λy:Bool. true) true -(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -λx:Bool. x +λx:Bool. false +(λx:Bool. λy:Bool. true) true false true -λx:Bool. true +(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. false) false) (λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) true) -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) -true -(λx:Bool -> Bool. x) (λx:Bool. true) false -λx:Bool. x -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) -true -true +λx:Bool. true +(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool. false) false) false -λx:Bool. x +(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. true)) +true diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/learning_curve.csv b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/learning_curve.csv new file mode 100644 index 00000000..9190c0f6 --- /dev/null +++ b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/learning_curve.csv @@ -0,0 +1,2001 @@ +0 -268.9974234499506 +1 -275.61368438169603 +2 -276.69326542744767 +3 -277.08857634639025 +4 -277.31535648957856 +5 -277.4705297445105 +6 -277.5871368391721 +7 -277.68026130109786 +8 -277.75777583928516 +9 -277.82413378018487 +10 -277.88202366782593 +11 -277.933174863397 +12 -277.9787734641662 +13 -278.0196842142627 +14 -278.05657165139684 +15 -278.08996784570695 +16 -278.12031152823994 +17 -278.1479717450886 +18 -278.17326301429904 +19 -278.19645569285524 +20 -278.21778352935354 +21 -278.23744946573913 +22 -278.2556302730326 +23 -278.272480355396 +24 -278.28813492475075 +25 -278.30271267724567 +26 -278.3163180634952 +27 -278.32904322128303 +28 -278.3409696247989 +29 -278.35216949435664 +30 -278.3627070030896 +31 -278.372639311265 +32 -278.3820174540819 +33 -278.3908871048695 +34 -278.39928923224056 +35 -278.4072606669503 +36 -278.41483459179733 +37 -278.42204096586966 +38 -278.4289068927295 +39 -278.43545694063704 +40 -278.4417134217212 +41 -278.4476966359091 +42 -278.4534250845886 +43 -278.4589156581943 +44 -278.4641838013023 +45 -278.46924365827647 +46 -278.4741082020537 +47 -278.4787893482878 +48 -278.48329805674655 +49 -278.48764442157295 +50 -278.49183775181575 +51 -278.49588664341684 +52 -278.4997990436849 +53 -278.503582309161 +54 -278.50724325762155 +55 -278.51078821492 +56 -278.514223057221 +57 -278.51755324915524 +58 -278.52078387832796 +59 -278.5239196865777 +60 -278.5269650983246 +61 -278.5299242463061 +62 -278.5328009949784 +63 -278.53559896180354 +64 -278.5383215366478 +65 -278.5409718994587 +66 -278.54355303641046 +67 -278.5460677546381 +68 -278.54851869571536 +69 -278.55090834798466 +70 -278.55323905784036 +71 -278.55551304008003 +72 -278.5577323873802 +73 -278.5598990790068 +74 -278.56201498880256 +75 -278.564081892531 +76 -278.5661014746309 +77 -278.5680753344245 +78 -278.57000499184403 +79 -278.5718918926939 +80 -278.57373741351773 +81 -278.5755428660742 +82 -278.57730950147686 +83 -278.579038514018 +84 -278.5807310447009 +85 -278.58238818450644 +86 -278.58401097742 +87 -278.585600423234 +88 -278.5871574801425 +89 -278.58868306715294 +90 -278.5901780663216 +91 -278.5916433248279 +92 -278.5930796569101 +93 -278.5944878456569 +94 -278.5958686446815 +95 -278.5972227796782 +96 -278.5985509498747 +97 -278.5998538293881 +98 -278.60113206848655 +99 -278.60238629477914 +100 -278.6036171143111 +101 -278.6048251126081 +102 -278.6060108556395 +103 -278.60717489072965 +104 -278.60831774741206 +105 -278.6094399382259 +106 -278.6105419594728 +107 -278.6116242919209 +108 -278.6126874014744 +109 -278.6137317397976 +110 -278.6147577449114 +111 -278.61576584174514 +112 -278.6167564426699 +113 -278.61772994799395 +114 -278.6186867464353 +115 -278.6196272155662 +116 -278.62055172224046 +117 -278.6214606229886 +118 -278.6223542644031 +119 -278.6232329834971 +120 -278.6240971080503 +121 -278.6249469569333 +122 -278.6257828404206 +123 -278.6266050604856 +124 -278.62741391108364 +125 -278.6282096784226 +126 -278.62899264121825 +127 -278.62976307094056 +128 -278.63052123205006 +129 -278.6312673822228 +130 -278.6320017725618 +131 -278.6327246478089 +132 -278.6334362465379 +133 -278.6341368013459 +134 -278.6348265390359 +135 -278.6355056807902 +136 -278.63617444233853 +137 -278.6368330341202 +138 -278.6374816614384 +139 -278.63812052461 +140 -278.6387498191093 +141 -278.63936973570725 +142 -278.6399804606027 +143 -278.6405821755558 +144 -278.64117505800715 +145 -278.6417592811999 +146 -278.6423350142962 +147 -278.6429024224889 +148 -278.6434616671083 +149 -278.6440129057273 +150 -278.64455629226444 +151 -278.6450919770765 +152 -278.6456201070598 +153 -278.6461408257376 +154 -278.6466542733484 +155 -278.6471605869338 +156 -278.64765990042275 +157 -278.64815234470814 +158 -278.64863804772784 +159 -278.6491171345428 +160 -278.64958972740584 +161 -278.6500559458352 +162 -278.6505159066859 +163 -278.6509697242133 +164 -278.6514175101426 +165 -278.65185937372814 +166 -278.6522954218169 +167 -278.65272575891095 +168 -278.6531504872213 +169 -278.65356970672684 +170 -278.6539835152284 +171 -278.654392008404 +172 -278.65479527985923 +173 -278.6551934211781 +174 -278.6555865219721 +175 -278.65597466992944 +176 -278.6563579508596 +177 -278.6567364487404 +178 -278.65711024576143 +179 -278.65747942236595 +180 -278.65784405729545 +181 -278.65820422762675 +182 -278.65856000881536 +183 -278.65891147473155 +184 -278.6592586976978 +185 -278.6596017485294 +186 -278.65994069656205 +187 -278.66027560969667 +188 -278.6606065544244 +189 -278.6609335958665 +190 -278.66125679780146 +191 -278.66157622269924 +192 -278.66189193175074 +193 -278.66220398489736 +194 -278.6625124408605 +195 -278.66281735717024 +196 -278.66311879019304 +197 -278.6634167951559 +198 -278.6637114261766 +199 -278.66400273628705 +200 -278.66429077745806 +201 -278.6645756006239 +202 -278.6648572557077 +203 -278.66513579164166 +204 -278.66541125639174 +205 -278.6656836969791 +206 -278.6659531595007 +207 -278.66621968915223 +208 -278.66648333024625 +209 -278.66674412623325 +210 -278.66700211972204 +211 -278.6672573524959 +212 -278.6675098655345 +213 -278.66775969902886 +214 -278.6680068924016 +215 -278.66825148432275 +216 -278.66849351272623 +217 -278.6687330148257 +218 -278.6689700271343 +219 -278.66920458547503 +220 -278.66943672499855 +221 -278.66966648020025 +222 -278.66989388492874 +223 -278.670118972407 +224 -278.670341775241 +225 -278.6705623254341 +226 -278.67078065440336 +227 -278.67099679299065 +228 -278.67121077147004 +229 -278.67142261956946 +230 -278.67163236647644 +231 -278.67184004085084 +232 -278.6720456708362 +233 -278.67224928407177 +234 -278.6724509077041 +235 -278.67265056839375 +236 -278.67284829233074 +237 -278.67304410524173 +238 -278.6732380323992 +239 -278.6734300986337 +240 -278.67362032834046 +241 -278.67380874549184 +242 -278.67399537364355 +243 -278.6741802359428 +244 -278.67436335514185 +245 -278.67454475360023 +246 -278.6747244532955 +247 -278.67490247583396 +248 -278.6750788424535 +249 -278.67525357403395 +250 -278.6754266911042 +251 -278.67559821385083 +252 -278.67576816212187 +253 -278.6759365554365 +254 -278.6761034129905 +255 -278.6762687536651 +256 -278.67643259602886 +257 -278.6765949583495 +258 -278.6767558585962 +259 -278.6769153144467 +260 -278.6770733432934 +261 -278.67722996225075 +262 -278.6773851881563 +263 -278.67753903758125 +264 -278.6776915268332 +265 -278.6778426719623 +266 -278.67799248876463 +267 -278.6781409927897 +268 -278.67828819934437 +269 -278.67843412349663 +270 -278.6785787800831 +271 -278.67872218370854 +272 -278.6788643487561 +273 -278.6790052893885 +274 -278.67914501955164 +275 -278.67928355298204 +276 -278.6794209032077 +277 -278.6795570835535 +278 -278.6796921071441 +279 -278.6798259869111 +280 -278.679958735592 +281 -278.68009036573574 +282 -278.68022088970895 +283 -278.68035031969634 +284 -278.68047866770263 +285 -278.68060594556243 +286 -278.68073216493593 +287 -278.68085733731647 +288 -278.6809814740334 +289 -278.6811045862529 +290 -278.6812266849835 +291 -278.68134778107856 +292 -278.681467885237 +293 -278.68158700800814 +294 -278.6817051597957 +295 -278.68182235085567 +296 -278.68193859130514 +297 -278.682053891119 +298 -278.6821682601372 +299 -278.6822817080642 +300 -278.6823942444718 +301 -278.6825058788037 +302 -278.6826166203753 +303 -278.6827264783764 +304 -278.6828354618744 +305 -278.6829435798153 +306 -278.683050841027 +307 -278.683157254221 +308 -278.68326282799325 +309 -278.6833675708278 +310 -278.6834714910976 +311 -278.68357459706635 +312 -278.68367689689245 +313 -278.6837783986277 +314 -278.683879110221 +315 -278.68397903952035 +316 -278.684078194272 +317 -278.6841765821259 +318 -278.6842742106349 +319 -278.68437108725743 +320 -278.68446721935715 +321 -278.6845626142058 +322 -278.684657278988 +323 -278.68475122079514 +324 -278.6848444466345 +325 -278.6849369634252 +326 -278.6850287780033 +327 -278.68511989712084 +328 -278.68521032744894 +329 -278.68530007557666 +330 -278.68538914801513 +331 -278.68547755119533 +332 -278.68556529147486 +333 -278.68565237513303 +334 -278.6857388083756 +335 -278.6858245973346 +336 -278.68590974807034 +337 -278.6859942665732 +338 -278.68607815876175 +339 -278.686161430487 +340 -278.68624408753107 +341 -278.68632613561095 +342 -278.6864075803752 +343 -278.6864884274116 +344 -278.6865686822411 +345 -278.68664835032155 +346 -278.6867274370518 +347 -278.68680594776606 +348 -278.6868838877422 +349 -278.68696126219606 +350 -278.68703807628566 +351 -278.6871143351134 +352 -278.68719004372207 +353 -278.6872652071013 +354 -278.68733983018444 +355 -278.6874139178504 +356 -278.6874874749259 +357 -278.6875605061829 +358 -278.6876330163434 +359 -278.68770501007765 +360 -278.6877764920041 +361 -278.6878474666933 +362 -278.68791793866524 +363 -278.6879879123922 +364 -278.688057392299 +365 -278.6881263827629 +366 -278.6881948881139 +367 -278.688262912638 +368 -278.6883304605742 +369 -278.68839753611843 +370 -278.68846414342175 +371 -278.6885302865914 +372 -278.6885959696929 +373 -278.6886611967485 +374 -278.68872597174027 +375 -278.6887902986068 +376 -278.68885418124796 +377 -278.68891762352297 +378 -278.6889806292518 +379 -278.68904320221435 +380 -278.68910534615213 +381 -278.6891670647706 +382 -278.6892283617358 +383 -278.6892892406762 +384 -278.6893497051854 +385 -278.6894097588196 +386 -278.68946940509943 +387 -278.68952864751134 +388 -278.68958748950524 +389 -278.6896459344981 +390 -278.689703985873 +391 -278.6897616469773 +392 -278.6898189211286 +393 -278.68987581160866 +394 -278.6899323216692 +395 -278.6899884545291 +396 -278.69004421337553 +397 -278.69009960136395 +398 -278.6901546216215 +399 -278.69020927724193 +400 -278.69026357129076 +401 -278.69031750680284 +402 -278.69037108678435 +403 -278.6904243142122 +404 -278.6904771920354 +405 -278.69052972317286 +406 -278.6905819105169 +407 -278.6906337569329 +408 -278.6906852652564 +409 -278.6907364382982 +410 -278.69078727884136 +411 -278.69083778964233 +412 -278.69088797343244 +413 -278.6909378329163 +414 -278.69098737077377 +415 -278.6910365896582 +416 -278.69108549219936 +417 -278.69113408100264 +418 -278.6911823586463 +419 -278.69123032768795 +420 -278.6912779906589 +421 -278.69132535006815 +422 -278.6913724084012 +423 -278.69141916811964 +424 -278.6914656316629 +425 -278.69151180144877 +426 -278.69155767987024 +427 -278.6916032693014 +428 -278.6916485720916 +429 -278.6916935905702 +430 -278.6917383270451 +431 -278.69178278380235 +432 -278.6918269631074 +433 -278.6918708672053 +434 -278.691914498321 +435 -278.6919578586578 +436 -278.6920009503992 +437 -278.6920437757114 +438 -278.6920863367371 +439 -278.6921286356024 +440 -278.6921706744133 +441 -278.6922124552566 +442 -278.69225398020023 +443 -278.69229525129464 +444 -278.69233627056946 +445 -278.6923770400388 +446 -278.69241756169623 +447 -278.69245783752064 +448 -278.69249786946955 +449 -278.6925376594848 +450 -278.6925772094923 +451 -278.6926165213982 +452 -278.6926555970926 +453 -278.6926944384491 +454 -278.69273304732496 +455 -278.6927714255606 +456 -278.69280957497983 +457 -278.69284749739086 +458 -278.6928851945854 +459 -278.69292266833935 +460 -278.69295992041407 +461 -278.6929969525536 +462 -278.6930337664886 +463 -278.69307036393275 +464 -278.6931067465853 +465 -278.69314291613136 +466 -278.69317887424006 +467 -278.693214622567 +468 -278.6932501627529 +469 -278.6932854964228 +470 -278.69332062519067 +471 -278.6933555506532 +472 -278.6933902743948 +473 -278.6934247979859 +474 -278.69345912298337 +475 -278.6934932509308 +476 -278.69352718335716 +477 -278.6935609217801 +478 -278.69359446770096 +479 -278.6936278226121 +480 -278.6936609879906 +481 -278.69369396530067 +482 -278.69372675599425 +483 -278.693759361512 +484 -278.6937917832803 +485 -278.69382402271464 +486 -278.6938560812169 +487 -278.69388796017813 +488 -278.69391966097754 +489 -278.69395118498215 +490 -278.693982533546 +491 -278.69401370801364 +492 -278.6940447097167 +493 -278.69407553997587 +494 -278.69410620010126 +495 -278.6941366913907 +496 -278.69416701513063 +497 -278.6941971725985 +498 -278.694227165058 +499 -278.69425699376546 +500 -278.6942866599636 +501 -278.694316164886 +502 -278.6943455097547 +503 -278.6943746957844 +504 -278.6944037241745 +505 -278.69443259611893 +506 -278.6944613127977 +507 -278.69448987538414 +508 -278.69451828504015 +509 -278.69454654291695 +510 -278.6945746501577 +511 -278.69460260789486 +512 -278.6946304172516 +513 -278.694658079341 +514 -278.6946855952686 +515 -278.6947129661283 +516 -278.6947401930068 +517 -278.6947672769794 +518 -278.69479421911524 +519 -278.6948210204724 +520 -278.69484768209986 +521 -278.6948742050396 +522 -278.6949005903237 +523 -278.6949268389757 +524 -278.6949529520092 +525 -278.69497893043297 +526 -278.6950047752443 +527 -278.6950304874311 +528 -278.695056067977 +529 -278.69508151785413 +530 -278.69510683802906 +531 -278.6951320294568 +532 -278.69515709308774 +533 -278.6951820298629 +534 -278.6952068407148 +535 -278.69523152657 +536 -278.6952560883467 +537 -278.695280526954 +538 -278.69530484329545 +539 -278.69532903826547 +540 -278.69535311275206 +541 -278.6953770676357 +542 -278.6954009037899 +543 -278.69542462208 +544 -278.6954482233646 +545 -278.69547170849523 +546 -278.69549507831664 +547 -278.6955183336664 +548 -278.6955414753742 +549 -278.69556450426523 +550 -278.6955874211552 +551 -278.695610226855 +552 -278.6956329221683 +553 -278.69565550789054 +554 -278.6956779848137 +555 -278.69570035372095 +556 -278.69572261538883 +557 -278.69574477058967 +558 -278.69576682008665 +559 -278.6957887646389 +560 -278.6958106049987 +561 -278.6958323419109 +562 -278.6958539761166 +563 -278.69587550834774 +564 -278.6958969393342 +565 -278.69591826979564 +566 -278.695939500449 +567 -278.69596063200385 +568 -278.6959816651636 +569 -278.69600260062737 +570 -278.6960234390877 +571 -278.6960441812319 +572 -278.6960648277403 +573 -278.69608537928957 +574 -278.69610583654986 +575 -278.6961262001854 +576 -278.6961464708556 +577 -278.6961666492151 +578 -278.6961867359121 +579 -278.6962067315893 +580 -278.696226636886 +581 -278.6962464524346 +582 -278.69626617886314 +583 -278.6962858167932 +584 -278.6963053668433 +585 -278.69632482962663 +586 -278.6963442057496 +587 -278.6963634958149 +588 -278.69638270042134 +589 -278.696401820161 +590 -278.6964208556216 +591 -278.69643980738806 +592 -278.69645867603737 +593 -278.696477462144 +594 -278.6964961662782 +595 -278.69651478900323 +596 -278.69653333087956 +597 -278.6965517924634 +598 -278.6965701743055 +599 -278.69658847695246 +600 -278.696606700947 +601 -278.6966248468258 +602 -278.69664291512305 +603 -278.69666090636827 +604 -278.6966788210861 +605 -278.69669665979757 +606 -278.6967144230188 +607 -278.6967321112621 +608 -278.6967497250358 +609 -278.69676726484454 +610 -278.69678473118825 +611 -278.6968021245623 +612 -278.6968194454597 +613 -278.6968366943681 +614 -278.69685387177213 +615 -278.6968709781515 +616 -278.6968880139837 +617 -278.6969049797408 +618 -278.69692187589135 +619 -278.6969387029016 +620 -278.69695546123137 +621 -278.69697215133993 +622 -278.6969887736808 +623 -278.6970053287047 +624 -278.6970218168576 +625 -278.6970382385833 +626 -278.69705459432197 +627 -278.6970708845092 +628 -278.6970871095784 +629 -278.6971032699581 +630 -278.69711936607484 +631 -278.69713539835146 +632 -278.6971513672061 +633 -278.6971672730545 +634 -278.69718311630953 +635 -278.6971988973818 +636 -278.6972146166751 +637 -278.69723027459327 +638 -278.69724587153627 +639 -278.69726140789925 +640 -278.69727688407687 +641 -278.6972923004579 +642 -278.6973076574302 +643 -278.69732295537733 +644 -278.69733819468064 +645 -278.697353375718 +646 -278.69736849886385 +647 -278.6973835644904 +648 -278.6973985729677 +649 -278.69741352466025 +650 -278.69742841993207 +651 -278.69744325914326 +652 -278.69745804265176 +653 -278.6974727708125 +654 -278.6974874439762 +655 -278.69750206249284 +656 -278.6975166267094 +657 -278.6975311369683 +658 -278.69754559361127 +659 -278.6975599969768 +660 -278.6975743474 +661 -278.69758864521384 +662 -278.69760289074964 +663 -278.69761708433407 +664 -278.69763122629234 +665 -278.6976453169479 +666 -278.6976593566214 +667 -278.6976733456293 +668 -278.6976872842867 +669 -278.69770117290733 +670 -278.6977150118014 +671 -278.6977288012761 +672 -278.69774254163656 +673 -278.69775623318725 +674 -278.6977698762275 +675 -278.69778347105614 +676 -278.69779701797006 +677 -278.6978105172613 +678 -278.6978239692227 +679 -278.6978373741431 +680 -278.6978507323091 +681 -278.697864044006 +682 -278.6978773095158 +683 -278.6978905291189 +684 -278.69790370309363 +685 -278.69791683171667 +686 -278.6979299152601 +687 -278.697942953997 +688 -278.69795594819686 +689 -278.69796889812625 +690 -278.69798180405184 +691 -278.69799466623715 +692 -278.69800748494305 +693 -278.69802026042845 +694 -278.6980329929516 +695 -278.69804568276766 +696 -278.69805833012947 +697 -278.6980709352891 +698 -278.6980834984961 +699 -278.69809601999873 +700 -278.6981085000409 +701 -278.69812093886816 +702 -278.69813333672204 +703 -278.6981456938423 +704 -278.69815801046786 +705 -278.69817028683394 +706 -278.6981825231765 +707 -278.6981947197286 +708 -278.69820687671944 +709 -278.69821899438045 +710 -278.69823107293826 +711 -278.6982431126183 +712 -278.6982551136454 +713 -278.6982670762412 +714 -278.69827900062813 +715 -278.69829088702267 +716 -278.6983027356446 +717 -278.69831454670765 +718 -278.6983263204274 +719 -278.69833805701546 +720 -278.69834975668243 +721 -278.6983614196388 +722 -278.6983730460913 +723 -278.6983846362462 +724 -278.6983961903078 +725 -278.6984077084787 +726 -278.69841919096183 +727 -278.6984306379559 +728 -278.6984420496599 +729 -278.6984534262701 +730 -278.6984647679825 +731 -278.6984760749911 +732 -278.6984873474883 +733 -278.6984985856647 +734 -278.6985097897107 +735 -278.6985209598141 +736 -278.69853209616144 +737 -278.6985431989391 +738 -278.6985542683296 +739 -278.698565304517 +740 -278.69857630768223 +741 -278.6985872780045 +742 -278.698598215663 +743 -278.69860912083436 +744 -278.6986199936952 +745 -278.69863083442067 +746 -278.6986416431822 +747 -278.6986524201535 +748 -278.69866316550406 +749 -278.69867387940457 +750 -278.6986845620221 +751 -278.69869521352473 +752 -278.6987058340773 +753 -278.69871642384487 +754 -278.69872698298997 +755 -278.6987375116756 +756 -278.69874801006273 +757 -278.69875847831025 +758 -278.69876891657646 +759 -278.69877932501964 +760 -278.69878970379517 +761 -278.698800053059 +762 -278.6988103729645 +763 -278.6988206636641 +764 -278.6988309253099 +765 -278.69884115805246 +766 -278.6988513620413 +767 -278.69886153742397 +768 -278.69887168434855 +769 -278.69888180296107 +770 -278.69889189340626 +771 -278.6989019558291 +772 -278.6989119903719 +773 -278.69892199717566 +774 -278.69893197638294 +775 -278.6989419281331 +776 -278.6989518525648 +777 -278.6989617498159 +778 -278.69897162002366 +779 -278.6989814633231 +780 -278.69899127985065 +781 -278.6990010697391 +782 -278.69901083312084 +783 -278.69902057012933 +784 -278.699030280895 +785 -278.6990399655476 +786 -278.6990496242164 +787 -278.6990592570304 +788 -278.69906886411576 +789 -278.6990784455997 +790 -278.69908800160715 +791 -278.69909753226375 +792 -278.6991070376916 +793 -278.6991165180149 +794 -278.6991259733551 +795 -278.69913540383266 +796 -278.6991448095682 +797 -278.6991541906818 +798 -278.69916354729094 +799 -278.6991728795138 +800 -278.69918218746733 +801 -278.69919147126683 +802 -278.69920073102844 +803 -278.6992099668655 +804 -278.69921917889235 +805 -278.6992283672211 +806 -278.69923753196343 +807 -278.69924667323215 +808 -278.6992557911358 +809 -278.69926488578477 +810 -278.6992739572878 +811 -278.6992830057527 +812 -278.6992920312872 +813 -278.69930103399787 +814 -278.69931001398965 +815 -278.6993189713689 +816 -278.69932790623847 +817 -278.69933681870333 +818 -278.6993457088658 +819 -278.69935457682743 +820 -278.69936342268994 +821 -278.699372246555 +822 -278.6993810485211 +823 -278.6993898286895 +824 -278.69939858715736 +825 -278.6994073240233 +826 -278.69941603938383 +827 -278.6994247333359 +828 -278.6994334059766 +829 -278.6994420573995 +830 -278.6994506877003 +831 -278.699459296973 +832 -278.6994678853102 +833 -278.6994764528048 +834 -278.6994849995495 +835 -278.69949352563515 +836 -278.699502031153 +837 -278.69951051619273 +838 -278.6995189808442 +839 -278.69952742519655 +840 -278.69953584933654 +841 -278.69954425335504 +842 -278.69955263733596 +843 -278.6995610013685 +844 -278.69956934553676 +845 -278.6995776699268 +846 -278.69958597462386 +847 -278.6995942597112 +848 -278.699602525274 +849 -278.6996107713935 +850 -278.6996189981532 +851 -278.69962720563564 +852 -278.69963539392165 +853 -278.69964356309214 +854 -278.699651713228 +855 -278.69965984440773 +856 -278.6996679567115 +857 -278.6996760502186 +858 -278.69968412500697 +859 -278.6996921811534 +860 -278.699700218736 +861 -278.6997082378309 +862 -278.6997162385146 +863 -278.69972422086323 +864 -278.6997321849512 +865 -278.6997401308534 +866 -278.69974805864433 +867 -278.6997559683974 +868 -278.69976386018607 +869 -278.69977173408284 +870 -278.69977959015995 +871 -278.69978742848923 +872 -278.69979524914214 +873 -278.69980305218905 +874 -278.6998108377009 +875 -278.6998186057469 +876 -278.69982635639775 +877 -278.69983408972143 +878 -278.69984180578695 +879 -278.6998495046619 +880 -278.6998571864146 +881 -278.6998648511121 +882 -278.6998724988212 +883 -278.6998801296087 +884 -278.6998877435394 +885 -278.6998953406794 +886 -278.6999029210949 +887 -278.6999104848489 +888 -278.6999180320066 +889 -278.6999255626317 +890 -278.69993307678783 +891 -278.6999405745378 +892 -278.6999480559442 +893 -278.69995552107014 +894 -278.69996296997584 +895 -278.6999704027251 +896 -278.69997781937633 +897 -278.69998521999173 +898 -278.69999260463163 +899 -278.69999997335555 +900 -278.70000732622356 +901 -278.7000146632952 +902 -278.70002198462777 +903 -278.7000292902802 +904 -278.70003658031163 +905 -278.7000438547786 +906 -278.7000511137396 +907 -278.7000583572504 +908 -278.70006558536886 +909 -278.70007279815087 +910 -278.70007999565115 +911 -278.7000871779269 +912 -278.70009434503316 +913 -278.70010149702404 +914 -278.7001086339546 +915 -278.7001157558789 +916 -278.70012286285134 +917 -278.7001299549248 +918 -278.70013703215363 +919 -278.70014409459003 +920 -278.7001511422859 +921 -278.7001581752947 +922 -278.7001651936681 +923 -278.700172197457 +924 -278.70017918671414 +925 -278.70018616148946 +926 -278.7001931218339 +927 -278.70020006779805 +928 -278.7002069994325 +929 -278.7002139167858 +930 -278.70022081990777 +931 -278.7002277088489 +932 -278.7002345836572 +933 -278.70024144438116 +934 -278.7002482910693 +935 -278.70025512376924 +936 -278.70026194253035 +937 -278.7002687473985 +938 -278.7002755384206 +939 -278.7002823156457 +940 -278.7002890791181 +941 -278.70029582888554 +942 -278.7003025649939 +943 -278.7003092874886 +944 -278.7003159964158 +945 -278.7003226918208 +946 -278.70032937374793 +947 -278.70033604224227 +948 -278.7003426973489 +949 -278.7003493391113 +950 -278.7003559675733 +951 -278.70036258278 +952 -278.70036918477393 +953 -278.700375773598 +954 -278.70038234929615 +955 -278.70038891191007 +956 -278.70039546148314 +957 -278.7004019980575 +958 -278.70040852167466 +959 -278.7004150323762 +960 -278.700421530205 +961 -278.70042801520106 +962 -278.7004344874067 +963 -278.70044094686097 +964 -278.70044739360605 +965 -278.70045382768154 +966 -278.7004602491281 +967 -278.70046665798486 +968 -278.70047305429216 +969 -278.7004794380897 +970 -278.7004858094162 +971 -278.70049216831086 +972 -278.7004985148127 +973 -278.7005048489597 +974 -278.7005111707911 +975 -278.7005174803452 +976 -278.7005237776588 +977 -278.70053006277055 +978 -278.7005363357179 +979 -278.70054259653784 +980 -278.70054884526786 +981 -278.700555081945 +982 -278.7005613066057 +983 -278.7005675192867 +984 -278.7005737200246 +985 -278.7005799088545 +986 -278.7005860858133 +987 -278.70059225093706 +988 -278.7005984042606 +989 -278.7006045458193 +990 -278.7006106756485 +991 -278.700616793783 +992 -278.7006229002585 +993 -278.7006289951088 +994 -278.70063507836835 +995 -278.7006411500713 +996 -278.7006472102524 +997 -278.70065325894524 +998 -278.700659296183 +999 -278.7006653220001 +1000 -278.70067133642846 +1001 -278.70067733950344 +1002 -278.70068333125613 +1003 -278.7006893117205 +1004 -278.70069528092847 +1005 -278.700701238913 +1006 -278.7007071857062 +1007 -278.70071312134047 +1008 -278.7007190458471 +1009 -278.7007249592589 +1010 -278.7007308616073 +1011 -278.70073675292366 +1012 -278.70074263323903 +1013 -278.7007485025849 +1014 -278.70075436099177 +1015 -278.7007602084912 +1016 -278.70076604511394 +1017 -278.7007718708899 +1018 -278.7007776858499 +1019 -278.70078349002415 +1020 -278.7007892834421 +1021 -278.70079506613524 +1022 -278.70080083813167 +1023 -278.7008065994617 +1024 -278.70081235015584 +1025 -278.70081809024174 +1026 -278.7008238197492 +1027 -278.7008295387074 +1028 -278.70083524714505 +1029 -278.7008409450911 +1030 -278.7008466325746 +1031 -278.7008523096231 +1032 -278.70085797626575 +1033 -278.7008636325303 +1034 -278.7008692784449 +1035 -278.70087491403746 +1036 -278.70088053933597 +1037 -278.70088615436833 +1038 -278.7008917591611 +1039 -278.7008973537419 +1040 -278.7009029381392 +1041 -278.70090851237893 +1042 -278.70091407648846 +1043 -278.7009196304943 +1044 -278.7009251744237 +1045 -278.7009307083029 +1046 -278.70093623215877 +1047 -278.7009417460176 +1048 -278.70094724990446 +1049 -278.7009527438476 +1050 -278.70095822787175 +1051 -278.7009637020024 +1052 -278.700969166266 +1053 -278.70097462068804 +1054 -278.70098006529395 +1055 -278.70098550010874 +1056 -278.70099092515835 +1057 -278.7009963404675 +1058 -278.7010017460607 +1059 -278.7010071419642 +1060 -278.7010125282016 +1061 -278.7010179047986 +1062 -278.70102327177943 +1063 -278.70102862916747 +1064 -278.70103397698847 +1065 -278.70103931526614 +1066 -278.70104464402385 +1067 -278.70104996328706 +1068 -278.7010552730795 +1069 -278.70106057342355 +1070 -278.7010658643442 +1071 -278.7010711458647 +1072 -278.70107641800826 +1073 -278.7010816807989 +1074 -278.70108693425897 +1075 -278.70109217841235 +1076 -278.7010974132812 +1077 -278.70110263889035 +1078 -278.70110785526055 +1079 -278.7011130624157 +1080 -278.70111826037805 +1081 -278.70112344917067 +1082 -278.7011286288159 +1083 -278.70113379933525 +1084 -278.70113896075236 +1085 -278.7011441130882 +1086 -278.7011492563649 +1087 -278.7011543906056 +1088 -278.7011595158314 +1089 -278.70116463206335 +1090 -278.7011697393248 +1091 -278.7011748376359 +1092 -278.70117992701853 +1093 -278.7011850074948 +1094 -278.7011900790854 +1095 -278.70119514181204 +1096 -278.70120019569464 +1097 -278.70120524075577 +1098 -278.7012102770158 +1099 -278.70121530449507 +1100 -278.7012203232148 +1101 -278.7012253331964 +1102 -278.7012303344595 +1103 -278.7012353270249 +1104 -278.701240310913 +1105 -278.70124528614457 +1106 -278.7012502527393 +1107 -278.7012552107176 +1108 -278.70126016009993 +1109 -278.70126510090654 +1110 -278.701270033156 +1111 -278.7012749568693 +1112 -278.7012798720665 +1113 -278.7012847787663 +1114 -278.7012896769884 +1115 -278.7012945667539 +1116 -278.7012994480799 +1117 -278.70130432098756 +1118 -278.7013091854956 +1119 -278.7013140416233 +1120 -278.70131888938937 +1121 -278.7013237288144 +1122 -278.70132855991494 +1123 -278.7013333827126 +1124 -278.7013381972237 +1125 -278.70134300346814 +1126 -278.70134780146606 +1127 -278.70135259123384 +1128 -278.70135737279116 +1129 -278.7013621461562 +1130 -278.7013669113466 +1131 -278.70137166838293 +1132 -278.70137641728155 +1133 -278.70138115806066 +1134 -278.7013858907397 +1135 -278.70139061533536 +1136 -278.70139533186665 +1137 -278.70140004035085 +1138 -278.7014047408057 +1139 -278.7014094332498 +1140 -278.7014141176996 +1141 -278.7014187941743 +1142 -278.7014234626902 +1143 -278.70142812326606 +1144 -278.70143277591734 +1145 -278.70143742066364 +1146 -278.701442057521 +1147 -278.7014466865071 +1148 -278.70145130763837 +1149 -278.7014559209335 +1150 -278.7014605264079 +1151 -278.7014651240791 +1152 -278.7014697139644 +1153 -278.7014742960812 +1154 -278.7014788704451 +1155 -278.7014834370727 +1156 -278.7014879959824 +1157 -278.7014925471894 +1158 -278.70149709071075 +1159 -278.70150162656245 +1160 -278.7015061547612 +1161 -278.70151067532385 +1162 -278.70151518826594 +1163 -278.70151969360467 +1164 -278.7015241913555 +1165 -278.7015286815353 +1166 -278.7015331641595 +1167 -278.70153763924424 +1168 -278.7015421068054 +1169 -278.7015465668597 +1170 -278.70155101942163 +1171 -278.7015554645087 +1172 -278.70155990213533 +1173 -278.7015643323175 +1174 -278.70156875507126 +1175 -278.701573170412 +1176 -278.7015775783548 +1177 -278.701581978916 +1178 -278.70158637211046 +1179 -278.70159075795374 +1180 -278.70159513646104 +1181 -278.7015995076477 +1182 -278.7016038715282 +1183 -278.70160822811977 +1184 -278.7016125774347 +1185 -278.70161691949113 +1186 -278.7016212543017 +1187 -278.70162558188235 +1188 -278.7016299022471 +1189 -278.70163421541264 +1190 -278.7016385213919 +1191 -278.7016428202005 +1192 -278.7016471118531 +1193 -278.7016513963638 +1194 -278.7016556737485 +1195 -278.70165994402066 +1196 -278.70166420719477 +1197 -278.70166846328635 +1198 -278.70167271230844 +1199 -278.70167695427625 +1200 -278.70168118920395 +1201 -278.70168541710603 +1202 -278.70168963799534 +1203 -278.70169385188814 +1204 -278.7016980587986 +1205 -278.7017022587383 +1206 -278.7017064517236 +1207 -278.7017106377671 +1208 -278.7017148168837 +1209 -278.70171898908717 +1210 -278.70172315439095 +1211 -278.70172731280985 +1212 -278.7017314643555 +1213 -278.701735609044 +1214 -278.70173974688817 +1215 -278.70174387790127 +1216 -278.7017480020969 +1217 -278.7017521194897 +1218 -278.7017562300917 +1219 -278.70176033391726 +1220 -278.70176443097984 +1221 -278.70176852129254 +1222 -278.7017726048686 +1223 -278.701776681722 +1224 -278.7017807518651 +1225 -278.7017848153119 +1226 -278.7017888720747 +1227 -278.7017929221674 +1228 -278.70179696560365 +1229 -278.7018010023946 +1230 -278.7018050325548 +1231 -278.7018090560966 +1232 -278.70181307303335 +1233 -278.70181708337833 +1234 -278.70182108714374 +1235 -278.7018250843418 +1236 -278.7018290749872 +1237 -278.7018330590905 +1238 -278.7018370366656 +1239 -278.70184100772576 +1240 -278.7018449722819 +1241 -278.701848930348 +1242 -278.7018528819364 +1243 -278.70185682705915 +1244 -278.7018607657289 +1245 -278.70186469795794 +1246 -278.7018686237593 +1247 -278.70187254314567 +1248 -278.7018764561277 +1249 -278.70188036271946 +1250 -278.7018842629317 +1251 -278.7018881567773 +1252 -278.7018920442697 +1253 -278.7018959254187 +1254 -278.70189980023866 +1255 -278.70190366873993 +1256 -278.70190753093556 +1257 -278.70191138683714 +1258 -278.70191523645684 +1259 -278.701919079806 +1260 -278.70192291689796 +1261 -278.70192674774364 +1262 -278.70193057235485 +1263 -278.7019343907434 +1264 -278.7019382029213 +1265 -278.7019420089006 +1266 -278.70194580869224 +1267 -278.7019496023079 +1268 -278.7019533897598 +1269 -278.70195717105975 +1270 -278.70196094621923 +1271 -278.7019647152487 +1272 -278.70196847816067 +1273 -278.7019722349666 +1274 -278.7019759856779 +1275 -278.70197973030554 +1276 -278.7019834688614 +1277 -278.7019872013567 +1278 -278.701990927803 +1279 -278.701994648211 +1280 -278.70199836259246 +1281 -278.7020020709589 +1282 -278.70200577332054 +1283 -278.7020094696896 +1284 -278.7020131600759 +1285 -278.70201684449165 +1286 -278.7020205229474 +1287 -278.702024195455 +1288 -278.7020278620252 +1289 -278.7020315226677 +1290 -278.7020351773955 +1291 -278.70203882621826 +1292 -278.70204246914733 +1293 -278.70204610619294 +1294 -278.70204973736696 +1295 -278.70205336267895 +1296 -278.7020569821405 +1297 -278.7020605957626 +1298 -278.70206420355515 +1299 -278.7020678055304 +1300 -278.7020714016975 +1301 -278.7020749920669 +1302 -278.7020785766509 +1303 -278.70208215545847 +1304 -278.7020857285007 +1305 -278.7020892957892 +1306 -278.70209285733216 +1307 -278.70209641314216 +1308 -278.70209996322876 +1309 -278.70210350760243 +1310 -278.70210704627385 +1311 -278.70211057925314 +1312 -278.7021141065506 +1313 -278.7021176281767 +1314 -278.70212114414215 +1315 -278.70212465445627 +1316 -278.70212815912987 +1317 -278.7021316581732 +1318 -278.7021351515963 +1319 -278.70213863940916 +1320 -278.7021421216227 +1321 -278.7021455982461 +1322 -278.70214906928993 +1323 -278.70215253476425 +1324 -278.70215599467855 +1325 -278.702159449044 +1326 -278.7021628978691 +1327 -278.70216634116525 +1328 -278.7021697789414 +1329 -278.70217321120805 +1330 -278.7021766379744 +1331 -278.7021800592508 +1332 -278.7021834750473 +1333 -278.7021868853728 +1334 -278.70219029023843 +1335 -278.70219368965337 +1336 -278.70219708362663 +1337 -278.7022004721689 +1338 -278.7022038552891 +1339 -278.70220723299786 +1340 -278.7022106053037 +1341 -278.7022139722175 +1342 -278.7022173337482 +1343 -278.7022206899048 +1344 -278.702224040697 +1345 -278.7022273861362 +1346 -278.7022307262287 +1347 -278.70223406098734 +1348 -278.7022373904188 +1349 -278.70224071453435 +1350 -278.70224403334265 +1351 -278.7022473468532 +1352 -278.7022506550752 +1353 -278.7022539580182 +1354 -278.70225725569185 +1355 -278.70226054810473 +1356 -278.70226383526625 +1357 -278.7022671171862 +1358 -278.7022703938739 +1359 -278.7022736653377 +1360 -278.70227693158773 +1361 -278.7022801926323 +1362 -278.70228344848107 +1363 -278.70228669914343 +1364 -278.7022899446274 +1365 -278.70229318494376 +1366 -278.7022964200999 +1367 -278.70229965010645 +1368 -278.7023028749708 +1369 -278.7023060947028 +1370 -278.7023093093113 +1371 -278.70231251880546 +1372 -278.7023157231946 +1373 -278.7023189224863 +1374 -278.7023221166913 +1375 -278.7023253058169 +1376 -278.7023284898724 +1377 -278.70233166886715 +1378 -278.702334842809 +1379 -278.70233801170804 +1380 -278.702341175572 +1381 -278.7023443344098 +1382 -278.7023474882304 +1383 -278.7023506370432 +1384 -278.70235378085516 +1385 -278.7023569196765 +1386 -278.70236005351586 +1387 -278.7023631823806 +1388 -278.70236630628045 +1389 -278.70236942522365 +1390 -278.70237253921874 +1391 -278.7023756482745 +1392 -278.7023787523992 +1393 -278.70238185160133 +1394 -278.70238494589 +1395 -278.7023880352733 +1396 -278.7023911197592 +1397 -278.70239419935695 +1398 -278.70239727407477 +1399 -278.70240034392094 +1400 -278.70240340890336 +1401 -278.70240646903153 +1402 -278.7024095243132 +1403 -278.70241257475595 +1404 -278.7024156203692 +1405 -278.70241866116106 +1406 -278.70242169713924 +1407 -278.7024247283131 +1408 -278.7024277546899 +1409 -278.7024307762775 +1410 -278.7024337930859 +1411 -278.7024368051207 +1412 -278.7024398123934 +1413 -278.7024428149089 +1414 -278.7024458126769 +1415 -278.7024488057062 +1416 -278.70245179400365 +1417 -278.702454777577 +1418 -278.7024577564363 +1419 -278.7024607305878 +1420 -278.70246370004014 +1421 -278.7024666648012 +1422 -278.702469624879 +1423 -278.70247258028206 +1424 -278.70247553101746 +1425 -278.70247847709425 +1426 -278.7024814185191 +1427 -278.7024843553004 +1428 -278.7024872874463 +1429 -278.70249021496505 +1430 -278.7024931378634 +1431 -278.7024960561498 +1432 -278.70249896983285 +1433 -278.7025018789194 +1434 -278.702504783417 +1435 -278.70250768333415 +1436 -278.7025105786783 +1437 -278.7025134694574 +1438 -278.70251635567894 +1439 -278.7025192373513 +1440 -278.70252211448144 +1441 -278.70252498707686 +1442 -278.7025278551456 +1443 -278.7025307186953 +1444 -278.70253357773396 +1445 -278.7025364322688 +1446 -278.7025392823068 +1447 -278.7025421278572 +1448 -278.702544968926 +1449 -278.70254780552176 +1450 -278.7025506376511 +1451 -278.70255346532286 +1452 -278.7025562885431 +1453 -278.7025591073203 +1454 -278.70256192166187 +1455 -278.7025647315745 +1456 -278.7025675370666 +1457 -278.70257033814505 +1458 -278.70257313481756 +1459 -278.70257592709095 +1460 -278.70257871497296 +1461 -278.7025814984715 +1462 -278.7025842775933 +1463 -278.7025870523461 +1464 -278.70258982273674 +1465 -278.7025925887732 +1466 -278.7025953504611 +1467 -278.70259810781016 +1468 -278.70260086082624 +1469 -278.7026036095168 +1470 -278.70260635388945 +1471 -278.70260909395057 +1472 -278.70261182970813 +1473 -278.7026145611692 +1474 -278.70261728834026 +1475 -278.70262001122984 +1476 -278.70262272984377 +1477 -278.70262544419046 +1478 -278.70262815427554 +1479 -278.7026308601072 +1480 -278.7026335616925 +1481 -278.70263625903783 +1482 -278.70263895215044 +1483 -278.70264164103816 +1484 -278.7026443257077 +1485 -278.70264700616536 +1486 -278.7026496824188 +1487 -278.702652354475 +1488 -278.702655022341 +1489 -278.7026576860235 +1490 -278.70266034553003 +1491 -278.70266300086615 +1492 -278.7026656520401 +1493 -278.7026682990588 +1494 -278.7026709419281 +1495 -278.70267358065547 +1496 -278.70267621524835 +1497 -278.70267884571314 +1498 -278.7026814720568 +1499 -278.7026840942855 +1500 -278.7026867124069 +1501 -278.70268932642756 +1502 -278.7026919363538 +1503 -278.7026945421938 +1504 -278.70269714395187 +1505 -278.70269974163716 +1506 -278.7027023352555 +1507 -278.7027049248132 +1508 -278.7027075103179 +1509 -278.70271009177554 +1510 -278.7027126691935 +1511 -278.7027152425774 +1512 -278.7027178119348 +1513 -278.70272037727165 +1514 -278.7027229385953 +1515 -278.70272549591226 +1516 -278.7027280492285 +1517 -278.7027305985511 +1518 -278.70273314388766 +1519 -278.70273568524294 +1520 -278.70273822262396 +1521 -278.70274075603817 +1522 -278.70274328549147 +1523 -278.7027458109903 +1524 -278.70274833254115 +1525 -278.70275085015084 +1526 -278.7027533638256 +1527 -278.7027558735726 +1528 -278.70275837939676 +1529 -278.7027608813064 +1530 -278.7027633793067 +1531 -278.7027658734039 +1532 -278.7027683636055 +1533 -278.7027708499174 +1534 -278.7027733323461 +1535 -278.70277581089704 +1536 -278.7027782855776 +1537 -278.70278075639385 +1538 -278.7027832233523 +1539 -278.7027856864594 +1540 -278.7027881457208 +1541 -278.70279060114376 +1542 -278.70279305273374 +1543 -278.70279550049696 +1544 -278.70279794444076 +1545 -278.7028003845693 +1546 -278.70280282089146 +1547 -278.70280525341263 +1548 -278.7028076821374 +1549 -278.70281010707373 +1550 -278.702812528227 +1551 -278.7028149456038 +1552 -278.70281735920986 +1553 -278.70281976905284 +1554 -278.7028221751368 +1555 -278.70282457746885 +1556 -278.7028269760552 +1557 -278.70282937090127 +1558 -278.7028317620147 +1559 -278.7028341494003 +1560 -278.7028365330642 +1561 -278.70283891301295 +1562 -278.7028412892527 +1563 -278.7028436617885 +1564 -278.7028460306275 +1565 -278.70284839577516 +1566 -278.7028507572379 +1567 -278.70285311502187 +1568 -278.70285546913163 +1569 -278.70285781957506 +1570 -278.7028601663571 +1571 -278.7028625094832 +1572 -278.7028648489613 +1573 -278.7028671847953 +1574 -278.702869516992 +1575 -278.70287184555775 +1576 -278.7028741704968 +1577 -278.7028764918164 +1578 -278.7028788095224 +1579 -278.70288112362095 +1580 -278.7028834341171 +1581 -278.7028857410168 +1582 -278.70288804432624 +1583 -278.7028903440513 +1584 -278.7028926401975 +1585 -278.7028949327705 +1586 -278.70289722177677 +1587 -278.7028995072215 +1588 -278.70290178911085 +1589 -278.7029040674507 +1590 -278.7029063422456 +1591 -278.702908613503 +1592 -278.7029108812278 +1593 -278.70291314542544 +1594 -278.7029154061021 +1595 -278.7029176632637 +1596 -278.7029199169154 +1597 -278.70292216706264 +1598 -278.70292441371197 +1599 -278.70292665686844 +1600 -278.7029288965383 +1601 -278.70293113272606 +1602 -278.70293336543887 +1603 -278.7029355946809 +1604 -278.70293782045877 +1605 -278.70294004277804 +1606 -278.702942261643 +1607 -278.7029444770612 +1608 -278.7029466890369 +1609 -278.7029488975758 +1610 -278.7029511026842 +1611 -278.70295330436664 +1612 -278.70295550262955 +1613 -278.70295769747725 +1614 -278.70295988891684 +1615 -278.70296207695253 +1616 -278.7029642615904 +1617 -278.7029664428357 +1618 -278.7029686206945 +1619 -278.7029707951716 +1620 -278.70297296627234 +1621 -278.70297513400254 +1622 -278.70297729836795 +1623 -278.70297945937284 +1624 -278.7029816170242 +1625 -278.7029837713256 +1626 -278.7029859222848 +1627 -278.7029880699048 +1628 -278.7029902141921 +1629 -278.70299235515256 +1630 -278.70299449279105 +1631 -278.7029966271122 +1632 -278.70299875812213 +1633 -278.7030008858263 +1634 -278.7030030102298 +1635 -278.70300513133725 +1636 -278.70300724915523 +1637 -278.7030093636887 +1638 -278.70301147494166 +1639 -278.7030135829211 +1640 -278.70301568763085 +1641 -278.7030177890777 +1642 -278.7030198872659 +1643 -278.70302198220065 +1644 -278.70302407388755 +1645 -278.7030261623318 +1646 -278.70302824753753 +1647 -278.7030303295118 +1648 -278.70303240825865 +1649 -278.70303448378303 +1650 -278.7030365560911 +1651 -278.70303862518665 +1652 -278.7030406910765 +1653 -278.7030427537644 +1654 -278.70304481325684 +1655 -278.70304686955774 +1656 -278.70304892267234 +1657 -278.7030509726055 +1658 -278.7030530193641 +1659 -278.7030550629513 +1660 -278.7030571033728 +1661 -278.7030591406339 +1662 -278.7030611747398 +1663 -278.7030632056943 +1664 -278.7030652335037 +1665 -278.7030672581736 +1666 -278.70306927970745 +1667 -278.70307129811135 +1668 -278.7030733133891 +1669 -278.7030753255478 +1670 -278.70307733459026 +1671 -278.7030793405223 +1672 -278.7030813433498 +1673 -278.7030833430765 +1674 -278.7030853397077 +1675 -278.7030873332483 +1676 -278.7030893237035 +1677 -278.7030913110783 +1678 -278.70309329537713 +1679 -278.7030952766054 +1680 -278.70309725476756 +1681 -278.70309922986905 +1682 -278.70310120191374 +1683 -278.7031031709084 +1684 -278.7031051368556 +1685 -278.7031070997626 +1686 -278.7031090596323 +1687 -278.70311101647 +1688 -278.7031129702815 +1689 -278.70311492107055 +1690 -278.70311686884224 +1691 -278.7031188136015 +1692 -278.70312075535355 +1693 -278.70312269410255 +1694 -278.7031246298534 +1695 -278.70312656261115 +1696 -278.7031284923796 +1697 -278.7031304191657 +1698 -278.7031323429725 +1699 -278.7031342638043 +1700 -278.70313618166705 +1701 -278.7031380965652 +1702 -278.70314000850385 +1703 -278.7031419174861 +1704 -278.7031438235186 +1705 -278.7031457266047 +1706 -278.7031476267497 +1707 -278.70314952395864 +1708 -278.7031514182349 +1709 -278.70315330958505 +1710 -278.70315519801187 +1711 -278.7031570835211 +1712 -278.7031589661171 +1713 -278.703160845805 +1714 -278.70316272258805 +1715 -278.7031645964726 +1716 -278.70316646746176 +1717 -278.703168335561 +1718 -278.7031702007747 +1719 -278.7031720631079 +1720 -278.7031739225642 +1721 -278.7031757791492 +1722 -278.70317763286704 +1723 -278.7031794837222 +1724 -278.70318133171855 +1725 -278.7031831768621 +1726 -278.7031850191566 +1727 -278.70318685860616 +1728 -278.70318869521617 +1729 -278.7031905289904 +1730 -278.7031923599337 +1731 -278.70319418805065 +1732 -278.7031960133453 +1733 -278.7031978358231 +1734 -278.7031996554872 +1735 -278.7032014723429 +1736 -278.7032032863947 +1737 -278.70320509764707 +1738 -278.7032069061038 +1739 -278.70320871176983 +1740 -278.7032105146498 +1741 -278.70321231474765 +1742 -278.7032141120681 +1743 -278.70321590661484 +1744 -278.7032176983937 +1745 -278.7032194874074 +1746 -278.70322127366217 +1747 -278.7032230571608 +1748 -278.7032248379083 +1749 -278.7032266159085 +1750 -278.7032283911667 +1751 -278.7032301636869 +1752 -278.7032319334733 +1753 -278.7032337005298 +1754 -278.7032354648615 +1755 -278.70323722647265 +1756 -278.7032389853662 +1757 -278.7032407415487 +1758 -278.70324249502244 +1759 -278.70324424579326 +1760 -278.7032459938642 +1761 -278.70324773924034 +1762 -278.70324948192587 +1763 -278.7032512219248 +1764 -278.7032529592407 +1765 -278.703254693879 +1766 -278.70325642584334 +1767 -278.70325815513814 +1768 -278.7032598817678 +1769 -278.70326160573643 +1770 -278.70326332704786 +1771 -278.70326504570664 +1772 -278.70326676171646 +1773 -278.7032684750828 +1774 -278.70327018580804 +1775 -278.7032718938977 +1776 -278.7032735993553 +1777 -278.70327530218543 +1778 -278.70327700239164 +1779 -278.70327869997936 +1780 -278.70328039495155 +1781 -278.70328208731223 +1782 -278.703283777066 +1783 -278.70328546421706 +1784 -278.7032871487692 +1785 -278.7032888307266 +1786 -278.7032905100937 +1787 -278.7032921868744 +1788 -278.7032938610721 +1789 -278.70329553269175 +1790 -278.7032972017376 +1791 -278.7032988682126 +1792 -278.7033005321221 +1793 -278.70330219346937 +1794 -278.7033038522588 +1795 -278.70330550849405 +1796 -278.70330716217967 +1797 -278.70330881331887 +1798 -278.70331046191575 +1799 -278.703312107976 +1800 -278.70331375150107 +1801 -278.7033153924972 +1802 -278.7033170309664 +1803 -278.7033186669143 +1804 -278.70332030034467 +1805 -278.70332193126 +1806 -278.70332355966605 +1807 -278.7033251855656 +1808 -278.70332680896354 +1809 -278.7033284298629 +1810 -278.70333004826824 +1811 -278.70333166418305 +1812 -278.70333327761097 +1813 -278.70333488855783 +1814 -278.7033364970244 +1815 -278.70333810301724 +1816 -278.7033397065402 +1817 -278.7033413075948 +1818 -278.7033429061869 +1819 -278.70334450232014 +1820 -278.70334609599803 +1821 -278.7033476872241 +1822 -278.70334927600334 +1823 -278.7033508623388 +1824 -278.703352446234 +1825 -278.70335402769314 +1826 -278.7033556067205 +1827 -278.7033571833199 +1828 -278.7033587574942 +1829 -278.70336032924797 +1830 -278.703361898585 +1831 -278.70336346550835 +1832 -278.7033650300236 +1833 -278.7033665921324 +1834 -278.70336815184015 +1835 -278.7033697091494 +1836 -278.7033712640649 +1837 -278.70337281658965 +1838 -278.70337436672804 +1839 -278.70337591448316 +1840 -278.7033774598595 +1841 -278.70337900286086 +1842 -278.7033805434892 +1843 -278.7033820817506 +1844 -278.7033836176482 +1845 -278.70338515118505 +1846 -278.70338668236445 +1847 -278.703388211191 +1848 -278.70338973766815 +1849 -278.70339126179977 +1850 -278.7033927835895 +1851 -278.70339430304085 +1852 -278.70339582015737 +1853 -278.7033973349425 +1854 -278.70339884740065 +1855 -278.7034003575351 +1856 -278.7034018653501 +1857 -278.70340337084787 +1858 -278.70340487403297 +1859 -278.7034063749093 +1860 -278.7034078734798 +1861 -278.70340936974844 +1862 -278.7034108637189 +1863 -278.7034123553945 +1864 -278.703413844779 +1865 -278.7034153318767 +1866 -278.7034168166898 +1867 -278.70341829922296 +1868 -278.7034197794789 +1869 -278.70342125746254 +1870 -278.70342273317556 +1871 -278.70342420662314 +1872 -278.7034256778085 +1873 -278.7034271467338 +1874 -278.7034286134047 +1875 -278.7034300778237 +1876 -278.7034315399943 +1877 -278.70343299992004 +1878 -278.7034344576039 +1879 -278.70343591305067 +1880 -278.70343736626336 +1881 -278.70343881724443 +1882 -278.7034402659993 +1883 -278.70344171252947 +1884 -278.70344315683974 +1885 -278.70344459893295 +1886 -278.70344603881347 +1887 -278.70344747648363 +1888 -278.703448911947 +1889 -278.70345034520784 +1890 -278.7034517762687 +1891 -278.70345320513405 +1892 -278.70345463180723 +1893 -278.70345605629063 +1894 -278.7034574785878 +1895 -278.703458898703 +1896 -278.70346031663945 +1897 -278.70346173240034 +1898 -278.7034631459891 +1899 -278.70346455740844 +1900 -278.70346596666343 +1901 -278.7034673737565 +1902 -278.7034687786907 +1903 -278.70347018146924 +1904 -278.7034715820971 +1905 -278.70347298057584 +1906 -278.7034743769092 +1907 -278.7034757711012 +1908 -278.7034771631547 +1909 -278.70347855307375 +1910 -278.70347994086035 +1911 -278.7034813265187 +1912 -278.7034827100529 +1913 -278.7034840914647 +1914 -278.70348547075776 +1915 -278.7034868479366 +1916 -278.70348822300264 +1917 -278.70348959596083 +1918 -278.70349096681423 +1919 -278.7034923355657 +1920 -278.703493702218 +1921 -278.7034950667747 +1922 -278.70349642924026 +1923 -278.7034977896169 +1924 -278.70349914790785 +1925 -278.7035005041169 +1926 -278.70350185824617 +1927 -278.70350321030037 +1928 -278.7035045602814 +1929 -278.70350590819385 +1930 -278.70350725404006 +1931 -278.70350859782343 +1932 -278.70350993954713 +1933 -278.7035112792146 +1934 -278.7035126168291 +1935 -278.703513952393 +1936 -278.7035152859109 +1937 -278.70351661738476 +1938 -278.7035179468182 +1939 -278.70351927421507 +1940 -278.7035205995774 +1941 -278.70352192290903 +1942 -278.70352324421276 +1943 -278.70352456349235 +1944 -278.70352588075116 +1945 -278.7035271959913 +1946 -278.7035285092159 +1947 -278.7035298204286 +1948 -278.7035311296336 +1949 -278.7035324368328 +1950 -278.70353374202887 +1951 -278.70353504522586 +1952 -278.7035363464264 +1953 -278.7035376456342 +1954 -278.7035389428516 +1955 -278.70354023808244 +1956 -278.70354153132917 +1957 -278.703542822595 +1958 -278.70354411188384 +1959 -278.70354539919833 +1960 -278.7035466845406 +1961 -278.7035479679146 +1962 -278.70354924932377 +1963 -278.7035505287699 +1964 -278.70355180625745 +1965 -278.7035530817886 +1966 -278.7035543553667 +1967 -278.7035556269951 +1968 -278.7035568966758 +1969 -278.7035581644131 +1970 -278.70355943020905 +1971 -278.70356069406745 +1972 -278.70356195599066 +1973 -278.7035632159821 +1974 -278.7035644740445 +1975 -278.7035657301812 +1976 -278.70356698439537 +1977 -278.7035682366891 +1978 -278.7035694870665 +1979 -278.7035707355292 +1980 -278.7035719820819 +1981 -278.70357322672544 +1982 -278.70357446946497 +1983 -278.70357571030263 +1984 -278.7035769492407 +1985 -278.70357818628236 +1986 -278.7035794214315 +1987 -278.70358065469054 +1988 -278.7035818860622 +1989 -278.7035831155493 +1990 -278.70358434315455 +1991 -278.7035855688823 +1992 -278.70358679273426 +1993 -278.70358801471355 +1994 -278.70358923482337 +1995 -278.70359045306583 +1996 -278.70359166944496 +1997 -278.70359288396276 +1998 -278.703594096623 +1999 -278.7035953074276 +2000 -278.7035965163802 diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/log.log b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/log.log index b615b41c..9f70e255 100644 --- a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/log.log +++ b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/log.log @@ -1,4 +1,4 @@ -2024-01-14T19:02:20.667 +2024-01-14T19:40:36.751 == Config == TAG: v4_infra STLCGenerationParams(true, 5, 2) @@ -7,4 +7,28 @@ EPOCHS: 2000 LEARNING_RATE: 0.03 DistNat: DistUInt32 -Building computation graph... +Building generation computation graph... + 17.73495736 seconds + +Building generation loss computation graph... + 246.007870148 seconds + +Initial adnodes_of_interest: +Dict("tysz2_gen_type_tbool" => 0.5, "sz4_succ_var" => 0.5, "tysz1_gen_type_tbool" => 0.5, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.5, "sz4_succ_abs" => 0.5, "sz5_succ_var" => 0.5, "sz5_succ_abs" => 0.5, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5, "sz1_succ_app" => 0.5, "sz1_succ_abs" => 0.5, "sz3_succ_abs" => 0.5, "sz3_succ_app" => 0.5, "sz5_succ_app" => 0.5, "sz4_succ_app" => 0.5, "sz2_succ_abs" => 0.5, "sz3_succ_var" => 0.5) +Saving samples... +Saved samples to examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/terms_before.txt. + 107.217707535 seconds + +Initial loss: -268.9974234499506 + +Training... + 177.329861307 seconds + +Final loss: -278.7035965163802 + +Learned adnodes_of_interest: +Dict("tysz2_gen_type_tbool" => 0.6406501979548712, "sz4_succ_var" => 0.6674255144274396, "tysz1_gen_type_tbool" => 0.5518244186781357, "sz0_zero_pr_var2" => 0.6074364937924714, "sz2_succ_app" => 0.29247488413020517, "sz4_succ_abs" => 0.46214510333327624, "sz5_succ_var" => 0.5, "sz5_succ_abs" => 0.6296817679421843, "sz2_succ_var" => 0.6924425693295808, "sz1_succ_var" => 0.6690399301775135, "sz1_succ_app" => 0.3164272452618666, "sz1_succ_abs" => 0.44933794966818746, "sz3_succ_abs" => 0.43541600818707565, "sz3_succ_app" => 0.2995197540262324, "sz5_succ_app" => 0.3278028860562152, "sz4_succ_app" => 0.30132673109175784, "sz2_succ_abs" => 0.42233005579465055, "sz3_succ_var" => 0.6824377595027068) +Saving samples... +Saved samples to examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/terms_trained.txt. + 110.290220352 seconds + diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/terms_before.txt b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/terms_before.txt new file mode 100644 index 00000000..742995a5 --- /dev/null +++ b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/terms_before.txt @@ -0,0 +1,200 @@ +true +λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. λa:Bool. false) ((λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool. λz:Bool. false)) ((λy:Bool. false) true) ((λy:Bool. λz:(Bool -> Bool) -> Bool. true) false ((λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. false) x ((λy:Bool. λz:Bool -> Bool. false) x))) +(λx:(Bool -> Bool) -> Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. (λz:Bool -> Bool. false) (λz:Bool. true)) (λx:Bool -> Bool. false)) +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. y true) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) false ((λx:Bool. λy:Bool -> Bool. true) true) ((λx:Bool. false) true)) ((λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. true) false) ((λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false))))) +(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λy:Bool -> Bool. λz:Bool. true)) ((λx:Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. false) true ((λx:Bool. λy:Bool. true) true)) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. x) ((λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) true ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. true)))) (λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. false) x (λy:Bool -> Bool. λz:Bool. false)) +false +(λx:Bool -> Bool -> Bool. λy:Bool. y) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. true) (λx:Bool -> Bool. true) false ((λx:Bool. false) false)) false +λx:Bool. (λy:Bool. λz:Bool. λw:Bool. true) false x +true +(λx:Bool. x) ((λx:Bool. λy:Bool -> Bool -> Bool. true) false (λx:Bool. (λy:Bool. λz:Bool. true) x)) +λx:Bool -> Bool. λy:Bool. (λz:Bool. λw:Bool -> Bool. λa:Bool. true) false ((λz:Bool. λw:Bool. true) true) y +false +(λx:(Bool -> Bool) -> Bool. (λy:Bool. (λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) (λz:Bool. λw:Bool. true)) ((λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. false) (λy:Bool. λz:Bool. false) (λy:Bool -> Bool. false))) (λx:Bool -> Bool. false) +(λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:(Bool -> Bool) -> Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false)) (λx:Bool. (λy:Bool. λz:Bool. false) true)) (λx:Bool -> Bool. (λy:Bool. x) false) +(λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) ((λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λy:Bool. λz:Bool. false) true)) (λx:Bool. true) +(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. λa:Bool -> Bool. λb:Bool. true) x ((λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. true)) (λy:Bool -> Bool. x false)) ((λx:Bool. λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. λa:Bool. λb:Bool. true) false ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false)) false ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) true (λx:Bool -> Bool. x))) +λx:Bool -> Bool. λy:Bool. true +λx:Bool -> Bool. λy:Bool. y +(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. true) true) ((λx:Bool. λy:Bool -> Bool. false) ((λx:Bool. true) true)) true (λx:Bool -> Bool. x) +(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) x) ((λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) true) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool. true)) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) true ((λx:Bool. λy:Bool -> Bool. false) false) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false)))) +false +λx:Bool. true +(λx:Bool -> Bool. λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. λa:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. false) false ((λx:Bool. x) false) ((λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. true) false) ((λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. true) (λx:Bool. false) ((λx:Bool. true) false))) (λx:Bool -> Bool. (λy:Bool. λz:Bool. true) true) +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false) false (λy:Bool. y) (λy:Bool. y) +true +(λx:Bool. λy:Bool -> Bool. (λz:Bool -> Bool. x) ((λz:Bool. λw:Bool. false) x)) false +true +false +true +false +false +(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. false)) ((λx:(Bool -> Bool) -> Bool. false) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. true) true (λx:Bool -> Bool. false))) ((λx:Bool. (λy:Bool. false) ((λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. false))) true) +true +true +true +(λx:(Bool -> Bool) -> Bool. λy:Bool. false) (λx:Bool -> Bool. (λy:Bool. λz:Bool -> Bool. true) true (λy:Bool. y)) true +true +λx:Bool. false +(λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool -> Bool. (λz:(Bool -> Bool) -> Bool -> Bool. true) (λz:Bool -> Bool. λw:Bool. true)) ((λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. true))) ((λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. false)) (λx:Bool. false) (λx:Bool. true)) +false +true +false +(λx:Bool. true) true +true +false +λx:Bool. (λy:Bool. true) ((λy:Bool -> Bool. false) ((λy:Bool. λz:Bool -> Bool. λw:Bool. true) x (λy:Bool. x))) +false +λx:Bool. (λy:Bool. (λz:Bool. λw:Bool. λa:Bool. false) y ((λz:Bool. true) y)) false +(λx:Bool. λy:Bool. (λz:Bool. λw:Bool. false) false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) true +(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. λw:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. true) true) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. true) (λx:Bool. λy:Bool. false) true ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false))) (λx:Bool -> Bool. λy:Bool. (λz:Bool. y) (x y)) +false +λx:Bool. λy:Bool. false +true +λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. z) (λy:Bool -> Bool. (λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) (λz:Bool -> Bool. λw:Bool. false) y) +(λx:Bool -> Bool -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. λa:Bool -> Bool. false) false (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool. λy:Bool. x)) (λx:Bool. true) +true +(λx:Bool -> Bool -> Bool. λy:Bool. (λz:Bool -> Bool. λw:(Bool -> Bool) -> Bool. true) (λz:Bool. false) ((λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. false) (λz:Bool -> Bool. false))) ((λx:Bool. (λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. true) x) false ((λx:Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. false) true ((λx:Bool. λy:Bool. false) true) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true))))) +false +false +λx:Bool -> Bool. x +(λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool. λz:Bool -> Bool. y) ((λy:(Bool -> Bool) -> Bool. λz:Bool. true) x)) (λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. false) ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. λa:Bool. true) (λy:Bool -> Bool. λz:Bool. false) ((λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. true)))) +λx:Bool -> Bool. x +λx:Bool. true +false +(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. (λy:Bool -> Bool. λz:Bool -> Bool -> Bool. false) (λy:Bool. false) (λy:Bool. λz:Bool. false)) false +(λx:Bool. false) false +true +false +λx:Bool -> Bool. λy:Bool. true +(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. λa:Bool -> Bool. λb:Bool. false) false) ((λx:Bool. x) false) ((λx:Bool. λy:Bool. λz:Bool. true) false false false) false +false +(λx:Bool. (λy:Bool -> Bool. λz:Bool -> Bool. x) ((λy:Bool. λz:Bool. λw:Bool. true) x false)) true +(λx:Bool. (λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool -> Bool. true) x) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) ((λx:Bool. λy:Bool. λz:Bool. λw:Bool. false) ((λx:Bool. false) true) true) ((λx:Bool -> Bool -> Bool. λy:Bool. x) (λx:Bool. λy:Bool. y) ((λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. true)) true)) +(λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. true) ((λx:Bool. λy:Bool. true) true ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true))) ((λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. false) (λy:Bool. λz:Bool. true)) true) ((λx:Bool. λy:Bool. (λz:(Bool -> Bool) -> Bool. λw:Bool. false) (λz:Bool -> Bool. false)) false) +false +(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. x) ((λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. x)))) +false +λx:Bool -> Bool. (λy:Bool. false) ((λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. true) (λy:Bool -> Bool. false) ((λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. false)) x) +true +(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. true) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) (λx:Bool -> Bool. true) +(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. λa:Bool. false) (λx:Bool. λy:Bool. false) true ((λx:Bool. (λy:Bool. λz:Bool. false) x) false) true +false +(λx:Bool. true) false +(λx:Bool -> Bool. true) ((λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) ((λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool. λz:Bool. true))) false) +false +true +(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool -> Bool. true) ((λy:Bool. λz:Bool. λw:Bool. true) false) (λy:Bool. x)) ((λx:Bool. (λy:Bool. y) ((λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. false))) true) +(λx:Bool. true) ((λx:Bool. (λy:Bool. λz:Bool. false) true x) true) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool. false) (λx:Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. false)) (λx:Bool. true) true +(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. false) true ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. true))) (λx:Bool -> Bool. (λy:Bool. λz:Bool -> Bool. true) false x) (λx:Bool. false) +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. false) ((λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. false)) true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool -> Bool. λa:Bool -> Bool. λb:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. true)) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false)) ((λx:Bool. λy:Bool. λz:Bool. true) false)) +(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) false ((λx:Bool -> Bool. (λy:Bool. false) false) ((λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) true)) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. (λz:Bool -> Bool. λw:Bool. true) (λz:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false)) true)) +λx:Bool -> Bool. λy:Bool. false +(λx:Bool -> Bool. λy:Bool -> Bool -> Bool. (λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. true) (λz:Bool -> Bool. true)) ((λx:Bool. (λy:Bool. λz:Bool. true) true) true) ((λx:Bool. λy:Bool. λz:Bool. x) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. true) (λx:Bool -> Bool. true) ((λx:Bool. true) false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. true) true))) +(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool -> Bool. λa:Bool. λb:Bool. λc:Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool. true) true) true (λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. λz:Bool. true) ((λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. false))) true +true +(λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. λa:Bool. true) (λy:Bool -> Bool. true) x ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) (λy:Bool -> Bool. λz:Bool. true) x)) false +(λx:Bool. λy:Bool. λz:Bool. (λw:Bool. false) y) ((λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. true) ((λy:Bool -> Bool. false) x)) (λx:Bool. x)) +(λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. λa:Bool. λb:Bool. λc:Bool. true) true ((λx:Bool -> Bool. true) (λx:Bool. true)) ((λx:Bool. λy:Bool. λz:Bool. true) true ((λx:Bool. true) true)) false ((λx:Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. false) (λx:Bool. true) true (λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. false) true ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. true) true))) +(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. (λz:Bool. false) false) (λx:Bool. λy:Bool. (λz:Bool -> Bool -> Bool. true) (λz:Bool. λw:Bool. true)) (λx:Bool -> Bool. λy:Bool. true) +true +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. λa:Bool. true) ((λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. false)) ((λy:Bool. λz:Bool -> Bool. λw:Bool. true) x)) true +(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:(Bool -> Bool) -> Bool. true) (λy:Bool. λz:Bool. false)) false false (λx:Bool -> Bool. false) +(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) (λx:Bool. x) true +(λx:Bool. (λy:(Bool -> Bool) -> Bool. x) (λy:Bool -> Bool. x)) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool. true) true) ((λx:(Bool -> Bool) -> Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true))) ((λx:Bool. λy:Bool -> Bool. y) ((λx:Bool -> Bool. false) (λx:Bool. true)))) +λx:Bool -> Bool. λy:Bool. y +(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. λa:Bool. true) x) ((λx:Bool. x) false) ((λx:Bool. false) false) +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. x) ((λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. true) true x)) (λx:Bool -> Bool. (λy:Bool. (λz:Bool -> Bool -> Bool. λw:Bool. false) (λz:Bool. λw:Bool. true)) false) +(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. x) true ((λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool. x) (λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true)))) +(λx:Bool -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:(Bool -> Bool) -> Bool -> Bool. λa:Bool -> Bool. false) (λx:Bool. x) (λx:Bool. (λy:Bool. λz:Bool. false) x) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. false) ((λy:Bool. λz:Bool -> Bool. true) true)) ((λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) x) false ((λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. false) true ((λx:(Bool -> Bool) -> Bool. λy:Bool. false) (λx:Bool -> Bool. true))))) +(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. λa:Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool. λy:Bool. λz:Bool. true) ((λx:Bool. false) true)) true ((λx:Bool. true) false) +(λx:Bool. λy:Bool -> Bool -> Bool. (λz:(Bool -> Bool) -> Bool. true) (λz:Bool -> Bool. false)) true (λx:Bool. (λy:Bool -> Bool. y) ((λy:Bool. λz:Bool. true) ((λy:Bool. true) true))) +λx:Bool -> Bool. (λy:Bool. λz:Bool. (λw:Bool -> Bool. false) (λw:Bool. true)) true +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. (λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. true) (λz:Bool. λw:Bool. false)) (λy:Bool -> Bool. y)) true +false +(λx:Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. λb:Bool. false) (λx:Bool. x) false true ((λx:Bool -> Bool. (λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool. true) ((λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool. λz:Bool. true))) ((λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) true)) +λx:Bool. x +λx:Bool -> Bool. x true +(λx:Bool. (λy:Bool. false) false) false +(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) (λy:Bool. true) ((λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. true)) true) (λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. false) ((λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. false)) ((λy:Bool -> Bool. λz:Bool. true) ((λy:Bool. λz:Bool. true) x))) +(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) (λy:Bool. false) ((λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. false))) ((λx:Bool. λy:Bool. λz:Bool. true) ((λx:Bool. true) false)) ((λx:Bool. λy:Bool -> Bool -> Bool. true) true ((λx:Bool. λy:Bool. λz:Bool. false) true)) +λx:Bool. λy:Bool. y +λx:Bool -> Bool. (λy:Bool. (λz:Bool. λw:Bool. false) y y) ((λy:Bool -> Bool -> Bool. true) (λy:Bool. x)) +λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. y) ((λy:Bool. λz:Bool -> Bool. false) false (λy:Bool. y)) ((λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool -> Bool. true) x ((λy:Bool. λz:Bool -> Bool. false) false) ((λy:Bool. x) ((λy:Bool. true) x))) +(λx:Bool. λy:Bool. x) false +false +(λx:Bool. (λy:Bool. λz:Bool -> Bool. false) x (λy:Bool. (λz:(Bool -> Bool) -> Bool -> Bool. true) (λz:Bool -> Bool. λw:Bool. false))) true +(λx:(Bool -> Bool) -> Bool -> Bool. x) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. false)) true) +true +(λx:Bool. (λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. λa:Bool -> Bool. λb:Bool. true) x) ((λx:Bool -> Bool. false) (λx:Bool. true)) ((λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false))) (λx:Bool -> Bool. x) +(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. λa:Bool. true) x ((λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. true))) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. false) false ((λx:Bool -> Bool. true) (λx:Bool. false))) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. true) false (λx:Bool -> Bool. true) true) +(λx:Bool -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:(Bool -> Bool) -> Bool. λa:Bool. λb:Bool -> Bool. false) (λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool -> Bool. x) (λx:Bool -> Bool. x ((λy:Bool -> Bool. false) (λy:Bool. false))) ((λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. λz:Bool. false)) (λx:Bool. λy:Bool. x) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. true) false ((λx:Bool -> Bool. true) (λx:Bool. true)) ((λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. true) true (λx:Bool. λy:Bool. true)))) +(λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool -> Bool. λa:Bool. false) false ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true)) (λx:Bool. (λy:Bool. λz:Bool. true) true) (λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool. λz:Bool. false) (λy:Bool. false)) ((λx:Bool -> Bool. false) (λx:Bool. x)) +true +(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. λa:Bool. true) true ((λx:Bool. λy:Bool. λz:Bool. true) false) false ((λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool. false) true) ((λx:Bool -> Bool. λy:Bool -> Bool -> Bool. true) (λx:Bool. true) (λx:Bool. λy:Bool. false))) false +λx:Bool -> Bool. false +λx:Bool -> Bool. λy:Bool. (λz:Bool. z) (x false) +true +true +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool -> Bool. λa:Bool -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false)) true (λx:Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. y) (λx:Bool. λy:Bool. (λz:Bool -> Bool -> Bool. false) (λz:Bool. λw:Bool. false))) +true +(λx:Bool. λy:Bool -> Bool. (λz:Bool. λw:Bool. true) x) false +true +(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. λa:Bool. true) (λy:Bool -> Bool. λz:Bool. false) ((λy:Bool. λz:Bool. false) x)) ((λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. true)) ((λx:Bool. x) ((λx:Bool. false) false)) (λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. false) true ((λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool. false)))) +(λx:(Bool -> Bool) -> Bool. λy:Bool. (λz:Bool -> Bool. λw:Bool -> Bool -> Bool. λa:Bool. true) (λz:Bool. false) ((λz:Bool. λw:Bool. λa:Bool. true) false)) ((λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. true) ((λx:Bool. x) true) ((λx:Bool. λy:Bool. y) false)) +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool. λa:Bool. false) (λx:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false)) false ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false))) ((λx:Bool. x) false) +λx:Bool -> Bool. x +false +λx:Bool -> Bool. λy:Bool. (λz:(Bool -> Bool) -> Bool. y) (λz:Bool -> Bool. (λw:(Bool -> Bool) -> Bool. false) (λw:Bool -> Bool. true)) +false +true +true +(λx:Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool. false) true (λy:Bool. false)) (λx:Bool -> Bool. x)) +(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. true) (λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) x ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. true))) ((λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. x) false)) +false +λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. (λw:(Bool -> Bool) -> Bool. false) (λw:Bool -> Bool. false)) (λy:Bool -> Bool. x) +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. (λz:Bool. λw:Bool -> Bool -> Bool. true) true (λz:Bool. x)) ((λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. true) (λy:Bool. λz:Bool. true) true) +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. (λz:(Bool -> Bool) -> Bool. λw:Bool. false) (λz:Bool -> Bool. true)) ((λx:Bool. λy:Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) true ((λx:(Bool -> Bool) -> Bool. λy:Bool. false) (λx:Bool -> Bool. true)) true)) +λx:Bool. λy:Bool. (λz:Bool. (λw:(Bool -> Bool) -> Bool -> Bool. true) (λw:Bool -> Bool. λa:Bool. true)) y +true +λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. true) ((λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. true) x ((λy:Bool. λz:Bool. λw:Bool. true) false)) false +(λx:Bool. (λy:(Bool -> Bool) -> Bool. (λz:Bool. false) x) (λy:Bool -> Bool. y true)) false +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. λa:Bool -> Bool. λb:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. true) (λx:Bool -> Bool. false)) ((λx:Bool. x) true) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) ((λx:Bool. λy:Bool. λz:Bool. false) false false) ((λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) (λx:Bool. false))) +false +false +(λx:Bool. λy:Bool. λz:Bool -> Bool. true) true ((λx:Bool. (λy:(Bool -> Bool) -> Bool. false) ((λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool. λz:Bool. true))) true) +λx:Bool -> Bool. (λy:Bool. (λz:Bool. λw:Bool. λa:Bool. true) true true) ((λy:Bool. λz:Bool. true) ((λy:Bool -> Bool. false) x) true) +λx:Bool. (λy:Bool. (λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. true) (λz:Bool -> Bool. true) x) false +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool. λz:Bool. λw:(Bool -> Bool) -> Bool. true) (λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. λy:Bool. true))) ((λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. true)) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. false) false (λx:Bool -> Bool. false))) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. λa:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. false)) ((λx:Bool. x) ((λx:Bool. true) false)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. true) true) (λx:Bool -> Bool. x))) +(λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. false) (λy:Bool -> Bool. true) ((λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool. λz:Bool. true)) ((λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. true) ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. true)))) ((λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. false) true true ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false))) false) +(λx:Bool. λy:Bool -> Bool -> Bool. x) false (λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool. false)) +false +(λx:Bool -> Bool. (λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λy:Bool. false)) (λx:Bool. x) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. true)) false +false +true +(λx:Bool -> Bool. (λy:Bool. (λz:Bool -> Bool -> Bool. false) (λz:Bool. λw:Bool. false)) false) (λx:Bool. false) +true +λx:Bool -> Bool. (λy:Bool. y) ((λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) (λy:Bool -> Bool. λz:Bool. z)) +false +λx:Bool. x +false +λx:Bool -> Bool. x +(λx:Bool -> Bool. false) (λx:Bool. x) +λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. (λz:Bool -> Bool -> Bool. λw:Bool -> Bool. true) (λz:Bool. λw:Bool. false)) ((λy:Bool. λz:Bool -> Bool. λw:Bool. false) x) ((λy:Bool -> Bool. λz:Bool. x) ((λy:Bool. λz:Bool. λw:Bool. true) x true)) +λx:Bool. λy:Bool. x +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool -> Bool. true) ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) x)) ((λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) ((λx:Bool. false) false) true ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) true (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool -> Bool. false) false (λx:Bool. λy:Bool. false)))) +true +(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. λa:(Bool -> Bool) -> Bool. λb:Bool. false) false ((λx:Bool. true) false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. x)) false ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool. false) false true)) +λx:Bool -> Bool. λy:Bool. (λz:Bool. (λw:Bool. false) false) true +(λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. false) ((λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) x) (λy:Bool. (λz:(Bool -> Bool) -> Bool. λw:Bool. true) (λz:Bool -> Bool. true))) (λx:Bool. true) +(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. false) false) (λx:Bool -> Bool. λy:Bool. y)) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. true) ((λy:Bool. λz:Bool -> Bool. false) false) false) +false +(λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false) (λx:Bool. x) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. (λy:Bool. false) false))) +(λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. x)) (λx:Bool. false) +true +false +true +false +(λx:Bool. λy:Bool -> Bool. (λz:Bool -> Bool. z) (λz:Bool. x)) ((λx:(Bool -> Bool) -> Bool. false) ((λx:Bool. λy:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) false ((λx:Bool. true) true)))) +(λx:Bool. (λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool. λz:Bool. false)) false ((λx:Bool -> Bool. (λy:Bool. λz:Bool -> Bool. true) false) (λx:Bool. x)) (λx:Bool -> Bool. λy:Bool. true) diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/terms_trained.txt b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/terms_trained.txt new file mode 100644 index 00000000..50184d7c --- /dev/null +++ b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/terms_trained.txt @@ -0,0 +1,200 @@ +(λx:Bool. λy:Bool. (λz:Bool. true) y) false ((λx:Bool. x) false) +(λx:Bool -> Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool. λa:Bool. false) true false) ((λx:Bool. λy:Bool. λz:Bool. true) false) false +(λx:Bool. λy:Bool. λz:Bool. z) ((λx:Bool. true) false) +false +(λx:Bool. (λy:Bool. λz:Bool -> Bool. true) x) false (λx:Bool. (λy:Bool. λz:Bool. false) false x) +λx:Bool -> Bool. true +true +true +(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool. λw:Bool. λa:Bool. false) false) (λx:Bool -> Bool. true) false ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:Bool. λy:Bool. false) false) (λx:Bool. false) ((λx:Bool. x) false)) +false +true +(λx:Bool -> Bool -> Bool. (λy:Bool. false) false) (λx:Bool. λy:Bool. y) +λx:Bool. false +(λx:Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool -> Bool. false) false false true true +true +(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false)) ((λx:Bool. true) ((λx:Bool. x) ((λx:Bool. false) true))) true +(λx:Bool. λy:Bool. x) false true +(λx:(Bool -> Bool) -> Bool. λy:Bool. y) ((λx:Bool. λy:Bool -> Bool. x) true) +(λx:Bool. λy:Bool. x) true false +(λx:Bool. λy:Bool. y) false +true +λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. true) x ((λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool -> Bool. true) false (λy:Bool -> Bool. x) true) +false +(λx:Bool. x) ((λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. false) false)) +true +λx:Bool. true +false +(λx:Bool. x) ((λx:Bool -> Bool -> Bool. (λy:Bool -> Bool. λz:Bool. false) (λy:Bool. true) ((λy:Bool. false) false)) (λx:Bool. λy:Bool. true)) +false +(λx:Bool. λy:Bool -> Bool. true) ((λx:Bool. true) false) +false +(λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. x false) +true +false +(λx:Bool -> Bool. λy:Bool -> Bool. (λz:Bool. λw:Bool. true) true ((λz:Bool. true) true)) (λx:Bool. x) +(λx:Bool. true) true +(λx:Bool. x) true +true +true +λx:Bool -> Bool. true +(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. λa:Bool. false) x) false false false +λx:Bool -> Bool. (λy:Bool -> Bool. (λz:Bool. λw:(Bool -> Bool) -> Bool. true) false (λz:Bool -> Bool. true)) x +λx:Bool -> Bool. (λy:Bool. (λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. λa:Bool. true) (λz:Bool -> Bool. true) (λz:Bool. false)) true +(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. true) x) false +(λx:Bool. λy:Bool. y) true +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. (λz:Bool. false) true) (λx:Bool. λy:Bool. (λz:Bool -> Bool -> Bool. false) (λz:Bool. λw:Bool. false)) (λx:Bool. λy:Bool. (λz:(Bool -> Bool) -> Bool -> Bool. x) ((λz:Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) (λz:Bool. false))) +true +(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) false) ((λx:Bool. (λy:Bool. λz:Bool -> Bool. false) true) true) (λx:Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool. true) ((λy:Bool -> Bool. λz:Bool. true) (λy:Bool. false)) true) +false +(λx:Bool. false) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. x)) +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. true)) (λx:Bool -> Bool. x) ((λx:Bool. (λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) false x) ((λx:Bool. false) true)) +false +(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. true)) ((λx:Bool. λy:Bool. false) ((λx:Bool. false) false) ((λx:Bool. x) true)) true +λx:Bool. (λy:Bool. λz:Bool. y) true true +true +(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λx:Bool -> Bool. true) (λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. true) (λx:Bool. x))) true +true +(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. λa:Bool -> Bool. λb:Bool. false) true ((λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. false))) true ((λx:Bool. x) false) +(λx:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. y) ((λx:Bool. λy:Bool -> Bool. true) true) true) +(λx:Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool -> Bool. λb:Bool. true) false ((λx:Bool. λy:Bool. λz:Bool. false) false) (λx:Bool -> Bool. true) true (λx:Bool. x) +λx:Bool -> Bool. (λy:Bool. x) ((λy:Bool. y) (x false)) false +λx:Bool. true +(λx:Bool. λy:Bool. λz:Bool. false) false +λx:Bool -> Bool. true +false +false +(λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. λb:Bool. true) (λy:Bool -> Bool. true) x (λy:Bool. (λz:Bool. false) x)) ((λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool -> Bool. true)) (λx:Bool -> Bool. x) true) +λx:Bool -> Bool. false +false +true +λx:Bool -> Bool. λy:Bool. y +λx:Bool. x +(λx:Bool -> Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool. λa:Bool. false) x) (λx:Bool. false) true +true +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool -> Bool. λa:Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) true ((λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool. true) true) (λx:Bool -> Bool. (λy:Bool. λz:Bool. false) true)) false +true +(λx:Bool. λy:Bool. false) true +true +false +false +false +false +true +λx:Bool. λy:Bool. x +false +(λx:Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. λb:Bool. true) true true true ((λx:Bool -> Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool. false) true)) true +false +false +λx:Bool. false +λx:Bool. (λy:Bool -> Bool -> Bool. y x) (λy:Bool. (λz:Bool. λw:Bool. true) true) +false +false +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false) false true (λx:Bool -> Bool. λy:Bool. false) +false +false +false +false +false +(λx:Bool. (λy:Bool -> Bool -> Bool. y) ((λy:Bool. λz:Bool. λw:Bool. λa:Bool. false) x ((λy:Bool. false) x))) true +λx:Bool. (λy:Bool -> Bool. y) ((λy:Bool. (λz:Bool. λw:Bool. false) true) x) +true +(λx:Bool. λy:Bool -> Bool. λz:Bool. x) ((λx:Bool -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) false) (λx:Bool. (λy:Bool. false) true) ((λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. true) false) false)) +(λx:Bool. (λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool -> Bool. false) x) ((λx:Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool. true) true)) (λx:Bool. λy:Bool. y) false +(λx:Bool. x) true +(λx:Bool. (λy:Bool -> Bool -> Bool. (λz:Bool. false) x) (λy:Bool. λz:Bool. true)) false +(λx:(Bool -> Bool) -> Bool. x) (λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. true)) ((λx:Bool. λy:Bool. false) true false) false) +λx:Bool -> Bool. x +false +λx:Bool. λy:Bool. x +false +false +true +false +(λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. false)) ((λx:Bool. true) false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. false) (λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) false)) ((λx:Bool. x) false) +false +(λx:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true) (λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) false ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. λy:Bool. false)) ((λx:Bool -> Bool. true) (λx:Bool. false)))) +λx:Bool. λy:Bool. y +λx:Bool -> Bool. false +(λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) false true (λx:Bool. x) false) +λx:Bool. x +λx:Bool. λy:Bool. (λz:Bool -> Bool. true) (λz:Bool. x) +λx:Bool. x +(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. (λw:Bool. false) false) (λx:Bool -> Bool. λy:Bool. (λz:Bool. λw:Bool. false) y y) +(λx:Bool. λy:Bool. λz:Bool. true) false false ((λx:Bool. x) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool. true) false) (λx:Bool -> Bool. x))) +true +(λx:Bool. λy:Bool. true) true +true +(λx:Bool -> Bool. x) (λx:Bool. x) true +(λx:Bool. λy:Bool. false) false false +(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool. false) ((λy:Bool. λz:Bool -> Bool. true) ((λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. true)))) (λx:Bool -> Bool. true) +(λx:Bool. true) true +λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. x) ((λy:Bool -> Bool -> Bool. (λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) y) ((λy:Bool. λz:Bool -> Bool. λw:Bool. λa:Bool. false) x ((λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. false)))) +λx:Bool. x +false +λx:Bool -> Bool. false +false +false +(λx:Bool. λy:Bool. x) false true +(λx:Bool -> Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. λz:Bool. z) (λx:Bool. x)) +false +true +true +λx:Bool -> Bool. λy:Bool. false +(λx:Bool. λy:Bool. (λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. true) y ((λz:Bool. λw:Bool -> Bool. λa:Bool. false) y)) ((λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. true) false true (λx:Bool -> Bool. (λy:Bool -> Bool. true) x) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. y))) +true +true +true +(λx:Bool. x) ((λx:Bool. λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. false) false ((λx:Bool. false) false) true ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool -> Bool. true) ((λx:Bool. true) false) ((λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) false (λx:Bool. λy:Bool. false)))) +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. true) ((λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool -> Bool. false) false true (λy:Bool. true)) +λx:Bool -> Bool. x +(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. true) x ((λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. true)) ((λy:Bool -> Bool. x) (λy:Bool. false))) false +true +λx:Bool -> Bool. false +(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool. false) ((λy:Bool. true) false)) (λx:Bool -> Bool. λy:Bool. (λz:Bool. false) y) (λx:Bool. (λy:Bool. y) x) +(λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. x) +false +λx:Bool -> Bool. λy:Bool. true +λx:Bool -> Bool. x +true +(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. true) x) ((λx:Bool. (λy:Bool. λz:Bool. true) true) ((λx:Bool. false) false) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) true ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false)) (λx:Bool -> Bool. x))) +(λx:Bool. λy:Bool -> Bool. false) false +true +(λx:Bool. λy:Bool. x) false false +(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) (λy:Bool. λz:Bool. true)) true true +λx:Bool. x +λx:Bool. λy:Bool. true +true +(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. z) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. true) (λx:Bool -> Bool. false) ((λx:Bool. true) true) true) (λx:Bool -> Bool. true) +false +(λx:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. y) ((λx:Bool. x) true)) +true +λx:Bool -> Bool. (λy:Bool. y) false +false +(λx:Bool. x) true +(λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) false (λy:Bool -> Bool. x)) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) true ((λx:Bool. λy:Bool -> Bool. true) false) ((λx:Bool. x) false) ((λx:Bool. true) false)) +(λx:Bool -> Bool. λy:Bool -> Bool. (λz:Bool -> Bool -> Bool. false) (λz:Bool. λw:Bool. false)) ((λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool. true)) true) ((λx:Bool -> Bool. λy:Bool. x) ((λx:Bool. λy:Bool. false) true) false) +(λx:Bool. (λy:Bool -> Bool. y) ((λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. false))) ((λx:Bool -> Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. x))) ((λx:Bool -> Bool -> Bool. λy:Bool. y) (λx:Bool. λy:Bool. false) false) +λx:Bool. false +(λx:Bool. λy:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. true) true (λx:Bool -> Bool. false)) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool. λy:Bool. false) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. true)))) +λx:Bool. (λy:Bool. (λz:Bool. λw:Bool. true) x) true ((λy:Bool. y) x) +true +(λx:Bool. false) true +λx:Bool. λy:Bool. y +λx:Bool. true +(λx:Bool. x) ((λx:Bool. true) true) +true +false +(λx:Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. λb:Bool. true) false ((λx:Bool. x) ((λx:Bool. true) true)) ((λx:Bool. true) true) true +true +(λx:Bool. λy:Bool. y) ((λx:Bool. x) ((λx:Bool -> Bool. x) (λx:Bool. true) ((λx:Bool. false) false))) +(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. false)) (λx:Bool -> Bool. λy:Bool. false)) ((λx:Bool -> Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. false) (λx:Bool. x) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) true ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true)))) +(λx:Bool. (λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. false) x (λy:Bool. λz:Bool. true) x) ((λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. false) false))) +(λx:Bool. false) true +λx:Bool. (λy:Bool -> Bool. y) (λy:Bool. x) +λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. x) (λy:Bool -> Bool. false) +true +true +false +λx:Bool -> Bool. x +λx:Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool -> Bool. λa:(Bool -> Bool) -> Bool -> Bool. true) false true ((λy:Bool. x) true) (λy:Bool -> Bool. λz:Bool. z) diff --git a/src/autodiff_pr/losses.jl b/src/autodiff_pr/losses.jl index 9ad94781..7722dc49 100644 --- a/src/autodiff_pr/losses.jl +++ b/src/autodiff_pr/losses.jl @@ -48,10 +48,10 @@ function kl_divergence(p::Dict{<:Any, <:Real}, q::Dist, domain::Set{<:Pair{<:Any res end -function neg_entropy(p::Dist, domain::Set{<:Dist}) +function neg_entropy(p::Dist, domain; ignore_non_support=false) sum(domain) do x pe = prob_equals(p, x) - if pe isa Bool + if ignore_non_support && length(support_mixed(pe)) == 1 Constant(0) else LogPr(pe) * exp(LogPr(pe)) diff --git a/src/dist/vector.jl b/src/dist/vector.jl index 31a51035..b1e92ef9 100644 --- a/src/dist/vector.jl +++ b/src/dist/vector.jl @@ -97,6 +97,7 @@ end dummy(::Type{DistString}) = DistString("dummy") dummy(::Type{DistUInt32}) = DistUInt32(555) +dummy(::Type{DistInt32}) = DistInt32(555) function prob_getindex(d::DistVector{T}, idx::DistUInt32) where T ans = if isempty(d.contents) dummy(T) else d.contents[1] end From 3e88e1e3837597242fa28106f02290e167613da0 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 14 Jan 2024 23:43:06 -0800 Subject: [PATCH 033/231] add BST benchmark --- examples/qc/benchmarks/benchmarks.jl | 85 +++++++++++++++---- examples/qc/benchmarks/lib/bst/dist.jl | 27 ++++++ examples/qc/benchmarks/lib/bst/generator.jl | 19 +++++ examples/qc/benchmarks/lib/lib.jl | 6 ++ examples/qc/benchmarks/lib/{ => stlc}/dist.jl | 26 +++--- .../qc/benchmarks/lib/{ => stlc}/generator.jl | 3 - examples/qc/benchmarks/main.jl | 29 ++++--- 7 files changed, 147 insertions(+), 48 deletions(-) create mode 100644 examples/qc/benchmarks/lib/bst/dist.jl create mode 100644 examples/qc/benchmarks/lib/bst/generator.jl create mode 100644 examples/qc/benchmarks/lib/lib.jl rename examples/qc/benchmarks/lib/{ => stlc}/dist.jl (94%) rename examples/qc/benchmarks/lib/{ => stlc}/generator.jl (96%) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index e12ceef9..d00afd6d 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -4,12 +4,12 @@ abstract type LossParams{T} end abstract type Generation{T} end -abstract type STLC <: Benchmark end - ################################## # STLC generation ################################## +abstract type STLC <: Benchmark end + struct STLCGenerationParams <: GenerationParams{STLC} param_vars_by_size::Bool size::Integer @@ -58,6 +58,70 @@ function build_loss(::ApproxSTLCConstructorEntropy, generation::STLCGeneration) loss, nothing end +################################## +# Exact STLC constructor entropy loss +################################## + +struct STLCConstructorEntropy <: LossParams{STLC} end +to_subpath(::STLCConstructorEntropy) = ["entropy"] +function build_loss(::STLCConstructorEntropy, generation::STLCGeneration) + random_term = match(generation.e, [ + "Some" => e -> DistSome(choice(collect_constructors(e))), + "None" => () -> DistNone(DistInt32), + ]) + loss = neg_entropy(random_term, Set([DistSome(i) for i in values(stlc_ctor_to_id)])) + loss, nothing +end + +################################## +# BST generation +################################## + +abstract type BST <: Benchmark end + +struct BSTGenerationParams <: GenerationParams{BST} + size::Integer + BSTGenerationParams(; size) = new(size) +end +struct BSTGeneration <: Generation{BST} + t::DistI{Tree} + constructors_overapproximation::Vector{DistI{Tree}} +end +function to_subpath(p::BSTGenerationParams) + [ + "bst", + "sz=$(p.size)", + ] +end +function generate(p::BSTGenerationParams) + constructors_overapproximation = [] + function add_ctor(v::DistI{Tree}) + push!(constructors_overapproximation, v) + v + end + t = gen_tree( + p.size, + DistNat(0), + DistNat(40), + add_ctor, + ) + BSTGeneration(t, constructors_overapproximation) +end + +################################## +# Approx BST constructor entropy loss +################################## + +struct ApproxBSTConstructorEntropy <: LossParams{BST} end +to_subpath(::ApproxBSTConstructorEntropy) = ["approx_entropy"] +function build_loss(::ApproxBSTConstructorEntropy, generation::BSTGeneration) + loss = sum( + neg_entropy(ctor_to_id(ctor), values(bst_ctor_to_id), ignore_non_support=true) + for ctor in generation.constructors_overapproximation + ) + loss, nothing +end + ################################## # MLE loss ################################## @@ -100,19 +164,4 @@ function metric_loss(metric::Dist, ::Linear) BoolToMax(prob_equals(metric, DistUInt32(i)), weight=i) for i in support_mixed(metric) ]) -end - -################################## -# Exact STLC constructor entropy loss -################################## - -struct STLCConstructorEntropy <: LossParams{STLC} end -to_subpath(::STLCConstructorEntropy) = ["entropy"] -function build_loss(::STLCConstructorEntropy, generation::STLCGeneration) - random_term = match(generation.e, [ - "Some" => e -> DistSome(choice(collect_constructors(e))), - "None" => () -> DistNone(DistInt32), - ]) - loss = neg_entropy(random_term, Set([DistSome(i) for i in values(stlc_ctor_to_id)])) - loss, nothing -end +end \ No newline at end of file diff --git a/examples/qc/benchmarks/lib/bst/dist.jl b/examples/qc/benchmarks/lib/bst/dist.jl new file mode 100644 index 00000000..dd31e9e6 --- /dev/null +++ b/examples/qc/benchmarks/lib/bst/dist.jl @@ -0,0 +1,27 @@ +# Define Tree +import Dice: param_lists + +struct Tree <: InductiveType end + +function param_lists(::Type{Tree})::Vector{Pair{String,Vector{Type}}} + [ + "E" => [], + "T" => [DistI{Tree}, DistNat, DistNat, DistI{Tree}], + ] +end + +DistE() = construct(Tree, "E", []) +DistT(l::DistI{Tree}, k::DistNat, v::DistNat, r::DistI{Tree}) = + construct(Tree, "T", [l, k, v, r]) + +bst_ctor_to_id = Dict( + "E" => DistInt32(0), + "T" => DistInt32(1), +) + +function ctor_to_id(ctor::DistI{Tree}) + match(ctor, [ + "E" => () -> bst_ctor_to_id["E"] + "T" => (_, _, _, _) -> bst_ctor_to_id["T"] + ]) +end diff --git a/examples/qc/benchmarks/lib/bst/generator.jl b/examples/qc/benchmarks/lib/bst/generator.jl new file mode 100644 index 00000000..cea4a3a5 --- /dev/null +++ b/examples/qc/benchmarks/lib/bst/generator.jl @@ -0,0 +1,19 @@ + +function gen_tree(s::Integer, lo::DistNat, hi::DistNat, track_return) + track_return( + @dice_ite if s == 0 || hi - lo < DistNat(2) + DistE() + else + s′ = s - 1 + if flip(register_weight!("sz$(s)")) + DistE() + else + k = unif(lo + DistNat(1), hi - DistNat(1)) + v = DistNat(0) # arbitrary + l = gen_tree(s′, lo, k, track_return) + r = gen_tree(s′, k, hi, track_return) + DistT(l, k, v, r) + end + end + ) +end diff --git a/examples/qc/benchmarks/lib/lib.jl b/examples/qc/benchmarks/lib/lib.jl new file mode 100644 index 00000000..889cfe75 --- /dev/null +++ b/examples/qc/benchmarks/lib/lib.jl @@ -0,0 +1,6 @@ +DistNat = DistUInt32 +include("stlc/dist.jl") +include("stlc/generator.jl") +include("bst/dist.jl") +include("bst/generator.jl") +include("util.jl") diff --git a/examples/qc/benchmarks/lib/dist.jl b/examples/qc/benchmarks/lib/stlc/dist.jl similarity index 94% rename from examples/qc/benchmarks/lib/dist.jl rename to examples/qc/benchmarks/lib/stlc/dist.jl index 3a6f4f3c..faf291c1 100644 --- a/examples/qc/benchmarks/lib/dist.jl +++ b/examples/qc/benchmarks/lib/stlc/dist.jl @@ -56,29 +56,29 @@ function num_apps(e::DistI{Expr}) ]) end -function ctor_to_id(ctor) +stlc_ctor_to_id = Dict( + "Var" => DistInt32(0), + "Boolean" => DistInt32(1), + "App" => DistInt32(2), + "Abs" => DistInt32(3), +) + +function ctor_to_id(ctor::DistI{Expr}) match(ctor, [ - "Var" => _ -> DistInt32(0) - "Boolean" => _ -> DistInt32(1) - "App" => (_, _) -> DistInt32(2) - "Abs" => (_, _) -> DistInt32(3) + "Var" => _ -> stlc_ctor_to_id["Var"] + "Boolean" => _ -> stlc_ctor_to_id["Boolean"] + "App" => (_, _) -> stlc_ctor_to_id["App"] + "Abs" => (_, _) -> stlc_ctor_to_id["Abs"] ]) end -function opt_ctor_to_id(opt_ctor) +function opt_ctor_to_id(opt_ctor::DistI{Opt{DistI{Expr}}}) match(opt_ctor, [ "Some" => ctor_to_id, "None" => () -> DistInt32(-1), ]) end -stlc_ctor_to_id = Dict( - "Var" => DistInt32(0), - "Boolean" => DistInt32(1), - "App" => DistInt32(2), - "Abs" => DistInt32(3), -) - function collect_constructors(e) match(e, [ "Var" => (i) -> DistVector([stlc_ctor_to_id["Var"]]), diff --git a/examples/qc/benchmarks/lib/generator.jl b/examples/qc/benchmarks/lib/stlc/generator.jl similarity index 96% rename from examples/qc/benchmarks/lib/generator.jl rename to examples/qc/benchmarks/lib/stlc/generator.jl index 7b89f88c..fe643251 100644 --- a/examples/qc/benchmarks/lib/generator.jl +++ b/examples/qc/benchmarks/lib/stlc/generator.jl @@ -1,9 +1,6 @@ # Based on # https://github.com/jwshi21/etna/blob/main/bench-suite/Coq/STLC/Methods/BespokeGenerator.v -# Encoding: DistUInt32 for binary; DistI{Nat} for Peano -# Shouldn't affect results -DistNat = DistUInt32 Ctx = DistI{List{DistI{Typ}}} diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 4186a6bd..607a760e 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -4,31 +4,32 @@ # Saves the distributions and sampled terms before and after training. using Dice -include("lib/dist.jl") -include("lib/util.jl") -include("lib/generator.jl") +include("lib/lib.jl") include("benchmarks.jl") ############################ # Config ############################ -generation_params = STLCGenerationParams( - param_vars_by_size=true, - size=5, - ty_size=2, -) -loss_params = MLELossParams( - metric=NumApps(), - target_dist=Uniform(), -) -loss_params = ApproxSTLCConstructorEntropy() +# generation_params = STLCGenerationParams( +# param_vars_by_size=true, +# size=5, +# ty_size=2, +# ) +# loss_params = MLELossParams( +# metric=NumApps(), +# target_dist=Uniform(), +# ) +# loss_params = ApproxSTLCConstructorEntropy() # loss_params = STLCConstructorEntropy() +generation_params = BSTGenerationParams(size=3) +loss_params = ApproxBSTConstructorEntropy() + EPOCHS = 2000 LEARNING_RATE = if loss_params isa ApproxSTLCConstructorEntropy 0.03 else 0.003 end -TAG = "v4_infra" +TAG = "v04_infra" LOG_TO_FILE = true From 0aa5a2c164bd26d072126d6065ae7533731b3f56 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 15 Jan 2024 17:30:09 -0800 Subject: [PATCH 034/231] update demo_bst for qc7.5 --- examples/qc/examples/demo_bst.jl | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/examples/qc/examples/demo_bst.jl b/examples/qc/examples/demo_bst.jl index ecb0a237..5f3e3268 100644 --- a/examples/qc/examples/demo_bst.jl +++ b/examples/qc/examples/demo_bst.jl @@ -3,11 +3,21 @@ using Dice include("lib/dist_tree.jl") # DistLeaf, DistBranch, depth +var_vals = Valuation() +adnodes_of_interest = Dict{String, ADNode}() +function register_weight!(s) + var = Var("$(s)_before_sigmoid") + var_vals[var] = 0 + weight = sigmoid(var) + adnodes_of_interest[s] = weight + weight +end + # Return tree function gen_bst(size, lo, hi) # Try changing the parameter to flip_for to a constant, which would force # all sizes to use the same probability. - @dice_ite if size == 0 || flip_for(size) + @dice_ite if size == 0 || flip(register_weight!("sz$(size)")) DistLeaf(DistUInt32) else # The flips used in the uniform aren't tracked via flip_for, so we @@ -33,25 +43,28 @@ tree = gen_bst( tree_depth = depth(tree) println("Distribution before training:") -display(pr(tree_depth)) +display(pr_mixed(var_vals)(tree_depth)) println() -bools_to_maximize = [prob_equals(tree_depth, x) for x in DATASET] -train_group_probs!(bools_to_maximize, 1000, 0.3) # epochs and lr +train!(var_vals, mle_loss([prob_equals(tree_depth, x) for x in DATASET]), epochs=1000, learning_rate=0.3) # Done! println("Learned flip probability for each size:") -display(get_group_probs()) +vals = compute(var_vals, values(adnodes_of_interest)) +show(Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) +println() println() println("Distribution over depths after training:") -display(pr(tree_depth)) +display(pr_mixed(var_vals)(tree_depth)) println() println("A few sampled trees:") -for _ in 1:3 - print_tree(sample(tree)) - println() +with_concrete_ad_flips(var_vals, tree) do + for _ in 1:3 + print_tree(sample(tree)) + println() + end end #== From b46ff35cd915f2cd8f983bfb1e3e4e6188dd2f7b Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 15 Jan 2024 18:19:40 -0800 Subject: [PATCH 035/231] qc bench: add mixed loss, always save app dist --- examples/qc/benchmarks/benchmarks.jl | 30 +++++++++++++++++++++++- examples/qc/benchmarks/main.jl | 35 +++++++++++++--------------- 2 files changed, 45 insertions(+), 20 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index d00afd6d..3c99116f 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -164,4 +164,32 @@ function metric_loss(metric::Dist, ::Linear) BoolToMax(prob_equals(metric, DistUInt32(i)), weight=i) for i in support_mixed(metric) ]) -end \ No newline at end of file +end + +################################## +# Mixed loss +################################## + +struct MixedLossParams{T} <: LossParams{T} + weighted_losses::Vector{<:Pair{<:LossParams{T}, <:Real}} +end +function to_subpath(p::MixedLossParams) + [join( + [ + "$(join(to_subpath(loss), "_"))_w$(weight)" + for (loss, weight) in p.weighted_losses + ], + "_AND_" + )] +end +function build_loss(p::MixedLossParams{T}, generation::Generation{T}) where T + mixed_loss = Dice.Constant(0) + extras = [] + for (loss, weight) in p.weighted_losses + loss, extra = build_loss(loss, generation) + mixed_loss += Dice.Constant(weight) * loss + push!(extras, extra) + end + mixed_loss, extras +end + diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 607a760e..0206aca6 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -11,20 +11,19 @@ include("benchmarks.jl") # Config ############################ -# generation_params = STLCGenerationParams( -# param_vars_by_size=true, -# size=5, -# ty_size=2, -# ) -# loss_params = MLELossParams( -# metric=NumApps(), -# target_dist=Uniform(), -# ) -# loss_params = ApproxSTLCConstructorEntropy() -# loss_params = STLCConstructorEntropy() - -generation_params = BSTGenerationParams(size=3) -loss_params = ApproxBSTConstructorEntropy() +generation_params = STLCGenerationParams( + param_vars_by_size=true, + size=3, + ty_size=1, +) +loss_params = ApproxSTLCConstructorEntropy() +# loss_params = MixedLossParams([ +# ApproxSTLCConstructorEntropy() => 10, +# MLELossParams(metric=NumApps(), target_dist=Uniform()) => 1, +# ]) + +# generation_params = BSTGenerationParams(size=3) +# loss_params = ApproxBSTConstructorEntropy() EPOCHS = 2000 LEARNING_RATE = if loss_params isa ApproxSTLCConstructorEntropy 0.03 else 0.003 end @@ -154,15 +153,13 @@ vals = compute(var_vals, values(adnodes_of_interest)) show(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) println(io) -if loss_params isa MLELossParams{STLC} - println(io, "Inferring trained distribution...") - time_infer_final = @elapsed metric_dist_after = pr_mixed(var_vals)(extra) +if generation isa STLCGeneration + println(io, "Inferring trained num apps distribution...") + time_infer_final = @elapsed metric_dist_after = pr_mixed(var_vals)(num_apps(generation.e)) save_metric_dist(joinpath(OUT_DIR, "dist_trained.csv"), metric_dist_after; io) println(io, " $(time_infer_final) seconds") println(io) -end -if generation isa STLCGeneration println(io, "Saving samples...") time_sample_final = @elapsed with_concrete_ad_flips(var_vals, generation.e) do save_samples(joinpath(OUT_DIR, "terms_trained.txt"), generation.e; io) From ee639c2098b3b0d7342213835aa6bd7ad98c05a2 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 15 Jan 2024 18:26:18 -0800 Subject: [PATCH 036/231] remove rest of qc outupt --- .../learning_curve.csv | 2001 ----------------- .../epochs=2000,learning_rate=0.03/log.log | 34 - .../terms_before.txt | 200 -- .../terms_trained.txt | 200 -- .../dist_before.csv | 5 - .../dist_trained.csv | 5 - .../learning_curve.csv | 2001 ----------------- .../epochs=2000,learning_rate=0.003/log.log | 40 - .../terms_before.txt | 200 -- .../terms_trained.txt | 200 -- .../learning_curve.csv | 2001 ----------------- .../epochs=2000,learning_rate=0.03/log.log | 34 - .../terms_before.txt | 200 -- .../terms_trained.txt | 200 -- 14 files changed, 7321 deletions(-) delete mode 100644 examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/learning_curve.csv delete mode 100644 examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/log.log delete mode 100644 examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/terms_before.txt delete mode 100644 examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/terms_trained.txt delete mode 100644 examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/dist_before.csv delete mode 100644 examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/dist_trained.csv delete mode 100644 examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/learning_curve.csv delete mode 100644 examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/log.log delete mode 100644 examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/terms_before.txt delete mode 100644 examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/terms_trained.txt delete mode 100644 examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/learning_curve.csv delete mode 100644 examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/log.log delete mode 100644 examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/terms_before.txt delete mode 100644 examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/terms_trained.txt diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/learning_curve.csv b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/learning_curve.csv deleted file mode 100644 index 585bb280..00000000 --- a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/learning_curve.csv +++ /dev/null @@ -1,2001 +0,0 @@ -0 -8.072558853466411 -1 -8.074420028242267 -2 -8.07621267169211 -3 -8.077940280375184 -4 -8.079606156892172 -5 -8.081213420458718 -6 -8.082765016963194 -7 -8.084263728525322 -8 -8.085712182572928 -9 -8.087112860454672 -10 -8.088468105606728 -11 -8.089780131291619 -12 -8.091051027927275 -13 -8.09228277002427 -14 -8.093477222748856 -15 -8.094636148129192 -16 -8.095761210921626 -17 -8.096853984153515 -18 -8.097915954358518 -19 -8.098948526519827 -20 -8.099953028736167 -21 -8.100930716624923 -22 -8.101882777476124 -23 -8.102810334170485 -24 -8.10371444887407 -25 -8.10459612652169 -26 -8.105456318100485 -27 -8.106295923744682 -28 -8.10711579565193 -29 -8.107916740831168 -30 -8.108699523691415 -31 -8.109464868480455 -32 -8.110213461581903 -33 -8.110945953678671 -34 -8.111662961790483 -35 -8.112365071192633 -36 -8.11305283722282 -37 -8.113726786982497 -38 -8.11438742093885 -39 -8.11503521443316 -40 -8.115670619100992 -41 -8.116294064209338 -42 -8.11690595791557 -43 -8.117506688452774 -44 -8.11809662524578 -45 -8.118676119961945 -46 -8.119245507500525 -47 -8.119805106924256 -48 -8.12035522233654 -49 -8.120896143707437 -50 -8.121428147651496 -51 -8.121951498160252 -52 -8.122466447292082 -53 -8.122973235821934 -54 -8.123472093853296 -55 -8.123963241394648 -56 -8.124446888902488 -57 -8.12492323779292 -58 -8.125392480923665 -59 -8.125854803048234 -60 -8.126310381243913 -61 -8.126759385315127 -62 -8.127201978173618 -63 -8.127638316196819 -64 -8.128068549565718 -65 -8.128492822583404 -66 -8.128911273975463 -67 -8.12932403717329 -68 -8.129731240581302 -69 -8.130133007829029 -70 -8.130529458008965 -71 -8.130920705901026 -72 -8.131306862184374 -73 -8.1316880336374 -74 -8.13206432332651 -75 -8.132435830784415 -76 -8.132802652178501 -77 -8.13316488046991 -78 -8.133522605563813 -79 -8.133875914451453 -80 -8.13422489134439 -81 -8.134569617801441 -82 -8.1349101728487 -83 -8.135246633093084 -84 -8.135579072829744 -85 -8.13590756414373 -86 -8.136232177006208 -87 -8.136552979365568 -88 -8.136870037233718 -89 -8.137183414767826 -90 -8.137493174347792 -91 -8.137799376649667 -92 -8.138102080715278 -93 -8.138401344018266 -94 -8.138697222526748 -95 -8.138989770762759 -96 -8.13927904185873 -97 -8.139565087611086 -98 -8.139847958531188 -99 -8.140127703893747 -100 -8.140404371782832 -101 -8.140678009135653 -102 -8.1409486617842 -103 -8.141216374494878 -104 -8.141481191006251 -105 -8.141743154064976 -106 -8.142002305460071 -107 -8.14225868605555 -108 -8.14251233582158 -109 -8.142763293864185 -110 -8.143011598453594 -111 -8.14325728705133 -112 -8.143500396336066 -113 -8.143740962228346 -114 -8.143979019914228 -115 -8.144214603867884 -116 -8.144447747873228 -117 -8.144678485044635 -118 -8.144906847846785 -119 -8.145132868113665 -120 -8.145356577066785 -121 -8.145578005332672 -122 -8.145797182959633 -123 -8.146014139433856 -124 -8.14622890369487 -125 -8.146441504150415 -126 -8.146651968690705 -127 -8.146860324702175 -128 -8.1470665990807 -129 -8.147270818244307 -130 -8.147473008145429 -131 -8.147673194282708 -132 -8.147871401712374 -133 -8.148067655059208 -134 -8.148261978527135 -135 -8.148454395909418 -136 -8.14864493059855 -137 -8.148833605595746 -138 -8.14902044352017 -139 -8.149205466617827 -140 -8.149388696770163 -141 -8.149570155502408 -142 -8.149749863991609 -143 -8.149927843074456 -144 -8.150104113254827 -145 -8.150278694711117 -146 -8.15045160730334 -147 -8.150622870580001 -148 -8.15079250378479 -149 -8.150960525863052 -150 -8.151126955468076 -151 -8.151291810967209 -152 -8.151455110447788 -153 -8.151616871722903 -154 -8.151777112336996 -155 -8.15193584957132 -156 -8.152093100449228 -157 -8.15224888174133 -158 -8.152403209970513 -159 -8.152556101416812 -160 -8.152707572122175 -161 -8.152857637895094 -162 -8.153006314315105 -163 -8.153153616737182 -164 -8.153299560296038 -165 -8.153444159910276 -166 -8.153587430286482 -167 -8.15372938592318 -168 -8.153870041114715 -169 -8.154009409955027 -170 -8.154147506341348 -171 -8.154284343977796 -172 -8.154419936378893 -173 -8.154554296872996 -174 -8.154687438605654 -175 -8.154819374542884 -176 -8.154950117474364 -177 -8.155079680016566 -178 -8.155208074615818 -179 -8.155335313551282 -180 -8.155461408937883 -181 -8.155586372729157 -182 -8.15571021672006 -183 -8.155832952549682 -184 -8.155954591703935 -185 -8.15607514551816 -186 -8.156194625179692 -187 -8.15631304173036 -188 -8.156430406068942 -189 -8.156546728953561 -190 -8.156662021004042 -191 -8.156776292704198 -192 -8.156889554404101 -193 -8.157001816322271 -194 -8.157113088547849 -195 -8.157223381042709 -196 -8.157332703643528 -197 -8.157441066063821 -198 -8.157548477895933 -199 -8.157654948612985 -200 -8.157760487570789 -201 -8.157865104009721 -202 -8.157968807056553 -203 -8.158071605726263 -204 -8.158173508923785 -205 -8.158274525445753 -206 -8.158374663982194 -207 -8.15847393311818 -208 -8.158572341335487 -209 -8.158669897014159 -210 -8.158766608434105 -211 -8.158862483776627 -212 -8.158957531125932 -213 -8.15905175847061 -214 -8.159145173705102 -215 -8.159237784631104 -216 -8.15932959895898 -217 -8.15942062430913 -218 -8.159510868213347 -219 -8.159600338116126 -220 -8.159689041375966 -221 -8.159776985266658 -222 -8.159864176978507 -223 -8.159950623619595 -224 -8.160036332216949 -225 -8.16012130971776 -226 -8.160205562990512 -227 -8.160289098826148 -228 -8.160371923939188 -229 -8.160454044968802 -230 -8.160535468479925 -231 -8.160616200964302 -232 -8.160696248841525 -233 -8.160775618460065 -234 -8.160854316098277 -235 -8.160932347965387 -236 -8.161009720202458 -237 -8.161086438883343 -238 -8.161162510015638 -239 -8.161237939541572 -240 -8.16131273333894 -241 -8.161386897221977 -242 -8.161460436942235 -243 -8.161533358189436 -244 -8.161605666592324 -245 -8.161677367719488 -246 -8.16174846708018 -247 -8.16181897012511 -248 -8.16188888224724 -249 -8.16195820878255 -250 -8.162026955010818 -251 -8.162095126156341 -252 -8.162162727388683 -253 -8.162229763823406 -254 -8.162296240522773 -255 -8.162362162496445 -256 -8.16242753470217 -257 -8.162492362046464 -258 -8.162556649385278 -259 -8.162620401524633 -260 -8.162683623221294 -261 -8.162746319183377 -262 -8.162808494070985 -263 -8.162870152496817 -264 -8.162931299026766 -265 -8.162991938180523 -266 -8.163052074432148 -267 -8.163111712210657 -268 -8.163170855900571 -269 -8.163229509842488 -270 -8.163287678333614 -271 -8.16334536562832 -272 -8.163402575938651 -273 -8.163459313434867 -274 -8.163515582245939 -275 -8.163571386460069 -276 -8.163626730125175 -277 -8.16368161724939 -278 -8.16373605180154 -279 -8.163790037711617 -280 -8.163843578871251 -281 -8.163896679134162 -282 -8.163949342316622 -283 -8.164001572197897 -284 -8.164053372520687 -285 -8.164104746991555 -286 -8.164155699281363 -287 -8.164206233025673 -288 -8.164256351825188 -289 -8.164306059246131 -290 -8.164355358820668 -291 -8.164404254047286 -292 -8.164452748391195 -293 -8.164500845284707 -294 -8.16454854812761 -295 -8.164595860287553 -296 -8.164642785100394 -297 -8.164689325870578 -298 -8.164735485871486 -299 -8.16478126834578 -300 -8.164826676505774 -301 -8.164871713533739 -302 -8.164916382582268 -303 -8.164960686774595 -304 -8.165004629204923 -305 -8.165048212938744 -306 -8.165091441013168 -307 -8.165134316437225 -308 -8.165176842192167 -309 -8.165219021231795 -310 -8.165260856482739 -311 -8.16530235084476 -312 -8.165343507191043 -313 -8.165384328368487 -314 -8.165424817197984 -315 -8.165464976474702 -316 -8.165504808968361 -317 -8.165544317423501 -318 -8.16558350455976 -319 -8.165622373072129 -320 -8.165660925631219 -321 -8.165699164883517 -322 -8.165737093451645 -323 -8.165774713934603 -324 -8.165812028908022 -325 -8.165849040924408 -326 -8.165885752513388 -327 -8.165922166181934 -328 -8.165958284414616 -329 -8.165994109673814 -330 -8.166029644399972 -331 -8.166064891011798 -332 -8.166099851906504 -333 -8.16613452946002 -334 -8.166168926027211 -335 -8.166203043942094 -336 -8.16623688551805 -337 -8.16627045304803 -338 -8.166303748804761 -339 -8.166336775040957 -340 -8.166369533989506 -341 -8.166402027863695 -342 -8.166434258857368 -343 -8.166466229145158 -344 -8.166497940882651 -345 -8.166529396206593 -346 -8.166560597235065 -347 -8.166591546067675 -348 -8.166622244785732 -349 -8.166652695452434 -350 -8.166682900113045 -351 -8.166712860795068 -352 -8.166742579508412 -353 -8.16677205824558 -354 -8.166801298981824 -355 -8.166830303675319 -356 -8.166859074267323 -357 -8.166887612682345 -358 -8.166915920828309 -359 -8.16694400059671 -360 -8.166971853862762 -361 -8.166999482485577 -362 -8.1670268883083 -363 -8.167054073158258 -364 -8.167081038847138 -365 -8.1671077871711 -366 -8.167134319910947 -367 -8.167160638832268 -368 -8.167186745685575 -369 -8.167212642206445 -370 -8.16723833011567 -371 -8.167263811119382 -372 -8.167289086909204 -373 -8.167314159162377 -374 -8.167339029541896 -375 -8.167363699696644 -376 -8.16738817126152 -377 -8.167412445857575 -378 -8.167436525092134 -379 -8.167460410558926 -380 -8.16748410383821 -381 -8.167507606496894 -382 -8.167530920088673 -383 -8.167554046154121 -384 -8.167576986220846 -385 -8.167599741803585 -386 -8.167622314404325 -387 -8.167644705512432 -388 -8.167666916604748 -389 -8.167688949145724 -390 -8.16771080458751 -391 -8.167732484370088 -392 -8.167753989921367 -393 -8.167775322657302 -394 -8.167796483981995 -395 -8.167817475287805 -396 -8.167838297955454 -397 -8.167858953354127 -398 -8.167879442841585 -399 -8.167899767764252 -400 -8.167919929457337 -401 -8.167939929244909 -402 -8.167959768440024 -403 -8.167979448344795 -404 -8.167998970250517 -405 -8.168018335437736 -406 -8.168037545176368 -407 -8.168056600725777 -408 -8.16807550333487 -409 -8.168094254242202 -410 -8.168112854676057 -411 -8.168131305854534 -412 -8.168149608985642 -413 -8.168167765267397 -414 -8.168185775887896 -415 -8.168203642025409 -416 -8.16822136484847 -417 -8.168238945515956 -418 -8.168256385177166 -419 -8.168273684971926 -420 -8.16829084603064 -421 -8.168307869474406 -422 -8.168324756415066 -423 -8.16834150795531 -424 -8.168358125188737 -425 -8.16837460919995 -426 -8.168390961064622 -427 -8.168407181849581 -428 -8.168423272612875 -429 -8.168439234403866 -430 -8.16845506826329 -431 -8.16847077522333 -432 -8.168486356307701 -433 -8.16850181253172 -434 -8.168517144902363 -435 -8.168532354418364 -436 -8.168547442070256 -437 -8.168562408840467 -438 -8.168577255703369 -439 -8.168591983625358 -440 -8.16860659356492 -441 -8.168621086472703 -442 -8.168635463291565 -443 -8.168649724956667 -444 -8.168663872395522 -445 -8.168677906528059 -446 -8.168691828266695 -447 -8.168705638516398 -448 -8.168719338174744 -449 -8.168732928131986 -450 -8.168746409271106 -451 -8.168759782467893 -452 -8.168773048590994 -453 -8.168786208501965 -454 -8.16879926305535 -455 -8.168812213098729 -456 -8.168825059472773 -457 -8.168837803011316 -458 -8.1688504445414 -459 -8.16886298488333 -460 -8.168875424850746 -461 -8.168887765250666 -462 -8.168900006883545 -463 -8.16891215054333 -464 -8.168924197017516 -465 -8.168936147087194 -466 -8.168948001527117 -467 -8.16895976110574 -468 -8.168971426585276 -469 -8.168982998721761 -470 -8.168994478265077 -471 -8.169005865959036 -472 -8.16901716254141 -473 -8.169028368743986 -474 -8.169039485292615 -475 -8.169050512907265 -476 -8.169061452302072 -477 -8.16907230418538 -478 -8.169083069259791 -479 -8.16909374822222 -480 -8.169104341763934 -481 -8.169114850570608 -482 -8.169125275322354 -483 -8.16913561669379 -484 -8.16914587535407 -485 -8.16915605196693 -486 -8.16916614719074 -487 -8.169176161678546 -488 -8.16918609607811 -489 -8.169195951031952 -490 -8.169205727177404 -491 -8.169215425146643 -492 -8.169225045566739 -493 -8.169234589059691 -494 -8.169244056242476 -495 -8.169253447727087 -496 -8.16926276412057 -497 -8.169272006025071 -498 -8.169281174037877 -499 -8.169290268751451 -500 -8.16929929075347 -501 -8.169308240626872 -502 -8.169317118949891 -503 -8.169325926296093 -504 -8.169334663234421 -505 -8.169343330329221 -506 -8.169351928140294 -507 -8.169360457222929 -508 -8.169368918127931 -509 -8.169377311401664 -510 -8.169385637586096 -511 -8.169393897218816 -512 -8.169402090833092 -513 -8.169410218957886 -514 -8.169418282117899 -515 -8.169426280833612 -516 -8.169434215621305 -517 -8.169442086993103 -518 -8.169449895457008 -519 -8.169457641516933 -520 -8.16946532567273 -521 -8.169472948420225 -522 -8.169480510251258 -523 -8.169488011653709 -524 -8.169495453111528 -525 -8.169502835104776 -526 -8.169510158109645 -527 -8.169517422598503 -528 -8.169524629039909 -529 -8.169531777898662 -530 -8.169538869635813 -531 -8.169545904708716 -532 -8.16955288357104 -533 -8.169559806672803 -534 -8.169566674460414 -535 -8.169573487376686 -536 -8.169580245860875 -537 -8.169586950348704 -538 -8.169593601272394 -539 -8.1696001990607 -540 -8.169606744138918 -541 -8.169613236928937 -542 -8.169619677849251 -543 -8.169626067314994 -544 -8.169632405737966 -545 -8.169638693526654 -546 -8.169644931086271 -547 -8.16965111881877 -548 -8.169657257122875 -549 -8.169663346394117 -550 -8.169669387024836 -551 -8.169675379404234 -552 -8.169681323918388 -553 -8.169687220950262 -554 -8.169693070879763 -555 -8.169698874083743 -556 -8.169704630936016 -557 -8.169710341807415 -558 -8.169716007065784 -559 -8.16972162707602 -560 -8.169727202200091 -561 -8.169732732797058 -562 -8.16973821922311 -563 -8.169743661831564 -564 -8.169749060972913 -565 -8.169754416994834 -566 -8.169759730242218 -567 -8.169765001057183 -568 -8.169770229779113 -569 -8.169775416744661 -570 -8.169780562287784 -571 -8.169785666739758 -572 -8.169790730429206 -573 -8.169795753682113 -574 -8.169800736821855 -575 -8.169805680169206 -576 -8.169810584042379 -577 -8.169815448757026 -578 -8.169820274626273 -579 -8.169825061960736 -580 -8.169829811068544 -581 -8.16983452225535 -582 -8.169839195824359 -583 -8.169843832076346 -584 -8.16984843130968 -585 -8.169852993820328 -586 -8.169857519901898 -587 -8.169862009845636 -588 -8.16986646394046 -589 -8.169870882472964 -590 -8.169875265727457 -591 -8.169879613985962 -592 -8.169883927528247 -593 -8.169888206631835 -594 -8.169892451572027 -595 -8.169896662621918 -596 -8.169900840052417 -597 -8.169904984132264 -598 -8.169909095128041 -599 -8.1699131733042 -600 -8.169917218923072 -601 -8.169921232244889 -602 -8.169925213527796 -603 -8.16992916302787 -604 -8.169933080999144 -605 -8.169936967693605 -606 -8.169940823361237 -607 -8.16994464825001 -608 -8.16994844260591 -609 -8.169952206672964 -610 -8.169955940693228 -611 -8.169959644906832 -612 -8.16996331955198 -613 -8.16996696486497 -614 -8.16997058108021 -615 -8.169974168430223 -616 -8.169977727145682 -617 -8.169981257455401 -618 -8.169984759586374 -619 -8.169988233763771 -620 -8.169991680210963 -621 -8.16999509914953 -622 -8.16999849079928 -623 -8.170001855378263 -624 -8.170005193102782 -625 -8.170008504187408 -626 -8.170011788844995 -627 -8.170015047286698 -628 -8.170018279721976 -629 -8.170021486358616 -630 -8.170024667402737 -631 -8.170027823058817 -632 -8.17003095352969 -633 -8.170034059016569 -634 -8.17003713971906 -635 -8.170040195835167 -636 -8.170043227561314 -637 -8.170046235092348 -638 -8.170049218621566 -639 -8.17005217834071 -640 -8.170055114439991 -641 -8.170058027108098 -642 -8.170060916532211 -643 -8.170063782898012 -644 -8.1700666263897 -645 -8.170069447189992 -646 -8.170072245480156 -647 -8.170075021439999 -648 -8.170077775247897 -649 -8.170080507080794 -650 -8.17008321711422 -651 -8.170085905522303 -652 -8.170088572477777 -653 -8.170091218151995 -654 -8.17009384271494 -655 -8.170096446335227 -656 -8.170099029180136 -657 -8.170101591415602 -658 -8.170104133206234 -659 -8.17010665471532 -660 -8.17010915610485 -661 -8.170111637535513 -662 -8.170114099166716 -663 -8.170116541156588 -664 -8.170118963661995 -665 -8.170121366838549 -666 -8.170123750840618 -667 -8.170126115821335 -668 -8.170128461932608 -669 -8.170130789325132 -670 -8.170133098148394 -671 -8.170135388550687 -672 -8.170137660679123 -673 -8.170139914679625 -674 -8.170142150696966 -675 -8.170144368874748 -676 -8.170146569355435 -677 -8.17014875228034 -678 -8.170150917789657 -679 -8.170153066022456 -680 -8.170155197116694 -681 -8.170157311209223 -682 -8.170159408435804 -683 -8.170161488931116 -684 -8.170163552828752 -685 -8.170165600261244 -686 -8.170167631360066 -687 -8.170169646255632 -688 -8.170171645077321 -689 -8.17017362795348 -690 -8.170175595011422 -691 -8.170177546377445 -692 -8.170179482176843 -693 -8.170181402533904 -694 -8.170183307571918 -695 -8.1701851974132 -696 -8.170187072179075 -697 -8.170188931989912 -698 -8.170190776965104 -699 -8.1701926072231 -700 -8.1701944228814 -701 -8.170196224056559 -702 -8.170198010864208 -703 -8.17019978341905 -704 -8.170201541834874 -705 -8.170203286224554 -706 -8.170205016700068 -707 -8.170206733372495 -708 -8.170208436352029 -709 -8.170210125747982 -710 -8.170211801668792 -711 -8.170213464222028 -712 -8.17021511351441 -713 -8.170216749651791 -714 -8.170218372739187 -715 -8.170219982880772 -716 -8.170221580179888 -717 -8.170223164739049 -718 -8.170224736659954 -719 -8.170226296043486 -720 -8.170227842989723 -721 -8.170229377597947 -722 -8.170230899966638 -723 -8.170232410193499 -724 -8.17023390837544 -725 -8.170235394608612 -726 -8.170236868988384 -727 -8.170238331609374 -728 -8.170239782565435 -729 -8.170241221949675 -730 -8.170242649854458 -731 -8.170244066371406 -732 -8.170245471591414 -733 -8.17024686560465 -734 -8.170248248500556 -735 -8.17024962036787 -736 -8.17025098129461 -737 -8.170252331368097 -738 -8.170253670674951 -739 -8.170254999301106 -740 -8.170256317331802 -741 -8.170257624851605 -742 -8.170258921944395 -743 -8.170260208693396 -744 -8.170261485181156 -745 -8.170262751489567 -746 -8.17026400769987 -747 -8.170265253892651 -748 -8.170266490147858 -749 -8.170267716544796 -750 -8.170268933162141 -751 -8.170270140077935 -752 -8.1702713373696 -753 -8.170272525113939 -754 -8.170273703387142 -755 -8.17027487226479 -756 -8.170276031821857 -757 -8.170277182132725 -758 -8.170278323271178 -759 -8.17027945531041 -760 -8.17028057832303 -761 -8.170281692381069 -762 -8.17028279755598 -763 -8.170283893918654 -764 -8.1702849815394 -765 -8.170286060487978 -766 -8.17028713083359 -767 -8.170288192644875 -768 -8.17028924598994 -769 -8.170290290936332 -770 -8.170291327551073 -771 -8.170292355900637 -772 -8.170293376050973 -773 -8.170294388067505 -774 -8.17029539201513 -775 -8.170296387958233 -776 -8.170297375960677 -777 -8.170298356085821 -778 -8.170299328396515 -779 -8.17030029295511 -780 -8.170301249823453 -781 -8.170302199062906 -782 -8.17030314073433 -783 -8.170304074898112 -784 -8.17030500161415 -785 -8.17030592094186 -786 -8.170306832940193 -787 -8.170307737667624 -788 -8.170308635182158 -789 -8.170309525541342 -790 -8.170310408802262 -791 -8.17031128502155 -792 -8.170312154255377 -793 -8.17031301655948 -794 -8.170313871989135 -795 -8.170314720599192 -796 -8.170315562444053 -797 -8.170316397577686 -798 -8.170317226053632 -799 -8.170318047925004 -800 -8.17031886324449 -801 -8.170319672064355 -802 -8.17032047443645 -803 -8.170321270412211 -804 -8.170322060042661 -805 -8.170322843378422 -806 -8.170323620469702 -807 -8.170324391366318 -808 -8.170325156117684 -809 -8.17032591477282 -810 -8.170326667380355 -811 -8.17032741398853 -812 -8.1703281546452 -813 -8.17032888939784 -814 -8.170329618293545 -815 -8.170330341379032 -816 -8.170331058700645 -817 -8.170331770304363 -818 -8.170332476235794 -819 -8.170333176540181 -820 -8.170333871262407 -821 -8.170334560447003 -822 -8.170335244138132 -823 -8.17033592237961 -824 -8.17033659521491 -825 -8.170337262687148 -826 -8.170337924839101 -827 -8.170338581713203 -828 -8.170339233351552 -829 -8.170339879795906 -830 -8.17034052108769 -831 -8.170341157268002 -832 -8.170341788377609 -833 -8.170342414456954 -834 -8.170343035546153 -835 -8.170343651685009 -836 -8.170344262913003 -837 -8.1703448692693 -838 -8.170345470792755 -839 -8.170346067521908 -840 -8.170346659495001 -841 -8.170347246749959 -842 -8.170347829324413 -843 -8.170348407255691 -844 -8.17034898058082 -845 -8.170349549336539 -846 -8.170350113559284 -847 -8.170350673285208 -848 -8.17035122855017 -849 -8.17035177938975 -850 -8.170352325839236 -851 -8.170352867933635 -852 -8.170353405707683 -853 -8.17035393919583 -854 -8.170354468432256 -855 -8.170354993450866 -856 -8.170355514285294 -857 -8.170356030968907 -858 -8.170356543534805 -859 -8.170357052015824 -860 -8.170357556444536 -861 -8.170358056853258 -862 -8.170358553274045 -863 -8.170359045738698 -864 -8.170359534278761 -865 -8.17036001892553 -866 -8.170360499710052 -867 -8.17036097666312 -868 -8.17036144981529 -869 -8.170361919196868 -870 -8.170362384837919 -871 -8.17036284676827 -872 -8.170363305017506 -873 -8.170363759614983 -874 -8.170364210589817 -875 -8.170364657970893 -876 -8.170365101786865 -877 -8.17036554206616 -878 -8.170365978836976 -879 -8.17036641212729 -880 -8.17036684196485 -881 -8.170367268377188 -882 -8.170367691391611 -883 -8.170368111035215 -884 -8.170368527334873 -885 -8.170368940317246 -886 -8.170369350008784 -887 -8.170369756435726 -888 -8.170370159624097 -889 -8.170370559599721 -890 -8.17037095638821 -891 -8.170371350014975 -892 -8.170371740505226 -893 -8.170372127883963 -894 -8.170372512176 -895 -8.170372893405943 -896 -8.170373271598201 -897 -8.170373646777001 -898 -8.17037401896636 -899 -8.170374388190112 -900 -8.170374754471899 -901 -8.170375117835182 -902 -8.170375478303217 -903 -8.170375835899094 -904 -8.170376190645708 -905 -8.170376542565775 -906 -8.170376891681823 -907 -8.17037723801621 -908 -8.170377581591111 -909 -8.170377922428527 -910 -8.170378260550276 -911 -8.17037859597801 -912 -8.170378928733202 -913 -8.170379258837162 -914 -8.170379586311018 -915 -8.170379911175742 -916 -8.170380233452132 -917 -8.170380553160816 -918 -8.17038087032227 -919 -8.170381184956794 -920 -8.170381497084533 -921 -8.17038180672547 -922 -8.170382113899429 -923 -8.17038241862607 -924 -8.17038272092491 -925 -8.17038302081529 -926 -8.170383318316418 -927 -8.170383613447335 -928 -8.170383906226936 -929 -8.170384196673961 -930 -8.170384484807004 -931 -8.170384770644509 -932 -8.170385054204777 -933 -8.170385335505955 -934 -8.170385614566051 -935 -8.17038589140293 -936 -8.170386166034312 -937 -8.170386438477772 -938 -8.170386708750756 -939 -8.170386976870562 -940 -8.17038724285435 -941 -8.170387506719145 -942 -8.170387768481838 -943 -8.170388028159184 -944 -8.170388285767803 -945 -8.170388541324183 -946 -8.170388794844683 -947 -8.17038904634553 -948 -8.170389295842817 -949 -8.170389543352513 -950 -8.170389788890466 -951 -8.170390032472383 -952 -8.17039027411386 -953 -8.170390513830359 -954 -8.170390751637223 -955 -8.17039098754967 -956 -8.1703912215828 -957 -8.170391453751591 -958 -8.170391684070903 -959 -8.170391912555473 -960 -8.170392139219922 -961 -8.170392364078761 -962 -8.170392587146377 -963 -8.170392808437047 -964 -8.170393027964929 -965 -8.170393245744075 -966 -8.170393461788422 -967 -8.170393676111791 -968 -8.1703938887279 -969 -8.170394099650357 -970 -8.170394308892657 -971 -8.17039451646819 -972 -8.170394722390236 -973 -8.17039492667198 -974 -8.170395129326486 -975 -8.170395330366725 -976 -8.170395529805559 -977 -8.170395727655752 -978 -8.170395923929965 -979 -8.170396118640753 -980 -8.17039631180058 -981 -8.1703965034218 -982 -8.170396693516679 -983 -8.170396882097377 -984 -8.17039706917596 -985 -8.1703972547644 -986 -8.170397438874572 -987 -8.170397621518253 -988 -8.17039780270713 -989 -8.170397982452798 -990 -8.170398160766755 -991 -8.17039833766041 -992 -8.17039851314508 -993 -8.170398687231996 -994 -8.170398859932293 -995 -8.170399031257018 -996 -8.170399201217139 -997 -8.17039936982352 -998 -8.170399537086956 -999 -8.170399703018145 -1000 -8.170399867627701 -1001 -8.17040003092616 -1002 -8.170400192923962 -1003 -8.170400353631479 -1004 -8.170400513058983 -1005 -8.170400671216681 -1006 -8.170400828114687 -1007 -8.170400983763036 -1008 -8.170401138171693 -1009 -8.170401291350528 -1010 -8.170401443309343 -1011 -8.170401594057857 -1012 -8.17040174360572 -1013 -8.17040189196249 -1014 -8.17040203913766 -1015 -8.170402185140649 -1016 -8.170402329980789 -1017 -8.170402473667354 -1018 -8.170402616209527 -1019 -8.17040275761643 -1020 -8.170402897897109 -1021 -8.170403037060535 -1022 -8.17040317511561 -1023 -8.170403312071166 -1024 -8.170403447935962 -1025 -8.17040358271869 -1026 -8.17040371642797 -1027 -8.170403849072354 -1028 -8.170403980660328 -1029 -8.170404111200307 -1030 -8.17040424070064 -1031 -8.170404369169614 -1032 -8.17040449661544 -1033 -8.170404623046274 -1034 -8.170404748470201 -1035 -8.170404872895242 -1036 -8.170404996329358 -1037 -8.170405118780442 -1038 -8.170405240256324 -1039 -8.170405360764775 -1040 -8.170405480313503 -1041 -8.170405598910154 -1042 -8.170405716562312 -1043 -8.170405833277501 -1044 -8.170405949063188 -1045 -8.170406063926775 -1046 -8.17040617787561 -1047 -8.170406290916981 -1048 -8.170406403058113 -1049 -8.170406514306183 -1050 -8.170406624668306 -1051 -8.170406734151534 -1052 -8.170406842762874 -1053 -8.170406950509273 -1054 -8.170407057397615 -1055 -8.170407163434742 -1056 -8.17040726862743 -1057 -8.17040737298241 -1058 -8.170407476506353 -1059 -8.170407579205882 -1060 -8.17040768108756 -1061 -8.170407782157907 -1062 -8.170407882423383 -1063 -8.170407981890401 -1064 -8.170408080565322 -1065 -8.170408178454455 -1066 -8.170408275564057 -1067 -8.170408371900342 -1068 -8.17040846746947 -1069 -8.17040856227755 -1070 -8.170408656330647 -1071 -8.170408749634772 -1072 -8.170408842195894 -1073 -8.170408934019928 -1074 -8.170409025112749 -1075 -8.170409115480181 -1076 -8.170409205128001 -1077 -8.170409294061944 -1078 -8.170409382287692 -1079 -8.170409469810892 -1080 -8.170409556637136 -1081 -8.170409642771974 -1082 -8.170409728220918 -1083 -8.17040981298943 -1084 -8.17040989708293 -1085 -8.170409980506793 -1086 -8.170410063266356 -1087 -8.170410145366908 -1088 -8.170410226813697 -1089 -8.170410307611938 -1090 -8.170410387766788 -1091 -8.170410467283377 -1092 -8.170410546166785 -1093 -8.17041062442206 -1094 -8.170410702054204 -1095 -8.170410779068176 -1096 -8.170410855468905 -1097 -8.170410931261273 -1098 -8.170411006450129 -1099 -8.170411081040276 -1100 -8.170411155036485 -1101 -8.170411228443484 -1102 -8.17041130126597 -1103 -8.170411373508596 -1104 -8.170411445175983 -1105 -8.170411516272708 -1106 -8.170411586803322 -1107 -8.17041165677233 -1108 -8.170411726184208 -1109 -8.17041179504339 -1110 -8.170411863354282 -1111 -8.170411931121249 -1112 -8.170411998348621 -1113 -8.1704120650407 -1114 -8.170412131201749 -1115 -8.170412196835994 -1116 -8.17041226194763 -1117 -8.170412326540827 -1118 -8.170412390619708 -1119 -8.17041245418837 -1120 -8.170412517250877 -1121 -8.17041257981126 -1122 -8.17041264187352 -1123 -8.170412703441624 -1124 -8.170412764519506 -1125 -8.170412825111072 -1126 -8.170412885220193 -1127 -8.170412944850714 -1128 -8.170413004006443 -1129 -8.170413062691166 -1130 -8.170413120908634 -1131 -8.170413178662562 -1132 -8.170413235956648 -1133 -8.170413292794553 -1134 -8.170413349179912 -1135 -8.170413405116323 -1136 -8.170413460607367 -1137 -8.170413515656588 -1138 -8.170413570267506 -1139 -8.170413624443613 -1140 -8.17041367818837 -1141 -8.170413731505212 -1142 -8.170413784397548 -1143 -8.170413836868759 -1144 -8.170413888922198 -1145 -8.170413940561195 -1146 -8.170413991789045 -1147 -8.170414042609028 -1148 -8.170414093024386 -1149 -8.170414143038348 -1150 -8.170414192654107 -1151 -8.170414241874834 -1152 -8.170414290703675 -1153 -8.170414339143754 -1154 -8.170414387198162 -1155 -8.170414434869976 -1156 -8.170414482162238 -1157 -8.170414529077973 -1158 -8.17041457562018 -1159 -8.17041462179183 -1160 -8.170414667595878 -1161 -8.170414713035251 -1162 -8.170414758112852 -1163 -8.170414802831562 -1164 -8.170414847194237 -1165 -8.170414891203718 -1166 -8.170414934862814 -1167 -8.170414978174314 -1168 -8.170415021140988 -1169 -8.170415063765581 -1170 -8.170415106050818 -1171 -8.170415147999401 -1172 -8.170415189614012 -1173 -8.170415230897307 -1174 -8.170415271851928 -1175 -8.170415312480493 -1176 -8.170415352785595 -1177 -8.170415392769812 -1178 -8.170415432435698 -1179 -8.17041547178579 -1180 -8.1704155108226 -1181 -8.170415549548624 -1182 -8.170415587966337 -1183 -8.170415626078194 -1184 -8.170415663886633 -1185 -8.170415701394067 -1186 -8.170415738602891 -1187 -8.170415775515487 -1188 -8.170415812134213 -1189 -8.170415848461408 -1190 -8.170415884499393 -1191 -8.170415920250473 -1192 -8.170415955716932 -1193 -8.170415990901033 -1194 -8.17041602580503 -1195 -8.170416060431151 -1196 -8.170416094781608 -1197 -8.170416128858594 -1198 -8.170416162664294 -1199 -8.17041619620086 -1200 -8.170416229470439 -1201 -8.170416262475156 -1202 -8.170416295217121 -1203 -8.170416327698426 -1204 -8.170416359921145 -1205 -8.170416391887338 -1206 -8.170416423599049 -1207 -8.170416455058302 -1208 -8.170416486267108 -1209 -8.170416517227462 -1210 -8.170416547941343 -1211 -8.170416578410709 -1212 -8.170416608637515 -1213 -8.170416638623685 -1214 -8.17041666837114 -1215 -8.170416697881777 -1216 -8.170416727157484 -1217 -8.170416756200131 -1218 -8.170416785011572 -1219 -8.170416813593652 -1220 -8.170416841948194 -1221 -8.170416870077009 -1222 -8.170416897981898 -1223 -8.170416925664641 -1224 -8.170416953127006 -1225 -8.170416980370753 -1226 -8.170417007397617 -1227 -8.170417034209327 -1228 -8.170417060807598 -1229 -8.170417087194126 -1230 -8.170417113370597 -1231 -8.170417139338687 -1232 -8.170417165100055 -1233 -8.170417190656341 -1234 -8.170417216009184 -1235 -8.170417241160203 -1236 -8.170417266111002 -1237 -8.170417290863178 -1238 -8.170417315418312 -1239 -8.170417339777972 -1240 -8.170417363943715 -1241 -8.170417387917084 -1242 -8.17041741169961 -1243 -8.170417435292816 -1244 -8.170417458698207 -1245 -8.170417481917278 -1246 -8.170417504951514 -1247 -8.170417527802385 -1248 -8.170417550471353 -1249 -8.170417572959863 -1250 -8.170417595269356 -1251 -8.170417617401252 -1252 -8.17041763935697 -1253 -8.170417661137911 -1254 -8.170417682745466 -1255 -8.170417704181013 -1256 -8.170417725445928 -1257 -8.170417746541567 -1258 -8.170417767469273 -1259 -8.170417788230388 -1260 -8.170417808826237 -1261 -8.170417829258135 -1262 -8.170417849527388 -1263 -8.170417869635292 -1264 -8.17041788958313 -1265 -8.170417909372176 -1266 -8.170417929003696 -1267 -8.170417948478944 -1268 -8.170417967799162 -1269 -8.170417986965587 -1270 -8.170418005979444 -1271 -8.170418024841943 -1272 -8.170418043554292 -1273 -8.17041806211769 -1274 -8.170418080533317 -1275 -8.170418098802351 -1276 -8.170418116925962 -1277 -8.170418134905304 -1278 -8.170418152741528 -1279 -8.170418170435772 -1280 -8.170418187989165 -1281 -8.170418205402834 -1282 -8.170418222677888 -1283 -8.17041823981543 -1284 -8.170418256816552 -1285 -8.170418273682346 -1286 -8.170418290413885 -1287 -8.170418307012241 -1288 -8.170418323478472 -1289 -8.170418339813631 -1290 -8.17041835601876 -1291 -8.170418372094899 -1292 -8.170418388043068 -1293 -8.17041840386429 -1294 -8.170418419559574 -1295 -8.170418435129925 -1296 -8.170418450576335 -1297 -8.170418465899791 -1298 -8.170418481101274 -1299 -8.170418496181753 -1300 -8.170418511142191 -1301 -8.170418525983546 -1302 -8.170418540706764 -1303 -8.170418555312787 -1304 -8.170418569802546 -1305 -8.170418584176968 -1306 -8.170418598436973 -1307 -8.170418612583468 -1308 -8.170418626617357 -1309 -8.170418640539541 -1310 -8.170418654350906 -1311 -8.170418668052331 -1312 -8.170418681644696 -1313 -8.17041869512887 -1314 -8.17041870850571 -1315 -8.170418721776073 -1316 -8.170418734940807 -1317 -8.170418748000753 -1318 -8.170418760956744 -1319 -8.170418773809608 -1320 -8.170418786560166 -1321 -8.170418799209232 -1322 -8.170418811757614 -1323 -8.170418824206115 -1324 -8.170418836555527 -1325 -8.170418848806644 -1326 -8.170418860960243 -1327 -8.170418873017104 -1328 -8.170418884977995 -1329 -8.170418896843682 -1330 -8.170418908614922 -1331 -8.170418920292464 -1332 -8.170418931877059 -1333 -8.170418943369443 -1334 -8.170418954770351 -1335 -8.170418966080513 -1336 -8.17041897730065 -1337 -8.170418988431479 -1338 -8.17041899947371 -1339 -8.17041901042805 -1340 -8.170419021295196 -1341 -8.170419032075847 -1342 -8.170419042770686 -1343 -8.170419053380398 -1344 -8.170419063905662 -1345 -8.170419074347148 -1346 -8.170419084705527 -1347 -8.170419094981456 -1348 -8.170419105175593 -1349 -8.170419115288592 -1350 -8.170419125321093 -1351 -8.170419135273741 -1352 -8.170419145147171 -1353 -8.170419154942014 -1354 -8.170419164658894 -1355 -8.170419174298434 -1356 -8.170419183861245 -1357 -8.170419193347943 -1358 -8.170419202759133 -1359 -8.170419212095414 -1360 -8.170419221357381 -1361 -8.17041923054563 -1362 -8.170419239660745 -1363 -8.170419248703311 -1364 -8.170419257673903 -1365 -8.170419266573091 -1366 -8.17041927540145 -1367 -8.170419284159538 -1368 -8.17041929284792 -1369 -8.170419301467144 -1370 -8.170419310017767 -1371 -8.17041931850033 -1372 -8.170419326915379 -1373 -8.170419335263448 -1374 -8.170419343545074 -1375 -8.170419351760783 -1376 -8.1704193599111 -1377 -8.170419367996546 -1378 -8.170419376017637 -1379 -8.170419383974886 -1380 -8.170419391868801 -1381 -8.170419399699885 -1382 -8.17041940746864 -1383 -8.17041941517556 -1384 -8.17041942282114 -1385 -8.170419430405865 -1386 -8.170419437930223 -1387 -8.17041944539469 -1388 -8.170419452799749 -1389 -8.170419460145867 -1390 -8.170419467433515 -1391 -8.17041947466316 -1392 -8.170419481835262 -1393 -8.17041948895028 -1394 -8.17041949600867 -1395 -8.170419503010876 -1396 -8.170419509957355 -1397 -8.170419516848542 -1398 -8.170419523684883 -1399 -8.17041953046681 -1400 -8.17041953719476 -1401 -8.170419543869162 -1402 -8.17041955049044 -1403 -8.170419557059018 -1404 -8.170419563575317 -1405 -8.170419570039751 -1406 -8.170419576452733 -1407 -8.170419582814674 -1408 -8.170419589125979 -1409 -8.170419595387052 -1410 -8.170419601598292 -1411 -8.170419607760097 -1412 -8.170419613872859 -1413 -8.170419619936968 -1414 -8.170419625952812 -1415 -8.170419631920778 -1416 -8.170419637841242 -1417 -8.170419643714586 -1418 -8.170419649541184 -1419 -8.170419655321407 -1420 -8.170419661055625 -1421 -8.170419666744204 -1422 -8.170419672387508 -1423 -8.170419677985896 -1424 -8.170419683539727 -1425 -8.170419689049352 -1426 -8.170419694515129 -1427 -8.170419699937405 -1428 -8.170419705316522 -1429 -8.170419710652826 -1430 -8.170419715946661 -1431 -8.170419721198362 -1432 -8.170419726408264 -1433 -8.1704197315767 -1434 -8.170419736704002 -1435 -8.170419741790496 -1436 -8.170419746836505 -1437 -8.170419751842354 -1438 -8.170419756808364 -1439 -8.170419761734847 -1440 -8.170419766622121 -1441 -8.170419771470497 -1442 -8.170419776280287 -1443 -8.170419781051795 -1444 -8.170419785785327 -1445 -8.170419790481185 -1446 -8.17041979513967 -1447 -8.170419799761078 -1448 -8.170419804345705 -1449 -8.170419808893843 -1450 -8.170419813405784 -1451 -8.170419817881815 -1452 -8.17041982232222 -1453 -8.170419826727287 -1454 -8.170419831097293 -1455 -8.170419835432519 -1456 -8.17041983973324 -1457 -8.170419843999733 -1458 -8.170419848232271 -1459 -8.170419852431124 -1460 -8.170419856596556 -1461 -8.170419860728838 -1462 -8.170419864828231 -1463 -8.170419868895 -1464 -8.170419872929399 -1465 -8.17041987693169 -1466 -8.170419880902129 -1467 -8.170419884840967 -1468 -8.170419888748457 -1469 -8.170419892624846 -1470 -8.170419896470387 -1471 -8.170419900285323 -1472 -8.170419904069893 -1473 -8.170419907824344 -1474 -8.170419911548915 -1475 -8.170419915243842 -1476 -8.170419918909362 -1477 -8.17041992254571 -1478 -8.170419926153118 -1479 -8.170419929731814 -1480 -8.170419933282027 -1481 -8.170419936803988 -1482 -8.170419940297917 -1483 -8.170419943764038 -1484 -8.170419947202573 -1485 -8.170419950613745 -1486 -8.170419953997765 -1487 -8.170419957354856 -1488 -8.170419960685226 -1489 -8.170419963989092 -1490 -8.170419967266662 -1491 -8.17041997051815 -1492 -8.170419973743758 -1493 -8.170419976943695 -1494 -8.170419980118163 -1495 -8.17041998326737 -1496 -8.17041998639151 -1497 -8.170419989490789 -1498 -8.1704199925654 -1499 -8.170419995615543 -1500 -8.17041999864141 -1501 -8.170420001643196 -1502 -8.170420004621091 -1503 -8.170420007575286 -1504 -8.170420010505971 -1505 -8.17042001341333 -1506 -8.170420016297552 -1507 -8.170420019158819 -1508 -8.170420021997316 -1509 -8.17042002481322 -1510 -8.170420027606715 -1511 -8.170420030377976 -1512 -8.170420033127183 -1513 -8.170420035854509 -1514 -8.17042003856013 -1515 -8.170420041244219 -1516 -8.170420043906946 -1517 -8.170420046548482 -1518 -8.170420049168992 -1519 -8.170420051768652 -1520 -8.170420054347618 -1521 -8.170420056906062 -1522 -8.170420059444142 -1523 -8.170420061962027 -1524 -8.170420064459869 -1525 -8.170420066937833 -1526 -8.170420069396076 -1527 -8.170420071834755 -1528 -8.170420074254027 -1529 -8.170420076654043 -1530 -8.170420079034962 -1531 -8.170420081396928 -1532 -8.1704200837401 -1533 -8.170420086064622 -1534 -8.170420088370646 -1535 -8.170420090658315 -1536 -8.170420092927777 -1537 -8.170420095179182 -1538 -8.170420097412666 -1539 -8.170420099628375 -1540 -8.170420101826451 -1541 -8.170420104007034 -1542 -8.170420106170262 -1543 -8.170420108316275 -1544 -8.17042011044521 -1545 -8.1704201125572 -1546 -8.170420114652384 -1547 -8.17042011673089 -1548 -8.170420118792856 -1549 -8.170420120838411 -1550 -8.170420122867691 -1551 -8.170420124880819 -1552 -8.170420126877922 -1553 -8.170420128859135 -1554 -8.170420130824581 -1555 -8.170420132774382 -1556 -8.17042013470867 -1557 -8.170420136627559 -1558 -8.170420138531181 -1559 -8.170420140419651 -1560 -8.170420142293093 -1561 -8.170420144151624 -1562 -8.170420145995367 -1563 -8.170420147824434 -1564 -8.170420149638945 -1565 -8.170420151439014 -1566 -8.170420153224761 -1567 -8.170420154996295 -1568 -8.17042015675373 -1569 -8.17042015849718 -1570 -8.170420160226753 -1571 -8.170420161942562 -1572 -8.170420163644717 -1573 -8.170420165333326 -1574 -8.170420167008494 -1575 -8.170420168670333 -1576 -8.170420170318945 -1577 -8.170420171954436 -1578 -8.170420173576913 -1579 -8.170420175186477 -1580 -8.170420176783233 -1581 -8.17042017836728 -1582 -8.170420179938722 -1583 -8.170420181497656 -1584 -8.170420183044186 -1585 -8.170420184578406 -1586 -8.170420186100415 -1587 -8.170420187610315 -1588 -8.170420189108198 -1589 -8.17042019059416 -1590 -8.170420192068296 -1591 -8.170420193530699 -1592 -8.170420194981466 -1593 -8.170420196420686 -1594 -8.170420197848452 -1595 -8.170420199264857 -1596 -8.170420200669989 -1597 -8.17042020206394 -1598 -8.170420203446795 -1599 -8.170420204818646 -1600 -8.17042020617958 -1601 -8.170420207529684 -1602 -8.170420208869041 -1603 -8.170420210197742 -1604 -8.170420211515866 -1605 -8.170420212823503 -1606 -8.170420214120732 -1607 -8.170420215407638 -1608 -8.1704202166843 -1609 -8.170420217950804 -1610 -8.17042021920723 -1611 -8.170420220453655 -1612 -8.170420221690161 -1613 -8.170420222916828 -1614 -8.170420224133732 -1615 -8.170420225340951 -1616 -8.170420226538566 -1617 -8.170420227726646 -1618 -8.170420228905273 -1619 -8.170420230074521 -1620 -8.170420231234461 -1621 -8.170420232385172 -1622 -8.170420233526727 -1623 -8.170420234659193 -1624 -8.17042023578265 -1625 -8.170420236897167 -1626 -8.170420238002812 -1627 -8.17042023909966 -1628 -8.170420240187777 -1629 -8.170420241267237 -1630 -8.170420242338105 -1631 -8.17042024340045 -1632 -8.170420244454343 -1633 -8.170420245499848 -1634 -8.17042024653703 -1635 -8.170420247565962 -1636 -8.170420248586703 -1637 -8.170420249599324 -1638 -8.170420250603883 -1639 -8.17042025160045 -1640 -8.170420252589084 -1641 -8.170420253569851 -1642 -8.170420254542814 -1643 -8.170420255508034 -1644 -8.170420256465569 -1645 -8.170420257415488 -1646 -8.170420258357847 -1647 -8.170420259292705 -1648 -8.170420260220125 -1649 -8.170420261140164 -1650 -8.170420262052879 -1651 -8.170420262958332 -1652 -8.170420263856581 -1653 -8.17042026474768 -1654 -8.170420265631687 -1655 -8.17042026650866 -1656 -8.170420267378656 -1657 -8.170420268241726 -1658 -8.170420269097928 -1659 -8.170420269947314 -1660 -8.170420270789943 -1661 -8.170420271625867 -1662 -8.170420272455138 -1663 -8.17042027327781 -1664 -8.170420274093933 -1665 -8.170420274903563 -1666 -8.170420275706748 -1667 -8.170420276503544 -1668 -8.170420277293998 -1669 -8.17042027807816 -1670 -8.170420278856085 -1671 -8.170420279627816 -1672 -8.170420280393408 -1673 -8.170420281152907 -1674 -8.17042028190636 -1675 -8.170420282653817 -1676 -8.170420283395325 -1677 -8.170420284130936 -1678 -8.17042028486069 -1679 -8.170420285584637 -1680 -8.170420286302823 -1681 -8.170420287015293 -1682 -8.170420287722095 -1683 -8.170420288423271 -1684 -8.170420289118868 -1685 -8.170420289808927 -1686 -8.170420290493498 -1687 -8.170420291172618 -1688 -8.170420291846334 -1689 -8.17042029251469 -1690 -8.170420293177727 -1691 -8.170420293835488 -1692 -8.170420294488013 -1693 -8.170420295135346 -1694 -8.170420295777527 -1695 -8.170420296414598 -1696 -8.170420297046599 -1697 -8.170420297673571 -1698 -8.170420298295554 -1699 -8.170420298912587 -1700 -8.170420299524707 -1701 -8.17042030013196 -1702 -8.170420300734378 -1703 -8.170420301332001 -1704 -8.170420301924871 -1705 -8.170420302513019 -1706 -8.170420303096492 -1707 -8.170420303675318 -1708 -8.170420304249538 -1709 -8.170420304819189 -1710 -8.170420305384308 -1711 -8.170420305944926 -1712 -8.170420306501086 -1713 -8.170420307052819 -1714 -8.170420307600162 -1715 -8.170420308143148 -1716 -8.170420308681814 -1717 -8.170420309216194 -1718 -8.17042030974632 -1719 -8.17042031027223 -1720 -8.17042031079395 -1721 -8.170420311311522 -1722 -8.170420311824973 -1723 -8.17042031233434 -1724 -8.170420312839651 -1725 -8.170420313340943 -1726 -8.170420313838246 -1727 -8.17042031433159 -1728 -8.170420314821008 -1729 -8.170420315306531 -1730 -8.170420315788192 -1731 -8.17042031626602 -1732 -8.170420316740044 -1733 -8.170420317210295 -1734 -8.170420317676806 -1735 -8.170420318139602 -1736 -8.170420318598719 -1737 -8.17042031905418 -1738 -8.170420319506016 -1739 -8.170420319954259 -1740 -8.17042032039893 -1741 -8.170420320840066 -1742 -8.17042032127769 -1743 -8.170420321711832 -1744 -8.170420322142519 -1745 -8.17042032256978 -1746 -8.17042032299364 -1747 -8.170420323414127 -1748 -8.17042032383127 -1749 -8.170420324245088 -1750 -8.170420324655616 -1751 -8.170420325062876 -1752 -8.170420325466898 -1753 -8.170420325867703 -1754 -8.170420326265317 -1755 -8.17042032665977 -1756 -8.170420327051083 -1757 -8.17042032743928 -1758 -8.170420327824388 -1759 -8.170420328206433 -1760 -8.170420328585436 -1761 -8.170420328961423 -1762 -8.170420329334421 -1763 -8.170420329704449 -1764 -8.170420330071533 -1765 -8.170420330435693 -1766 -8.170420330796958 -1767 -8.170420331155348 -1768 -8.170420331510885 -1769 -8.170420331863593 -1770 -8.170420332213492 -1771 -8.17042033256061 -1772 -8.170420332904964 -1773 -8.170420333246577 -1774 -8.170420333585474 -1775 -8.170420333921673 -1776 -8.170420334255194 -1777 -8.170420334586064 -1778 -8.1704203349143 -1779 -8.170420335239925 -1780 -8.170420335562957 -1781 -8.17042033588342 -1782 -8.170420336201332 -1783 -8.170420336516715 -1784 -8.170420336829586 -1785 -8.170420337139968 -1786 -8.170420337447881 -1787 -8.170420337753344 -1788 -8.170420338056374 -1789 -8.170420338356994 -1790 -8.170420338655223 -1791 -8.170420338951077 -1792 -8.170420339244576 -1793 -8.170420339535742 -1794 -8.17042033982459 -1795 -8.170420340111137 -1796 -8.170420340395408 -1797 -8.170420340677413 -1798 -8.170420340957175 -1799 -8.170420341234712 -1800 -8.17042034151004 -1801 -8.170420341783176 -1802 -8.170420342054138 -1803 -8.170420342322945 -1804 -8.170420342589612 -1805 -8.17042034285416 -1806 -8.170420343116598 -1807 -8.17042034337695 -1808 -8.17042034363523 -1809 -8.170420343891456 -1810 -8.17042034414564 -1811 -8.170420344397803 -1812 -8.170420344647962 -1813 -8.170420344896126 -1814 -8.170420345142317 -1815 -8.170420345386548 -1816 -8.170420345628838 -1817 -8.170420345869196 -1818 -8.170420346107644 -1819 -8.170420346344192 -1820 -8.170420346578862 -1821 -8.170420346811662 -1822 -8.17042034704261 -1823 -8.170420347271719 -1824 -8.170420347499006 -1825 -8.17042034772448 -1826 -8.170420347948165 -1827 -8.17042034817007 -1828 -8.170420348390207 -1829 -8.170420348608593 -1830 -8.17042034882524 -1831 -8.170420349040164 -1832 -8.170420349253378 -1833 -8.170420349464896 -1834 -8.170420349674728 -1835 -8.170420349882892 -1836 -8.1704203500894 -1837 -8.170420350294265 -1838 -8.170420350497498 -1839 -8.170420350699114 -1840 -8.170420350899128 -1841 -8.170420351097547 -1842 -8.17042035129439 -1843 -8.170420351489664 -1844 -8.170420351683386 -1845 -8.170420351875565 -1846 -8.170420352066216 -1847 -8.170420352255348 -1848 -8.170420352442976 -1849 -8.170420352629112 -1850 -8.170420352813764 -1851 -8.170420352996949 -1852 -8.170420353178677 -1853 -8.170420353358958 -1854 -8.170420353537803 -1855 -8.170420353715226 -1856 -8.170420353891238 -1857 -8.170420354065847 -1858 -8.170420354239067 -1859 -8.170420354410911 -1860 -8.170420354581385 -1861 -8.170420354750503 -1862 -8.170420354918274 -1863 -8.170420355084714 -1864 -8.170420355249826 -1865 -8.170420355413626 -1866 -8.17042035557612 -1867 -8.170420355737322 -1868 -8.170420355897242 -1869 -8.170420356055889 -1870 -8.170420356213274 -1871 -8.170420356369405 -1872 -8.170420356524296 -1873 -8.170420356677955 -1874 -8.17042035683039 -1875 -8.17042035698161 -1876 -8.170420357131627 -1877 -8.170420357280454 -1878 -8.170420357428092 -1879 -8.170420357574557 -1880 -8.170420357719857 -1881 -8.170420357864002 -1882 -8.170420358006997 -1883 -8.170420358148855 -1884 -8.170420358289585 -1885 -8.170420358429194 -1886 -8.170420358567695 -1887 -8.170420358705089 -1888 -8.170420358841394 -1889 -8.17042035897661 -1890 -8.170420359110754 -1891 -8.170420359243831 -1892 -8.170420359375845 -1893 -8.170420359506812 -1894 -8.170420359636735 -1895 -8.170420359765625 -1896 -8.170420359893487 -1897 -8.170420360020334 -1898 -8.17042036014617 -1899 -8.170420360271008 -1900 -8.17042036039485 -1901 -8.170420360517706 -1902 -8.170420360639586 -1903 -8.170420360760495 -1904 -8.170420360880442 -1905 -8.170420360999435 -1906 -8.170420361117479 -1907 -8.170420361234585 -1908 -8.17042036135076 -1909 -8.170420361466011 -1910 -8.170420361580344 -1911 -8.170420361693767 -1912 -8.170420361806286 -1913 -8.170420361917913 -1914 -8.170420362028649 -1915 -8.170420362138506 -1916 -8.170420362247487 -1917 -8.1704203623556 -1918 -8.170420362462854 -1919 -8.170420362569255 -1920 -8.17042036267481 -1921 -8.170420362779522 -1922 -8.170420362883403 -1923 -8.170420362986457 -1924 -8.170420363088692 -1925 -8.170420363190111 -1926 -8.170420363290724 -1927 -8.170420363390535 -1928 -8.170420363489555 -1929 -8.170420363587784 -1930 -8.170420363685233 -1931 -8.170420363781908 -1932 -8.170420363877811 -1933 -8.170420363972951 -1934 -8.170420364067336 -1935 -8.170420364160968 -1936 -8.170420364253857 -1937 -8.170420364346004 -1938 -8.17042036443742 -1939 -8.170420364528107 -1940 -8.170420364618073 -1941 -8.170420364707322 -1942 -8.170420364795863 -1943 -8.170420364883698 -1944 -8.170420364970836 -1945 -8.170420365057279 -1946 -8.170420365143032 -1947 -8.170420365228107 -1948 -8.1704203653125 -1949 -8.170420365396225 -1950 -8.170420365479284 -1951 -8.17042036556168 -1952 -8.170420365643421 -1953 -8.170420365724514 -1954 -8.170420365804958 -1955 -8.170420365884764 -1956 -8.170420365963935 -1957 -8.170420366042475 -1958 -8.170420366120391 -1959 -8.170420366197686 -1960 -8.170420366274366 -1961 -8.170420366350436 -1962 -8.170420366425901 -1963 -8.170420366500764 -1964 -8.170420366575033 -1965 -8.17042036664871 -1966 -8.170420366721803 -1967 -8.17042036679431 -1968 -8.170420366866244 -1969 -8.170420366937604 -1970 -8.170420367008397 -1971 -8.170420367078627 -1972 -8.170420367148296 -1973 -8.170420367217412 -1974 -8.17042036728598 -1975 -8.170420367353998 -1976 -8.170420367421478 -1977 -8.170420367488418 -1978 -8.170420367554827 -1979 -8.170420367620709 -1980 -8.170420367686065 -1981 -8.170420367750902 -1982 -8.170420367815222 -1983 -8.17042036787903 -1984 -8.170420367942333 -1985 -8.170420368005129 -1986 -8.170420368067427 -1987 -8.170420368129228 -1988 -8.17042036819054 -1989 -8.17042036825136 -1990 -8.1704203683117 -1991 -8.170420368371557 -1992 -8.170420368430939 -1993 -8.170420368489847 -1994 -8.170420368548287 -1995 -8.170420368606262 -1996 -8.170420368663777 -1997 -8.170420368720835 -1998 -8.170420368777437 -1999 -8.17042036883359 -2000 -8.170420368889292 diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/log.log b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/log.log deleted file mode 100644 index 375d01fb..00000000 --- a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/log.log +++ /dev/null @@ -1,34 +0,0 @@ -2024-01-14T19:40:06.750 -== Config == -TAG: v4_infra -STLCGenerationParams(true, 2, 1) -ApproxSTLCConstructorEntropy() -EPOCHS: 2000 -LEARNING_RATE: 0.03 -DistNat: DistUInt32 - -Building generation computation graph... - 10.417825655 seconds - -Building generation loss computation graph... - 2.362158481 seconds - -Initial adnodes_of_interest: -Dict("sz1_succ_abs" => 0.5, "tysz1_gen_type_tbool" => 0.5, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.5, "sz2_succ_abs" => 0.5, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5, "sz1_succ_app" => 0.5) -Saving samples... -Saved samples to examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/terms_before.txt. - 2.837110962 seconds - -Initial loss: -8.072558853466411 - -Training... - 3.247644987 seconds - -Final loss: -8.170420368889292 - -Learned adnodes_of_interest: -Dict("sz1_succ_abs" => 0.5598030152826101, "tysz1_gen_type_tbool" => 0.5395457933590109, "sz0_zero_pr_var2" => 0.5271444904668267, "sz2_succ_app" => 0.3185816526602986, "sz2_succ_abs" => 0.6350128152410152, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5000874628748793, "sz1_succ_app" => 0.43209667095380405) -Saving samples... -Saved samples to examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/terms_trained.txt. - 0.171530594 seconds - diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/terms_before.txt b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/terms_before.txt deleted file mode 100644 index 2b47234d..00000000 --- a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/terms_before.txt +++ /dev/null @@ -1,200 +0,0 @@ -true -true -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) ((λx:Bool. false) false) -true -(λx:Bool -> Bool. true) (λx:Bool. false) -(λx:Bool. λy:Bool. false) ((λx:Bool. true) true) -(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -false -(λx:Bool. false) ((λx:Bool. false) false) -(λx:Bool -> Bool. true) (λx:Bool. x) -true -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) (λx:Bool. false) -λx:Bool. false -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. x) -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) -λx:Bool. x -λx:Bool. true -λx:Bool. true -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false ((λx:Bool. λy:Bool. false) false) -(λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) false) -false -false -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) -λx:Bool. (λy:Bool. false) true -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) -true -(λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) -λx:Bool. x -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) -true -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. true)) -(λx:Bool. λy:Bool -> Bool. false) true ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -false -(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -false -(λx:Bool. x) false -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) -(λx:Bool. x) ((λx:Bool. true) true) -(λx:Bool. λy:Bool. true) true ((λx:Bool. true) false) -(λx:Bool. x) ((λx:Bool. true) true) -λx:Bool. false -(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) true -(λx:Bool -> Bool. false) (λx:Bool. x) -false -λx:Bool. x -(λx:Bool -> Bool. x) (λx:Bool. x) -(λx:Bool. λy:Bool -> Bool. false) false ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. true) false) -false -true -(λx:Bool -> Bool. x) (λx:Bool. true) -(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. true) true) -(λx:Bool -> Bool. true) (λx:Bool. false) -true -(λx:Bool. λy:Bool. true) true -true -(λx:Bool. x) false -(λx:Bool. false) ((λx:Bool. true) false) -λx:Bool. false -true -true -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) -false -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) true -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) (λx:Bool. x) -(λx:Bool. true) false -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. false) true) -λx:Bool. x -(λx:Bool. λy:Bool. true) true -(λx:Bool. λy:Bool. false) ((λx:Bool. false) true) -(λx:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. true)) -false -(λx:Bool. x) ((λx:Bool -> Bool. true) (λx:Bool. true)) -(λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) -λx:Bool. false -(λx:Bool. true) ((λx:Bool. true) false) -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) (λx:Bool. false) -(λx:Bool. λy:Bool. λz:Bool. false) false true -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) ((λx:Bool. λy:Bool. true) false) -true -false -(λx:Bool. λy:Bool. false) ((λx:Bool. true) false) -false -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -(λx:Bool -> Bool. false) (λx:Bool. x) -(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. false) true) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. true)) -(λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. true)) -λx:Bool. false -false -(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -(λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool -> Bool. false) (λx:Bool. true)) -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) (λx:Bool. false) -(λx:Bool -> Bool. x) (λx:Bool. true) -(λx:Bool. λy:Bool. true) true ((λx:Bool -> Bool. false) (λx:Bool. false)) -λx:Bool. (λy:Bool. false) true -true -(λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. false) false) -false -(λx:Bool. false) ((λx:Bool. false) false) -false -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -true -(λx:Bool -> Bool. x) (λx:Bool. false) -true -false -(λx:Bool. x) ((λx:Bool. false) true) -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -true -true -(λx:Bool. x) true -false -(λx:Bool -> Bool. x) (λx:Bool. true) -(λx:Bool. λy:Bool -> Bool. false) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -(λx:Bool. false) ((λx:Bool. true) false) -false -true -false -false -false -λx:Bool. false -λx:Bool. false -true -λx:Bool. x -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) false -(λx:Bool -> Bool. x) (λx:Bool. true) -false -(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. true)) -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. false) false) -λx:Bool. false -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool. true) false) -λx:Bool. (λy:Bool. false) true -true -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -true -λx:Bool. false -(λx:Bool. λy:Bool. true) false ((λx:Bool. false) false) -(λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -(λx:Bool. λy:Bool. false) true false -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) -(λx:Bool -> Bool. true) (λx:Bool. false) -true -true -(λx:Bool -> Bool. true) (λx:Bool. false) -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool. true) true) -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. true)) -λx:Bool. x -λx:Bool. x -false -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool. λy:Bool. false) false) -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -false -(λx:Bool. λy:Bool. true) true -true -λx:Bool. true -(λx:Bool. λy:Bool. false) true true -true -λx:Bool. x -λx:Bool. x -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -(λx:Bool. λy:Bool. λz:Bool. true) true false -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) (λx:Bool. true) -false -λx:Bool. (λy:Bool. false) false -true -(λx:Bool. λy:Bool. false) true -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) -false -λx:Bool. true -λx:Bool. x -false -λx:Bool. x -(λx:Bool. true) false -λx:Bool. x -true -λx:Bool. false -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false (λx:Bool. x) -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool. false) true) -λx:Bool. true -true -(λx:Bool. λy:Bool -> Bool. true) true (λx:Bool. x) -false -λx:Bool. false -true -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) (λx:Bool. false) -λx:Bool. (λy:Bool. false) x -false -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) false -true -(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false)) -λx:Bool. true -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) (λx:Bool. x) diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/terms_trained.txt b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/terms_trained.txt deleted file mode 100644 index a983a33a..00000000 --- a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/approx_entropy/epochs=2000,learning_rate=0.03/terms_trained.txt +++ /dev/null @@ -1,200 +0,0 @@ -λx:Bool. x -false -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) (λx:Bool. false) -(λx:Bool -> Bool. true) (λx:Bool. x) -false -λx:Bool. true -false -true -false -false -(λx:Bool -> Bool. x) (λx:Bool. true) -λx:Bool. false -λx:Bool. true -false -true -true -λx:Bool. x -λx:Bool. x -true -(λx:Bool. λy:Bool. true) false true -λx:Bool. x -(λx:Bool -> Bool. true) (λx:Bool. true) -λx:Bool. (λy:Bool. true) true -true -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false (λx:Bool. x) -(λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. false) false) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) false -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. true)) -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) ((λx:Bool. false) true) -true -λx:Bool. x -false -(λx:Bool. λy:Bool. λz:Bool. false) false false -λx:Bool. x -true -(λx:Bool. λy:Bool -> Bool. false) false ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -λx:Bool. false -false -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. x) -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) -false -true -true -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) false -λx:Bool. (λy:Bool. false) x -false -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) -(λx:Bool. x) ((λx:Bool. true) false) -(λx:Bool. λy:Bool. false) true -λx:Bool. x -true -(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -true -λx:Bool. true -true -false -true -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -(λx:Bool. λy:Bool. true) true -true -false -λx:Bool. x -false -λx:Bool. x -false -λx:Bool. x -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true (λx:Bool. x) -true -false -true -λx:Bool. (λy:Bool. false) x -false -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) false -false -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) -true -λx:Bool. x -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) false -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. true)) -λx:Bool. x -(λx:Bool. λy:Bool. false) ((λx:Bool. true) true) -(λx:Bool. x) true -true -true -(λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) -λx:Bool. true -(λx:Bool. true) false -true -false -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. true)) -λx:Bool. false -true -λx:Bool. false -(λx:Bool. x) ((λx:Bool -> Bool. true) (λx:Bool. false)) -(λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) true) -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -λx:Bool. false -λx:Bool. true -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) false -λx:Bool. false -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -(λx:Bool. x) ((λx:Bool -> Bool. true) (λx:Bool. true)) -false -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) -(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -true -λx:Bool. false -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -λx:Bool. true -true -(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -true -(λx:Bool. false) true -(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -true -false -false -true -false -false -(λx:Bool. λy:Bool. true) false -(λx:Bool. λy:Bool. false) ((λx:Bool. false) false) -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. true)) -λx:Bool. false -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false (λx:Bool. x) -λx:Bool. (λy:Bool. true) x -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. x) -λx:Bool. false -false -false -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -λx:Bool. true -(λx:Bool. λy:Bool -> Bool. true) true (λx:Bool. true) -(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -(λx:Bool. λy:Bool. false) false true -true -true -true -λx:Bool. (λy:Bool. false) false -(λx:Bool. λy:Bool. false) true -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -false -λx:Bool. x -λx:Bool. x -true -false -false -(λx:Bool. λy:Bool. false) false true -(λx:Bool. λy:Bool. false) true false -(λx:Bool. λy:Bool. false) true true -true -true -(λx:Bool. true) false -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) -(λx:Bool. λy:Bool. false) false false -false -false -(λx:Bool. x) false -λx:Bool. true -(λx:Bool. x) false -true -(λx:Bool -> Bool. false) (λx:Bool. true) -λx:Bool. true -λx:Bool. false -true -λx:Bool. x -(λx:Bool -> Bool. false) (λx:Bool. x) -(λx:Bool. λy:Bool. false) true true -true -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false ((λx:Bool. λy:Bool. true) true) -(λx:Bool -> Bool. false) (λx:Bool. true) -λx:Bool. true -false -true -true -λx:Bool. (λy:Bool. true) x -λx:Bool. true -λx:Bool. (λy:Bool. true) true -false -true -(λx:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) -(λx:Bool -> Bool. true) (λx:Bool. x) -λx:Bool. false -(λx:Bool. λy:Bool. true) true -false -true -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. false) false) -(λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) true) -false -λx:Bool. true -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool. false) false) -false -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. true)) -true diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/dist_before.csv b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/dist_before.csv deleted file mode 100644 index 601b3e1c..00000000 --- a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/dist_before.csv +++ /dev/null @@ -1,5 +0,0 @@ -val probability -0 0.41666666666666674 -1 0.20833333333333343 -2 0.25000000000000017 -3 0.12500000000000008 diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/dist_trained.csv b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/dist_trained.csv deleted file mode 100644 index 5b503139..00000000 --- a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/dist_trained.csv +++ /dev/null @@ -1,5 +0,0 @@ -val probability -0 0.27861431390698005 -1 0.19367217254954094 -2 0.3002327295320593 -3 0.2274807840114198 diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/learning_curve.csv b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/learning_curve.csv deleted file mode 100644 index 46d55d18..00000000 --- a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/learning_curve.csv +++ /dev/null @@ -1,2001 +0,0 @@ -0 5.909820558067469 -1 5.90887137151752 -2 5.907925432640779 -3 5.906982729167141 -4 5.906043248880616 -5 5.905106979619048 -6 5.904173909273823 -7 5.903244025789578 -8 5.902317317163921 -9 5.901393771447134 -10 5.900473376741902 -11 5.899556121203027 -12 5.898641993037145 -13 5.897730980502459 -14 5.89682307190845 -15 5.895918255615616 -16 5.895016520035183 -17 5.894117853628856 -18 5.893222244908531 -19 5.8923296824360385 -20 5.8914401548228765 -21 5.89055365072994 -22 5.88967015886727 -23 5.888789667993786 -24 5.887912166917028 -25 5.887037644492897 -26 5.886166089625409 -27 5.88529749126643 -28 5.884431838415429 -29 5.883569120119228 -30 5.882709325471752 -31 5.881852443613777 -32 5.880998463732695 -33 5.8801473750622595 -34 5.879299166882342 -35 5.878453828518696 -36 5.877611349342722 -37 5.876771718771215 -38 5.875934926266142 -39 5.875100961334393 -40 5.874269813527558 -41 5.873441472441694 -42 5.872615927717085 -43 5.871793169038023 -44 5.870973186132572 -45 5.8701559687723455 -46 5.8693415067722805 -47 5.868529789990415 -48 5.867720808327664 -49 5.866914551727595 -50 5.866111010176217 -51 5.865310173701751 -52 5.864512032374424 -53 5.863716576306247 -54 5.8629237956508025 -55 5.86213368060303 -56 5.861346221399016 -57 5.860561408315781 -58 5.859779231671079 -59 5.858999681823177 -60 5.858222749170659 -61 5.857448424152214 -62 5.856676697246435 -63 5.855907558971619 -64 5.855140999885563 -65 5.854377010585356 -66 5.8536155817071975 -67 5.852856703926186 -68 5.852100367956122 -69 5.851346564549325 -70 5.850595284496425 -71 5.84984651862618 -72 5.8491002578052775 -73 5.848356492938147 -74 5.847615214966773 -75 5.8468764148705015 -76 5.846140083665855 -77 5.845406212406349 -78 5.8446747921823 -79 5.843945814120653 -80 5.843219269384793 -81 5.842495149174351 -82 5.841773444725052 -83 5.841054147308512 -84 5.840337248232063 -85 5.839622738838588 -86 5.83891061050633 -87 5.838200854648729 -88 5.8374934627142405 -89 5.836788426186166 -90 5.8360857365824765 -91 5.835385385455652 -92 5.834687364392498 -93 5.833991665013988 -94 5.833298278975089 -95 5.832607197964601 -96 5.83191841370498 -97 5.831231917952188 -98 5.830547702495518 -99 5.8298657591574345 -100 5.829186079793414 -101 5.828508656291778 -102 5.827833480573544 -103 5.827160544592252 -104 5.826489840333821 -105 5.825821359816379 -106 5.825155095090116 -107 5.824491038237124 -108 5.82382918137125 -109 5.823169516637929 -110 5.822512036214044 -111 5.821856732307769 -112 5.821203597158414 -113 5.8205526230362885 -114 5.819903802242539 -115 5.81925712710901 -116 5.818612589998088 -117 5.817970183302564 -118 5.8173298994454825 -119 5.816691730880002 -120 5.816055670089243 -121 5.815421709586152 -122 5.81478984191336 -123 5.81416005964303 -124 5.813532355376739 -125 5.8129067217453105 -126 5.812283151408702 -127 5.811661637055844 -128 5.81104217140452 -129 5.810424747201223 -130 5.8098093572210185 -131 5.809195994267413 -132 5.80858465117222 -133 5.807975320795425 -134 5.807367996025051 -135 5.806762669777029 -136 5.8061593349950735 -137 5.805557984650539 -138 5.804958611742303 -139 5.804361209296626 -140 5.803765770367036 -141 5.803172288034189 -142 5.8025807554057565 -143 5.801991165616277 -144 5.801403511827061 -145 5.800817787226044 -146 5.800233985027667 -147 5.799652098472762 -148 5.799072120828422 -149 5.79849404538788 -150 5.797917865470394 -151 5.7973435744211175 -152 5.79677116561099 -153 5.796200632436614 -154 5.795631968320129 -155 5.795065166709109 -156 5.794500221076436 -157 5.793937124920187 -158 5.793375871763513 -159 5.792816455154533 -160 5.792258868666217 -161 5.791703105896266 -162 5.791149160467008 -163 5.790597026025281 -164 5.790046696242322 -165 5.789498164813657 -166 5.78895142545899 -167 5.788406471922091 -168 5.787863297970692 -169 5.787321897396376 -170 5.786782264014464 -171 5.78624439166392 -172 5.785708274207226 -173 5.785173905530297 -174 5.78464127954236 -175 5.784110390175853 -176 5.783581231386324 -177 5.783053797152324 -178 5.782528081475305 -179 5.782004078379517 -180 5.7814817819119035 -181 5.7809611861420045 -182 5.780442285161857 -183 5.779925073085883 -184 5.7794095440508055 -185 5.778895692215534 -186 5.7783835117610804 -187 5.777872996890451 -188 5.7773641418285475 -189 5.776856940822079 -190 5.776351388139457 -191 5.775847478070704 -192 5.775345204927354 -193 5.774844563042365 -194 5.7743455467700135 -195 5.7738481504858115 -196 5.773352368586405 -197 5.772858195489482 -198 5.772365625633684 -199 5.771874653478517 -200 5.771385273504243 -201 5.770897480211813 -202 5.770411268122757 -203 5.769926631779106 -204 5.769443565743295 -205 5.768962064598078 -206 5.768482122946439 -207 5.768003735411499 -208 5.767526896636442 -209 5.7670516012844075 -210 5.766577844038423 -211 5.766105619601306 -212 5.765634922695583 -213 5.765165748063404 -214 5.764698090466453 -215 5.7642319446858705 -216 5.763767305522167 -217 5.7633041677951375 -218 5.76284252634378 -219 5.7623823760262125 -220 5.761923711719595 -221 5.761466528320036 -222 5.761010820742529 -223 5.760556583920851 -224 5.760103812807501 -225 5.7596525023736085 -226 5.75920264760886 -227 5.7587542435214125 -228 5.758307285137822 -229 5.757861767502962 -230 5.757417685679945 -231 5.756975034750045 -232 5.756533809812629 -233 5.7560940059850605 -234 5.755655618402643 -235 5.755218642218536 -236 5.754783072603675 -237 5.754348904746708 -238 5.753916133853907 -239 5.753484755149106 -240 5.753054763873616 -241 5.752626155286164 -242 5.752198924662805 -243 5.751773067296865 -244 5.751348578498851 -245 5.750925453596398 -246 5.750503687934182 -247 5.75008327687385 -248 5.749664215793967 -249 5.749246500089917 -250 5.748830125173857 -251 5.748415086474635 -252 5.748001379437719 -253 5.747588999525135 -254 5.747177942215398 -255 5.746768203003436 -256 5.746359777400528 -257 5.745952660934234 -258 5.745546849148331 -259 5.745142337602737 -260 5.744739121873456 -261 5.744337197552506 -262 5.743936560247846 -263 5.743537205583326 -264 5.743139129198609 -265 5.742742326749108 -266 5.742346793905922 -267 5.741952526355775 -268 5.7415595198009495 -269 5.7411677699592225 -270 5.740777272563797 -271 5.740388023363252 -272 5.740000018121467 -273 5.739613252617565 -274 5.739227722645847 -275 5.738843424015734 -276 5.738460352551703 -277 5.738078504093233 -278 5.737697874494728 -279 5.7373184596254685 -280 5.7369402553695545 -281 5.73656325762583 -282 5.736187462307842 -283 5.735812865343766 -284 5.735439462676354 -285 5.735067250262873 -286 5.734696224075048 -287 5.734326380099003 -288 5.733957714335206 -289 5.733590222798405 -290 5.733223901517574 -291 5.732858746535858 -292 5.732494753910512 -293 5.732131919712846 -294 5.731770240028169 -295 5.7314097109557345 -296 5.731050328608681 -297 5.73069208911398 -298 5.730334988612376 -299 5.7299790232583385 -300 5.729624189220004 -301 5.729270482679112 -302 5.728917899830976 -303 5.728566436884396 -304 5.728216090061634 -305 5.727866855598344 -306 5.727518729743523 -307 5.727171708759462 -308 5.726825788921689 -309 5.726480966518913 -310 5.726137237852981 -311 5.725794599238826 -312 5.725453047004399 -313 5.725112577490639 -314 5.724773187051408 -315 5.724434872053448 -316 5.724097628876324 -317 5.723761453912376 -318 5.723426343566672 -319 5.723092294256951 -320 5.722759302413582 -321 5.722427364479507 -322 5.7220964769101945 -323 5.721766636173593 -324 5.721437838750077 -325 5.721110081132403 -326 5.7207833598256626 -327 5.720457671347226 -328 5.720133012226701 -329 5.719809379005887 -330 5.719486768238719 -331 5.719165176491231 -332 5.718844600341499 -333 5.718525036379604 -334 5.718206481207576 -335 5.717888931439356 -336 5.717572383700743 -337 5.717256834629353 -338 5.716942280874572 -339 5.716628719097506 -340 5.716316145970943 -341 5.716004558179305 -342 5.715693952418603 -343 5.715384325396389 -344 5.715075673831717 -345 5.714767994455098 -346 5.7144612840084505 -347 5.7141555392450645 -348 5.713850756929551 -349 5.713546933837804 -350 5.713244066756955 -351 5.712942152485327 -352 5.712641187832398 -353 5.712341169618751 -354 5.712042094676041 -355 5.711743959846936 -356 5.711446761985104 -357 5.711150497955137 -358 5.710855164632534 -359 5.710560758903648 -360 5.710267277665648 -361 5.709974717826482 -362 5.709683076304822 -363 5.709392350030045 -364 5.709102535942172 -365 5.70881363099184 -366 5.708525632140258 -367 5.708238536359163 -368 5.707952340630788 -369 5.707667041947816 -370 5.707382637313348 -371 5.707099123740852 -372 5.706816498254131 -373 5.70653475788729 -374 5.706253899684686 -375 5.705973920700894 -376 5.705694818000671 -377 5.705416588658912 -378 5.705139229760621 -379 5.704862738400859 -380 5.704587111684726 -381 5.704312346727303 -382 5.704038440653627 -383 5.703765390598649 -384 5.703493193707203 -385 5.70322184713396 -386 5.702951348043397 -387 5.702681693609758 -388 5.70241288101702 -389 5.702144907458855 -390 5.701877770138597 -391 5.701611466269197 -392 5.7013459930732004 -393 5.701081347782698 -394 5.700817527639304 -395 5.700554529894105 -396 5.70029235180764 -397 5.700030990649861 -398 5.699770443700087 -399 5.699510708246986 -400 5.6992517815885275 -401 5.698993661031955 -402 5.698736343893755 -403 5.698479827499606 -404 5.698224109184367 -405 5.6979691862920285 -406 5.697715056175686 -407 5.697461716197498 -408 5.697209163728665 -409 5.696957396149382 -410 5.6967064108488215 -411 5.696456205225086 -412 5.696206776685182 -413 5.69595812264499 -414 5.695710240529221 -415 5.695463127771401 -416 5.695216781813821 -417 5.694971200107515 -418 5.69472638011223 -419 5.694482319296384 -420 5.6942390151370486 -421 5.693996465119897 -422 5.693754666739199 -423 5.6935136174977625 -424 5.693273314906927 -425 5.693033756486511 -426 5.692794939764794 -427 5.692556862278486 -428 5.692319521572688 -429 5.692082915200871 -430 5.691847040724838 -431 5.6916118957147 -432 5.691377477748841 -433 5.691143784413891 -434 5.690910813304693 -435 5.690678562024278 -436 5.690447028183831 -437 5.690216209402664 -438 5.689986103308181 -439 5.689756707535861 -440 5.689528019729216 -441 5.689300037539766 -442 5.6890727586270184 -443 5.68884618065842 -444 5.688620301309351 -445 5.688395118263082 -446 5.688170629210748 -447 5.687946831851319 -448 5.6877237238915805 -449 5.687501303046097 -450 5.68727956703718 -451 5.687058513594875 -452 5.686838140456915 -453 5.686618445368715 -454 5.686399426083321 -455 5.686181080361397 -456 5.6859634059712 -457 5.685746400688537 -458 5.68553006229676 -459 5.685314388586715 -460 5.68509937735674 -461 5.684885026412611 -462 5.684671333567543 -463 5.684458296642145 -464 5.684245913464399 -465 5.684034181869633 -466 5.683823099700499 -467 5.683612664806937 -468 5.68340287504616 -469 5.683193728282624 -470 5.682985222388 -471 5.6827773552411465 -472 5.682570124728098 -473 5.682363528742017 -474 5.6821575651831875 -475 5.681952231958976 -476 5.681747526983824 -477 5.681543448179202 -478 5.6813399934736 -479 5.6811371608024945 -480 5.680934948108328 -481 5.6807333533404805 -482 5.680532374455252 -483 5.680332009415825 -484 5.680132256192257 -485 5.679933112761445 -486 5.679734577107096 -487 5.67953664721972 -488 5.679339321096599 -489 5.679142596741748 -490 5.678946472165916 -491 5.678750945386546 -492 5.6785560144277545 -493 5.678361677320311 -494 5.678167932101612 -495 5.677974776815658 -496 5.6777822095130315 -497 5.677590228250873 -498 5.677398831092858 -499 5.677208016109173 -500 5.6770177813764935 -501 5.676828124977964 -502 5.676639045003171 -503 5.676450539548119 -504 5.676262606715215 -505 5.676075244613241 -506 5.6758884513573316 -507 5.675702225068953 -508 5.675516563875884 -509 5.675331465912185 -510 5.675146929318185 -511 5.674962952240455 -512 5.674779532831789 -513 5.674596669251181 -514 5.6744143596638 -515 5.674232602240971 -516 5.67405139516016 -517 5.673870736604938 -518 5.673690624764977 -519 5.673511057836015 -520 5.673332034019836 -521 5.673153551524263 -522 5.672975608563119 -523 5.672798203356214 -524 5.672621334129327 -525 5.67244499911418 -526 5.672269196548421 -527 5.672093924675602 -528 5.671919181745157 -529 5.6717449660123815 -530 5.671571275738419 -531 5.671398109190229 -532 5.671225464640578 -533 5.671053340368013 -534 5.67088173465684 -535 5.6707106457971115 -536 5.670540072084598 -537 5.670370011820777 -538 5.6702004633128045 -539 5.670031424873498 -540 5.669862894821323 -541 5.669694871480368 -542 5.66952735318032 -543 5.669360338256457 -544 5.669193825049619 -545 5.669027811906196 -546 5.668862297178101 -547 5.668697279222757 -548 5.668532756403077 -549 5.668368727087444 -550 5.668205189649687 -551 5.6680421424690755 -552 5.6678795839302865 -553 5.6677175124233985 -554 5.66755592634386 -555 5.6673948240924785 -556 5.667234204075405 -557 5.667074064704107 -558 5.666914404395359 -559 5.666755221571217 -560 5.666596514659005 -561 5.666438282091294 -562 5.666280522305886 -563 5.666123233745795 -564 5.6659664148592315 -565 5.665810064099579 -566 5.665654179925385 -567 5.665498760800327 -568 5.665343805193224 -569 5.665189311577982 -570 5.665035278433608 -571 5.664881704244174 -572 5.66472858749881 -573 5.664575926691678 -574 5.6644237203219605 -575 5.664271966893842 -576 5.664120664916492 -577 5.663969812904048 -578 5.663819409375598 -579 5.663669452855162 -580 5.6635199418716775 -581 5.663370874958986 -582 5.663222250655805 -583 5.663074067505725 -584 5.662926324057183 -585 5.662779018863452 -586 5.6626321504826205 -587 5.662485717477575 -588 5.662339718415993 -589 5.662194151870311 -590 5.6620490164177255 -591 5.661904310640162 -592 5.661760033124268 -593 5.6616161824613975 -594 5.661472757247582 -595 5.661329756083534 -596 5.661187177574617 -597 5.661045020330834 -598 5.660903282966811 -599 5.660761964101785 -600 5.660621062359581 -601 5.660480576368606 -602 5.660340504761821 -603 5.660200846176738 -604 5.660061599255398 -605 5.6599227626443565 -606 5.659784334994667 -607 5.659646314961868 -608 5.659508701205969 -609 5.659371492391429 -610 5.659234687187151 -611 5.659098284266453 -612 5.658962282307074 -613 5.658826679991135 -614 5.658691476005143 -615 5.658556669039964 -616 5.658422257790814 -617 5.658288240957251 -618 5.65815461724314 -619 5.658021385356659 -620 5.657888544010276 -621 5.657756091920735 -622 5.657624027809037 -623 5.6574923504004335 -624 5.65736105842441 -625 5.657230150614671 -626 5.657099625709117 -627 5.656969482449849 -628 5.6568397195831395 -629 5.656710335859419 -630 5.65658133003327 -631 5.656452700863409 -632 5.656324447112667 -633 5.656196567547986 -634 5.656069060940399 -635 5.655941926065013 -636 5.655815161701005 -637 5.655688766631598 -638 5.655562739644054 -639 5.6554370795296585 -640 5.655311785083704 -641 5.655186855105484 -642 5.655062288398268 -643 5.654938083769302 -644 5.654814240029783 -645 5.654690755994855 -646 5.654567630483584 -647 5.654444862318956 -648 5.654322450327866 -649 5.654200393341088 -650 5.6540786901932805 -651 5.653957339722964 -652 5.6538363407725045 -653 5.653715692188111 -654 5.653595392819817 -655 5.653475441521467 -656 5.653355837150703 -657 5.653236578568955 -658 5.653117664641427 -659 5.652999094237082 -660 5.652880866228633 -661 5.652762979492527 -662 5.652645432908939 -663 5.6525282253617455 -664 5.652411355738529 -665 5.652294822930555 -666 5.652178625832761 -667 5.652062763343746 -668 5.651947234365765 -669 5.651832037804697 -670 5.651717172570054 -671 5.651602637574957 -672 5.651488431736128 -673 5.651374553973878 -674 5.651261003212089 -675 5.651147778378215 -676 5.651034878403255 -677 5.65092230222175 -678 5.650810048771772 -679 5.650698116994906 -680 5.6505865058362446 -681 5.65047521424437 -682 5.650364241171346 -683 5.650253585572711 -684 5.650143246407456 -685 5.650033222638019 -686 5.649923513230274 -687 5.649814117153518 -688 5.649705033380462 -689 5.649596260887212 -690 5.6494877986532686 -691 5.649379645661508 -692 5.649271800898173 -693 5.649164263352861 -694 5.649057032018515 -695 5.648950105891407 -696 5.648843483971136 -697 5.648737165260609 -698 5.648631148766032 -699 5.648525433496898 -700 5.648420018465982 -701 5.6483149026893225 -702 5.6482100851862125 -703 5.648105564979193 -704 5.648001341094036 -705 5.647897412559741 -706 5.647793778408513 -707 5.647690437675763 -708 5.647587389400096 -709 5.6474846326232875 -710 5.647382166390293 -711 5.647279989749226 -712 5.647178101751339 -713 5.647076501451035 -714 5.646975187905834 -715 5.64687416017638 -716 5.646773417326425 -717 5.646672958422808 -718 5.646572782535467 -719 5.646472888737404 -720 5.646373276104695 -721 5.646273943716465 -722 5.646174890654892 -723 5.64607611600518 -724 5.645977618855564 -725 5.645879398297292 -726 5.6457814534246165 -727 5.645683783334787 -728 5.6455863871280325 -729 5.6454892639075664 -730 5.645392412779554 -731 5.645295832853126 -732 5.645199523240356 -733 5.645103483056252 -734 5.645007711418746 -735 5.644912207448689 -736 5.644816970269838 -737 5.644721999008846 -738 5.644627292795247 -739 5.6445328507614665 -740 5.644438672042783 -741 5.644344755777341 -742 5.644251101106134 -743 5.644157707172991 -744 5.644064573124572 -745 5.64397169811036 -746 5.643879081282648 -747 5.643786721796526 -748 5.643694618809882 -749 5.643602771483385 -750 5.64351117898048 -751 5.643419840467371 -752 5.643328755113026 -753 5.643237922089149 -754 5.643147340570188 -755 5.643057009733319 -756 5.642966928758435 -757 5.642877096828139 -758 5.642787513127735 -759 5.6426981768452205 -760 5.642609087171273 -761 5.642520243299247 -762 5.642431644425161 -763 5.642343289747691 -764 5.642255178468162 -765 5.642167309790529 -766 5.642079682921388 -767 5.641992297069951 -768 5.641905151448043 -769 5.641818245270093 -770 5.641731577753125 -771 5.641645148116755 -772 5.641558955583169 -773 5.641472999377123 -774 5.641387278725941 -775 5.641301792859494 -776 5.6412165410101975 -777 5.641131522413005 -778 5.6410467363053955 -779 5.640962181927367 -780 5.640877858521427 -781 5.640793765332587 -782 5.640709901608349 -783 5.6406262665987095 -784 5.64054285955613 -785 5.640459679735548 -786 5.640376726394361 -787 5.640293998792421 -788 5.640211496192022 -789 5.640129217857891 -790 5.640047163057193 -791 5.639965331059506 -792 5.639883721136825 -793 5.6398023325635425 -794 5.639721164616454 -795 5.63964021657474 -796 5.639559487719967 -797 5.639478977336065 -798 5.6393986847093345 -799 5.639318609128436 -800 5.639238749884372 -801 5.63915910627049 -802 5.639079677582474 -803 5.639000463118327 -804 5.6389214621783745 -805 5.6388426740652555 -806 5.638764098083904 -807 5.638685733541557 -808 5.638607579747733 -809 5.638529636014235 -810 5.638451901655137 -811 5.638374375986777 -812 5.638297058327751 -813 5.6382199479989055 -814 5.63814304432333 -815 5.63806634662635 -816 5.637989854235514 -817 5.637913566480594 -818 5.63783748269358 -819 5.637761602208657 -820 5.637685924362216 -821 5.63761044849284 -822 5.637535173941289 -823 5.637460100050504 -824 5.637385226165601 -825 5.6373105516338455 -826 5.637236075804668 -827 5.637161798029643 -828 5.637087717662487 -829 5.637013834059051 -830 5.636940146577311 -831 5.636866654577363 -832 5.636793357421418 -833 5.636720254473787 -834 5.63664734510089 -835 5.636574628671224 -836 5.636502104555383 -837 5.636429772126036 -838 5.636357630757919 -839 5.636285679827839 -840 5.636213918714654 -841 5.636142346799279 -842 5.636070963464661 -843 5.6359997680957985 -844 5.635928760079713 -845 5.635857938805449 -846 5.6357873036640695 -847 5.635716854048647 -848 5.635646589354261 -849 5.635576508977982 -850 5.635506612318874 -851 5.635436898777987 -852 5.635367367758343 -853 5.6352980186649395 -854 5.635228850904736 -855 5.635159863886648 -856 5.635091057021547 -857 5.635022429722241 -858 5.634953981403488 -859 5.634885711481967 -860 5.634817619376287 -861 5.63474970450698 -862 5.634681966296483 -863 5.634614404169143 -864 5.634547017551211 -865 5.634479805870823 -866 5.634412768558015 -867 5.634345905044691 -868 5.634279214764641 -869 5.634212697153517 -870 5.634146351648836 -871 5.634080177689973 -872 5.634014174718153 -873 5.633948342176444 -874 5.633882679509753 -875 5.633817186164819 -876 5.633751861590209 -877 5.633686705236307 -878 5.633621716555313 -879 5.633556895001233 -880 5.633492240029882 -881 5.633427751098862 -882 5.63336342766757 -883 5.633299269197186 -884 5.63323527515067 -885 5.633171444992756 -886 5.633107778189936 -887 5.633044274210476 -888 5.632980932524385 -889 5.632917752603431 -890 5.632854733921118 -891 5.632791875952687 -892 5.632729178175124 -893 5.6326666400671215 -894 5.632604261109112 -895 5.6325420407832265 -896 5.632479978573315 -897 5.63241807396493 -898 5.632356326445316 -899 5.632294735503418 -900 5.632233300629861 -901 5.632172021316956 -902 5.632110897058686 -903 5.632049927350705 -904 5.6319891116903325 -905 5.631928449576547 -906 5.631867940509979 -907 5.6318075839929085 -908 5.631747379529258 -909 5.631687326624585 -910 5.631627424786082 -911 5.631567673522568 -912 5.631508072344479 -913 5.631448620763872 -914 5.631389318294408 -915 5.6313301644513585 -916 5.631271158751592 -917 5.631212300713574 -918 5.631153589857355 -919 5.631095025704575 -920 5.631036607778443 -921 5.630978335603753 -922 5.630920208706863 -923 5.63086222661569 -924 5.630804388859713 -925 5.630746694969963 -926 5.630689144479019 -927 5.630631736921002 -928 5.6305744718315704 -929 5.6305173487479125 -930 5.630460367208749 -931 5.6304035267543195 -932 5.630346826926384 -933 5.630290267268206 -934 5.63023384732457 -935 5.630177566641749 -936 5.6301214247675215 -937 5.630065421251157 -938 5.630009555643411 -939 5.6299538274965215 -940 5.6298982363642045 -941 5.629842781801649 -942 5.629787463365514 -943 5.629732280613917 -944 5.629677233106434 -945 5.629622320404097 -946 5.629567542069388 -947 5.629512897666229 -948 5.62945838675998 -949 5.629404008917441 -950 5.629349763706836 -951 5.6292956506978165 -952 5.629241669461452 -953 5.629187819570231 -954 5.629134100598049 -955 5.629080512120206 -956 5.6290270537134095 -957 5.6289737249557605 -958 5.628920525426751 -959 5.62886745470726 -960 5.628814512379556 -961 5.628761698027274 -962 5.628709011235437 -963 5.628656451590426 -964 5.628604018679988 -965 5.628551712093238 -966 5.628499531420642 -967 5.628447476254012 -968 5.628395546186516 -969 5.628343740812658 -970 5.628292059728284 -971 5.628240502530572 -972 5.628189068818024 -973 5.628137758190476 -974 5.62808657024908 -975 5.628035504596301 -976 5.62798456083592 -977 5.627933738573023 -978 5.6278830374140005 -979 5.627832456966539 -980 5.627781996839624 -981 5.627731656643527 -982 5.627681435989803 -983 5.627631334491297 -984 5.6275813517621245 -985 5.627531487417675 -986 5.627481741074611 -987 5.627432112350855 -988 5.627382600865591 -989 5.62733320623926 -990 5.627283928093556 -991 5.627234766051421 -992 5.627185719737042 -993 5.62713678877584 -994 5.627087972794481 -995 5.627039271420852 -996 5.626990684284079 -997 5.626942211014503 -998 5.626893851243688 -999 5.62684560460441 -1000 5.626797470730665 -1001 5.626749449257646 -1002 5.626701539821756 -1003 5.626653742060597 -1004 5.626606055612962 -1005 5.626558480118842 -1006 5.6265110152194096 -1007 5.626463660557025 -1008 5.626416415775228 -1009 5.626369280518734 -1010 5.626322254433425 -1011 5.626275337166363 -1012 5.626228528365761 -1013 5.626181827681004 -1014 5.626135234762624 -1015 5.62608874926231 -1016 5.626042370832904 -1017 5.625996099128386 -1018 5.62594993380388 -1019 5.625903874515648 -1020 5.625857920921088 -1021 5.625812072678725 -1022 5.625766329448212 -1023 5.625720690890322 -1024 5.625675156666951 -1025 5.625629726441106 -1026 5.625584399876908 -1027 5.625539176639588 -1028 5.6254940563954765 -1029 5.625449038812006 -1030 5.6254041235577095 -1031 5.6253593103022075 -1032 5.625314598716216 -1033 5.62526998847153 -1034 5.625225479241033 -1035 5.625181070698689 -1036 5.625136762519528 -1037 5.625092554379664 -1038 5.625048445956266 -1039 5.625004436927579 -1040 5.624960526972904 -1041 5.6249167157726 -1042 5.62487300300808 -1043 5.6248293883618095 -1044 5.624785871517298 -1045 5.6247424521591025 -1046 5.624699129972818 -1047 5.624655904645078 -1048 5.624612775863545 -1049 5.624569743316917 -1050 5.624526806694917 -1051 5.624483965688288 -1052 5.624441219988798 -1053 5.6243985692892275 -1054 5.624356013283373 -1055 5.624313551666038 -1056 5.624271184133033 -1057 5.624228910381174 -1058 5.624186730108274 -1059 5.624144643013141 -1060 5.624102648795583 -1061 5.624060747156388 -1062 5.6240189377973415 -1063 5.623977220421205 -1064 5.623935594731719 -1065 5.623894060433608 -1066 5.623852617232563 -1067 5.6238112648352505 -1068 5.623770002949298 -1069 5.623728831283307 -1070 5.623687749546828 -1071 5.623646757450374 -1072 5.623605854705419 -1073 5.62356504102438 -1074 5.623524316120623 -1075 5.623483679708464 -1076 5.623443131503153 -1077 5.623402671220885 -1078 5.623362298578791 -1079 5.623322013294933 -1080 5.623281815088298 -1081 5.623241703678804 -1082 5.623201678787295 -1083 5.62316174013553 -1084 5.623121887446187 -1085 5.623082120442859 -1086 5.6230424388500495 -1087 5.62300284239317 -1088 5.622963330798537 -1089 5.622923903793371 -1090 5.622884561105787 -1091 5.622845302464805 -1092 5.622806127600326 -1093 5.622767036243154 -1094 5.622728028124971 -1095 5.622689102978347 -1096 5.622650260536735 -1097 5.622611500534461 -1098 5.622572822706735 -1099 5.62253422678963 -1100 5.622495712520099 -1101 5.622457279635952 -1102 5.622418927875872 -1103 5.622380656979399 -1104 5.622342466686931 -1105 5.622304356739719 -1106 5.622266326879876 -1107 5.622228376850353 -1108 5.62219050639496 -1109 5.622152715258341 -1110 5.6221150031859874 -1111 5.622077369924226 -1112 5.622039815220225 -1113 5.622002338821979 -1114 5.621964940478313 -1115 5.621927619938891 -1116 5.6218903769541875 -1117 5.621853211275507 -1118 5.621816122654971 -1119 5.6217791108455195 -1120 5.621742175600906 -1121 5.621705316675692 -1122 5.621668533825256 -1123 5.621631826805771 -1124 5.6215951953742245 -1125 5.621558639288397 -1126 5.62152215830687 -1127 5.621485752189021 -1128 5.621449420695018 -1129 5.621413163585823 -1130 5.621376980623176 -1131 5.621340871569616 -1132 5.621304836188456 -1133 5.621268874243786 -1134 5.621232985500483 -1135 5.621197169724187 -1136 5.621161426681317 -1137 5.621125756139062 -1138 5.621090157865372 -1139 5.621054631628967 -1140 5.62101917719933 -1141 5.620983794346696 -1142 5.620948482842062 -1143 5.6209132424571795 -1144 5.62087807296455 -1145 5.620842974137425 -1146 5.620807945749801 -1147 5.620772987576423 -1148 5.620738099392774 -1149 5.620703280975077 -1150 5.620668532100295 -1151 5.6206338525461215 -1152 5.620599242090985 -1153 5.620564700514041 -1154 5.620530227595175 -1155 5.620495823114997 -1156 5.620461486854834 -1157 5.620427218596743 -1158 5.620393018123492 -1159 5.620358885218565 -1160 5.6203248196661555 -1161 5.620290821251177 -1162 5.620256889759244 -1163 5.620223024976677 -1164 5.620189226690503 -1165 5.620155494688451 -1166 5.620121828758942 -1167 5.620088228691101 -1168 5.620054694274742 -1169 5.620021225300378 -1170 5.619987821559203 -1171 5.619954482843102 -1172 5.619921208944648 -1173 5.619887999657093 -1174 5.619854854774372 -1175 5.619821774091095 -1176 5.619788757402551 -1177 5.619755804504704 -1178 5.619722915194185 -1179 5.619690089268299 -1180 5.619657326525013 -1181 5.619624626762964 -1182 5.619591989781453 -1183 5.619559415380431 -1184 5.619526903360521 -1185 5.619494453522993 -1186 5.619462065669772 -1187 5.61942973960344 -1188 5.619397475127226 -1189 5.619365272045002 -1190 5.6193331301612925 -1191 5.61930104928126 -1192 5.619269029210709 -1193 5.619237069756087 -1194 5.619205170724473 -1195 5.619173331923582 -1196 5.619141553161767 -1197 5.619109834248004 -1198 5.619078174991899 -1199 5.619046575203691 -1200 5.619015034694234 -1201 5.618983553275009 -1202 5.618952130758122 -1203 5.618920766956284 -1204 5.618889461682835 -1205 5.618858214751723 -1206 5.618827025977511 -1207 5.618795895175364 -1208 5.618764822161065 -1209 5.618733806750999 -1210 5.618702848762153 -1211 5.618671948012119 -1212 5.618641104319088 -1213 5.618610317501847 -1214 5.618579587379779 -1215 5.618548913772866 -1216 5.618518296501676 -1217 5.61848773538737 -1218 5.618457230251694 -1219 5.618426780916987 -1220 5.618396387206166 -1221 5.6183660489427325 -1222 5.618335765950767 -1223 5.61830553805493 -1224 5.618275365080457 -1225 5.618245246853158 -1226 5.618215183199421 -1227 5.618185173946198 -1228 5.618155218921008 -1229 5.6181253179519475 -1230 5.618095470867669 -1231 5.61806567749739 -1232 5.618035937670893 -1233 5.618006251218517 -1234 5.617976617971158 -1235 5.61794703776027 -1236 5.617917510417859 -1237 5.6178880357764855 -1238 5.617858613669258 -1239 5.617829243929833 -1240 5.6177999263924185 -1241 5.617770660891761 -1242 5.617741447263155 -1243 5.617712285342432 -1244 5.617683174965967 -1245 5.617654115970669 -1246 5.6176251081939865 -1247 5.617596151473901 -1248 5.617567245648923 -1249 5.617538390558096 -1250 5.617509586040997 -1251 5.617480831937722 -1252 5.617452128088896 -1253 5.617423474335668 -1254 5.617394870519711 -1255 5.617366316483208 -1256 5.617337812068875 -1257 5.617309357119936 -1258 5.617280951480129 -1259 5.61725259499371 -1260 5.617224287505444 -1261 5.617196028860603 -1262 5.617167818904974 -1263 5.617139657484845 -1264 5.6171115444470106 -1265 5.617083479638769 -1266 5.617055462907917 -1267 5.617027494102755 -1268 5.616999573072081 -1269 5.6169716996651875 -1270 5.616943873731861 -1271 5.616916095122386 -1272 5.616888363687532 -1273 5.616860679278565 -1274 5.616833041747235 -1275 5.616805450945778 -1276 5.61677790672692 -1277 5.616750408943867 -1278 5.616722957450306 -1279 5.616695552100406 -1280 5.616668192748814 -1281 5.616640879250655 -1282 5.616613611461528 -1283 5.616586389237505 -1284 5.616559212435137 -1285 5.616532080911437 -1286 5.6165049945238925 -1287 5.616477953130455 -1288 5.616450956589546 -1289 5.6164240047600495 -1290 5.616397097501315 -1291 5.616370234673148 -1292 5.6163434161358206 -1293 5.616316641750059 -1294 5.616289911377047 -1295 5.6162632248784226 -1296 5.616236582116283 -1297 5.616209982953172 -1298 5.6161834272520865 -1299 5.616156914876472 -1300 5.616130445690226 -1301 5.616104019557687 -1302 5.616077636343638 -1303 5.616051295913312 -1304 5.616024998132379 -1305 5.6159987428669496 -1306 5.615972529983573 -1307 5.615946359349239 -1308 5.615920230831373 -1309 5.615894144297831 -1310 5.61586809961691 -1311 5.615842096657331 -1312 5.61581613528825 -1313 5.615790215379247 -1314 5.615764336800336 -1315 5.615738499421955 -1316 5.615712703114964 -1317 5.6156869477506515 -1318 5.615661233200721 -1319 5.6156355593373 -1320 5.61560992603294 -1321 5.6155843331606 -1322 5.615558780593666 -1323 5.6155332682059305 -1324 5.615507795871602 -1325 5.615482363465307 -1326 5.615456970862073 -1327 5.615431617937345 -1328 5.615406304566972 -1329 5.615381030627211 -1330 5.6153557959947245 -1331 5.615330600546581 -1332 5.615305444160244 -1333 5.615280326713592 -1334 5.615255248084887 -1335 5.615230208152804 -1336 5.615205206796411 -1337 5.615180243895169 -1338 5.615155319328933 -1339 5.615130432977958 -1340 5.615105584722885 -1341 5.615080774444751 -1342 5.615056002024976 -1343 5.615031267345376 -1344 5.615006570288149 -1345 5.61498191073588 -1346 5.614957288571537 -1347 5.614932703678475 -1348 5.614908155940428 -1349 5.614883645241509 -1350 5.614859171466215 -1351 5.614834734499414 -1352 5.61481033422636 -1353 5.614785970532678 -1354 5.614761643304366 -1355 5.614737352427796 -1356 5.614713097789714 -1357 5.614688879277235 -1358 5.614664696777842 -1359 5.614640550179388 -1360 5.614616439370094 -1361 5.614592364238545 -1362 5.614568324673689 -1363 5.6145443205648435 -1364 5.61452035180168 -1365 5.614496418274238 -1366 5.614472519872912 -1367 5.614448656488455 -1368 5.614424828011984 -1369 5.614401034334962 -1370 5.6143772753492165 -1371 5.614353550946921 -1372 5.614329861020609 -1373 5.614306205463157 -1374 5.614282584167803 -1375 5.614258997028122 -1376 5.6142354439380435 -1377 5.614211924791844 -1378 5.6141884394841455 -1379 5.6141649879099145 -1380 5.614141569964455 -1381 5.614118185543424 -1382 5.614094834542811 -1383 5.614071516858952 -1384 5.614048232388514 -1385 5.614024981028509 -1386 5.6140017626762795 -1387 5.613978577229512 -1388 5.6139554245862175 -1389 5.613932304644746 -1390 5.61390921730378 -1391 5.613886162462332 -1392 5.61386314001974 -1393 5.613840149875681 -1394 5.613817191930153 -1395 5.613794266083476 -1396 5.613771372236308 -1397 5.613748510289621 -1398 5.613725680144715 -1399 5.613702881703212 -1400 5.613680114867056 -1401 5.613657379538509 -1402 5.613634675620152 -1403 5.61361200301489 -1404 5.613589361625937 -1405 5.61356675135683 -1406 5.613544172111413 -1407 5.613521623793854 -1408 5.613499106308626 -1409 5.613476619560515 -1410 5.613454163454625 -1411 5.613431737896359 -1412 5.613409342791435 -1413 5.613386978045882 -1414 5.613364643566024 -1415 5.613342339258505 -1416 5.613320065030264 -1417 5.613297820788546 -1418 5.613275606440901 -1419 5.61325342189518 -1420 5.613231267059531 -1421 5.613209141842406 -1422 5.6131870461525555 -1423 5.613164979899023 -1424 5.613142942991155 -1425 5.613120935338591 -1426 5.613098956851262 -1427 5.6130770074394025 -1428 5.613055087013526 -1429 5.613033195484448 -1430 5.613011332763275 -1431 5.612989498761395 -1432 5.612967693390494 -1433 5.612945916562541 -1434 5.612924168189794 -1435 5.612902448184797 -1436 5.6128807564603775 -1437 5.61285909292965 -1438 5.612837457506009 -1439 5.612815850103134 -1440 5.612794270634984 -1441 5.612772719015801 -1442 5.612751195160101 -1443 5.612729698982687 -1444 5.612708230398633 -1445 5.612686789323293 -1446 5.612665375672296 -1447 5.6126439893615405 -1448 5.612622630307211 -1449 5.612601298425756 -1450 5.612579993633895 -1451 5.612558715848628 -1452 5.612537464987216 -1453 5.612516240967193 -1454 5.6124950437063665 -1455 5.6124738731228 -1456 5.612452729134835 -1457 5.6124316116610755 -1458 5.612410520620387 -1459 5.612389455931906 -1460 5.612368417515026 -1461 5.612347405289404 -1462 5.612326419174963 -1463 5.612305459091882 -1464 5.612284524960601 -1465 5.612263616701821 -1466 5.612242734236499 -1467 5.612221877485851 -1468 5.612201046371348 -1469 5.612180240814714 -1470 5.612159460737935 -1471 5.612138706063243 -1472 5.612117976713132 -1473 5.612097272610336 -1474 5.612076593677851 -1475 5.61205593983892 -1476 5.612035311017035 -1477 5.612014707135937 -1478 5.611994128119614 -1479 5.611973573892308 -1480 5.611953044378494 -1481 5.6119325395029085 -1482 5.611912059190519 -1483 5.611891603366548 -1484 5.611871171956453 -1485 5.611850764885939 -1486 5.6118303820809485 -1487 5.611810023467667 -1488 5.611789688972523 -1489 5.61176937852218 -1490 5.611749092043537 -1491 5.611728829463737 -1492 5.61170859071016 -1493 5.611688375710418 -1494 5.611668184392357 -1495 5.611648016684063 -1496 5.61162787251385 -1497 5.611607751810274 -1498 5.6115876545021095 -1499 5.611567580518374 -1500 5.611547529788309 -1501 5.61152750224139 -1502 5.611507497807322 -1503 5.6114875164160285 -1504 5.611467557997676 -1505 5.611447622482649 -1506 5.611427709801555 -1507 5.611407819885235 -1508 5.611387952664749 -1509 5.611368108071383 -1510 5.611348286036646 -1511 5.6113284864922655 -1512 5.611308709370199 -1513 5.6112889546026175 -1514 5.611269222121914 -1515 5.611249511860702 -1516 5.611229823751812 -1517 5.6112101577283 -1518 5.6111905137234235 -1519 5.611170891670673 -1520 5.611151291503745 -1521 5.6111317131565555 -1522 5.611112156563232 -1523 5.611092621658118 -1524 5.611073108375768 -1525 5.611053616650951 -1526 5.611034146418646 -1527 5.611014697614046 -1528 5.610995270172545 -1529 5.610975864029759 -1530 5.610956479121505 -1531 5.610937115383809 -1532 5.610917772752907 -1533 5.610898451165239 -1534 5.610879150557452 -1535 5.610859870866401 -1536 5.61084061202914 -1537 5.610821373982931 -1538 5.6108021566652395 -1539 5.610782960013732 -1540 5.61076378396628 -1541 5.61074462846095 -1542 5.610725493436017 -1543 5.610706378829951 -1544 5.610687284581422 -1545 5.610668210629301 -1546 5.610649156912652 -1547 5.610630123370743 -1548 5.610611109943035 -1549 5.610592116569184 -1550 5.610573143189043 -1551 5.610554189742661 -1552 5.61053525617028 -1553 5.610516342412335 -1554 5.610497448409453 -1555 5.610478574102457 -1556 5.610459719432354 -1557 5.610440884340353 -1558 5.610422068767843 -1559 5.610403272656409 -1560 5.610384495947823 -1561 5.610365738584045 -1562 5.610347000507223 -1563 5.610328281659695 -1564 5.610309581983978 -1565 5.610290901422784 -1566 5.610272239919004 -1567 5.610253597415721 -1568 5.6102349738561905 -1569 5.6102163691838625 -1570 5.610197783342365 -1571 5.610179216275508 -1572 5.6101606679272855 -1573 5.610142138241871 -1574 5.610123627163617 -1575 5.610105134637061 -1576 5.610086660606915 -1577 5.610068205018068 -1578 5.610049767815597 -1579 5.610031348944746 -1580 5.61001294835094 -1581 5.609994565979781 -1582 5.6099762017770445 -1583 5.6099578556886875 -1584 5.60993952766083 -1585 5.609921217639779 -1586 5.6099029255720065 -1587 5.60988465140416 -1588 5.609866395083062 -1589 5.6098481565556995 -1590 5.609829935769236 -1591 5.609811732671009 -1592 5.609793547208519 -1593 5.609775379329438 -1594 5.6097572289816116 -1595 5.6097390961130476 -1596 5.609720980671924 -1597 5.609702882606588 -1598 5.609684801865551 -1599 5.60966673839749 -1600 5.609648692151254 -1601 5.609630663075846 -1602 5.609612651120443 -1603 5.609594656234385 -1604 5.60957667836717 -1605 5.609558717468463 -1606 5.60954077348809 -1607 5.6095228463760405 -1608 5.609504936082465 -1609 5.6094870425576735 -1610 5.609469165752136 -1611 5.609451305616485 -1612 5.6094334621015065 -1613 5.609415635158155 -1614 5.609397824737531 -1615 5.609380030790904 -1616 5.609362253269691 -1617 5.609344492125473 -1618 5.609326747309983 -1619 5.609309018775112 -1620 5.609291306472901 -1621 5.609273610355556 -1622 5.609255930375424 -1623 5.609238266485016 -1624 5.609220618636989 -1625 5.609202986784157 -1626 5.609185370879486 -1627 5.609167770876089 -1628 5.609150186727234 -1629 5.60913261838634 -1630 5.6091150658069715 -1631 5.60909752894285 -1632 5.609080007747838 -1633 5.609062502175952 -1634 5.609045012181354 -1635 5.6090275377183545 -1636 5.609010078741411 -1637 5.608992635205128 -1638 5.608975207064256 -1639 5.608957794273687 -1640 5.608940396788467 -1641 5.60892301456378 -1642 5.6089056475549555 -1643 5.608888295717467 -1644 5.608870959006931 -1645 5.608853637379108 -1646 5.608836330789899 -1647 5.608819039195349 -1648 5.608801762551642 -1649 5.608784500815105 -1650 5.608767253942204 -1651 5.608750021889546 -1652 5.608732804613878 -1653 5.608715602072082 -1654 5.608698414221184 -1655 5.608681241018346 -1656 5.608664082420866 -1657 5.608646938386184 -1658 5.608629808871872 -1659 5.60861269383564 -1660 5.608595593235332 -1661 5.608578507028934 -1662 5.608561435174558 -1663 5.608544377630457 -1664 5.608527334355017 -1665 5.608510305306753 -1666 5.6084932904443185 -1667 5.608476289726504 -1668 5.60845930311222 -1669 5.608442330560515 -1670 5.608425372030574 -1671 5.608408427481707 -1672 5.608391496873356 -1673 5.608374580165094 -1674 5.608357677316624 -1675 5.608340788287775 -1676 5.608323913038509 -1677 5.608307051528916 -1678 5.608290203719213 -1679 5.608273369569744 -1680 5.608256549040981 -1681 5.608239742093524 -1682 5.608222948688097 -1683 5.608206168785551 -1684 5.608189402346864 -1685 5.608172649333138 -1686 5.608155909705601 -1687 5.6081391834256 -1688 5.608122470454614 -1689 5.608105770754241 -1690 5.6080890842862 -1691 5.608072411012338 -1692 5.608055750894622 -1693 5.608039103895139 -1694 5.608022469976101 -1695 5.608005849099836 -1696 5.607989241228799 -1697 5.607972646325562 -1698 5.607956064352816 -1699 5.607939495273373 -1700 5.607922939050168 -1701 5.607906395646243 -1702 5.607889865024773 -1703 5.607873347149039 -1704 5.607856841982447 -1705 5.607840349488518 -1706 5.60782386963089 -1707 5.607807402373314 -1708 5.607790947679664 -1709 5.607774505513923 -1710 5.607758075840193 -1711 5.60774165862269 -1712 5.607725253825744 -1713 5.607708861413801 -1714 5.607692481351416 -1715 5.607676113603265 -1716 5.607659758134132 -1717 5.607643414908911 -1718 5.607627083892615 -1719 5.607610765050367 -1720 5.607594458347399 -1721 5.607578163749053 -1722 5.607561881220787 -1723 5.607545610728165 -1724 5.607529352236866 -1725 5.607513105712673 -1726 5.607496871121482 -1727 5.607480648429297 -1728 5.60746443760223 -1729 5.607448238606505 -1730 5.607432051408447 -1731 5.607415875974495 -1732 5.607399712271193 -1733 5.607383560265191 -1734 5.607367419923246 -1735 5.607351291212224 -1736 5.607335174099091 -1737 5.6073190685509235 -1738 5.6073029745349015 -1739 5.607286892018312 -1740 5.607270820968543 -1741 5.607254761353085 -1742 5.60723871313954 -1743 5.607222676295605 -1744 5.607206650789088 -1745 5.60719063658789 -1746 5.6071746336600246 -1747 5.607158641973603 -1748 5.607142661496836 -1749 5.607126692198042 -1750 5.60711073404563 -1751 5.60709478700812 -1752 5.607078851054132 -1753 5.607062926152378 -1754 5.607047012271675 -1755 5.6070311093809435 -1756 5.607015217449193 -1757 5.606999336445543 -1758 5.606983466339202 -1759 5.606967607099484 -1760 5.606951758695795 -1761 5.606935921097643 -1762 5.606920094274628 -1763 5.606904278196456 -1764 5.606888472832918 -1765 5.606872678153911 -1766 5.6068568941294235 -1767 5.606841120729538 -1768 5.606825357924437 -1769 5.606809605684394 -1770 5.606793863979778 -1771 5.606778132781057 -1772 5.606762412058784 -1773 5.6067467017836154 -1774 5.606731001926294 -1775 5.606715312457657 -1776 5.60669963334864 -1777 5.606683964570264 -1778 5.6066683060936455 -1779 5.6066526578899945 -1780 5.6066370199306075 -1781 5.606621392186881 -1782 5.606605774630294 -1783 5.606590167232416 -1784 5.606574569964917 -1785 5.606558982799546 -1786 5.606543405708151 -1787 5.606527838662659 -1788 5.606512281635096 -1789 5.606496734597574 -1790 5.606481197522292 -1791 5.606465670381538 -1792 5.606450153147689 -1793 5.606434645793209 -1794 5.60641914829065 -1795 5.606403660612653 -1796 5.606388182731942 -1797 5.606372714621332 -1798 5.6063572562537205 -1799 5.606341807602094 -1800 5.6063263686395235 -1801 5.606310939339165 -1802 5.606295519674263 -1803 5.606280109618141 -1804 5.606264709144217 -1805 5.606249318225979 -1806 5.606233936837016 -1807 5.6062185649509875 -1808 5.606203202541643 -1809 5.606187849582812 -1810 5.606172506048413 -1811 5.606157171912443 -1812 5.606141847148977 -1813 5.6061265317321824 -1814 5.606111225636301 -1815 5.606095928835661 -1816 5.606080641304668 -1817 5.6060653630178106 -1818 5.60605009394966 -1819 5.606034834074865 -1820 5.606019583368157 -1821 5.606004341804349 -1822 5.60598910935833 -1823 5.605973886005068 -1824 5.605958671719617 -1825 5.605943466477106 -1826 5.60592827025274 -1827 5.605913083021808 -1828 5.605897904759673 -1829 5.605882735441779 -1830 5.605867575043648 -1831 5.605852423540876 -1832 5.605837280909139 -1833 5.605822147124194 -1834 5.605807022161864 -1835 5.6057919059980605 -1836 5.6057767986087645 -1837 5.605761699970035 -1838 5.605746610058008 -1839 5.6057315288488905 -1840 5.605716456318971 -1841 5.605701392444606 -1842 5.605686337202236 -1843 5.605671290568369 -1844 5.605656252519591 -1845 5.605641223032556 -1846 5.605626202084004 -1847 5.605611189650734 -1848 5.605596185709629 -1849 5.6055811902376425 -1850 5.605566203211798 -1851 5.605551224609196 -1852 5.605536254407008 -1853 5.605521292582475 -1854 5.605506339112914 -1855 5.60549139397571 -1856 5.605476457148322 -1857 5.605461528608282 -1858 5.605446608333187 -1859 5.6054316963007125 -1860 5.605416792488601 -1861 5.60540189687466 -1862 5.605387009436776 -1863 5.6053721301529045 -1864 5.605357259001065 -1865 5.6053423959593465 -1866 5.605327541005915 -1867 5.605312694118998 -1868 5.605297855276895 -1869 5.605283024457975 -1870 5.605268201640672 -1871 5.605253386803492 -1872 5.605238579925004 -1873 5.6052237809838505 -1874 5.605208989958738 -1875 5.6051942068284415 -1876 5.605179431571799 -1877 5.605164664167722 -1878 5.605149904595185 -1879 5.6051351528332285 -1880 5.6051204088609605 -1881 5.6051056726575545 -1882 5.605090944202248 -1883 5.605076223474347 -1884 5.605061510453222 -1885 5.605046805118306 -1886 5.605032107449102 -1887 5.60501741742517 -1888 5.605002735026144 -1889 5.604988060231715 -1890 5.60497339302164 -1891 5.604958733375742 -1892 5.604944081273904 -1893 5.604929436696077 -1894 5.604914799622269 -1895 5.604900170032556 -1896 5.604885547907078 -1897 5.604870933226032 -1898 5.604856325969681 -1899 5.604841726118352 -1900 5.604827133652428 -1901 5.60481254855236 -1902 5.60479797079866 -1903 5.604783400371895 -1904 5.604768837252701 -1905 5.604754281421771 -1906 5.6047397328598585 -1907 5.604725191547781 -1908 5.604710657466414 -1909 5.604696130596691 -1910 5.604681610919611 -1911 5.604667098416227 -1912 5.604652593067657 -1913 5.604638094855075 -1914 5.604623603759714 -1915 5.60460911976287 -1916 5.6045946428458935 -1917 5.604580172990196 -1918 5.604565710177246 -1919 5.604551254388571 -1920 5.604536805605758 -1921 5.60452236381045 -1922 5.60450792898435 -1923 5.604493501109215 -1924 5.604479080166863 -1925 5.604464666139167 -1926 5.6044502590080585 -1927 5.604435858755526 -1928 5.604421465363611 -1929 5.604407078814416 -1930 5.604392699090097 -1931 5.604378326172869 -1932 5.604363960044998 -1933 5.604349600688812 -1934 5.604335248086688 -1935 5.604320902221066 -1936 5.604306563074432 -1937 5.604292230629335 -1938 5.604277904868374 -1939 5.604263585774207 -1940 5.6042492733295415 -1941 5.604234967517144 -1942 5.60422066831983 -1943 5.604206375720475 -1944 5.604192089702003 -1945 5.604177810247396 -1946 5.604163537339683 -1947 5.604149270961955 -1948 5.60413501109735 -1949 5.604120757729058 -1950 5.604106510840332 -1951 5.60409227041446 -1952 5.6040780364347995 -1953 5.604063808884753 -1954 5.60404958774777 -1955 5.6040353730073615 -1956 5.604021164647086 -1957 5.60400696265055 -1958 5.603992767001418 -1959 5.603978577683403 -1960 5.603964394680268 -1961 5.603950217975827 -1962 5.603936047553947 -1963 5.603921883398542 -1964 5.60390772549358 -1965 5.603893573823079 -1966 5.603879428371104 -1967 5.603865289121773 -1968 5.603851156059252 -1969 5.603837029167756 -1970 5.603822908431556 -1971 5.603808793834961 -1972 5.603794685362337 -1973 5.6037805829981 -1974 5.603766486726711 -1975 5.603752396532679 -1976 5.603738312400566 -1977 5.603724234314979 -1978 5.6037101622605725 -1979 5.603696096222051 -1980 5.60368203618417 -1981 5.603667982131723 -1982 5.6036539340495635 -1983 5.603639891922583 -1984 5.603625855735722 -1985 5.603611825473974 -1986 5.6035978011223735 -1987 5.6035837826660035 -1988 5.603569770089992 -1989 5.603555763379518 -1990 5.603541762519805 -1991 5.603527767496118 -1992 5.603513778293776 -1993 5.603499794898138 -1994 5.60348581729461 -1995 5.603471845468649 -1996 5.603457879405749 -1997 5.603443919091453 -1998 5.603429964511353 -1999 5.60341601565108 -2000 5.603402072496315 diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/log.log b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/log.log deleted file mode 100644 index f90895b2..00000000 --- a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/log.log +++ /dev/null @@ -1,40 +0,0 @@ -2024-01-14T18:59:36.992 -== Config == -TAG: v4_infra -STLCGenerationParams(true, 2, 1) -MLELossParams{STLC}(NumApps(), Uniform()) -EPOCHS: 2000 -LEARNING_RATE: 0.003 -DistNat: DistUInt32 - -Building computation graph... - 11.619795557 seconds - -Initial adnodes_of_interest: -Dict("sz1_succ_abs" => 0.5, "tysz1_gen_type_tbool" => 0.5, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.5, "sz2_succ_abs" => 0.5, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5, "sz1_succ_app" => 0.5) -Inferring initial distribution... - 0.255517536 seconds -Saved metric dist to examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/dist_before.csv. - -Saving samples... -Saved samples to examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/terms_before.txt. - 2.658043849 seconds - -Initial loss: Dice.Add(17717928539214294226) - -Training... - 2.258345507 seconds - -Final logprob: 5.603402072496315 -Drawing the target dataset is 1.36x more likely - -Learned adnodes_of_interest: -Dict("sz1_succ_abs" => 0.4040994646611332, "tysz1_gen_type_tbool" => 0.3898050541437879, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.6086307765953906, "sz2_succ_abs" => 0.36241837534771965, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.4575828949877497, "sz1_succ_app" => 0.612357374780445) -Inferring trained distribution... -Saved metric dist to examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/dist_trained.csv. - 0.015229351 seconds - -Saving samples... -Saved samples to examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/terms_trained.txt. - 0.189465751 seconds - diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/terms_before.txt b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/terms_before.txt deleted file mode 100644 index 39f26041..00000000 --- a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/terms_before.txt +++ /dev/null @@ -1,200 +0,0 @@ -false -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -(λx:Bool. false) true -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) -(λx:Bool. λy:Bool. λz:Bool. false) false true -(λx:Bool -> Bool. x) (λx:Bool. x) -true -(λx:Bool. λy:Bool. true) true -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) (λx:Bool. false) -(λx:Bool. λy:Bool. true) true -(λx:Bool. λy:Bool. true) ((λx:Bool. false) true) -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) -(λx:Bool. λy:Bool. λz:Bool. false) false true -true -λx:Bool. (λy:Bool. false) false -λx:Bool. true -true -(λx:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) ((λx:Bool. true) true) -λx:Bool. x -(λx:Bool. λy:Bool. false) false true -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) (λx:Bool. false) -λx:Bool. (λy:Bool. false) x -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) ((λx:Bool. true) true) -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true (λx:Bool. false) -λx:Bool. (λy:Bool. true) true -(λx:Bool. λy:Bool. true) ((λx:Bool. true) false) -true -false -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) ((λx:Bool. true) false) -(λx:Bool. λy:Bool. false) false -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. false) true) -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. true)) -λx:Bool. false -λx:Bool. false -(λx:Bool. λy:Bool. λz:Bool. true) true true -(λx:Bool -> Bool. true) (λx:Bool. x) -true -(λx:Bool. λy:Bool. false) ((λx:Bool. false) true) -true -true -λx:Bool. x -false -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) true) -false -false -(λx:Bool. λy:Bool. λz:Bool. true) true false -λx:Bool. x -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) (λx:Bool. x) -λx:Bool. (λy:Bool. false) false -(λx:Bool. λy:Bool -> Bool. true) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -(λx:Bool. true) true -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -(λx:Bool. x) ((λx:Bool -> Bool. false) (λx:Bool. false)) -(λx:Bool. λy:Bool -> Bool. true) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -λx:Bool. false -true -λx:Bool. (λy:Bool. false) false -true -(λx:Bool -> Bool. x) (λx:Bool. x) -(λx:Bool. λy:Bool. λz:Bool. true) true true -λx:Bool. (λy:Bool. false) true -(λx:Bool. λy:Bool. true) false ((λx:Bool -> Bool. true) (λx:Bool. true)) -(λx:Bool. λy:Bool. false) false false -λx:Bool. x -λx:Bool. x -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false (λx:Bool. true) -false -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true (λx:Bool. x) -true -(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false)) -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) false) -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -false -λx:Bool. true -true -true -(λx:Bool. λy:Bool -> Bool. true) false (λx:Bool. x) -(λx:Bool. x) true -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. false) (λx:Bool. x) -false -(λx:Bool. λy:Bool. true) true ((λx:Bool -> Bool. false) (λx:Bool. true)) -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) (λx:Bool. x) -λx:Bool. (λy:Bool. true) false -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) true -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) false (λx:Bool. x) -false -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) -λx:Bool. true -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) (λx:Bool. true) -(λx:Bool. λy:Bool. true) false -false -false -λx:Bool. true -(λx:Bool -> Bool. false) (λx:Bool. x) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) (λx:Bool. x) -(λx:Bool -> Bool. x) (λx:Bool. false) -(λx:Bool. λy:Bool. false) false -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) true) -λx:Bool. x -(λx:Bool. λy:Bool. λz:Bool. true) true ((λx:Bool. false) true) -(λx:Bool. λy:Bool -> Bool. true) true (λx:Bool. x) -λx:Bool. x -(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) true -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool. true) true) -(λx:Bool -> Bool. true) (λx:Bool. true) -false -false -(λx:Bool. λy:Bool. λz:Bool. false) false true -λx:Bool. x -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -true -λx:Bool. x -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. true)) -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -λx:Bool. x -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -false -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) -λx:Bool. (λy:Bool. false) false -true -(λx:Bool. x) ((λx:Bool. false) true) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) (λx:Bool. false) -(λx:Bool. λy:Bool. true) false ((λx:Bool -> Bool. false) (λx:Bool. false)) -(λx:Bool. λy:Bool -> Bool. false) true ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -(λx:Bool. x) ((λx:Bool. true) true) -(λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. true) false) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) (λx:Bool. x) -(λx:Bool. λy:Bool -> Bool. true) false (λx:Bool. x) -λx:Bool. x -(λx:Bool. λy:Bool. true) true -(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. true)) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool. λy:Bool. true) true) -λx:Bool. x -λx:Bool. false -true -(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) true -(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -(λx:Bool. λy:Bool. false) true true -λx:Bool. (λy:Bool. true) false -true -(λx:Bool. false) ((λx:Bool. false) false) -false -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) -λx:Bool. true -(λx:Bool. true) false -true -(λx:Bool. λy:Bool -> Bool. false) true ((λx:Bool. λy:Bool. false) true) -λx:Bool. (λy:Bool. true) x -(λx:Bool. λy:Bool. λz:Bool. true) true ((λx:Bool -> Bool. true) (λx:Bool. true)) -λx:Bool. x -λx:Bool. x -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) false -false -false -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -false -true -false -λx:Bool. false -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) true -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. x) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) ((λx:Bool. true) true) -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true (λx:Bool. x) -λx:Bool. (λy:Bool. true) x -(λx:Bool. λy:Bool. true) false ((λx:Bool -> Bool. false) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) (λx:Bool. x) -(λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. false) true) -false -true -(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -(λx:Bool. x) ((λx:Bool -> Bool. false) (λx:Bool. true)) -(λx:Bool. false) ((λx:Bool. false) true) -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true (λx:Bool. x) -λx:Bool. false -(λx:Bool. λy:Bool. true) true true -(λx:Bool. λy:Bool. true) false -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -(λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -true -λx:Bool. true -false -false -true -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. true) true -λx:Bool. false -true -(λx:Bool. true) true -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) false) diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/terms_trained.txt b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/terms_trained.txt deleted file mode 100644 index 24db61f0..00000000 --- a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=2,tysz=1/num_apps/uniform/epochs=2000,learning_rate=0.003/terms_trained.txt +++ /dev/null @@ -1,200 +0,0 @@ -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) -true -(λx:Bool. λy:Bool. false) false -λx:Bool. false -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -true -(λx:Bool. λy:Bool. true) false ((λx:Bool -> Bool. true) (λx:Bool. false)) -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -λx:Bool. (λy:Bool. false) x -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool. λy:Bool. true) true) -λx:Bool. x -λx:Bool. false -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) -false -λx:Bool. x -(λx:Bool. λy:Bool -> Bool. false) false ((λx:Bool. λy:Bool. false) false) -(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -λx:Bool. x -true -(λx:Bool -> Bool. x) (λx:Bool. x) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) ((λx:Bool. false) true) -λx:Bool. false -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool. λy:Bool. true) true) -(λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) true) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) true -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) (λx:Bool. true) -true -false -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool. λy:Bool. false) true) -(λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) false -true -(λx:Bool. λy:Bool. true) true -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) ((λx:Bool. λy:Bool. false) true) -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) -λx:Bool. false -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -λx:Bool. x -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) true -true -(λx:Bool. x) false -λx:Bool. x -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false (λx:Bool. false) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -λx:Bool. x -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) false -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) (λx:Bool. x) -true -(λx:Bool. λy:Bool. λz:Bool. false) true ((λx:Bool -> Bool. true) (λx:Bool. true)) -true -(λx:Bool. λy:Bool -> Bool. false) false ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. true)) -(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. true)) -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -λx:Bool. x -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. false) false) -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) -λx:Bool. (λy:Bool. false) x -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) (λx:Bool. true) -(λx:Bool. false) false -λx:Bool. x -(λx:Bool. λy:Bool. false) false -(λx:Bool. x) ((λx:Bool -> Bool. false) (λx:Bool. false)) -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -λx:Bool. x -λx:Bool. x -(λx:Bool -> Bool. false) (λx:Bool. x) -(λx:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. false)) -(λx:Bool. λy:Bool -> Bool. false) true ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -false -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool. λy:Bool. false) false) -false -(λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. x) -false -(λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. true)) -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false (λx:Bool. false) -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool. λy:Bool. false) true) -true -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool. true) false) -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. true)) -(λx:Bool. λy:Bool. false) false -λx:Bool. false -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) -(λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -(λx:Bool. λy:Bool -> Bool. true) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -false -(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -false -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. true) false -(λx:Bool -> Bool. true) (λx:Bool. true) -λx:Bool. false -(λx:Bool. λy:Bool. false) ((λx:Bool. false) true) -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) (λx:Bool. x) -(λx:Bool -> Bool. x) (λx:Bool. true) -(λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. true) false) -λx:Bool. false -λx:Bool. x -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. x) -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false) -(λx:Bool. λy:Bool. λz:Bool. false) true true -false -λx:Bool. true -λx:Bool. false -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) (λx:Bool. x) -λx:Bool. x -λx:Bool. true -λx:Bool. false -λx:Bool. true -λx:Bool. false -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -(λx:Bool. λy:Bool. true) true ((λx:Bool. true) false) -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) -(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -λx:Bool. x -λx:Bool. false -(λx:Bool -> Bool. x) (λx:Bool. true) -(λx:Bool. λy:Bool -> Bool. λz:Bool. false) false (λx:Bool. x) -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -λx:Bool. x -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) (λx:Bool. false) -false -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -λx:Bool. (λy:Bool. false) x -λx:Bool. false -false -(λx:Bool. λy:Bool -> Bool. false) true ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -(λx:Bool -> Bool. true) (λx:Bool. false) -(λx:Bool. λy:Bool. true) false -(λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) true) -λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. true) -(λx:Bool. λy:Bool. false) true -λx:Bool. x -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. x) -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. true)) -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false)) -(λx:Bool. λy:Bool -> Bool. true) true (λx:Bool. x) -(λx:Bool -> Bool. x) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -true -false -(λx:Bool -> Bool. false) (λx:Bool. true) -(λx:Bool -> Bool. λy:Bool. false) ((λx:Bool. λy:Bool. false) false) -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) false -(λx:Bool. λy:Bool. true) ((λx:Bool. true) true) -false -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) false -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. false) -(λx:Bool. false) false -λx:Bool. false -true -(λx:Bool. λy:Bool. false) false ((λx:Bool. true) false) -false -false -false -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. false) ((λx:Bool. λy:Bool. false) false) -(λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. true)) -(λx:Bool. λy:Bool. false) false -(λx:Bool. λy:Bool. false) ((λx:Bool. false) true) -λx:Bool. true -λx:Bool. false -λx:Bool. (λy:Bool. true) false -(λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) false -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true) true -(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. false)) -λx:Bool. x -(λx:Bool. λy:Bool. true) true true -(λx:Bool. λy:Bool. true) ((λx:Bool. true) true) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. true)) -(λx:Bool. λy:Bool -> Bool. false) true (λx:Bool. false) -λx:Bool. x -(λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool. false) false) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool. false) false) -(λx:Bool. λy:Bool. false) ((λx:Bool -> Bool. false) (λx:Bool. true)) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool. false) false) -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) ((λx:Bool. true) true) -(λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. false) false -(λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) ((λx:Bool -> Bool. true) (λx:Bool. true)) -true -λx:Bool. (λy:Bool -> Bool. true) (λy:Bool. true) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -(λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) -(λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false)) -true -λx:Bool. false -(λx:Bool. λy:Bool -> Bool. true) true (λx:Bool. false) -(λx:Bool. λy:Bool. false) false ((λx:Bool -> Bool. true) (λx:Bool. false)) -λx:Bool. false -λx:Bool. x -λx:Bool. true -(λx:Bool. λy:Bool -> Bool. λz:Bool. true) true ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false)) diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/learning_curve.csv b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/learning_curve.csv deleted file mode 100644 index 9190c0f6..00000000 --- a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/learning_curve.csv +++ /dev/null @@ -1,2001 +0,0 @@ -0 -268.9974234499506 -1 -275.61368438169603 -2 -276.69326542744767 -3 -277.08857634639025 -4 -277.31535648957856 -5 -277.4705297445105 -6 -277.5871368391721 -7 -277.68026130109786 -8 -277.75777583928516 -9 -277.82413378018487 -10 -277.88202366782593 -11 -277.933174863397 -12 -277.9787734641662 -13 -278.0196842142627 -14 -278.05657165139684 -15 -278.08996784570695 -16 -278.12031152823994 -17 -278.1479717450886 -18 -278.17326301429904 -19 -278.19645569285524 -20 -278.21778352935354 -21 -278.23744946573913 -22 -278.2556302730326 -23 -278.272480355396 -24 -278.28813492475075 -25 -278.30271267724567 -26 -278.3163180634952 -27 -278.32904322128303 -28 -278.3409696247989 -29 -278.35216949435664 -30 -278.3627070030896 -31 -278.372639311265 -32 -278.3820174540819 -33 -278.3908871048695 -34 -278.39928923224056 -35 -278.4072606669503 -36 -278.41483459179733 -37 -278.42204096586966 -38 -278.4289068927295 -39 -278.43545694063704 -40 -278.4417134217212 -41 -278.4476966359091 -42 -278.4534250845886 -43 -278.4589156581943 -44 -278.4641838013023 -45 -278.46924365827647 -46 -278.4741082020537 -47 -278.4787893482878 -48 -278.48329805674655 -49 -278.48764442157295 -50 -278.49183775181575 -51 -278.49588664341684 -52 -278.4997990436849 -53 -278.503582309161 -54 -278.50724325762155 -55 -278.51078821492 -56 -278.514223057221 -57 -278.51755324915524 -58 -278.52078387832796 -59 -278.5239196865777 -60 -278.5269650983246 -61 -278.5299242463061 -62 -278.5328009949784 -63 -278.53559896180354 -64 -278.5383215366478 -65 -278.5409718994587 -66 -278.54355303641046 -67 -278.5460677546381 -68 -278.54851869571536 -69 -278.55090834798466 -70 -278.55323905784036 -71 -278.55551304008003 -72 -278.5577323873802 -73 -278.5598990790068 -74 -278.56201498880256 -75 -278.564081892531 -76 -278.5661014746309 -77 -278.5680753344245 -78 -278.57000499184403 -79 -278.5718918926939 -80 -278.57373741351773 -81 -278.5755428660742 -82 -278.57730950147686 -83 -278.579038514018 -84 -278.5807310447009 -85 -278.58238818450644 -86 -278.58401097742 -87 -278.585600423234 -88 -278.5871574801425 -89 -278.58868306715294 -90 -278.5901780663216 -91 -278.5916433248279 -92 -278.5930796569101 -93 -278.5944878456569 -94 -278.5958686446815 -95 -278.5972227796782 -96 -278.5985509498747 -97 -278.5998538293881 -98 -278.60113206848655 -99 -278.60238629477914 -100 -278.6036171143111 -101 -278.6048251126081 -102 -278.6060108556395 -103 -278.60717489072965 -104 -278.60831774741206 -105 -278.6094399382259 -106 -278.6105419594728 -107 -278.6116242919209 -108 -278.6126874014744 -109 -278.6137317397976 -110 -278.6147577449114 -111 -278.61576584174514 -112 -278.6167564426699 -113 -278.61772994799395 -114 -278.6186867464353 -115 -278.6196272155662 -116 -278.62055172224046 -117 -278.6214606229886 -118 -278.6223542644031 -119 -278.6232329834971 -120 -278.6240971080503 -121 -278.6249469569333 -122 -278.6257828404206 -123 -278.6266050604856 -124 -278.62741391108364 -125 -278.6282096784226 -126 -278.62899264121825 -127 -278.62976307094056 -128 -278.63052123205006 -129 -278.6312673822228 -130 -278.6320017725618 -131 -278.6327246478089 -132 -278.6334362465379 -133 -278.6341368013459 -134 -278.6348265390359 -135 -278.6355056807902 -136 -278.63617444233853 -137 -278.6368330341202 -138 -278.6374816614384 -139 -278.63812052461 -140 -278.6387498191093 -141 -278.63936973570725 -142 -278.6399804606027 -143 -278.6405821755558 -144 -278.64117505800715 -145 -278.6417592811999 -146 -278.6423350142962 -147 -278.6429024224889 -148 -278.6434616671083 -149 -278.6440129057273 -150 -278.64455629226444 -151 -278.6450919770765 -152 -278.6456201070598 -153 -278.6461408257376 -154 -278.6466542733484 -155 -278.6471605869338 -156 -278.64765990042275 -157 -278.64815234470814 -158 -278.64863804772784 -159 -278.6491171345428 -160 -278.64958972740584 -161 -278.6500559458352 -162 -278.6505159066859 -163 -278.6509697242133 -164 -278.6514175101426 -165 -278.65185937372814 -166 -278.6522954218169 -167 -278.65272575891095 -168 -278.6531504872213 -169 -278.65356970672684 -170 -278.6539835152284 -171 -278.654392008404 -172 -278.65479527985923 -173 -278.6551934211781 -174 -278.6555865219721 -175 -278.65597466992944 -176 -278.6563579508596 -177 -278.6567364487404 -178 -278.65711024576143 -179 -278.65747942236595 -180 -278.65784405729545 -181 -278.65820422762675 -182 -278.65856000881536 -183 -278.65891147473155 -184 -278.6592586976978 -185 -278.6596017485294 -186 -278.65994069656205 -187 -278.66027560969667 -188 -278.6606065544244 -189 -278.6609335958665 -190 -278.66125679780146 -191 -278.66157622269924 -192 -278.66189193175074 -193 -278.66220398489736 -194 -278.6625124408605 -195 -278.66281735717024 -196 -278.66311879019304 -197 -278.6634167951559 -198 -278.6637114261766 -199 -278.66400273628705 -200 -278.66429077745806 -201 -278.6645756006239 -202 -278.6648572557077 -203 -278.66513579164166 -204 -278.66541125639174 -205 -278.6656836969791 -206 -278.6659531595007 -207 -278.66621968915223 -208 -278.66648333024625 -209 -278.66674412623325 -210 -278.66700211972204 -211 -278.6672573524959 -212 -278.6675098655345 -213 -278.66775969902886 -214 -278.6680068924016 -215 -278.66825148432275 -216 -278.66849351272623 -217 -278.6687330148257 -218 -278.6689700271343 -219 -278.66920458547503 -220 -278.66943672499855 -221 -278.66966648020025 -222 -278.66989388492874 -223 -278.670118972407 -224 -278.670341775241 -225 -278.6705623254341 -226 -278.67078065440336 -227 -278.67099679299065 -228 -278.67121077147004 -229 -278.67142261956946 -230 -278.67163236647644 -231 -278.67184004085084 -232 -278.6720456708362 -233 -278.67224928407177 -234 -278.6724509077041 -235 -278.67265056839375 -236 -278.67284829233074 -237 -278.67304410524173 -238 -278.6732380323992 -239 -278.6734300986337 -240 -278.67362032834046 -241 -278.67380874549184 -242 -278.67399537364355 -243 -278.6741802359428 -244 -278.67436335514185 -245 -278.67454475360023 -246 -278.6747244532955 -247 -278.67490247583396 -248 -278.6750788424535 -249 -278.67525357403395 -250 -278.6754266911042 -251 -278.67559821385083 -252 -278.67576816212187 -253 -278.6759365554365 -254 -278.6761034129905 -255 -278.6762687536651 -256 -278.67643259602886 -257 -278.6765949583495 -258 -278.6767558585962 -259 -278.6769153144467 -260 -278.6770733432934 -261 -278.67722996225075 -262 -278.6773851881563 -263 -278.67753903758125 -264 -278.6776915268332 -265 -278.6778426719623 -266 -278.67799248876463 -267 -278.6781409927897 -268 -278.67828819934437 -269 -278.67843412349663 -270 -278.6785787800831 -271 -278.67872218370854 -272 -278.6788643487561 -273 -278.6790052893885 -274 -278.67914501955164 -275 -278.67928355298204 -276 -278.6794209032077 -277 -278.6795570835535 -278 -278.6796921071441 -279 -278.6798259869111 -280 -278.679958735592 -281 -278.68009036573574 -282 -278.68022088970895 -283 -278.68035031969634 -284 -278.68047866770263 -285 -278.68060594556243 -286 -278.68073216493593 -287 -278.68085733731647 -288 -278.6809814740334 -289 -278.6811045862529 -290 -278.6812266849835 -291 -278.68134778107856 -292 -278.681467885237 -293 -278.68158700800814 -294 -278.6817051597957 -295 -278.68182235085567 -296 -278.68193859130514 -297 -278.682053891119 -298 -278.6821682601372 -299 -278.6822817080642 -300 -278.6823942444718 -301 -278.6825058788037 -302 -278.6826166203753 -303 -278.6827264783764 -304 -278.6828354618744 -305 -278.6829435798153 -306 -278.683050841027 -307 -278.683157254221 -308 -278.68326282799325 -309 -278.6833675708278 -310 -278.6834714910976 -311 -278.68357459706635 -312 -278.68367689689245 -313 -278.6837783986277 -314 -278.683879110221 -315 -278.68397903952035 -316 -278.684078194272 -317 -278.6841765821259 -318 -278.6842742106349 -319 -278.68437108725743 -320 -278.68446721935715 -321 -278.6845626142058 -322 -278.684657278988 -323 -278.68475122079514 -324 -278.6848444466345 -325 -278.6849369634252 -326 -278.6850287780033 -327 -278.68511989712084 -328 -278.68521032744894 -329 -278.68530007557666 -330 -278.68538914801513 -331 -278.68547755119533 -332 -278.68556529147486 -333 -278.68565237513303 -334 -278.6857388083756 -335 -278.6858245973346 -336 -278.68590974807034 -337 -278.6859942665732 -338 -278.68607815876175 -339 -278.686161430487 -340 -278.68624408753107 -341 -278.68632613561095 -342 -278.6864075803752 -343 -278.6864884274116 -344 -278.6865686822411 -345 -278.68664835032155 -346 -278.6867274370518 -347 -278.68680594776606 -348 -278.6868838877422 -349 -278.68696126219606 -350 -278.68703807628566 -351 -278.6871143351134 -352 -278.68719004372207 -353 -278.6872652071013 -354 -278.68733983018444 -355 -278.6874139178504 -356 -278.6874874749259 -357 -278.6875605061829 -358 -278.6876330163434 -359 -278.68770501007765 -360 -278.6877764920041 -361 -278.6878474666933 -362 -278.68791793866524 -363 -278.6879879123922 -364 -278.688057392299 -365 -278.6881263827629 -366 -278.6881948881139 -367 -278.688262912638 -368 -278.6883304605742 -369 -278.68839753611843 -370 -278.68846414342175 -371 -278.6885302865914 -372 -278.6885959696929 -373 -278.6886611967485 -374 -278.68872597174027 -375 -278.6887902986068 -376 -278.68885418124796 -377 -278.68891762352297 -378 -278.6889806292518 -379 -278.68904320221435 -380 -278.68910534615213 -381 -278.6891670647706 -382 -278.6892283617358 -383 -278.6892892406762 -384 -278.6893497051854 -385 -278.6894097588196 -386 -278.68946940509943 -387 -278.68952864751134 -388 -278.68958748950524 -389 -278.6896459344981 -390 -278.689703985873 -391 -278.6897616469773 -392 -278.6898189211286 -393 -278.68987581160866 -394 -278.6899323216692 -395 -278.6899884545291 -396 -278.69004421337553 -397 -278.69009960136395 -398 -278.6901546216215 -399 -278.69020927724193 -400 -278.69026357129076 -401 -278.69031750680284 -402 -278.69037108678435 -403 -278.6904243142122 -404 -278.6904771920354 -405 -278.69052972317286 -406 -278.6905819105169 -407 -278.6906337569329 -408 -278.6906852652564 -409 -278.6907364382982 -410 -278.69078727884136 -411 -278.69083778964233 -412 -278.69088797343244 -413 -278.6909378329163 -414 -278.69098737077377 -415 -278.6910365896582 -416 -278.69108549219936 -417 -278.69113408100264 -418 -278.6911823586463 -419 -278.69123032768795 -420 -278.6912779906589 -421 -278.69132535006815 -422 -278.6913724084012 -423 -278.69141916811964 -424 -278.6914656316629 -425 -278.69151180144877 -426 -278.69155767987024 -427 -278.6916032693014 -428 -278.6916485720916 -429 -278.6916935905702 -430 -278.6917383270451 -431 -278.69178278380235 -432 -278.6918269631074 -433 -278.6918708672053 -434 -278.691914498321 -435 -278.6919578586578 -436 -278.6920009503992 -437 -278.6920437757114 -438 -278.6920863367371 -439 -278.6921286356024 -440 -278.6921706744133 -441 -278.6922124552566 -442 -278.69225398020023 -443 -278.69229525129464 -444 -278.69233627056946 -445 -278.6923770400388 -446 -278.69241756169623 -447 -278.69245783752064 -448 -278.69249786946955 -449 -278.6925376594848 -450 -278.6925772094923 -451 -278.6926165213982 -452 -278.6926555970926 -453 -278.6926944384491 -454 -278.69273304732496 -455 -278.6927714255606 -456 -278.69280957497983 -457 -278.69284749739086 -458 -278.6928851945854 -459 -278.69292266833935 -460 -278.69295992041407 -461 -278.6929969525536 -462 -278.6930337664886 -463 -278.69307036393275 -464 -278.6931067465853 -465 -278.69314291613136 -466 -278.69317887424006 -467 -278.693214622567 -468 -278.6932501627529 -469 -278.6932854964228 -470 -278.69332062519067 -471 -278.6933555506532 -472 -278.6933902743948 -473 -278.6934247979859 -474 -278.69345912298337 -475 -278.6934932509308 -476 -278.69352718335716 -477 -278.6935609217801 -478 -278.69359446770096 -479 -278.6936278226121 -480 -278.6936609879906 -481 -278.69369396530067 -482 -278.69372675599425 -483 -278.693759361512 -484 -278.6937917832803 -485 -278.69382402271464 -486 -278.6938560812169 -487 -278.69388796017813 -488 -278.69391966097754 -489 -278.69395118498215 -490 -278.693982533546 -491 -278.69401370801364 -492 -278.6940447097167 -493 -278.69407553997587 -494 -278.69410620010126 -495 -278.6941366913907 -496 -278.69416701513063 -497 -278.6941971725985 -498 -278.694227165058 -499 -278.69425699376546 -500 -278.6942866599636 -501 -278.694316164886 -502 -278.6943455097547 -503 -278.6943746957844 -504 -278.6944037241745 -505 -278.69443259611893 -506 -278.6944613127977 -507 -278.69448987538414 -508 -278.69451828504015 -509 -278.69454654291695 -510 -278.6945746501577 -511 -278.69460260789486 -512 -278.6946304172516 -513 -278.694658079341 -514 -278.6946855952686 -515 -278.6947129661283 -516 -278.6947401930068 -517 -278.6947672769794 -518 -278.69479421911524 -519 -278.6948210204724 -520 -278.69484768209986 -521 -278.6948742050396 -522 -278.6949005903237 -523 -278.6949268389757 -524 -278.6949529520092 -525 -278.69497893043297 -526 -278.6950047752443 -527 -278.6950304874311 -528 -278.695056067977 -529 -278.69508151785413 -530 -278.69510683802906 -531 -278.6951320294568 -532 -278.69515709308774 -533 -278.6951820298629 -534 -278.6952068407148 -535 -278.69523152657 -536 -278.6952560883467 -537 -278.695280526954 -538 -278.69530484329545 -539 -278.69532903826547 -540 -278.69535311275206 -541 -278.6953770676357 -542 -278.6954009037899 -543 -278.69542462208 -544 -278.6954482233646 -545 -278.69547170849523 -546 -278.69549507831664 -547 -278.6955183336664 -548 -278.6955414753742 -549 -278.69556450426523 -550 -278.6955874211552 -551 -278.695610226855 -552 -278.6956329221683 -553 -278.69565550789054 -554 -278.6956779848137 -555 -278.69570035372095 -556 -278.69572261538883 -557 -278.69574477058967 -558 -278.69576682008665 -559 -278.6957887646389 -560 -278.6958106049987 -561 -278.6958323419109 -562 -278.6958539761166 -563 -278.69587550834774 -564 -278.6958969393342 -565 -278.69591826979564 -566 -278.695939500449 -567 -278.69596063200385 -568 -278.6959816651636 -569 -278.69600260062737 -570 -278.6960234390877 -571 -278.6960441812319 -572 -278.6960648277403 -573 -278.69608537928957 -574 -278.69610583654986 -575 -278.6961262001854 -576 -278.6961464708556 -577 -278.6961666492151 -578 -278.6961867359121 -579 -278.6962067315893 -580 -278.696226636886 -581 -278.6962464524346 -582 -278.69626617886314 -583 -278.6962858167932 -584 -278.6963053668433 -585 -278.69632482962663 -586 -278.6963442057496 -587 -278.6963634958149 -588 -278.69638270042134 -589 -278.696401820161 -590 -278.6964208556216 -591 -278.69643980738806 -592 -278.69645867603737 -593 -278.696477462144 -594 -278.6964961662782 -595 -278.69651478900323 -596 -278.69653333087956 -597 -278.6965517924634 -598 -278.6965701743055 -599 -278.69658847695246 -600 -278.696606700947 -601 -278.6966248468258 -602 -278.69664291512305 -603 -278.69666090636827 -604 -278.6966788210861 -605 -278.69669665979757 -606 -278.6967144230188 -607 -278.6967321112621 -608 -278.6967497250358 -609 -278.69676726484454 -610 -278.69678473118825 -611 -278.6968021245623 -612 -278.6968194454597 -613 -278.6968366943681 -614 -278.69685387177213 -615 -278.6968709781515 -616 -278.6968880139837 -617 -278.6969049797408 -618 -278.69692187589135 -619 -278.6969387029016 -620 -278.69695546123137 -621 -278.69697215133993 -622 -278.6969887736808 -623 -278.6970053287047 -624 -278.6970218168576 -625 -278.6970382385833 -626 -278.69705459432197 -627 -278.6970708845092 -628 -278.6970871095784 -629 -278.6971032699581 -630 -278.69711936607484 -631 -278.69713539835146 -632 -278.6971513672061 -633 -278.6971672730545 -634 -278.69718311630953 -635 -278.6971988973818 -636 -278.6972146166751 -637 -278.69723027459327 -638 -278.69724587153627 -639 -278.69726140789925 -640 -278.69727688407687 -641 -278.6972923004579 -642 -278.6973076574302 -643 -278.69732295537733 -644 -278.69733819468064 -645 -278.697353375718 -646 -278.69736849886385 -647 -278.6973835644904 -648 -278.6973985729677 -649 -278.69741352466025 -650 -278.69742841993207 -651 -278.69744325914326 -652 -278.69745804265176 -653 -278.6974727708125 -654 -278.6974874439762 -655 -278.69750206249284 -656 -278.6975166267094 -657 -278.6975311369683 -658 -278.69754559361127 -659 -278.6975599969768 -660 -278.6975743474 -661 -278.69758864521384 -662 -278.69760289074964 -663 -278.69761708433407 -664 -278.69763122629234 -665 -278.6976453169479 -666 -278.6976593566214 -667 -278.6976733456293 -668 -278.6976872842867 -669 -278.69770117290733 -670 -278.6977150118014 -671 -278.6977288012761 -672 -278.69774254163656 -673 -278.69775623318725 -674 -278.6977698762275 -675 -278.69778347105614 -676 -278.69779701797006 -677 -278.6978105172613 -678 -278.6978239692227 -679 -278.6978373741431 -680 -278.6978507323091 -681 -278.697864044006 -682 -278.6978773095158 -683 -278.6978905291189 -684 -278.69790370309363 -685 -278.69791683171667 -686 -278.6979299152601 -687 -278.697942953997 -688 -278.69795594819686 -689 -278.69796889812625 -690 -278.69798180405184 -691 -278.69799466623715 -692 -278.69800748494305 -693 -278.69802026042845 -694 -278.6980329929516 -695 -278.69804568276766 -696 -278.69805833012947 -697 -278.6980709352891 -698 -278.6980834984961 -699 -278.69809601999873 -700 -278.6981085000409 -701 -278.69812093886816 -702 -278.69813333672204 -703 -278.6981456938423 -704 -278.69815801046786 -705 -278.69817028683394 -706 -278.6981825231765 -707 -278.6981947197286 -708 -278.69820687671944 -709 -278.69821899438045 -710 -278.69823107293826 -711 -278.6982431126183 -712 -278.6982551136454 -713 -278.6982670762412 -714 -278.69827900062813 -715 -278.69829088702267 -716 -278.6983027356446 -717 -278.69831454670765 -718 -278.6983263204274 -719 -278.69833805701546 -720 -278.69834975668243 -721 -278.6983614196388 -722 -278.6983730460913 -723 -278.6983846362462 -724 -278.6983961903078 -725 -278.6984077084787 -726 -278.69841919096183 -727 -278.6984306379559 -728 -278.6984420496599 -729 -278.6984534262701 -730 -278.6984647679825 -731 -278.6984760749911 -732 -278.6984873474883 -733 -278.6984985856647 -734 -278.6985097897107 -735 -278.6985209598141 -736 -278.69853209616144 -737 -278.6985431989391 -738 -278.6985542683296 -739 -278.698565304517 -740 -278.69857630768223 -741 -278.6985872780045 -742 -278.698598215663 -743 -278.69860912083436 -744 -278.6986199936952 -745 -278.69863083442067 -746 -278.6986416431822 -747 -278.6986524201535 -748 -278.69866316550406 -749 -278.69867387940457 -750 -278.6986845620221 -751 -278.69869521352473 -752 -278.6987058340773 -753 -278.69871642384487 -754 -278.69872698298997 -755 -278.6987375116756 -756 -278.69874801006273 -757 -278.69875847831025 -758 -278.69876891657646 -759 -278.69877932501964 -760 -278.69878970379517 -761 -278.698800053059 -762 -278.6988103729645 -763 -278.6988206636641 -764 -278.6988309253099 -765 -278.69884115805246 -766 -278.6988513620413 -767 -278.69886153742397 -768 -278.69887168434855 -769 -278.69888180296107 -770 -278.69889189340626 -771 -278.6989019558291 -772 -278.6989119903719 -773 -278.69892199717566 -774 -278.69893197638294 -775 -278.6989419281331 -776 -278.6989518525648 -777 -278.6989617498159 -778 -278.69897162002366 -779 -278.6989814633231 -780 -278.69899127985065 -781 -278.6990010697391 -782 -278.69901083312084 -783 -278.69902057012933 -784 -278.699030280895 -785 -278.6990399655476 -786 -278.6990496242164 -787 -278.6990592570304 -788 -278.69906886411576 -789 -278.6990784455997 -790 -278.69908800160715 -791 -278.69909753226375 -792 -278.6991070376916 -793 -278.6991165180149 -794 -278.6991259733551 -795 -278.69913540383266 -796 -278.6991448095682 -797 -278.6991541906818 -798 -278.69916354729094 -799 -278.6991728795138 -800 -278.69918218746733 -801 -278.69919147126683 -802 -278.69920073102844 -803 -278.6992099668655 -804 -278.69921917889235 -805 -278.6992283672211 -806 -278.69923753196343 -807 -278.69924667323215 -808 -278.6992557911358 -809 -278.69926488578477 -810 -278.6992739572878 -811 -278.6992830057527 -812 -278.6992920312872 -813 -278.69930103399787 -814 -278.69931001398965 -815 -278.6993189713689 -816 -278.69932790623847 -817 -278.69933681870333 -818 -278.6993457088658 -819 -278.69935457682743 -820 -278.69936342268994 -821 -278.699372246555 -822 -278.6993810485211 -823 -278.6993898286895 -824 -278.69939858715736 -825 -278.6994073240233 -826 -278.69941603938383 -827 -278.6994247333359 -828 -278.6994334059766 -829 -278.6994420573995 -830 -278.6994506877003 -831 -278.699459296973 -832 -278.6994678853102 -833 -278.6994764528048 -834 -278.6994849995495 -835 -278.69949352563515 -836 -278.699502031153 -837 -278.69951051619273 -838 -278.6995189808442 -839 -278.69952742519655 -840 -278.69953584933654 -841 -278.69954425335504 -842 -278.69955263733596 -843 -278.6995610013685 -844 -278.69956934553676 -845 -278.6995776699268 -846 -278.69958597462386 -847 -278.6995942597112 -848 -278.699602525274 -849 -278.6996107713935 -850 -278.6996189981532 -851 -278.69962720563564 -852 -278.69963539392165 -853 -278.69964356309214 -854 -278.699651713228 -855 -278.69965984440773 -856 -278.6996679567115 -857 -278.6996760502186 -858 -278.69968412500697 -859 -278.6996921811534 -860 -278.699700218736 -861 -278.6997082378309 -862 -278.6997162385146 -863 -278.69972422086323 -864 -278.6997321849512 -865 -278.6997401308534 -866 -278.69974805864433 -867 -278.6997559683974 -868 -278.69976386018607 -869 -278.69977173408284 -870 -278.69977959015995 -871 -278.69978742848923 -872 -278.69979524914214 -873 -278.69980305218905 -874 -278.6998108377009 -875 -278.6998186057469 -876 -278.69982635639775 -877 -278.69983408972143 -878 -278.69984180578695 -879 -278.6998495046619 -880 -278.6998571864146 -881 -278.6998648511121 -882 -278.6998724988212 -883 -278.6998801296087 -884 -278.6998877435394 -885 -278.6998953406794 -886 -278.6999029210949 -887 -278.6999104848489 -888 -278.6999180320066 -889 -278.6999255626317 -890 -278.69993307678783 -891 -278.6999405745378 -892 -278.6999480559442 -893 -278.69995552107014 -894 -278.69996296997584 -895 -278.6999704027251 -896 -278.69997781937633 -897 -278.69998521999173 -898 -278.69999260463163 -899 -278.69999997335555 -900 -278.70000732622356 -901 -278.7000146632952 -902 -278.70002198462777 -903 -278.7000292902802 -904 -278.70003658031163 -905 -278.7000438547786 -906 -278.7000511137396 -907 -278.7000583572504 -908 -278.70006558536886 -909 -278.70007279815087 -910 -278.70007999565115 -911 -278.7000871779269 -912 -278.70009434503316 -913 -278.70010149702404 -914 -278.7001086339546 -915 -278.7001157558789 -916 -278.70012286285134 -917 -278.7001299549248 -918 -278.70013703215363 -919 -278.70014409459003 -920 -278.7001511422859 -921 -278.7001581752947 -922 -278.7001651936681 -923 -278.700172197457 -924 -278.70017918671414 -925 -278.70018616148946 -926 -278.7001931218339 -927 -278.70020006779805 -928 -278.7002069994325 -929 -278.7002139167858 -930 -278.70022081990777 -931 -278.7002277088489 -932 -278.7002345836572 -933 -278.70024144438116 -934 -278.7002482910693 -935 -278.70025512376924 -936 -278.70026194253035 -937 -278.7002687473985 -938 -278.7002755384206 -939 -278.7002823156457 -940 -278.7002890791181 -941 -278.70029582888554 -942 -278.7003025649939 -943 -278.7003092874886 -944 -278.7003159964158 -945 -278.7003226918208 -946 -278.70032937374793 -947 -278.70033604224227 -948 -278.7003426973489 -949 -278.7003493391113 -950 -278.7003559675733 -951 -278.70036258278 -952 -278.70036918477393 -953 -278.700375773598 -954 -278.70038234929615 -955 -278.70038891191007 -956 -278.70039546148314 -957 -278.7004019980575 -958 -278.70040852167466 -959 -278.7004150323762 -960 -278.700421530205 -961 -278.70042801520106 -962 -278.7004344874067 -963 -278.70044094686097 -964 -278.70044739360605 -965 -278.70045382768154 -966 -278.7004602491281 -967 -278.70046665798486 -968 -278.70047305429216 -969 -278.7004794380897 -970 -278.7004858094162 -971 -278.70049216831086 -972 -278.7004985148127 -973 -278.7005048489597 -974 -278.7005111707911 -975 -278.7005174803452 -976 -278.7005237776588 -977 -278.70053006277055 -978 -278.7005363357179 -979 -278.70054259653784 -980 -278.70054884526786 -981 -278.700555081945 -982 -278.7005613066057 -983 -278.7005675192867 -984 -278.7005737200246 -985 -278.7005799088545 -986 -278.7005860858133 -987 -278.70059225093706 -988 -278.7005984042606 -989 -278.7006045458193 -990 -278.7006106756485 -991 -278.700616793783 -992 -278.7006229002585 -993 -278.7006289951088 -994 -278.70063507836835 -995 -278.7006411500713 -996 -278.7006472102524 -997 -278.70065325894524 -998 -278.700659296183 -999 -278.7006653220001 -1000 -278.70067133642846 -1001 -278.70067733950344 -1002 -278.70068333125613 -1003 -278.7006893117205 -1004 -278.70069528092847 -1005 -278.700701238913 -1006 -278.7007071857062 -1007 -278.70071312134047 -1008 -278.7007190458471 -1009 -278.7007249592589 -1010 -278.7007308616073 -1011 -278.70073675292366 -1012 -278.70074263323903 -1013 -278.7007485025849 -1014 -278.70075436099177 -1015 -278.7007602084912 -1016 -278.70076604511394 -1017 -278.7007718708899 -1018 -278.7007776858499 -1019 -278.70078349002415 -1020 -278.7007892834421 -1021 -278.70079506613524 -1022 -278.70080083813167 -1023 -278.7008065994617 -1024 -278.70081235015584 -1025 -278.70081809024174 -1026 -278.7008238197492 -1027 -278.7008295387074 -1028 -278.70083524714505 -1029 -278.7008409450911 -1030 -278.7008466325746 -1031 -278.7008523096231 -1032 -278.70085797626575 -1033 -278.7008636325303 -1034 -278.7008692784449 -1035 -278.70087491403746 -1036 -278.70088053933597 -1037 -278.70088615436833 -1038 -278.7008917591611 -1039 -278.7008973537419 -1040 -278.7009029381392 -1041 -278.70090851237893 -1042 -278.70091407648846 -1043 -278.7009196304943 -1044 -278.7009251744237 -1045 -278.7009307083029 -1046 -278.70093623215877 -1047 -278.7009417460176 -1048 -278.70094724990446 -1049 -278.7009527438476 -1050 -278.70095822787175 -1051 -278.7009637020024 -1052 -278.700969166266 -1053 -278.70097462068804 -1054 -278.70098006529395 -1055 -278.70098550010874 -1056 -278.70099092515835 -1057 -278.7009963404675 -1058 -278.7010017460607 -1059 -278.7010071419642 -1060 -278.7010125282016 -1061 -278.7010179047986 -1062 -278.70102327177943 -1063 -278.70102862916747 -1064 -278.70103397698847 -1065 -278.70103931526614 -1066 -278.70104464402385 -1067 -278.70104996328706 -1068 -278.7010552730795 -1069 -278.70106057342355 -1070 -278.7010658643442 -1071 -278.7010711458647 -1072 -278.70107641800826 -1073 -278.7010816807989 -1074 -278.70108693425897 -1075 -278.70109217841235 -1076 -278.7010974132812 -1077 -278.70110263889035 -1078 -278.70110785526055 -1079 -278.7011130624157 -1080 -278.70111826037805 -1081 -278.70112344917067 -1082 -278.7011286288159 -1083 -278.70113379933525 -1084 -278.70113896075236 -1085 -278.7011441130882 -1086 -278.7011492563649 -1087 -278.7011543906056 -1088 -278.7011595158314 -1089 -278.70116463206335 -1090 -278.7011697393248 -1091 -278.7011748376359 -1092 -278.70117992701853 -1093 -278.7011850074948 -1094 -278.7011900790854 -1095 -278.70119514181204 -1096 -278.70120019569464 -1097 -278.70120524075577 -1098 -278.7012102770158 -1099 -278.70121530449507 -1100 -278.7012203232148 -1101 -278.7012253331964 -1102 -278.7012303344595 -1103 -278.7012353270249 -1104 -278.701240310913 -1105 -278.70124528614457 -1106 -278.7012502527393 -1107 -278.7012552107176 -1108 -278.70126016009993 -1109 -278.70126510090654 -1110 -278.701270033156 -1111 -278.7012749568693 -1112 -278.7012798720665 -1113 -278.7012847787663 -1114 -278.7012896769884 -1115 -278.7012945667539 -1116 -278.7012994480799 -1117 -278.70130432098756 -1118 -278.7013091854956 -1119 -278.7013140416233 -1120 -278.70131888938937 -1121 -278.7013237288144 -1122 -278.70132855991494 -1123 -278.7013333827126 -1124 -278.7013381972237 -1125 -278.70134300346814 -1126 -278.70134780146606 -1127 -278.70135259123384 -1128 -278.70135737279116 -1129 -278.7013621461562 -1130 -278.7013669113466 -1131 -278.70137166838293 -1132 -278.70137641728155 -1133 -278.70138115806066 -1134 -278.7013858907397 -1135 -278.70139061533536 -1136 -278.70139533186665 -1137 -278.70140004035085 -1138 -278.7014047408057 -1139 -278.7014094332498 -1140 -278.7014141176996 -1141 -278.7014187941743 -1142 -278.7014234626902 -1143 -278.70142812326606 -1144 -278.70143277591734 -1145 -278.70143742066364 -1146 -278.701442057521 -1147 -278.7014466865071 -1148 -278.70145130763837 -1149 -278.7014559209335 -1150 -278.7014605264079 -1151 -278.7014651240791 -1152 -278.7014697139644 -1153 -278.7014742960812 -1154 -278.7014788704451 -1155 -278.7014834370727 -1156 -278.7014879959824 -1157 -278.7014925471894 -1158 -278.70149709071075 -1159 -278.70150162656245 -1160 -278.7015061547612 -1161 -278.70151067532385 -1162 -278.70151518826594 -1163 -278.70151969360467 -1164 -278.7015241913555 -1165 -278.7015286815353 -1166 -278.7015331641595 -1167 -278.70153763924424 -1168 -278.7015421068054 -1169 -278.7015465668597 -1170 -278.70155101942163 -1171 -278.7015554645087 -1172 -278.70155990213533 -1173 -278.7015643323175 -1174 -278.70156875507126 -1175 -278.701573170412 -1176 -278.7015775783548 -1177 -278.701581978916 -1178 -278.70158637211046 -1179 -278.70159075795374 -1180 -278.70159513646104 -1181 -278.7015995076477 -1182 -278.7016038715282 -1183 -278.70160822811977 -1184 -278.7016125774347 -1185 -278.70161691949113 -1186 -278.7016212543017 -1187 -278.70162558188235 -1188 -278.7016299022471 -1189 -278.70163421541264 -1190 -278.7016385213919 -1191 -278.7016428202005 -1192 -278.7016471118531 -1193 -278.7016513963638 -1194 -278.7016556737485 -1195 -278.70165994402066 -1196 -278.70166420719477 -1197 -278.70166846328635 -1198 -278.70167271230844 -1199 -278.70167695427625 -1200 -278.70168118920395 -1201 -278.70168541710603 -1202 -278.70168963799534 -1203 -278.70169385188814 -1204 -278.7016980587986 -1205 -278.7017022587383 -1206 -278.7017064517236 -1207 -278.7017106377671 -1208 -278.7017148168837 -1209 -278.70171898908717 -1210 -278.70172315439095 -1211 -278.70172731280985 -1212 -278.7017314643555 -1213 -278.701735609044 -1214 -278.70173974688817 -1215 -278.70174387790127 -1216 -278.7017480020969 -1217 -278.7017521194897 -1218 -278.7017562300917 -1219 -278.70176033391726 -1220 -278.70176443097984 -1221 -278.70176852129254 -1222 -278.7017726048686 -1223 -278.701776681722 -1224 -278.7017807518651 -1225 -278.7017848153119 -1226 -278.7017888720747 -1227 -278.7017929221674 -1228 -278.70179696560365 -1229 -278.7018010023946 -1230 -278.7018050325548 -1231 -278.7018090560966 -1232 -278.70181307303335 -1233 -278.70181708337833 -1234 -278.70182108714374 -1235 -278.7018250843418 -1236 -278.7018290749872 -1237 -278.7018330590905 -1238 -278.7018370366656 -1239 -278.70184100772576 -1240 -278.7018449722819 -1241 -278.701848930348 -1242 -278.7018528819364 -1243 -278.70185682705915 -1244 -278.7018607657289 -1245 -278.70186469795794 -1246 -278.7018686237593 -1247 -278.70187254314567 -1248 -278.7018764561277 -1249 -278.70188036271946 -1250 -278.7018842629317 -1251 -278.7018881567773 -1252 -278.7018920442697 -1253 -278.7018959254187 -1254 -278.70189980023866 -1255 -278.70190366873993 -1256 -278.70190753093556 -1257 -278.70191138683714 -1258 -278.70191523645684 -1259 -278.701919079806 -1260 -278.70192291689796 -1261 -278.70192674774364 -1262 -278.70193057235485 -1263 -278.7019343907434 -1264 -278.7019382029213 -1265 -278.7019420089006 -1266 -278.70194580869224 -1267 -278.7019496023079 -1268 -278.7019533897598 -1269 -278.70195717105975 -1270 -278.70196094621923 -1271 -278.7019647152487 -1272 -278.70196847816067 -1273 -278.7019722349666 -1274 -278.7019759856779 -1275 -278.70197973030554 -1276 -278.7019834688614 -1277 -278.7019872013567 -1278 -278.701990927803 -1279 -278.701994648211 -1280 -278.70199836259246 -1281 -278.7020020709589 -1282 -278.70200577332054 -1283 -278.7020094696896 -1284 -278.7020131600759 -1285 -278.70201684449165 -1286 -278.7020205229474 -1287 -278.702024195455 -1288 -278.7020278620252 -1289 -278.7020315226677 -1290 -278.7020351773955 -1291 -278.70203882621826 -1292 -278.70204246914733 -1293 -278.70204610619294 -1294 -278.70204973736696 -1295 -278.70205336267895 -1296 -278.7020569821405 -1297 -278.7020605957626 -1298 -278.70206420355515 -1299 -278.7020678055304 -1300 -278.7020714016975 -1301 -278.7020749920669 -1302 -278.7020785766509 -1303 -278.70208215545847 -1304 -278.7020857285007 -1305 -278.7020892957892 -1306 -278.70209285733216 -1307 -278.70209641314216 -1308 -278.70209996322876 -1309 -278.70210350760243 -1310 -278.70210704627385 -1311 -278.70211057925314 -1312 -278.7021141065506 -1313 -278.7021176281767 -1314 -278.70212114414215 -1315 -278.70212465445627 -1316 -278.70212815912987 -1317 -278.7021316581732 -1318 -278.7021351515963 -1319 -278.70213863940916 -1320 -278.7021421216227 -1321 -278.7021455982461 -1322 -278.70214906928993 -1323 -278.70215253476425 -1324 -278.70215599467855 -1325 -278.702159449044 -1326 -278.7021628978691 -1327 -278.70216634116525 -1328 -278.7021697789414 -1329 -278.70217321120805 -1330 -278.7021766379744 -1331 -278.7021800592508 -1332 -278.7021834750473 -1333 -278.7021868853728 -1334 -278.70219029023843 -1335 -278.70219368965337 -1336 -278.70219708362663 -1337 -278.7022004721689 -1338 -278.7022038552891 -1339 -278.70220723299786 -1340 -278.7022106053037 -1341 -278.7022139722175 -1342 -278.7022173337482 -1343 -278.7022206899048 -1344 -278.702224040697 -1345 -278.7022273861362 -1346 -278.7022307262287 -1347 -278.70223406098734 -1348 -278.7022373904188 -1349 -278.70224071453435 -1350 -278.70224403334265 -1351 -278.7022473468532 -1352 -278.7022506550752 -1353 -278.7022539580182 -1354 -278.70225725569185 -1355 -278.70226054810473 -1356 -278.70226383526625 -1357 -278.7022671171862 -1358 -278.7022703938739 -1359 -278.7022736653377 -1360 -278.70227693158773 -1361 -278.7022801926323 -1362 -278.70228344848107 -1363 -278.70228669914343 -1364 -278.7022899446274 -1365 -278.70229318494376 -1366 -278.7022964200999 -1367 -278.70229965010645 -1368 -278.7023028749708 -1369 -278.7023060947028 -1370 -278.7023093093113 -1371 -278.70231251880546 -1372 -278.7023157231946 -1373 -278.7023189224863 -1374 -278.7023221166913 -1375 -278.7023253058169 -1376 -278.7023284898724 -1377 -278.70233166886715 -1378 -278.702334842809 -1379 -278.70233801170804 -1380 -278.702341175572 -1381 -278.7023443344098 -1382 -278.7023474882304 -1383 -278.7023506370432 -1384 -278.70235378085516 -1385 -278.7023569196765 -1386 -278.70236005351586 -1387 -278.7023631823806 -1388 -278.70236630628045 -1389 -278.70236942522365 -1390 -278.70237253921874 -1391 -278.7023756482745 -1392 -278.7023787523992 -1393 -278.70238185160133 -1394 -278.70238494589 -1395 -278.7023880352733 -1396 -278.7023911197592 -1397 -278.70239419935695 -1398 -278.70239727407477 -1399 -278.70240034392094 -1400 -278.70240340890336 -1401 -278.70240646903153 -1402 -278.7024095243132 -1403 -278.70241257475595 -1404 -278.7024156203692 -1405 -278.70241866116106 -1406 -278.70242169713924 -1407 -278.7024247283131 -1408 -278.7024277546899 -1409 -278.7024307762775 -1410 -278.7024337930859 -1411 -278.7024368051207 -1412 -278.7024398123934 -1413 -278.7024428149089 -1414 -278.7024458126769 -1415 -278.7024488057062 -1416 -278.70245179400365 -1417 -278.702454777577 -1418 -278.7024577564363 -1419 -278.7024607305878 -1420 -278.70246370004014 -1421 -278.7024666648012 -1422 -278.702469624879 -1423 -278.70247258028206 -1424 -278.70247553101746 -1425 -278.70247847709425 -1426 -278.7024814185191 -1427 -278.7024843553004 -1428 -278.7024872874463 -1429 -278.70249021496505 -1430 -278.7024931378634 -1431 -278.7024960561498 -1432 -278.70249896983285 -1433 -278.7025018789194 -1434 -278.702504783417 -1435 -278.70250768333415 -1436 -278.7025105786783 -1437 -278.7025134694574 -1438 -278.70251635567894 -1439 -278.7025192373513 -1440 -278.70252211448144 -1441 -278.70252498707686 -1442 -278.7025278551456 -1443 -278.7025307186953 -1444 -278.70253357773396 -1445 -278.7025364322688 -1446 -278.7025392823068 -1447 -278.7025421278572 -1448 -278.702544968926 -1449 -278.70254780552176 -1450 -278.7025506376511 -1451 -278.70255346532286 -1452 -278.7025562885431 -1453 -278.7025591073203 -1454 -278.70256192166187 -1455 -278.7025647315745 -1456 -278.7025675370666 -1457 -278.70257033814505 -1458 -278.70257313481756 -1459 -278.70257592709095 -1460 -278.70257871497296 -1461 -278.7025814984715 -1462 -278.7025842775933 -1463 -278.7025870523461 -1464 -278.70258982273674 -1465 -278.7025925887732 -1466 -278.7025953504611 -1467 -278.70259810781016 -1468 -278.70260086082624 -1469 -278.7026036095168 -1470 -278.70260635388945 -1471 -278.70260909395057 -1472 -278.70261182970813 -1473 -278.7026145611692 -1474 -278.70261728834026 -1475 -278.70262001122984 -1476 -278.70262272984377 -1477 -278.70262544419046 -1478 -278.70262815427554 -1479 -278.7026308601072 -1480 -278.7026335616925 -1481 -278.70263625903783 -1482 -278.70263895215044 -1483 -278.70264164103816 -1484 -278.7026443257077 -1485 -278.70264700616536 -1486 -278.7026496824188 -1487 -278.702652354475 -1488 -278.702655022341 -1489 -278.7026576860235 -1490 -278.70266034553003 -1491 -278.70266300086615 -1492 -278.7026656520401 -1493 -278.7026682990588 -1494 -278.7026709419281 -1495 -278.70267358065547 -1496 -278.70267621524835 -1497 -278.70267884571314 -1498 -278.7026814720568 -1499 -278.7026840942855 -1500 -278.7026867124069 -1501 -278.70268932642756 -1502 -278.7026919363538 -1503 -278.7026945421938 -1504 -278.70269714395187 -1505 -278.70269974163716 -1506 -278.7027023352555 -1507 -278.7027049248132 -1508 -278.7027075103179 -1509 -278.70271009177554 -1510 -278.7027126691935 -1511 -278.7027152425774 -1512 -278.7027178119348 -1513 -278.70272037727165 -1514 -278.7027229385953 -1515 -278.70272549591226 -1516 -278.7027280492285 -1517 -278.7027305985511 -1518 -278.70273314388766 -1519 -278.70273568524294 -1520 -278.70273822262396 -1521 -278.70274075603817 -1522 -278.70274328549147 -1523 -278.7027458109903 -1524 -278.70274833254115 -1525 -278.70275085015084 -1526 -278.7027533638256 -1527 -278.7027558735726 -1528 -278.70275837939676 -1529 -278.7027608813064 -1530 -278.7027633793067 -1531 -278.7027658734039 -1532 -278.7027683636055 -1533 -278.7027708499174 -1534 -278.7027733323461 -1535 -278.70277581089704 -1536 -278.7027782855776 -1537 -278.70278075639385 -1538 -278.7027832233523 -1539 -278.7027856864594 -1540 -278.7027881457208 -1541 -278.70279060114376 -1542 -278.70279305273374 -1543 -278.70279550049696 -1544 -278.70279794444076 -1545 -278.7028003845693 -1546 -278.70280282089146 -1547 -278.70280525341263 -1548 -278.7028076821374 -1549 -278.70281010707373 -1550 -278.702812528227 -1551 -278.7028149456038 -1552 -278.70281735920986 -1553 -278.70281976905284 -1554 -278.7028221751368 -1555 -278.70282457746885 -1556 -278.7028269760552 -1557 -278.70282937090127 -1558 -278.7028317620147 -1559 -278.7028341494003 -1560 -278.7028365330642 -1561 -278.70283891301295 -1562 -278.7028412892527 -1563 -278.7028436617885 -1564 -278.7028460306275 -1565 -278.70284839577516 -1566 -278.7028507572379 -1567 -278.70285311502187 -1568 -278.70285546913163 -1569 -278.70285781957506 -1570 -278.7028601663571 -1571 -278.7028625094832 -1572 -278.7028648489613 -1573 -278.7028671847953 -1574 -278.702869516992 -1575 -278.70287184555775 -1576 -278.7028741704968 -1577 -278.7028764918164 -1578 -278.7028788095224 -1579 -278.70288112362095 -1580 -278.7028834341171 -1581 -278.7028857410168 -1582 -278.70288804432624 -1583 -278.7028903440513 -1584 -278.7028926401975 -1585 -278.7028949327705 -1586 -278.70289722177677 -1587 -278.7028995072215 -1588 -278.70290178911085 -1589 -278.7029040674507 -1590 -278.7029063422456 -1591 -278.702908613503 -1592 -278.7029108812278 -1593 -278.70291314542544 -1594 -278.7029154061021 -1595 -278.7029176632637 -1596 -278.7029199169154 -1597 -278.70292216706264 -1598 -278.70292441371197 -1599 -278.70292665686844 -1600 -278.7029288965383 -1601 -278.70293113272606 -1602 -278.70293336543887 -1603 -278.7029355946809 -1604 -278.70293782045877 -1605 -278.70294004277804 -1606 -278.702942261643 -1607 -278.7029444770612 -1608 -278.7029466890369 -1609 -278.7029488975758 -1610 -278.7029511026842 -1611 -278.70295330436664 -1612 -278.70295550262955 -1613 -278.70295769747725 -1614 -278.70295988891684 -1615 -278.70296207695253 -1616 -278.7029642615904 -1617 -278.7029664428357 -1618 -278.7029686206945 -1619 -278.7029707951716 -1620 -278.70297296627234 -1621 -278.70297513400254 -1622 -278.70297729836795 -1623 -278.70297945937284 -1624 -278.7029816170242 -1625 -278.7029837713256 -1626 -278.7029859222848 -1627 -278.7029880699048 -1628 -278.7029902141921 -1629 -278.70299235515256 -1630 -278.70299449279105 -1631 -278.7029966271122 -1632 -278.70299875812213 -1633 -278.7030008858263 -1634 -278.7030030102298 -1635 -278.70300513133725 -1636 -278.70300724915523 -1637 -278.7030093636887 -1638 -278.70301147494166 -1639 -278.7030135829211 -1640 -278.70301568763085 -1641 -278.7030177890777 -1642 -278.7030198872659 -1643 -278.70302198220065 -1644 -278.70302407388755 -1645 -278.7030261623318 -1646 -278.70302824753753 -1647 -278.7030303295118 -1648 -278.70303240825865 -1649 -278.70303448378303 -1650 -278.7030365560911 -1651 -278.70303862518665 -1652 -278.7030406910765 -1653 -278.7030427537644 -1654 -278.70304481325684 -1655 -278.70304686955774 -1656 -278.70304892267234 -1657 -278.7030509726055 -1658 -278.7030530193641 -1659 -278.7030550629513 -1660 -278.7030571033728 -1661 -278.7030591406339 -1662 -278.7030611747398 -1663 -278.7030632056943 -1664 -278.7030652335037 -1665 -278.7030672581736 -1666 -278.70306927970745 -1667 -278.70307129811135 -1668 -278.7030733133891 -1669 -278.7030753255478 -1670 -278.70307733459026 -1671 -278.7030793405223 -1672 -278.7030813433498 -1673 -278.7030833430765 -1674 -278.7030853397077 -1675 -278.7030873332483 -1676 -278.7030893237035 -1677 -278.7030913110783 -1678 -278.70309329537713 -1679 -278.7030952766054 -1680 -278.70309725476756 -1681 -278.70309922986905 -1682 -278.70310120191374 -1683 -278.7031031709084 -1684 -278.7031051368556 -1685 -278.7031070997626 -1686 -278.7031090596323 -1687 -278.70311101647 -1688 -278.7031129702815 -1689 -278.70311492107055 -1690 -278.70311686884224 -1691 -278.7031188136015 -1692 -278.70312075535355 -1693 -278.70312269410255 -1694 -278.7031246298534 -1695 -278.70312656261115 -1696 -278.7031284923796 -1697 -278.7031304191657 -1698 -278.7031323429725 -1699 -278.7031342638043 -1700 -278.70313618166705 -1701 -278.7031380965652 -1702 -278.70314000850385 -1703 -278.7031419174861 -1704 -278.7031438235186 -1705 -278.7031457266047 -1706 -278.7031476267497 -1707 -278.70314952395864 -1708 -278.7031514182349 -1709 -278.70315330958505 -1710 -278.70315519801187 -1711 -278.7031570835211 -1712 -278.7031589661171 -1713 -278.703160845805 -1714 -278.70316272258805 -1715 -278.7031645964726 -1716 -278.70316646746176 -1717 -278.703168335561 -1718 -278.7031702007747 -1719 -278.7031720631079 -1720 -278.7031739225642 -1721 -278.7031757791492 -1722 -278.70317763286704 -1723 -278.7031794837222 -1724 -278.70318133171855 -1725 -278.7031831768621 -1726 -278.7031850191566 -1727 -278.70318685860616 -1728 -278.70318869521617 -1729 -278.7031905289904 -1730 -278.7031923599337 -1731 -278.70319418805065 -1732 -278.7031960133453 -1733 -278.7031978358231 -1734 -278.7031996554872 -1735 -278.7032014723429 -1736 -278.7032032863947 -1737 -278.70320509764707 -1738 -278.7032069061038 -1739 -278.70320871176983 -1740 -278.7032105146498 -1741 -278.70321231474765 -1742 -278.7032141120681 -1743 -278.70321590661484 -1744 -278.7032176983937 -1745 -278.7032194874074 -1746 -278.70322127366217 -1747 -278.7032230571608 -1748 -278.7032248379083 -1749 -278.7032266159085 -1750 -278.7032283911667 -1751 -278.7032301636869 -1752 -278.7032319334733 -1753 -278.7032337005298 -1754 -278.7032354648615 -1755 -278.70323722647265 -1756 -278.7032389853662 -1757 -278.7032407415487 -1758 -278.70324249502244 -1759 -278.70324424579326 -1760 -278.7032459938642 -1761 -278.70324773924034 -1762 -278.70324948192587 -1763 -278.7032512219248 -1764 -278.7032529592407 -1765 -278.703254693879 -1766 -278.70325642584334 -1767 -278.70325815513814 -1768 -278.7032598817678 -1769 -278.70326160573643 -1770 -278.70326332704786 -1771 -278.70326504570664 -1772 -278.70326676171646 -1773 -278.7032684750828 -1774 -278.70327018580804 -1775 -278.7032718938977 -1776 -278.7032735993553 -1777 -278.70327530218543 -1778 -278.70327700239164 -1779 -278.70327869997936 -1780 -278.70328039495155 -1781 -278.70328208731223 -1782 -278.703283777066 -1783 -278.70328546421706 -1784 -278.7032871487692 -1785 -278.7032888307266 -1786 -278.7032905100937 -1787 -278.7032921868744 -1788 -278.7032938610721 -1789 -278.70329553269175 -1790 -278.7032972017376 -1791 -278.7032988682126 -1792 -278.7033005321221 -1793 -278.70330219346937 -1794 -278.7033038522588 -1795 -278.70330550849405 -1796 -278.70330716217967 -1797 -278.70330881331887 -1798 -278.70331046191575 -1799 -278.703312107976 -1800 -278.70331375150107 -1801 -278.7033153924972 -1802 -278.7033170309664 -1803 -278.7033186669143 -1804 -278.70332030034467 -1805 -278.70332193126 -1806 -278.70332355966605 -1807 -278.7033251855656 -1808 -278.70332680896354 -1809 -278.7033284298629 -1810 -278.70333004826824 -1811 -278.70333166418305 -1812 -278.70333327761097 -1813 -278.70333488855783 -1814 -278.7033364970244 -1815 -278.70333810301724 -1816 -278.7033397065402 -1817 -278.7033413075948 -1818 -278.7033429061869 -1819 -278.70334450232014 -1820 -278.70334609599803 -1821 -278.7033476872241 -1822 -278.70334927600334 -1823 -278.7033508623388 -1824 -278.703352446234 -1825 -278.70335402769314 -1826 -278.7033556067205 -1827 -278.7033571833199 -1828 -278.7033587574942 -1829 -278.70336032924797 -1830 -278.703361898585 -1831 -278.70336346550835 -1832 -278.7033650300236 -1833 -278.7033665921324 -1834 -278.70336815184015 -1835 -278.7033697091494 -1836 -278.7033712640649 -1837 -278.70337281658965 -1838 -278.70337436672804 -1839 -278.70337591448316 -1840 -278.7033774598595 -1841 -278.70337900286086 -1842 -278.7033805434892 -1843 -278.7033820817506 -1844 -278.7033836176482 -1845 -278.70338515118505 -1846 -278.70338668236445 -1847 -278.703388211191 -1848 -278.70338973766815 -1849 -278.70339126179977 -1850 -278.7033927835895 -1851 -278.70339430304085 -1852 -278.70339582015737 -1853 -278.7033973349425 -1854 -278.70339884740065 -1855 -278.7034003575351 -1856 -278.7034018653501 -1857 -278.70340337084787 -1858 -278.70340487403297 -1859 -278.7034063749093 -1860 -278.7034078734798 -1861 -278.70340936974844 -1862 -278.7034108637189 -1863 -278.7034123553945 -1864 -278.703413844779 -1865 -278.7034153318767 -1866 -278.7034168166898 -1867 -278.70341829922296 -1868 -278.7034197794789 -1869 -278.70342125746254 -1870 -278.70342273317556 -1871 -278.70342420662314 -1872 -278.7034256778085 -1873 -278.7034271467338 -1874 -278.7034286134047 -1875 -278.7034300778237 -1876 -278.7034315399943 -1877 -278.70343299992004 -1878 -278.7034344576039 -1879 -278.70343591305067 -1880 -278.70343736626336 -1881 -278.70343881724443 -1882 -278.7034402659993 -1883 -278.70344171252947 -1884 -278.70344315683974 -1885 -278.70344459893295 -1886 -278.70344603881347 -1887 -278.70344747648363 -1888 -278.703448911947 -1889 -278.70345034520784 -1890 -278.7034517762687 -1891 -278.70345320513405 -1892 -278.70345463180723 -1893 -278.70345605629063 -1894 -278.7034574785878 -1895 -278.703458898703 -1896 -278.70346031663945 -1897 -278.70346173240034 -1898 -278.7034631459891 -1899 -278.70346455740844 -1900 -278.70346596666343 -1901 -278.7034673737565 -1902 -278.7034687786907 -1903 -278.70347018146924 -1904 -278.7034715820971 -1905 -278.70347298057584 -1906 -278.7034743769092 -1907 -278.7034757711012 -1908 -278.7034771631547 -1909 -278.70347855307375 -1910 -278.70347994086035 -1911 -278.7034813265187 -1912 -278.7034827100529 -1913 -278.7034840914647 -1914 -278.70348547075776 -1915 -278.7034868479366 -1916 -278.70348822300264 -1917 -278.70348959596083 -1918 -278.70349096681423 -1919 -278.7034923355657 -1920 -278.703493702218 -1921 -278.7034950667747 -1922 -278.70349642924026 -1923 -278.7034977896169 -1924 -278.70349914790785 -1925 -278.7035005041169 -1926 -278.70350185824617 -1927 -278.70350321030037 -1928 -278.7035045602814 -1929 -278.70350590819385 -1930 -278.70350725404006 -1931 -278.70350859782343 -1932 -278.70350993954713 -1933 -278.7035112792146 -1934 -278.7035126168291 -1935 -278.703513952393 -1936 -278.7035152859109 -1937 -278.70351661738476 -1938 -278.7035179468182 -1939 -278.70351927421507 -1940 -278.7035205995774 -1941 -278.70352192290903 -1942 -278.70352324421276 -1943 -278.70352456349235 -1944 -278.70352588075116 -1945 -278.7035271959913 -1946 -278.7035285092159 -1947 -278.7035298204286 -1948 -278.7035311296336 -1949 -278.7035324368328 -1950 -278.70353374202887 -1951 -278.70353504522586 -1952 -278.7035363464264 -1953 -278.7035376456342 -1954 -278.7035389428516 -1955 -278.70354023808244 -1956 -278.70354153132917 -1957 -278.703542822595 -1958 -278.70354411188384 -1959 -278.70354539919833 -1960 -278.7035466845406 -1961 -278.7035479679146 -1962 -278.70354924932377 -1963 -278.7035505287699 -1964 -278.70355180625745 -1965 -278.7035530817886 -1966 -278.7035543553667 -1967 -278.7035556269951 -1968 -278.7035568966758 -1969 -278.7035581644131 -1970 -278.70355943020905 -1971 -278.70356069406745 -1972 -278.70356195599066 -1973 -278.7035632159821 -1974 -278.7035644740445 -1975 -278.7035657301812 -1976 -278.70356698439537 -1977 -278.7035682366891 -1978 -278.7035694870665 -1979 -278.7035707355292 -1980 -278.7035719820819 -1981 -278.70357322672544 -1982 -278.70357446946497 -1983 -278.70357571030263 -1984 -278.7035769492407 -1985 -278.70357818628236 -1986 -278.7035794214315 -1987 -278.70358065469054 -1988 -278.7035818860622 -1989 -278.7035831155493 -1990 -278.70358434315455 -1991 -278.7035855688823 -1992 -278.70358679273426 -1993 -278.70358801471355 -1994 -278.70358923482337 -1995 -278.70359045306583 -1996 -278.70359166944496 -1997 -278.70359288396276 -1998 -278.703594096623 -1999 -278.7035953074276 -2000 -278.7035965163802 diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/log.log b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/log.log deleted file mode 100644 index 9f70e255..00000000 --- a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/log.log +++ /dev/null @@ -1,34 +0,0 @@ -2024-01-14T19:40:36.751 -== Config == -TAG: v4_infra -STLCGenerationParams(true, 5, 2) -ApproxSTLCConstructorEntropy() -EPOCHS: 2000 -LEARNING_RATE: 0.03 -DistNat: DistUInt32 - -Building generation computation graph... - 17.73495736 seconds - -Building generation loss computation graph... - 246.007870148 seconds - -Initial adnodes_of_interest: -Dict("tysz2_gen_type_tbool" => 0.5, "sz4_succ_var" => 0.5, "tysz1_gen_type_tbool" => 0.5, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.5, "sz4_succ_abs" => 0.5, "sz5_succ_var" => 0.5, "sz5_succ_abs" => 0.5, "sz2_succ_var" => 0.5, "sz1_succ_var" => 0.5, "sz1_succ_app" => 0.5, "sz1_succ_abs" => 0.5, "sz3_succ_abs" => 0.5, "sz3_succ_app" => 0.5, "sz5_succ_app" => 0.5, "sz4_succ_app" => 0.5, "sz2_succ_abs" => 0.5, "sz3_succ_var" => 0.5) -Saving samples... -Saved samples to examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/terms_before.txt. - 107.217707535 seconds - -Initial loss: -268.9974234499506 - -Training... - 177.329861307 seconds - -Final loss: -278.7035965163802 - -Learned adnodes_of_interest: -Dict("tysz2_gen_type_tbool" => 0.6406501979548712, "sz4_succ_var" => 0.6674255144274396, "tysz1_gen_type_tbool" => 0.5518244186781357, "sz0_zero_pr_var2" => 0.6074364937924714, "sz2_succ_app" => 0.29247488413020517, "sz4_succ_abs" => 0.46214510333327624, "sz5_succ_var" => 0.5, "sz5_succ_abs" => 0.6296817679421843, "sz2_succ_var" => 0.6924425693295808, "sz1_succ_var" => 0.6690399301775135, "sz1_succ_app" => 0.3164272452618666, "sz1_succ_abs" => 0.44933794966818746, "sz3_succ_abs" => 0.43541600818707565, "sz3_succ_app" => 0.2995197540262324, "sz5_succ_app" => 0.3278028860562152, "sz4_succ_app" => 0.30132673109175784, "sz2_succ_abs" => 0.42233005579465055, "sz3_succ_var" => 0.6824377595027068) -Saving samples... -Saved samples to examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/terms_trained.txt. - 110.290220352 seconds - diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/terms_before.txt b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/terms_before.txt deleted file mode 100644 index 742995a5..00000000 --- a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/terms_before.txt +++ /dev/null @@ -1,200 +0,0 @@ -true -λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. λa:Bool. false) ((λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool. λz:Bool. false)) ((λy:Bool. false) true) ((λy:Bool. λz:(Bool -> Bool) -> Bool. true) false ((λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. false) x ((λy:Bool. λz:Bool -> Bool. false) x))) -(λx:(Bool -> Bool) -> Bool. false) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. (λz:Bool -> Bool. false) (λz:Bool. true)) (λx:Bool -> Bool. false)) -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. y true) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) false ((λx:Bool. λy:Bool -> Bool. true) true) ((λx:Bool. false) true)) ((λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. true) false) ((λx:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false))))) -(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λy:Bool -> Bool. λz:Bool. true)) ((λx:Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. false) true ((λx:Bool. λy:Bool. true) true)) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. x) ((λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) true ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. true)))) (λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. false) x (λy:Bool -> Bool. λz:Bool. false)) -false -(λx:Bool -> Bool -> Bool. λy:Bool. y) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. true) (λx:Bool -> Bool. true) false ((λx:Bool. false) false)) false -λx:Bool. (λy:Bool. λz:Bool. λw:Bool. true) false x -true -(λx:Bool. x) ((λx:Bool. λy:Bool -> Bool -> Bool. true) false (λx:Bool. (λy:Bool. λz:Bool. true) x)) -λx:Bool -> Bool. λy:Bool. (λz:Bool. λw:Bool -> Bool. λa:Bool. true) false ((λz:Bool. λw:Bool. true) true) y -false -(λx:(Bool -> Bool) -> Bool. (λy:Bool. (λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) (λz:Bool. λw:Bool. true)) ((λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. false) (λy:Bool. λz:Bool. false) (λy:Bool -> Bool. false))) (λx:Bool -> Bool. false) -(λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:(Bool -> Bool) -> Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. false)) (λx:Bool. (λy:Bool. λz:Bool. false) true)) (λx:Bool -> Bool. (λy:Bool. x) false) -(λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. false) ((λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) (λy:Bool. λz:Bool. false) true)) (λx:Bool. true) -(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. λa:Bool -> Bool. λb:Bool. true) x ((λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. true)) (λy:Bool -> Bool. x false)) ((λx:Bool. λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. λa:Bool. λb:Bool. true) false ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. false)) false ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) true (λx:Bool -> Bool. x))) -λx:Bool -> Bool. λy:Bool. true -λx:Bool -> Bool. λy:Bool. y -(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. true) true) ((λx:Bool. λy:Bool -> Bool. false) ((λx:Bool. true) true)) true (λx:Bool -> Bool. x) -(λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. false) x) ((λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) true) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool. true)) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) true ((λx:Bool. λy:Bool -> Bool. false) false) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false)))) -false -λx:Bool. true -(λx:Bool -> Bool. λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. λa:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool. false) false ((λx:Bool. x) false) ((λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. true) false) ((λx:Bool -> Bool. λy:Bool. λz:Bool -> Bool. true) (λx:Bool. false) ((λx:Bool. true) false))) (λx:Bool -> Bool. (λy:Bool. λz:Bool. true) true) -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false) false (λy:Bool. y) (λy:Bool. y) -true -(λx:Bool. λy:Bool -> Bool. (λz:Bool -> Bool. x) ((λz:Bool. λw:Bool. false) x)) false -true -false -true -false -false -(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. false)) ((λx:(Bool -> Bool) -> Bool. false) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. true) true (λx:Bool -> Bool. false))) ((λx:Bool. (λy:Bool. false) ((λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. false))) true) -true -true -true -(λx:(Bool -> Bool) -> Bool. λy:Bool. false) (λx:Bool -> Bool. (λy:Bool. λz:Bool -> Bool. true) true (λy:Bool. y)) true -true -λx:Bool. false -(λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool -> Bool. (λz:(Bool -> Bool) -> Bool -> Bool. true) (λz:Bool -> Bool. λw:Bool. true)) ((λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. true))) ((λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. false)) (λx:Bool. false) (λx:Bool. true)) -false -true -false -(λx:Bool. true) true -true -false -λx:Bool. (λy:Bool. true) ((λy:Bool -> Bool. false) ((λy:Bool. λz:Bool -> Bool. λw:Bool. true) x (λy:Bool. x))) -false -λx:Bool. (λy:Bool. (λz:Bool. λw:Bool. λa:Bool. false) y ((λz:Bool. true) y)) false -(λx:Bool. λy:Bool. (λz:Bool. λw:Bool. false) false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) true -(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. λw:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. true) true) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. true) (λx:Bool. λy:Bool. false) true ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false))) (λx:Bool -> Bool. λy:Bool. (λz:Bool. y) (x y)) -false -λx:Bool. λy:Bool. false -true -λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. z) (λy:Bool -> Bool. (λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) (λz:Bool -> Bool. λw:Bool. false) y) -(λx:Bool -> Bool -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. λa:Bool -> Bool. false) false (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool. λy:Bool. x)) (λx:Bool. true) -true -(λx:Bool -> Bool -> Bool. λy:Bool. (λz:Bool -> Bool. λw:(Bool -> Bool) -> Bool. true) (λz:Bool. false) ((λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. false) (λz:Bool -> Bool. false))) ((λx:Bool. (λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. true) x) false ((λx:Bool. λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. false) true ((λx:Bool. λy:Bool. false) true) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. true) (λx:Bool. true) ((λx:Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. true))))) -false -false -λx:Bool -> Bool. x -(λx:(Bool -> Bool) -> Bool. (λy:Bool -> Bool. λz:Bool -> Bool. y) ((λy:(Bool -> Bool) -> Bool. λz:Bool. true) x)) (λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. false) ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. λa:Bool. true) (λy:Bool -> Bool. λz:Bool. false) ((λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. true)))) -λx:Bool -> Bool. x -λx:Bool. true -false -(λx:Bool -> Bool. λy:Bool. false) (λx:Bool. (λy:Bool -> Bool. λz:Bool -> Bool -> Bool. false) (λy:Bool. false) (λy:Bool. λz:Bool. false)) false -(λx:Bool. false) false -true -false -λx:Bool -> Bool. λy:Bool. true -(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. λa:Bool -> Bool. λb:Bool. false) false) ((λx:Bool. x) false) ((λx:Bool. λy:Bool. λz:Bool. true) false false false) false -false -(λx:Bool. (λy:Bool -> Bool. λz:Bool -> Bool. x) ((λy:Bool. λz:Bool. λw:Bool. true) x false)) true -(λx:Bool. (λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool -> Bool. true) x) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) ((λx:Bool. λy:Bool. λz:Bool. λw:Bool. false) ((λx:Bool. false) true) true) ((λx:Bool -> Bool -> Bool. λy:Bool. x) (λx:Bool. λy:Bool. y) ((λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. false) (λx:Bool -> Bool. λy:Bool. true)) true)) -(λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. true) ((λx:Bool. λy:Bool. true) true ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true))) ((λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. false) (λy:Bool. λz:Bool. true)) true) ((λx:Bool. λy:Bool. (λz:(Bool -> Bool) -> Bool. λw:Bool. false) (λz:Bool -> Bool. false)) false) -false -(λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. x) ((λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. x)))) -false -λx:Bool -> Bool. (λy:Bool. false) ((λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. true) (λy:Bool -> Bool. false) ((λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. false)) x) -true -(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. true) (λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) (λx:Bool -> Bool. true) -(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. λa:Bool. false) (λx:Bool. λy:Bool. false) true ((λx:Bool. (λy:Bool. λz:Bool. false) x) false) true -false -(λx:Bool. true) false -(λx:Bool -> Bool. true) ((λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) ((λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool. λz:Bool. true))) false) -false -true -(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool -> Bool. true) ((λy:Bool. λz:Bool. λw:Bool. true) false) (λy:Bool. x)) ((λx:Bool. (λy:Bool. y) ((λy:Bool -> Bool -> Bool. false) (λy:Bool. λz:Bool. false))) true) -(λx:Bool. true) ((λx:Bool. (λy:Bool. λz:Bool. false) true x) true) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool. false) (λx:Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. false)) (λx:Bool. true) true -(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. false) true ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. true))) (λx:Bool -> Bool. (λy:Bool. λz:Bool -> Bool. true) false x) (λx:Bool. false) -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. false) ((λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. false)) true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool -> Bool. λa:Bool -> Bool. λb:Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. true) (λx:Bool -> Bool. true)) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false)) ((λx:Bool. λy:Bool. λz:Bool. true) false)) -(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) false ((λx:Bool -> Bool. (λy:Bool. false) false) ((λx:Bool -> Bool. λy:Bool. λz:Bool. true) (λx:Bool. false) true)) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. (λz:Bool -> Bool. λw:Bool. true) (λz:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false)) true)) -λx:Bool -> Bool. λy:Bool. false -(λx:Bool -> Bool. λy:Bool -> Bool -> Bool. (λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. true) (λz:Bool -> Bool. true)) ((λx:Bool. (λy:Bool. λz:Bool. true) true) true) ((λx:Bool. λy:Bool. λz:Bool. x) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool -> Bool. true) (λx:Bool -> Bool. true) ((λx:Bool. true) false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool. true) (λx:Bool -> Bool. true) true))) -(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool -> Bool. λa:Bool. λb:Bool. λc:Bool. true) (λx:Bool. λy:Bool. false) ((λx:Bool. true) true) true (λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. false) (λy:Bool. λz:Bool. true) ((λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. false))) true -true -(λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. λa:Bool. true) (λy:Bool -> Bool. true) x ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) (λy:Bool -> Bool. λz:Bool. true) x)) false -(λx:Bool. λy:Bool. λz:Bool. (λw:Bool. false) y) ((λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. λz:Bool. true) ((λy:Bool -> Bool. false) x)) (λx:Bool. x)) -(λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. λa:Bool. λb:Bool. λc:Bool. true) true ((λx:Bool -> Bool. true) (λx:Bool. true)) ((λx:Bool. λy:Bool. λz:Bool. true) true ((λx:Bool. true) true)) false ((λx:Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. false) (λx:Bool. true) true (λx:Bool -> Bool. x) ((λx:Bool. λy:Bool. false) true ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. true) true))) -(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. (λz:Bool. false) false) (λx:Bool. λy:Bool. (λz:Bool -> Bool -> Bool. true) (λz:Bool. λw:Bool. true)) (λx:Bool -> Bool. λy:Bool. true) -true -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. λa:Bool. true) ((λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. false)) ((λy:Bool. λz:Bool -> Bool. λw:Bool. true) x)) true -(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:(Bool -> Bool) -> Bool. true) (λy:Bool. λz:Bool. false)) false false (λx:Bool -> Bool. false) -(λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool. true) (λx:Bool. x) true -(λx:Bool. (λy:(Bool -> Bool) -> Bool. x) (λy:Bool -> Bool. x)) ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool. true) ((λx:Bool. λy:Bool. true) true) ((λx:(Bool -> Bool) -> Bool. false) ((λx:Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. true))) ((λx:Bool. λy:Bool -> Bool. y) ((λx:Bool -> Bool. false) (λx:Bool. true)))) -λx:Bool -> Bool. λy:Bool. y -(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. λa:Bool. true) x) ((λx:Bool. x) false) ((λx:Bool. false) false) -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. x) ((λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. true) true x)) (λx:Bool -> Bool. (λy:Bool. (λz:Bool -> Bool -> Bool. λw:Bool. false) (λz:Bool. λw:Bool. true)) false) -(λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. x) true ((λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool. x) (λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. true)))) -(λx:Bool -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:(Bool -> Bool) -> Bool -> Bool. λa:Bool -> Bool. false) (λx:Bool. x) (λx:Bool. (λy:Bool. λz:Bool. false) x) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. false) ((λy:Bool. λz:Bool -> Bool. true) true)) ((λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) x) false ((λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool. false) true ((λx:(Bool -> Bool) -> Bool. λy:Bool. false) (λx:Bool -> Bool. true))))) -(λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. λa:Bool -> Bool. false) (λy:Bool -> Bool. λz:Bool. false)) ((λx:Bool. λy:Bool. λz:Bool. true) ((λx:Bool. false) true)) true ((λx:Bool. true) false) -(λx:Bool. λy:Bool -> Bool -> Bool. (λz:(Bool -> Bool) -> Bool. true) (λz:Bool -> Bool. false)) true (λx:Bool. (λy:Bool -> Bool. y) ((λy:Bool. λz:Bool. true) ((λy:Bool. true) true))) -λx:Bool -> Bool. (λy:Bool. λz:Bool. (λw:Bool -> Bool. false) (λw:Bool. true)) true -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. (λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool. true) (λz:Bool. λw:Bool. false)) (λy:Bool -> Bool. y)) true -false -(λx:Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. λb:Bool. false) (λx:Bool. x) false true ((λx:Bool -> Bool. (λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool. true) ((λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool. λz:Bool. true))) ((λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) true)) -λx:Bool. x -λx:Bool -> Bool. x true -(λx:Bool. (λy:Bool. false) false) false -(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) (λy:Bool. true) ((λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. true)) true) (λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. false) ((λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. false)) ((λy:Bool -> Bool. λz:Bool. true) ((λy:Bool. λz:Bool. true) x))) -(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) (λy:Bool. false) ((λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. false) (λy:Bool -> Bool. false))) ((λx:Bool. λy:Bool. λz:Bool. true) ((λx:Bool. true) false)) ((λx:Bool. λy:Bool -> Bool -> Bool. true) true ((λx:Bool. λy:Bool. λz:Bool. false) true)) -λx:Bool. λy:Bool. y -λx:Bool -> Bool. (λy:Bool. (λz:Bool. λw:Bool. false) y y) ((λy:Bool -> Bool -> Bool. true) (λy:Bool. x)) -λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. y) ((λy:Bool. λz:Bool -> Bool. false) false (λy:Bool. y)) ((λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool -> Bool. true) x ((λy:Bool. λz:Bool -> Bool. false) false) ((λy:Bool. x) ((λy:Bool. true) x))) -(λx:Bool. λy:Bool. x) false -false -(λx:Bool. (λy:Bool. λz:Bool -> Bool. false) x (λy:Bool. (λz:(Bool -> Bool) -> Bool -> Bool. true) (λz:Bool -> Bool. λw:Bool. false))) true -(λx:(Bool -> Bool) -> Bool -> Bool. x) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. false)) true) -true -(λx:Bool. (λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. λa:Bool -> Bool. λb:Bool. true) x) ((λx:Bool -> Bool. false) (λx:Bool. true)) ((λx:Bool. λy:Bool. true) ((λx:Bool -> Bool. true) (λx:Bool. false)) ((λx:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false))) (λx:Bool -> Bool. x) -(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. λa:Bool. true) x ((λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. true))) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. true) (λx:Bool -> Bool. false) false ((λx:Bool -> Bool. true) (λx:Bool. false))) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. true) false (λx:Bool -> Bool. true) true) -(λx:Bool -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:(Bool -> Bool) -> Bool. λa:Bool. λb:Bool -> Bool. false) (λx:Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false)) (λx:Bool -> Bool. x) (λx:Bool -> Bool. x ((λy:Bool -> Bool. false) (λy:Bool. false))) ((λx:Bool -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. λz:Bool. false)) (λx:Bool. λy:Bool. x) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool -> Bool. true) false ((λx:Bool -> Bool. true) (λx:Bool. true)) ((λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. true) true (λx:Bool. λy:Bool. true)))) -(λx:Bool. λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool -> Bool. λa:Bool. false) false ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true)) (λx:Bool. (λy:Bool. λz:Bool. true) true) (λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool. λz:Bool. false) (λy:Bool. false)) ((λx:Bool -> Bool. false) (λx:Bool. x)) -true -(λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. λa:Bool. true) true ((λx:Bool. λy:Bool. λz:Bool. true) false) false ((λx:Bool. λy:Bool. λz:Bool. true) false ((λx:Bool. false) true) ((λx:Bool -> Bool. λy:Bool -> Bool -> Bool. true) (λx:Bool. true) (λx:Bool. λy:Bool. false))) false -λx:Bool -> Bool. false -λx:Bool -> Bool. λy:Bool. (λz:Bool. z) (x false) -true -true -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool -> Bool. λa:Bool -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. true) (λx:Bool. λy:Bool. false)) true (λx:Bool. λy:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. y) (λx:Bool. λy:Bool. (λz:Bool -> Bool -> Bool. false) (λz:Bool. λw:Bool. false))) -true -(λx:Bool. λy:Bool -> Bool. (λz:Bool. λw:Bool. true) x) false -true -(λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. λa:Bool. true) (λy:Bool -> Bool. λz:Bool. false) ((λy:Bool. λz:Bool. false) x)) ((λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. true)) ((λx:Bool. x) ((λx:Bool. false) false)) (λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. false) true ((λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool. false)))) -(λx:(Bool -> Bool) -> Bool. λy:Bool. (λz:Bool -> Bool. λw:Bool -> Bool -> Bool. λa:Bool. true) (λz:Bool. false) ((λz:Bool. λw:Bool. λa:Bool. true) false)) ((λx:Bool. λy:Bool -> Bool. λz:Bool -> Bool. true) ((λx:Bool. x) true) ((λx:Bool. λy:Bool. y) false)) -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool. λa:Bool. false) (λx:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false)) false ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. λy:Bool. false))) ((λx:Bool. x) false) -λx:Bool -> Bool. x -false -λx:Bool -> Bool. λy:Bool. (λz:(Bool -> Bool) -> Bool. y) (λz:Bool -> Bool. (λw:(Bool -> Bool) -> Bool. false) (λw:Bool -> Bool. true)) -false -true -true -(λx:Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool. false) true (λy:Bool. false)) (λx:Bool -> Bool. x)) -(λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool -> Bool. true) (λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) x ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. true))) ((λx:Bool -> Bool. true) ((λx:Bool. λy:Bool. x) false)) -false -λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. (λw:(Bool -> Bool) -> Bool. false) (λw:Bool -> Bool. false)) (λy:Bool -> Bool. x) -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. (λz:Bool. λw:Bool -> Bool -> Bool. true) true (λz:Bool. x)) ((λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. true) (λy:Bool. λz:Bool. true) true) -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. (λz:(Bool -> Bool) -> Bool. λw:Bool. false) (λz:Bool -> Bool. true)) ((λx:Bool. λy:Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) true ((λx:(Bool -> Bool) -> Bool. λy:Bool. false) (λx:Bool -> Bool. true)) true)) -λx:Bool. λy:Bool. (λz:Bool. (λw:(Bool -> Bool) -> Bool -> Bool. true) (λw:Bool -> Bool. λa:Bool. true)) y -true -λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. true) ((λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool -> Bool. true) x ((λy:Bool. λz:Bool. λw:Bool. true) false)) false -(λx:Bool. (λy:(Bool -> Bool) -> Bool. (λz:Bool. false) x) (λy:Bool -> Bool. y true)) false -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. λa:Bool -> Bool. λb:Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. true) ((λx:Bool -> Bool. false) (λx:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool -> Bool. true) (λx:Bool -> Bool. false)) ((λx:Bool. x) true) ((λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. true) ((λx:Bool. λy:Bool. λz:Bool. false) false false) ((λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) (λx:Bool. false))) -false -false -(λx:Bool. λy:Bool. λz:Bool -> Bool. true) true ((λx:Bool. (λy:(Bool -> Bool) -> Bool. false) ((λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool. λz:Bool. true))) true) -λx:Bool -> Bool. (λy:Bool. (λz:Bool. λw:Bool. λa:Bool. true) true true) ((λy:Bool. λz:Bool. true) ((λy:Bool -> Bool. false) x) true) -λx:Bool. (λy:Bool. (λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool. true) (λz:Bool -> Bool. true) x) false -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool. λz:Bool. λw:(Bool -> Bool) -> Bool. true) (λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. true) (λx:Bool. λy:Bool. true))) ((λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool. true) (λy:Bool -> Bool. true)) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. false) false (λx:Bool -> Bool. false))) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. λw:Bool. λa:Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. false)) ((λx:Bool. x) ((λx:Bool. true) false)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. true) true) (λx:Bool -> Bool. x))) -(λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. false) (λy:Bool -> Bool. true) ((λy:Bool -> Bool -> Bool. λz:Bool -> Bool. false) (λy:Bool. λz:Bool. true)) ((λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. true) ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. true)))) ((λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. false) true true ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. λy:Bool. false))) false) -(λx:Bool. λy:Bool -> Bool -> Bool. x) false (λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool. false)) -false -(λx:Bool -> Bool. (λy:Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. true) (λy:Bool. false)) (λx:Bool. x) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) (λy:Bool -> Bool. λz:Bool. false) (λy:Bool -> Bool. true)) false -false -true -(λx:Bool -> Bool. (λy:Bool. (λz:Bool -> Bool -> Bool. false) (λz:Bool. λw:Bool. false)) false) (λx:Bool. false) -true -λx:Bool -> Bool. (λy:Bool. y) ((λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λy:Bool -> Bool. λz:Bool. false)) (λy:Bool -> Bool. λz:Bool. z)) -false -λx:Bool. x -false -λx:Bool -> Bool. x -(λx:Bool -> Bool. false) (λx:Bool. x) -λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. (λz:Bool -> Bool -> Bool. λw:Bool -> Bool. true) (λz:Bool. λw:Bool. false)) ((λy:Bool. λz:Bool -> Bool. λw:Bool. false) x) ((λy:Bool -> Bool. λz:Bool. x) ((λy:Bool. λz:Bool. λw:Bool. true) x true)) -λx:Bool. λy:Bool. x -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool -> Bool -> Bool. true) ((λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool. λw:Bool. true) x)) ((λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) ((λx:Bool. false) false) true ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) true (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool -> Bool. false) false (λx:Bool. λy:Bool. false)))) -true -(λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. λw:Bool. λa:(Bool -> Bool) -> Bool. λb:Bool. false) false ((λx:Bool. true) false) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) (λx:Bool -> Bool. λy:Bool. true) (λx:Bool -> Bool. x)) false ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool. false) false true)) -λx:Bool -> Bool. λy:Bool. (λz:Bool. (λw:Bool. false) false) true -(λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool -> Bool. false) ((λy:Bool -> Bool. λz:Bool -> Bool. λw:Bool. true) x) (λy:Bool. (λz:(Bool -> Bool) -> Bool. λw:Bool. true) (λz:Bool -> Bool. true))) (λx:Bool. true) -(λx:Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. x) ((λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. false) false) (λx:Bool -> Bool. λy:Bool. y)) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. true) ((λy:Bool. λz:Bool -> Bool. false) false) false) -false -(λx:Bool. (λy:Bool -> Bool. false) (λy:Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:Bool -> Bool. λw:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) false) (λx:Bool. x) ((λx:(Bool -> Bool) -> Bool. λy:Bool -> Bool. λz:Bool. false) (λx:Bool -> Bool. (λy:Bool. false) false))) -(λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. x)) (λx:Bool. false) -true -false -true -false -(λx:Bool. λy:Bool -> Bool. (λz:Bool -> Bool. z) (λz:Bool. x)) ((λx:(Bool -> Bool) -> Bool. false) ((λx:Bool. λy:Bool -> Bool. x) ((λx:Bool. λy:Bool. true) false ((λx:Bool. true) true)))) -(λx:Bool. (λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool. λz:Bool. false)) false ((λx:Bool -> Bool. (λy:Bool. λz:Bool -> Bool. true) false) (λx:Bool. x)) (λx:Bool -> Bool. λy:Bool. true) diff --git a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/terms_trained.txt b/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/terms_trained.txt deleted file mode 100644 index 50184d7c..00000000 --- a/examples/qc/benchmarks/stlc/output/v4_infra/STLC/by_sz/sz=5,tysz=2/approx_entropy/epochs=2000,learning_rate=0.03/terms_trained.txt +++ /dev/null @@ -1,200 +0,0 @@ -(λx:Bool. λy:Bool. (λz:Bool. true) y) false ((λx:Bool. x) false) -(λx:Bool -> Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool. λa:Bool. false) true false) ((λx:Bool. λy:Bool. λz:Bool. true) false) false -(λx:Bool. λy:Bool. λz:Bool. z) ((λx:Bool. true) false) -false -(λx:Bool. (λy:Bool. λz:Bool -> Bool. true) x) false (λx:Bool. (λy:Bool. λz:Bool. false) false x) -λx:Bool -> Bool. true -true -true -(λx:(Bool -> Bool) -> Bool. (λy:Bool. λz:Bool. λw:Bool. λa:Bool. false) false) (λx:Bool -> Bool. true) false ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. false) ((λx:Bool. λy:Bool. false) false) (λx:Bool. false) ((λx:Bool. x) false)) -false -true -(λx:Bool -> Bool -> Bool. (λy:Bool. false) false) (λx:Bool. λy:Bool. y) -λx:Bool. false -(λx:Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool -> Bool. false) false false true true -true -(λx:Bool -> Bool -> Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool. true) (λy:Bool. true)) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false)) ((λx:Bool. true) ((λx:Bool. x) ((λx:Bool. false) true))) true -(λx:Bool. λy:Bool. x) false true -(λx:(Bool -> Bool) -> Bool. λy:Bool. y) ((λx:Bool. λy:Bool -> Bool. x) true) -(λx:Bool. λy:Bool. x) true false -(λx:Bool. λy:Bool. y) false -true -λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. true) x ((λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool -> Bool. true) false (λy:Bool -> Bool. x) true) -false -(λx:Bool. x) ((λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. false) false)) -true -λx:Bool. true -false -(λx:Bool. x) ((λx:Bool -> Bool -> Bool. (λy:Bool -> Bool. λz:Bool. false) (λy:Bool. true) ((λy:Bool. false) false)) (λx:Bool. λy:Bool. true)) -false -(λx:Bool. λy:Bool -> Bool. true) ((λx:Bool. true) false) -false -(λx:(Bool -> Bool) -> Bool. false) (λx:Bool -> Bool. x false) -true -false -(λx:Bool -> Bool. λy:Bool -> Bool. (λz:Bool. λw:Bool. true) true ((λz:Bool. true) true)) (λx:Bool. x) -(λx:Bool. true) true -(λx:Bool. x) true -true -true -λx:Bool -> Bool. true -(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. λa:Bool. false) x) false false false -λx:Bool -> Bool. (λy:Bool -> Bool. (λz:Bool. λw:(Bool -> Bool) -> Bool. true) false (λz:Bool -> Bool. true)) x -λx:Bool -> Bool. (λy:Bool. (λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. λa:Bool. true) (λz:Bool -> Bool. true) (λz:Bool. false)) true -(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. true) x) false -(λx:Bool. λy:Bool. y) true -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool -> Bool. (λz:Bool. false) true) (λx:Bool. λy:Bool. (λz:Bool -> Bool -> Bool. false) (λz:Bool. λw:Bool. false)) (λx:Bool. λy:Bool. (λz:(Bool -> Bool) -> Bool -> Bool. x) ((λz:Bool -> Bool. λw:Bool -> Bool. λa:Bool. true) (λz:Bool. false))) -true -(λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. false) (λx:Bool. false) false) ((λx:Bool. (λy:Bool. λz:Bool -> Bool. false) true) true) (λx:Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool. true) ((λy:Bool -> Bool. λz:Bool. true) (λy:Bool. false)) true) -false -(λx:Bool. false) ((λx:Bool -> Bool -> Bool. false) (λx:Bool. λy:Bool. x)) -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. true)) (λx:Bool -> Bool. x) ((λx:Bool. (λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. true) false x) ((λx:Bool. false) true)) -false -(λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. true)) ((λx:Bool. λy:Bool. false) ((λx:Bool. false) false) ((λx:Bool. x) true)) true -λx:Bool. (λy:Bool. λz:Bool. y) true true -true -(λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λx:Bool -> Bool. true) (λx:Bool -> Bool. (λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. false)) ((λx:(Bool -> Bool) -> Bool. λy:Bool. true) (λx:Bool -> Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool -> Bool. false) (λx:Bool. λy:Bool. true) (λx:Bool. x))) true -true -(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. λa:Bool -> Bool. λb:Bool. false) true ((λy:Bool -> Bool -> Bool. true) (λy:Bool. λz:Bool. false))) true ((λx:Bool. x) false) -(λx:Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:Bool. y) ((λx:Bool. λy:Bool -> Bool. true) true) true) -(λx:Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. λa:Bool -> Bool. λb:Bool. true) false ((λx:Bool. λy:Bool. λz:Bool. false) false) (λx:Bool -> Bool. true) true (λx:Bool. x) -λx:Bool -> Bool. (λy:Bool. x) ((λy:Bool. y) (x false)) false -λx:Bool. true -(λx:Bool. λy:Bool. λz:Bool. false) false -λx:Bool -> Bool. true -false -false -(λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. λb:Bool. true) (λy:Bool -> Bool. true) x (λy:Bool. (λz:Bool. false) x)) ((λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. true) (λy:Bool -> Bool. true)) (λx:Bool -> Bool. x) true) -λx:Bool -> Bool. false -false -true -λx:Bool -> Bool. λy:Bool. y -λx:Bool. x -(λx:Bool -> Bool. (λy:Bool -> Bool. λz:Bool. λw:Bool. λa:Bool. false) x) (λx:Bool. false) true -true -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:Bool -> Bool -> Bool. λa:Bool. false) (λx:Bool -> Bool. λy:Bool. false) ((λx:(Bool -> Bool) -> Bool -> Bool. false) (λx:Bool -> Bool. λy:Bool. true)) true ((λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool. true) true) (λx:Bool -> Bool. (λy:Bool. λz:Bool. false) true)) false -true -(λx:Bool. λy:Bool. false) true -true -false -false -false -false -true -λx:Bool. λy:Bool. x -false -(λx:Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. λb:Bool. true) true true true ((λx:Bool -> Bool -> Bool. true) ((λx:Bool. λy:Bool. λz:Bool. false) true)) true -false -false -λx:Bool. false -λx:Bool. (λy:Bool -> Bool -> Bool. y x) (λy:Bool. (λz:Bool. λw:Bool. true) true) -false -false -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. λz:Bool. false) false) false true (λx:Bool -> Bool. λy:Bool. false) -false -false -false -false -false -(λx:Bool. (λy:Bool -> Bool -> Bool. y) ((λy:Bool. λz:Bool. λw:Bool. λa:Bool. false) x ((λy:Bool. false) x))) true -λx:Bool. (λy:Bool -> Bool. y) ((λy:Bool. (λz:Bool. λw:Bool. false) true) x) -true -(λx:Bool. λy:Bool -> Bool. λz:Bool. x) ((λx:Bool -> Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) false) (λx:Bool. (λy:Bool. false) true) ((λx:Bool. (λy:Bool. λz:Bool -> Bool. λw:Bool. true) false) false)) -(λx:Bool. (λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. λa:Bool -> Bool. false) x) ((λx:Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. true) ((λx:Bool. true) true)) (λx:Bool. λy:Bool. y) false -(λx:Bool. x) true -(λx:Bool. (λy:Bool -> Bool -> Bool. (λz:Bool. false) x) (λy:Bool. λz:Bool. true)) false -(λx:(Bool -> Bool) -> Bool. x) (λx:Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. true) ((λx:Bool -> Bool -> Bool. λy:Bool. false) (λx:Bool. λy:Bool. true)) ((λx:Bool. λy:Bool. false) true false) false) -λx:Bool -> Bool. x -false -λx:Bool. λy:Bool. x -false -false -true -false -(λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. false)) ((λx:Bool. true) false) ((λx:(Bool -> Bool) -> Bool. λy:Bool. false) (λx:Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. true) (λx:Bool. false) false)) ((λx:Bool. x) false) -false -(λx:Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. true) ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true) (λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) false ((λx:Bool -> Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. λy:Bool. false)) ((λx:Bool -> Bool. true) (λx:Bool. false)))) -λx:Bool. λy:Bool. y -λx:Bool -> Bool. false -(λx:Bool. λy:Bool. true) ((λx:Bool. λy:Bool. λz:Bool -> Bool. λw:Bool. true) false true (λx:Bool. x) false) -λx:Bool. x -λx:Bool. λy:Bool. (λz:Bool -> Bool. true) (λz:Bool. x) -λx:Bool. x -(λx:(Bool -> Bool) -> Bool -> Bool. λy:Bool -> Bool. λz:Bool. (λw:Bool. false) false) (λx:Bool -> Bool. λy:Bool. (λz:Bool. λw:Bool. false) y y) -(λx:Bool. λy:Bool. λz:Bool. true) false false ((λx:Bool. x) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool. true) false) (λx:Bool -> Bool. x))) -true -(λx:Bool. λy:Bool. true) true -true -(λx:Bool -> Bool. x) (λx:Bool. x) true -(λx:Bool. λy:Bool. false) false false -(λx:(Bool -> Bool) -> Bool. (λy:(Bool -> Bool) -> Bool. false) ((λy:Bool. λz:Bool -> Bool. true) ((λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. true)))) (λx:Bool -> Bool. true) -(λx:Bool. true) true -λx:Bool. (λy:(Bool -> Bool) -> Bool -> Bool. x) ((λy:Bool -> Bool -> Bool. (λz:Bool -> Bool -> Bool. λw:Bool -> Bool. λa:Bool. false) y) ((λy:Bool. λz:Bool -> Bool. λw:Bool. λa:Bool. false) x ((λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. false)))) -λx:Bool. x -false -λx:Bool -> Bool. false -false -false -(λx:Bool. λy:Bool. x) false true -(λx:Bool -> Bool -> Bool. true) ((λx:Bool -> Bool. λy:Bool. λz:Bool. z) (λx:Bool. x)) -false -true -true -λx:Bool -> Bool. λy:Bool. false -(λx:Bool. λy:Bool. (λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. true) y ((λz:Bool. λw:Bool -> Bool. λa:Bool. false) y)) ((λx:Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. true) false true (λx:Bool -> Bool. (λy:Bool -> Bool. true) x) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool. λy:Bool. true) (λx:Bool -> Bool. λy:Bool. y))) -true -true -true -(λx:Bool. x) ((λx:Bool. λy:Bool. λz:Bool. λw:(Bool -> Bool) -> Bool -> Bool. false) false ((λx:Bool. false) false) true ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool -> Bool. λa:Bool. false) (λx:Bool -> Bool. true) ((λx:Bool. true) false) ((λx:Bool. λy:Bool -> Bool -> Bool. λz:Bool -> Bool. true) false (λx:Bool. λy:Bool. false)))) -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. true) ((λy:Bool. λz:Bool. λw:Bool -> Bool. λa:Bool -> Bool. false) false true (λy:Bool. true)) -λx:Bool -> Bool. x -(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. true) x ((λy:(Bool -> Bool) -> Bool -> Bool. true) (λy:Bool -> Bool. λz:Bool. true)) ((λy:Bool -> Bool. x) (λy:Bool. false))) false -true -λx:Bool -> Bool. false -(λx:(Bool -> Bool) -> Bool -> Bool. (λy:Bool. λz:Bool -> Bool. false) ((λy:Bool. true) false)) (λx:Bool -> Bool. λy:Bool. (λz:Bool. false) y) (λx:Bool. (λy:Bool. y) x) -(λx:(Bool -> Bool) -> Bool -> Bool. true) (λx:Bool -> Bool. x) -false -λx:Bool -> Bool. λy:Bool. true -λx:Bool -> Bool. x -true -(λx:Bool. (λy:Bool. λz:Bool. λw:Bool. true) x) ((λx:Bool. (λy:Bool. λz:Bool. true) true) ((λx:Bool. false) false) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. λz:(Bool -> Bool) -> Bool -> Bool. false) true ((λx:Bool -> Bool. λy:Bool -> Bool. λz:Bool. true) (λx:Bool. false)) (λx:Bool -> Bool. x))) -(λx:Bool. λy:Bool -> Bool. false) false -true -(λx:Bool. λy:Bool. x) false false -(λx:Bool. (λy:Bool -> Bool -> Bool. λz:Bool. λw:Bool -> Bool. λa:Bool. false) (λy:Bool. λz:Bool. true)) true true -λx:Bool. x -λx:Bool. λy:Bool. true -true -(λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. z) ((λx:(Bool -> Bool) -> Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. true) (λx:Bool -> Bool. false) ((λx:Bool. true) true) true) (λx:Bool -> Bool. true) -false -(λx:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool. λy:Bool -> Bool. y) ((λx:Bool. x) true)) -true -λx:Bool -> Bool. (λy:Bool. y) false -false -(λx:Bool. x) true -(λx:Bool. (λy:Bool. λz:(Bool -> Bool) -> Bool. λw:Bool. false) false (λy:Bool -> Bool. x)) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) true ((λx:Bool. λy:Bool -> Bool. true) false) ((λx:Bool. x) false) ((λx:Bool. true) false)) -(λx:Bool -> Bool. λy:Bool -> Bool. (λz:Bool -> Bool -> Bool. false) (λz:Bool. λw:Bool. false)) ((λx:Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. false) (λy:Bool -> Bool. true)) true) ((λx:Bool -> Bool. λy:Bool. x) ((λx:Bool. λy:Bool. false) true) false) -(λx:Bool. (λy:Bool -> Bool. y) ((λy:Bool -> Bool -> Bool. λz:Bool. true) (λy:Bool. λz:Bool. false))) ((λx:Bool -> Bool -> Bool. false) ((λx:Bool -> Bool. λy:Bool. λz:Bool. false) (λx:Bool. x))) ((λx:Bool -> Bool -> Bool. λy:Bool. y) (λx:Bool. λy:Bool. false) false) -λx:Bool. false -(λx:Bool. λy:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool. λy:(Bool -> Bool) -> Bool -> Bool. false) ((λx:Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. true) true (λx:Bool -> Bool. false)) ((λx:Bool -> Bool -> Bool. λy:(Bool -> Bool) -> Bool. λz:Bool -> Bool. λw:Bool. false) (λx:Bool. λy:Bool. false) (λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. false) (λy:Bool -> Bool. true)))) -λx:Bool. (λy:Bool. (λz:Bool. λw:Bool. true) x) true ((λy:Bool. y) x) -true -(λx:Bool. false) true -λx:Bool. λy:Bool. y -λx:Bool. true -(λx:Bool. x) ((λx:Bool. true) true) -true -false -(λx:Bool. λy:Bool. λz:Bool. λw:Bool. λa:Bool. λb:Bool. true) false ((λx:Bool. x) ((λx:Bool. true) true)) ((λx:Bool. true) true) true -true -(λx:Bool. λy:Bool. y) ((λx:Bool. x) ((λx:Bool -> Bool. x) (λx:Bool. true) ((λx:Bool. false) false))) -(λx:Bool -> Bool -> Bool. λy:Bool -> Bool. true) ((λx:(Bool -> Bool) -> Bool -> Bool. (λy:(Bool -> Bool) -> Bool. λz:Bool. λw:Bool. false) (λy:Bool -> Bool. false)) (λx:Bool -> Bool. λy:Bool. false)) ((λx:Bool -> Bool -> Bool. λy:Bool. false) ((λx:Bool -> Bool. λy:Bool. λz:Bool. λw:Bool. false) (λx:Bool. x) ((λx:Bool. λy:(Bool -> Bool) -> Bool -> Bool. true) true ((λx:Bool. λy:Bool -> Bool. λz:Bool. true) true)))) -(λx:Bool. (λy:Bool. λz:Bool -> Bool -> Bool. λw:Bool. false) x (λy:Bool. λz:Bool. true) x) ((λx:Bool -> Bool. false) ((λx:Bool. λy:Bool. false) ((λx:Bool -> Bool -> Bool. λy:Bool. true) (λx:Bool. λy:Bool. false) false))) -(λx:Bool. false) true -λx:Bool. (λy:Bool -> Bool. y) (λy:Bool. x) -λx:Bool -> Bool. (λy:(Bool -> Bool) -> Bool. x) (λy:Bool -> Bool. false) -true -true -false -λx:Bool -> Bool. x -λx:Bool -> Bool. (λy:Bool. λz:Bool. λw:Bool -> Bool. λa:(Bool -> Bool) -> Bool -> Bool. true) false true ((λy:Bool. x) true) (λy:Bool -> Bool. λz:Bool. z) From 6940520d5d937e2ce6a5061e0ae921a434b47e60 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 15 Jan 2024 18:28:17 -0800 Subject: [PATCH 037/231] undo: logpr, expand_logpr of const --- src/autodiff_pr/train.jl | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/autodiff_pr/train.jl b/src/autodiff_pr/train.jl index cf4acec0..c5e4183e 100644 --- a/src/autodiff_pr/train.jl +++ b/src/autodiff_pr/train.jl @@ -7,7 +7,6 @@ end NodeType(::Type{LogPr}) = Leaf() compute_leaf(::LogPr) = error("LogPr must be expanded") backward(::LogPr, _, _) = error("LogPr must be expanded") -LogPr(b::Bool) = Constant(if b log(1.) else log(0.) end) mutable struct LogPrExpander w::WMC @@ -17,9 +16,6 @@ mutable struct LogPrExpander end end -function expand_logprs(l::LogPrExpander, x::Float64) - Constant(x) -end function expand_logprs(l::LogPrExpander, root::ADNode)::ADNode fl(x::LogPr) = expand_logprs(l, logprob(l.w, x.bool)) fl(x::Var) = x From 27de651b2c53148cd3d537c522535bfc895ab379 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 20 Jan 2024 21:52:23 -0800 Subject: [PATCH 038/231] [qc] add few apps loss, print var vals, preexisting var val warning --- examples/qc/benchmarks/benchmarks.jl | 16 ++++++++++++++ examples/qc/benchmarks/main.jl | 32 +++++++++++++++++++--------- 2 files changed, 38 insertions(+), 10 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 3c99116f..01ce4354 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -73,6 +73,22 @@ function build_loss(::STLCConstructorEntropy, generation::STLCGeneration) loss, nothing end +################################## +# STLC "4231" (few apps) loss +################################## + +struct STLC4321AppsLoss <: LossParams{STLC} end +to_subpath(::STLC4321AppsLoss) = ["4321apps"] +function build_loss(::STLC4321AppsLoss, generation::STLCGeneration) + metric = num_apps(generation.e) + mle_loss([ + BoolToMax(prob_equals(metric, DistUInt32(0)), weight=.4), + BoolToMax(prob_equals(metric, DistUInt32(1)), weight=.3), + BoolToMax(prob_equals(metric, DistUInt32(2)), weight=.2), + BoolToMax(prob_equals(metric, DistUInt32(3)), weight=.1), + ]), nothing +end + ################################## # BST generation ################################## diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 0206aca6..fa85974c 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -13,20 +13,16 @@ include("benchmarks.jl") generation_params = STLCGenerationParams( param_vars_by_size=true, - size=3, - ty_size=1, + size=5, + ty_size=2, ) -loss_params = ApproxSTLCConstructorEntropy() -# loss_params = MixedLossParams([ -# ApproxSTLCConstructorEntropy() => 10, -# MLELossParams(metric=NumApps(), target_dist=Uniform()) => 1, -# ]) +loss_params = STLC4321AppsLoss() # generation_params = BSTGenerationParams(size=3) # loss_params = ApproxBSTConstructorEntropy() -EPOCHS = 2000 -LEARNING_RATE = if loss_params isa ApproxSTLCConstructorEntropy 0.03 else 0.003 end +EPOCHS = 500 +LEARNING_RATE = if loss_params isa ApproxSTLCConstructorEntropy 0.03 else 0.01 end TAG = "v04_infra" @@ -74,7 +70,11 @@ var_vals = Valuation() adnodes_of_interest = Dict{String, ADNode}() function register_weight!(s) var = Var("$(s)_before_sigmoid") - var_vals[var] = 0 + if !haskey(var_vals, var) || var_vals[var] == 0 + var_vals[var] = 0 + else + println(io, "WARNING: not registering fresh weight for $(s)") + end weight = sigmoid(var) adnodes_of_interest[s] = weight weight @@ -95,10 +95,16 @@ println(io) # Before ############################ +println(io, "Initial var_vals:") +show(io, var_vals) +println(io) +println(io) + println(io, "Initial adnodes_of_interest:") vals = compute(var_vals, values(adnodes_of_interest)) show(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) println(io) +println(io) if loss_params isa MLELossParams{STLC} println_flush(io, "Inferring initial distribution...") @@ -148,10 +154,16 @@ if loss_params isa MLELossParams end println(io) +println(io, "Learned var_vals:") +show(io, var_vals) +println(io) +println(io) + println(io, "Learned adnodes_of_interest:") vals = compute(var_vals, values(adnodes_of_interest)) show(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) println(io) +println(io) if generation isa STLCGeneration println(io, "Inferring trained num apps distribution...") From e8bc4f37a9e0c9f31f994512ce71858bd6d08032 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 21 Jan 2024 16:00:49 -0800 Subject: [PATCH 039/231] add qc stlc size 5 formatter --- examples/qc/benchmarks/format.jl | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 examples/qc/benchmarks/format.jl diff --git a/examples/qc/benchmarks/format.jl b/examples/qc/benchmarks/format.jl new file mode 100644 index 00000000..da268529 --- /dev/null +++ b/examples/qc/benchmarks/format.jl @@ -0,0 +1,34 @@ +adnodes_of_interest = + +Dict("tysz2_gen_type_tbool" => 0.7207727519197863, "sz4_succ_var" => 0.4903234929252827, "tysz1_gen_type_tbool" => 0.5079797882722665, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.08352877939489839, "sz4_succ_abs" => 0.7066063985105583, "sz5_succ_var" => 0.5, "sz5_succ_abs" => 0.41721675684910503, "sz2_succ_var" => 0.5435857870063115, "sz1_succ_var" => 0.5460302801221573, "sz1_succ_app" => 0.1617094113296376, "sz1_succ_abs" => 0.6925946397620913, "sz3_succ_abs" => 0.7633559861209368, "sz3_succ_app" => 0.06947521647387661, "sz5_succ_app" => 0.5711467012997115, "sz4_succ_app" => 0.19063677116251065, "sz2_succ_abs" => 0.7423080357841665, "sz3_succ_var" => 0.5151953122355372) +@assert issetequal(keys(adnodes_of_interest), ["sz1_succ_abs", "tysz2_gen_type_tbool", "sz3_succ_abs", "sz4_succ_var", "sz3_succ_app", "sz5_succ_app", "tysz1_gen_type_tbool", "sz0_zero_pr_var2", "sz2_succ_app", "sz4_succ_abs", "sz5_succ_var", "sz4_succ_app", "sz2_succ_abs", "sz5_succ_abs", "sz3_succ_var", "sz2_succ_var", "sz1_succ_var", "sz1_succ_app"]) + +thousandths(n) = Integer(round(n, digits=3) * 1000) +w(s) = thousandths(adnodes_of_interest[s]) + +println("""genType + let '(boolWeight, funWeight) := + get + [ + (1, ($(w("tysz1_gen_type_tbool")), 1000-$(w("tysz1_gen_type_tbool")))); + (2, ($(w("tysz2_gen_type_tbool")), 2000-$(w("tysz2_gen_type_tbool")))) + ] + +Fixpoint genExpr env tau (sz: nat) : G (option Expr) := + match sz with + | 0 => + let '(var_weight, zero_weight) := ($(w("sz0_zero_pr_var2")), 1000-$(w("sz0_zero_pr_var2"))) in + backtrack + [(var_weight, oneOf_ (ret None) (map (fun x => returnGen (Some (Var x))) (genVar' env tau 0 []))) + ;(zero_weight, genZero env tau)] + | S sz' => + let '(val_weight, app_weight, var_weight) := + get + [ + (1, ($(w("sz1_succ_abs")), $(w("sz1_succ_app")), $(w("sz1_succ_var")))); + (2, ($(w("sz2_succ_abs")), $(w("sz2_succ_app")), $(w("sz2_succ_var")))); + (3, ($(w("sz3_succ_abs")), $(w("sz3_succ_app")), $(w("sz3_succ_var")))); + (4, ($(w("sz4_succ_abs")), $(w("sz4_succ_app")), $(w("sz4_succ_var")))); + (5, ($(w("sz5_succ_abs")), $(w("sz5_succ_app")), $(w("sz5_succ_var")))) + ] +""") \ No newline at end of file From 1d949394a1c6d71069f14a0e96490680283e218b Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 30 Jan 2024 23:37:42 -0800 Subject: [PATCH 040/231] Add to_graph --- src/autodiff/adnode.jl | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/autodiff/adnode.jl b/src/autodiff/adnode.jl index 8445777e..eba456a7 100644 --- a/src/autodiff/adnode.jl +++ b/src/autodiff/adnode.jl @@ -1,9 +1,28 @@ -export ADNode, ADMatrix, Var, ad_map, sigmoid, deriv_sigmoid, inverse_sigmoid +export ADNode, ADMatrix, Var, ad_map, sigmoid, deriv_sigmoid, inverse_sigmoid, to_graph + +using Graphs import DirectedAcyclicGraphs: NodeType, DAG, children abstract type ADNode <: DAG end +function to_graph(root::DAG) + g = SimpleDiGraph() + nodes = [] + function fi(n::DAG, call) + add_vertex!(g) + push!(nodes, n) + id = nv(g) + for child in if isinner(n) children(n) else [] end + add_edge!(g, id, call(child)) + end + id + end + fl(n::DAG) = fi(n, _ -> error()) + foldup(root, fl, fi, Integer) + g, nodes +end + ADNodeCompatible = Union{Real, AbstractMatrix{<:Real}} function add_deriv(derivs, n::ADNode, amount::ADNodeCompatible) From 290010bf02e14530814dd3aad08051560540a1ff Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 30 Jan 2024 23:39:12 -0800 Subject: [PATCH 041/231] graphviz loss adnode graph --- examples/qc/benchmarks/dump_loss_graph.jl | 46 +++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 examples/qc/benchmarks/dump_loss_graph.jl diff --git a/examples/qc/benchmarks/dump_loss_graph.jl b/examples/qc/benchmarks/dump_loss_graph.jl new file mode 100644 index 00000000..b28bb0b5 --- /dev/null +++ b/examples/qc/benchmarks/dump_loss_graph.jl @@ -0,0 +1,46 @@ +# run this at the bottom of main.jl to get a graphviz of the loss graph + +bool_roots = Dice.bool_roots +LogPrExpander = Dice.LogPrExpander +expand_logprs = Dice.expand_logprs +to_graph +l = LogPrExpander(WMC(BDDCompiler(bool_roots([loss])))) +eloss = expand_logprs(l, loss) + +vals, derivs = differentiate(var_vals, Derivs(eloss => 1)) +for (logpr, expanded) in l.cache + vals[logpr] = vals[expanded] + derivs[logpr] = if haskey(derivs, expanded) derivs[expanded] else 0 end +end + +using Graphs +using DirectedAcyclicGraphs: isinner + +function node_to_label(n) + name = if isinner(n) + last(Base.split(string(typeof(n)), ".")) + else + replace(string(n), "\"" => "\\\"") + end + "$(name)\\n$(vals[n])\\n$(derivs[n])" +end + +function dump_graph(path, node) + g, nodes = Dice.to_graph(node) + open(path, "w") do file + println(file, "digraph G {") + for (i, n) in enumerate(nodes) + if n isa Var + println(file, " $(i) [fillcolor=lightcyan, style=filled];") + end + println(file, " $(i) [label=\"$(node_to_label(n))\"];") + end + for e in edges(g) + println(file, " $(src(e)) -> $(dst(e));") + end + println(file, "}") + end +end + +dump_graph("loss.dot", loss) +dump_graph("eloss.dot", eloss) \ No newline at end of file From eccd81c44d7571a9df7a2b9e4c7018a2c88637e5 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 31 Jan 2024 00:14:54 -0800 Subject: [PATCH 042/231] Update examples or mark as deprecated --- examples/qc/examples/demo_natlist.jl | 14 +- examples/qc/examples/demo_sortednatlist.jl | 222 +++++++++++---------- examples/qc/examples/demo_utlc.jl | 208 +++++++++---------- examples/qc/examples/tour_2_learning.jl | 115 ++++------- 4 files changed, 268 insertions(+), 291 deletions(-) diff --git a/examples/qc/examples/demo_natlist.jl b/examples/qc/examples/demo_natlist.jl index 64c6e86e..6ffd7f94 100644 --- a/examples/qc/examples/demo_natlist.jl +++ b/examples/qc/examples/demo_natlist.jl @@ -7,7 +7,7 @@ function gen_list(size) # Try changing the parameter to flip_for to a constant, which would force # all sizes to use the same probability. - @dice_ite if flip_for(size) + @dice_ite if flip(sigmoid(Var(size))) DistNil(DistUInt32) else # The flips used in the uniform aren't tracked via flip_for, so we @@ -27,20 +27,22 @@ DATASET = [DistUInt32(x) for x in 0:INIT_SIZE] list = gen_list(INIT_SIZE) list_len = length(list) +var_vals = Valuation(Var(size) => 0 for size in 1:INIT_SIZE) + println("Distribution before training:") -display(pr(list_len)) +display(pr_mixed(var_vals)(list_len)) println() -bools_to_maximize = AnyBool[prob_equals(list_len, x) for x in DATASET] -train_group_probs!(bools_to_maximize, 1000, 0.3) # epochs and lr +loss = mle_loss([prob_equals(list_len, x) for x in DATASET]) +train!(var_vals, loss, epochs=1000, learning_rate=0.3) # Done! println("Learned flip probability for each size:") -display(get_group_probs()) +display(Dict(size => compute(var_vals, sigmoid(Var(size))) for size in 1:INIT_SIZE)) println() println("Distribution over lengths after training:") -display(pr(list_len)) +display(pr_mixed(var_vals)(list_len)) #== Distribution before training: diff --git a/examples/qc/examples/demo_sortednatlist.jl b/examples/qc/examples/demo_sortednatlist.jl index ab522570..c3d13f35 100644 --- a/examples/qc/examples/demo_sortednatlist.jl +++ b/examples/qc/examples/demo_sortednatlist.jl @@ -1,113 +1,115 @@ -# Demo of using BDD MLE to learn flip probs for a sorted nat list of uniform length. +# TODO: update this example -using Dice +# # Demo of using BDD MLE to learn flip probs for a sorted nat list of uniform length. -# Return a List -function gen_sorted_list(size, lo, hi) - size == 0 && return DistNil(DistUInt32) +# using Dice + +# # Return a List +# function gen_sorted_list(size, lo, hi) +# size == 0 && return DistNil(DistUInt32) - # The flips used in the uniform aren't tracked via flip_for, so we - # don't learn their probabilities (this is on purpose - we could). - @dice_ite if flip_for(size) - DistNil(DistUInt32) - else - # Try changing the parameter to flip_for to a constant, which would force - # all sizes to use the same probability. - x = unif(lo, hi) - DistCons(x, gen_sorted_list(size-1, x, hi)) - end - -end - -# Top-level size/fuel. For gen_list, this is the max length. -INIT_SIZE = 5 - -# Dataset over the desired property to match. Below is a uniform distribution -# over sizes. -DATASET = [DistUInt32(x) for x in 0:INIT_SIZE] - -# Use Dice to build computation graph -list = gen_sorted_list( - INIT_SIZE, - DistUInt32(1), - DistUInt32(INIT_SIZE), -) -list_len = length(list) - -println("Distribution before training:") -display(pr(list_len)) -println() - -bools_to_maximize = [prob_equals(list_len, x) for x in DATASET] -train_group_probs!(bools_to_maximize, 1000, 0.3) # epochs and lr - -# Done! -println("Learned flip probability for each size:") -display(get_group_probs()) -println() - -println("Distribution over lengths after training:") -display(pr(list_len)) -println() - -println("A few sampled lists:") -for _ in 1:3 - print_tree(sample(list)) - println() -end - -#== -Distribution before training: - 0 => 0.49999999999999994 - 1 => 0.24999999999999972 - 2 => 0.12499999999999986 - 3 => 0.062499999999999924 - 4 => 0.03124999999999996 - 5 => 0.03124999999999996 - -Learned flip probability for each size: - 1 => 0.5 - 2 => 0.33333333333333337 - 3 => 0.25000000000000006 - 4 => 0.19999999999999996 - 5 => 0.16666666666666663 - -Distribution over lengths after training: - 2 => 0.1666666666666666 - 3 => 0.1666666666666666 - 0 => 0.16666666666666646 - 1 => 0.16666666666666646 - 4 => 0.16666666666666646 - 5 => 0.16666666666666646 - -A few sampled lists: -Cons -├── 1 -└── Cons - ├── 2 - └── Cons - ├── 3 - └── Cons - ├── 3 - └── Cons - ├── 4 - └── Nil - -Cons -├── 3 -└── Cons - ├── 3 - └── Cons - ├── 3 - └── Cons - ├── 3 - └── Cons - ├── 5 - └── Nil - -Cons -├── 3 -└── Cons - ├── 5 - └── Nil -==# +# # The flips used in the uniform aren't tracked via flip_for, so we +# # don't learn their probabilities (this is on purpose - we could). +# @dice_ite if flip_for(size) +# DistNil(DistUInt32) +# else +# # Try changing the parameter to flip_for to a constant, which would force +# # all sizes to use the same probability. +# x = unif(lo, hi) +# DistCons(x, gen_sorted_list(size-1, x, hi)) +# end + +# end + +# # Top-level size/fuel. For gen_list, this is the max length. +# INIT_SIZE = 5 + +# # Dataset over the desired property to match. Below is a uniform distribution +# # over sizes. +# DATASET = [DistUInt32(x) for x in 0:INIT_SIZE] + +# # Use Dice to build computation graph +# list = gen_sorted_list( +# INIT_SIZE, +# DistUInt32(1), +# DistUInt32(INIT_SIZE), +# ) +# list_len = length(list) + +# println("Distribution before training:") +# display(pr(list_len)) +# println() + +# bools_to_maximize = [prob_equals(list_len, x) for x in DATASET] +# train_group_probs!(bools_to_maximize, 1000, 0.3) # epochs and lr + +# # Done! +# println("Learned flip probability for each size:") +# display(get_group_probs()) +# println() + +# println("Distribution over lengths after training:") +# display(pr(list_len)) +# println() + +# println("A few sampled lists:") +# for _ in 1:3 +# print_tree(sample(list)) +# println() +# end + +# #== +# Distribution before training: +# 0 => 0.49999999999999994 +# 1 => 0.24999999999999972 +# 2 => 0.12499999999999986 +# 3 => 0.062499999999999924 +# 4 => 0.03124999999999996 +# 5 => 0.03124999999999996 + +# Learned flip probability for each size: +# 1 => 0.5 +# 2 => 0.33333333333333337 +# 3 => 0.25000000000000006 +# 4 => 0.19999999999999996 +# 5 => 0.16666666666666663 + +# Distribution over lengths after training: +# 2 => 0.1666666666666666 +# 3 => 0.1666666666666666 +# 0 => 0.16666666666666646 +# 1 => 0.16666666666666646 +# 4 => 0.16666666666666646 +# 5 => 0.16666666666666646 + +# A few sampled lists: +# Cons +# ├── 1 +# └── Cons +# ├── 2 +# └── Cons +# ├── 3 +# └── Cons +# ├── 3 +# └── Cons +# ├── 4 +# └── Nil + +# Cons +# ├── 3 +# └── Cons +# ├── 3 +# └── Cons +# ├── 3 +# └── Cons +# ├── 3 +# └── Cons +# ├── 5 +# └── Nil + +# Cons +# ├── 3 +# └── Cons +# ├── 5 +# └── Nil +# ==# diff --git a/examples/qc/examples/demo_utlc.jl b/examples/qc/examples/demo_utlc.jl index 2d363fb1..81bd3e7f 100644 --- a/examples/qc/examples/demo_utlc.jl +++ b/examples/qc/examples/demo_utlc.jl @@ -1,103 +1,105 @@ -# Using BDD MLE to learn flip probs for closed UTLC exprs of uniform AST depth - -using Dice -include("lib/dist_utlc.jl") # DistVar, DistApp, DistAbs, utlc_str - -function gen_name() - @dice_ite if flip(1/3) - DistString("a") - elseif flip(1/2) - DistString("b") - else - DistString("c") - end -end - -# Return ast, evid pair -function gen_utlc(size, in_scope) - # Generate Var arg - name = choice(in_scope) - - # Fuel check - size == 0 && return DistVar(name) - - @dice_ite if flip_for(size) & (in_scope.len > DistUInt32(0)) - DistVar(name) - # Fix weight between Abs and App. We must also always choose Abs if - # size=1 and the scope is empty so far. - elseif flip(2/3) | (size==1 & prob_equals(in_scope.len, DistUInt32(0))) - fresh = gen_name() - DistAbs( - fresh, - gen_utlc(size-1, prob_append(in_scope, fresh)) - ) - else - DistApp(gen_utlc(size-1, in_scope), gen_utlc(size-1, in_scope)) - end -end - -# Top-level size/fuel. For gen_bst, this is the max depth. -INIT_SIZE = 4 - -# Dataset over the desired property to match. Below is a uniform distribution -# over sizes. -DATASET = [DistUInt32(x) for x in 0:INIT_SIZE] - -# Use Dice to build computation graph -e = gen_utlc(INIT_SIZE, DistVector{DistString}()) -e_depth = ast_depth(e) - -println("Distribution before training:") -display(pr(e_depth)) -println() - -bools_to_maximize = [prob_equals(e_depth, x) for x in DATASET] -train_group_probs!(bools_to_maximize, 1000, 0.3) # epochs and lr - -# Done! -println("Learned flip probability for each size:") -display(get_group_probs()) -println() - -println("Distribution over depths after training:") -display(pr(e_depth)) -println() - -println("A few sampled exprs:") -for _ in 1:10 - expr = sample(e) - println(utlc_str(expr)) - # println(print_tree(expr)) # concrete AST -end - -#== -Distribution before training: - 4 => 0.3670624714220393 - 1 => 0.3333333333333333 - 2 => 0.1759259259259259 - 3 => 0.12367826931870127 - -Learned flip probability for each size: - 1 => 0.7709384509910406 - 2 => 0.5673658539871177 - 4 => 0.5 - 3 => 0.3749999999999999 - -Distribution over depths after training: - 2 => 0.2500000000000001 - 4 => 0.25000000000000006 - 1 => 0.2499999999999999 - 3 => 0.24999999999999983 - -A few sampled exprs: -λc.λb.b b -λb.λa.λc.a b -(λa.a) (λa.a) -λb.(λa.λc.c) (b b) -λb.b -λb.b -(λc.c) (λa.λc.λc.c) -(λb.b) (λb.λc.c b) -λb.b -λa.λb.λb.λb.b -==# +# TODO: update this example + +# # Using BDD MLE to learn flip probs for closed UTLC exprs of uniform AST depth + +# using Dice +# include("lib/dist_utlc.jl") # DistVar, DistApp, DistAbs, utlc_str + +# function gen_name() +# @dice_ite if flip(1/3) +# DistString("a") +# elseif flip(1/2) +# DistString("b") +# else +# DistString("c") +# end +# end + +# # Return ast, evid pair +# function gen_utlc(size, in_scope) +# # Generate Var arg +# name = choice(in_scope) + +# # Fuel check +# size == 0 && return DistVar(name) + +# @dice_ite if flip_for(size) & (in_scope.len > DistUInt32(0)) +# DistVar(name) +# # Fix weight between Abs and App. We must also always choose Abs if +# # size=1 and the scope is empty so far. +# elseif flip(2/3) | (size==1 & prob_equals(in_scope.len, DistUInt32(0))) +# fresh = gen_name() +# DistAbs( +# fresh, +# gen_utlc(size-1, prob_append(in_scope, fresh)) +# ) +# else +# DistApp(gen_utlc(size-1, in_scope), gen_utlc(size-1, in_scope)) +# end +# end + +# # Top-level size/fuel. For gen_bst, this is the max depth. +# INIT_SIZE = 4 + +# # Dataset over the desired property to match. Below is a uniform distribution +# # over sizes. +# DATASET = [DistUInt32(x) for x in 0:INIT_SIZE] + +# # Use Dice to build computation graph +# e = gen_utlc(INIT_SIZE, DistVector{DistString}()) +# e_depth = ast_depth(e) + +# println("Distribution before training:") +# display(pr(e_depth)) +# println() + +# bools_to_maximize = [prob_equals(e_depth, x) for x in DATASET] +# train_group_probs!(bools_to_maximize, 1000, 0.3) # epochs and lr + +# # Done! +# println("Learned flip probability for each size:") +# display(get_group_probs()) +# println() + +# println("Distribution over depths after training:") +# display(pr(e_depth)) +# println() + +# println("A few sampled exprs:") +# for _ in 1:10 +# expr = sample(e) +# println(utlc_str(expr)) +# # println(print_tree(expr)) # concrete AST +# end + +# #== +# Distribution before training: +# 4 => 0.3670624714220393 +# 1 => 0.3333333333333333 +# 2 => 0.1759259259259259 +# 3 => 0.12367826931870127 + +# Learned flip probability for each size: +# 1 => 0.7709384509910406 +# 2 => 0.5673658539871177 +# 4 => 0.5 +# 3 => 0.3749999999999999 + +# Distribution over depths after training: +# 2 => 0.2500000000000001 +# 4 => 0.25000000000000006 +# 1 => 0.2499999999999999 +# 3 => 0.24999999999999983 + +# A few sampled exprs: +# λc.λb.b b +# λb.λa.λc.a b +# (λa.a) (λa.a) +# λb.(λa.λc.c) (b b) +# λb.b +# λb.b +# (λc.c) (λa.λc.λc.c) +# (λb.b) (λb.λc.c b) +# λb.b +# λa.λb.λb.λb.b +# ==# diff --git a/examples/qc/examples/tour_2_learning.jl b/examples/qc/examples/tour_2_learning.jl index 9176c4dc..bcce4477 100644 --- a/examples/qc/examples/tour_2_learning.jl +++ b/examples/qc/examples/tour_2_learning.jl @@ -6,49 +6,25 @@ using Revise using Dice -# What value for ? maximizes the probability of the following expression? -# flip(?) & flip(?) & !flip(?) +# What value of θ maximizes `pr(flip(θ) & flip(θ) & !flip(θ))`? # Let's check! -p = add_unit_interval_var!("p") -x = flip(p) & flip(p) & !flip(p) -train_vars!([x]) -compute(p) # ~ 2/3 - -# What just happened? -# - `add_unit_interval_var!()` registers a value in (0,1) to learn (init. 0.5) -# - `train_vars!(bools)` performs maximum likelihood estimation to train -# the parameter to maximize the product of the probabilities of the bools - -# We can also perform computation on params before using them for flip -# probabilities. For example, `x` could have been equivalently defined as: -# x = flip(p) & flip(p) & flip(1 - p) - -clear_vars!() # call before adding the params of the next "program" - -# (For the curious) What's happening under the hood? -# - TODO: discuss `ADNode`s, `compute` -# - TODO: discuss how `add_unit_interval_var!`` wraps a param in `sigmoid` - -# If the flips above can have different groups, each can take on a -# different probability. -a = add_unit_interval_var!("a") -b = add_unit_interval_var!("b") -c = add_unit_interval_var!("c") -x = flip(a) & flip(b) & !flip(c) -train_vars!([x]) -compute(a) # 0.8419880024053406 -compute(b) # 0.8419880024053406 -compute(c) # 0.1580119975946594 - -# We can also keep training to get closer to 1, 1, 0. -train_vars!([x]; epochs=10000, learning_rate=3.0) -compute(a) # 0.9999666784828445 -compute(b) # 0.9999666784828445 -compute(c) # 3.332151715556398e-5 - -clear_vars!() - +θ = Var("θ") +x = flip(θ) & flip(θ) & !flip(θ) +var_vals = Valuation(θ => 0.5) # as we train by GD, we need to provide starting a value +loss = -LogPr(x) +train!(var_vals, loss, epochs=200, learning_rate=0.1) # mutates var_vals +compute_mixed(var_vals, θ) # ~ 2/3 + +# Optional note! +# In practice, we pass learned prs. through sigmoid to bound in [0, 1]. +# The above example becomes: +θ = sigmoid(Var("θ_before_sigmoid")) +x = flip(θ) & flip(θ) & !flip(θ) +var_vals = Valuation(Var("θ_before_sigmoid") => 0) +loss = -LogPr(x) # symbolic version of log(pr(...)) +train!(var_vals, loss, epochs=200, learning_rate=0.1) +compute_mixed(var_vals, θ) # ~ 2/3 ################################################################################ # Approximating datasets @@ -56,51 +32,46 @@ clear_vars!() # Consider the following probabilistic program with holes. What probability # will cause x to be true 2/3 of the time? -p = add_unit_interval_var!("p") +p_before_sigmoid = Var("p_before_sigmoid") +p = sigmoid(p_before_sigmoid) b = @dice_ite if flip(p) true else flip(0.5) end # We can match this dataset... dataset = [true, true, false] -# ...by maximizing these distributions over bools: -bools_to_maximize = [prob_equals(b, x) for x in dataset] -train_vars!(bools_to_maximize; learning_rate=0.1) -compute(p) # ~ 1/3 - -# We can also check how close we are by performing normal Dice inference. -# Let's back up: -clear_vars!() -p = add_unit_interval_var!("p") -b = @dice_ite if flip(p) true else flip(0.5) end +# ...by maximizing this value +antiloss = LogPr(prob_equals(b, true)) + LogPr(prob_equals(b, true)) + LogPr(prob_equals(b, false)) -# By default, unit interval params have a value of 0.5 -pr(b) # true => 0.75 +var_vals = Valuation(p_before_sigmoid => 0) +train!(var_vals, -antiloss; epochs=2000, learning_rate=0.1) +compute_mixed(var_vals, p) # ~ 1/3 -train_vars!([prob_equals(b, x) for x in dataset]; learning_rate=0.1) +# Equivalently, we can use `mle_loss`: +loss = mle_loss([prob_equals(b, x) for x in dataset]) +var_vals = Valuation(p_before_sigmoid => 0) +train!(var_vals, loss; epochs=2000, learning_rate=0.1) +compute_mixed(var_vals, p) # ~ 1/3 +# Two ways to "check our work" by seeing the original progam's probability. # The program is true 2/3 of the time, as desired! -pr(b) # true => 0.666667 - -clear_vars!() -p = add_unit_interval_var!("p") -# As before, we can also constrain multiple flips to have the same probability -# vvvvvvv changed -b = @dice_ite if flip(p) true else flip(p) end -train_vars!([prob_equals(b, x) for x in dataset]; learning_rate=0.1) -compute(p) # 0.42264973081037427 -pr(b) # true => 0.666667 - -clear_vars!() +pr_mixed(var_vals)(b) # true => ~ 2/3 +compute_mixed(var_vals, exp(LogPr(b))) # ~ 2/3 # Here's an example for ints. Lets say we build an int whose bits are flips such # that it has a uniform distribution over 0, 2, 4, ..., 14. -probs = [add_unit_interval_var!("b$(i)") for i in 1:4] +pre_sigmoid_probs = [Var("b$(i)") for i in 1:4] +probs = [sigmoid(psp) for psp in pre_sigmoid_probs] n = DistUInt{4}([flip(prob) for prob in probs]) + dataset = [DistUInt{4}(even) for even in 0:2:14] -bools_to_maximize = [prob_equals(n, x) for x in dataset] -train_vars!(bools_to_maximize; learning_rate=0.1) -[compute(prob) for prob in probs] # 0.5, 0.5, 0.5, 0.000626043181613181 -clear_vars!() +loss = mle_loss([prob_equals(n, x) for x in dataset]) + +# Train +var_vals = Valuation(psp => 0 for psp in pre_sigmoid_probs) +train!(var_vals, loss; learning_rate=0.1, epochs=2000) + +# Check the desired probabilities +[compute_mixed(var_vals, prob) for prob in probs] # 0.5, 0.5, 0.5, 0.000626043181613181 ################################################################################ ###################### TODO: update the rest of this file ###################### From d03a1bd7f96bd1702d4d7373e1cb39cfcdddf23a Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 31 Jan 2024 00:18:28 -0800 Subject: [PATCH 043/231] Update QC README --- examples/qc/{examples => }/README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) rename examples/qc/{examples => }/README.md (51%) diff --git a/examples/qc/examples/README.md b/examples/qc/README.md similarity index 51% rename from examples/qc/examples/README.md rename to examples/qc/README.md index 794d1301..09fd118b 100644 --- a/examples/qc/examples/README.md +++ b/examples/qc/README.md @@ -1,19 +1,19 @@ # Learning generator probabilities in Dice -Once the installation ([`../../README.md`](../../README.md)) is complete, see [`tour_1_core.jl`](tour_1_core.jl) for a quick start to Dice.jl. Then, see [`tour_2_learning.jl`](tour_2_learning.jl) for an introduction to learning probabilities with MLE in Dice.jl. +Once the installation ([`../../README.md`](../../README.md)) is complete, see [`examples/tour_1_core.jl`](examples/tour_1_core.jl) for a quick start to Dice.jl. Then, see [`examples/tour_2_learning.jl`](examples/tour_2_learning.jl) for an introduction to learning probabilities with MLE in Dice.jl. The following related programs are included. The expected output of each is in a comment at the bottom of the file. -- Generator for nat lists ([`demo_natlist.jl`](demo_natlist.jl)) +- Generator for nat lists ([`examples/demo_natlist.jl`](examples/demo_natlist.jl)) - Given a generator for nat lists with a hole dependent on size, chooses probabilities such that the list has uniform length. -- Generator for sorted nat lists ([`demo_sortednatlist.jl`](demo_sortednatlist.jl)) +- Generator for sorted nat lists ([`examples/demo_sortednatlist.jl`](examples/demo_sortednatlist.jl)) - Given a generator for sorted nat lists with a hole dependent on size, chooses probabilities such that the list has uniform length. -- Generator for binary search trees ([`demo_bst.jl`](demo_bst.jl)) +- Generator for binary search trees ([`examples/demo_bst.jl`](examples/demo_bst.jl)) - Given a generator for binary search trees with a hole dependent on size, chooses probabilities such that the tree has uniform depth. - - 50 example generated BSTs are visible at [`samples/bst.txt`](samples/bst.txt) -- Generator for closed untyped lambda calculus expressions ([`demo_utlc.jl`](demo_utlc.jl)) + - 50 example generated BSTs are visible at [`examples/samples/bst.txt`](examples/samples/bst.txt) +- Generator for closed untyped lambda calculus expressions ([`examples/demo_utlc.jl`](examples/demo_utlc.jl)) - Given a generator for UTLC exprs with a hole dependent on size, chooses probabilities such that the AST has near uniform depth - - 50 example generated expressions are visible at [`samples/utlc.txt`](samples/utlc.txt). -- Generator for well-typed, simply-typed lambda calculus expressions ([`stlc`](stlc)) - - Configure and run [`stlc/main.jl`](stlc/main.jl) + - 50 example generated expressions are visible at [`examples/samples/utlc.txt`](examples/samples/utlc.txt). +- Generator for well-typed, simply-typed lambda calculus expressions ([`benchmarks`](benchmarks)) + - Configure and run [`benchmarks/main.jl`](benchmarks/main.jl) Beware that the programs expected to run on this version of Dice.jl are the examples listed above and the tests. Other examples are known to be broken. From 76edb706472c272f3f036d42ae2d0448ce6c29b0 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 3 Feb 2024 15:31:28 -0800 Subject: [PATCH 044/231] refactor qc runner to use lossmgrs --- examples/qc/benchmarks/benchmarks.jl | 166 +++++++++++++++++++++------ examples/qc/benchmarks/lib/util.jl | 7 ++ examples/qc/benchmarks/main.jl | 116 +++---------------- 3 files changed, 155 insertions(+), 134 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 01ce4354..ee4375c3 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -1,9 +1,50 @@ abstract type Benchmark end abstract type GenerationParams{T} end abstract type LossParams{T} end +abstract type SimpleLossParams{T} <: LossParams{T} end +abstract type LossMgr end abstract type Generation{T} end +struct BenchmarkMgr + emit_stats::Function # tag::String -> () + train!::Function # epochs::Integer -> learning_rate::Real -> learning_curve::Vector{<:Real} +end + + +function create_benchmark_manager( + io::IO, + out_dir::String, + var_vals::Valuation, + generation_params::GenerationParams{T}, + loss_params::LossParams{T} +) where T + println_flush(io, "Building generation computation graph...") + time_build_generation = @elapsed generation = generate(generation_params) + println(io, " $(time_build_generation) seconds") + println(io) + + loss_mgr = create_loss_manager(loss_params, io, out_dir, var_vals, generation) + + function emit_stats(s::String) + println_flush(io, "Parameter values ($(s)):") + showln(io, var_vals) + + generation_emit_stats(generation, io, out_dir, s, var_vals) + loss_mgr.emit_stats(s) + end + + BenchmarkMgr(emit_stats, loss_mgr.train!) +end + +struct SimpleLossMgr <: LossMgr + emit_stats::Function # tag::String -> () + train!::Function # epochs::Integer -> learning_rate::Real -> learning_curve::Vector{<:Real} + loss::ADNode +end +emit_stats(m::SimpleLossMgr, tag) = m.emit_stats(tag) +train!(m::SimpleLossMgr; epochs, learning_rate) = m.train!(; epochs, learning_rate) + ################################## # STLC generation ################################## @@ -44,49 +85,67 @@ function generate(p::STLCGenerationParams) STLCGeneration(e, constructors_overapproximation) end +function generation_emit_stats(generation::STLCGeneration, io::IO, out_dir::String, s::String, var_vals::Valuation) + println_flush(io, "Saving samples...") + time_sample = @elapsed with_concrete_ad_flips(var_vals, generation.e) do + save_samples(joinpath(out_dir, "terms_$(s).txt"), generation.e; io=io) + end + println(io, " $(time_sample) seconds") + println(io) +end + ################################## # Approx STLC constructor entropy loss ################################## -struct ApproxSTLCConstructorEntropy <: LossParams{STLC} end +struct ApproxSTLCConstructorEntropy <: SimpleLossParams{STLC} end to_subpath(::ApproxSTLCConstructorEntropy) = ["approx_entropy"] -function build_loss(::ApproxSTLCConstructorEntropy, generation::STLCGeneration) +function create_loss_manager(::ApproxSTLCConstructorEntropy, io, out_dir, var_vals, generation) loss = sum( neg_entropy(opt_ctor_to_id(ctor), values(stlc_ctor_to_id), ignore_non_support=true) for ctor in generation.constructors_overapproximation ) - loss, nothing + create_simple_loss_manager(loss, io, out_dir, var_vals) end +function create_simple_loss_manager(loss, io, out_dir, var_vals) + function emit_stats(tag) + loss_val = compute_mixed(var_vals, loss) + println(io, "Loss ($(tag)): $(loss_val)") + println(io) + end + function f_train(; epochs, learning_rate) + println_flush(io, "Training...") + time_train = @elapsed learning_curve = Dice.train!(var_vals, loss; epochs, learning_rate) + println(io, " $(time_train) seconds") + println(io) + + open(joinpath(out_dir, "learning_curve.csv"), "w") do file + for (epoch, logpr) in zip(0:epochs, learning_curve) + println(file, "$(epoch)\t$(logpr)") + end + end + end + SimpleLossMgr(emit_stats, f_train, loss) +end + +# struct SamplingSTLCConstructorEntropy <: LossParams{STLC} end +# to_subpath(::SamplingSTLCConstructorEntropy) = ["sampling_entropy"] +# function m + ################################## # Exact STLC constructor entropy loss ################################## -struct STLCConstructorEntropy <: LossParams{STLC} end +struct STLCConstructorEntropy <: SimpleLossParams{STLC} end to_subpath(::STLCConstructorEntropy) = ["entropy"] -function build_loss(::STLCConstructorEntropy, generation::STLCGeneration) +function create_loss_manager(::STLCConstructorEntropy, io, out_dir, var_vals, generation::STLCGeneration) random_term = match(generation.e, [ "Some" => e -> DistSome(choice(collect_constructors(e))), "None" => () -> DistNone(DistInt32), ]) loss = neg_entropy(random_term, Set([DistSome(i) for i in values(stlc_ctor_to_id)])) - loss, nothing -end - -################################## -# STLC "4231" (few apps) loss -################################## - -struct STLC4321AppsLoss <: LossParams{STLC} end -to_subpath(::STLC4321AppsLoss) = ["4321apps"] -function build_loss(::STLC4321AppsLoss, generation::STLCGeneration) - metric = num_apps(generation.e) - mle_loss([ - BoolToMax(prob_equals(metric, DistUInt32(0)), weight=.4), - BoolToMax(prob_equals(metric, DistUInt32(1)), weight=.3), - BoolToMax(prob_equals(metric, DistUInt32(2)), weight=.2), - BoolToMax(prob_equals(metric, DistUInt32(3)), weight=.1), - ]), nothing + create_simple_loss_manager(loss, io, out_dir, var_vals) end ################################## @@ -128,14 +187,14 @@ end # Approx BST constructor entropy loss ################################## -struct ApproxBSTConstructorEntropy <: LossParams{BST} end +struct ApproxBSTConstructorEntropy <: SimpleLossParams{BST} end to_subpath(::ApproxBSTConstructorEntropy) = ["approx_entropy"] -function build_loss(::ApproxBSTConstructorEntropy, generation::BSTGeneration) +function create_loss_manager(::ApproxBSTConstructorEntropy, io, out_dir, var_vals, generation::BSTGeneration) loss = sum( neg_entropy(ctor_to_id(ctor), values(bst_ctor_to_id), ignore_non_support=true) for ctor in generation.constructors_overapproximation ) - loss, nothing + create_simple_loss_manager(loss, io, out_dir, var_vals) end ################################## @@ -145,15 +204,28 @@ end abstract type Metric{T} end abstract type TargetDist end -struct MLELossParams{T} <: LossParams{T} +struct MLELossParams{T} <: SimpleLossParams{T} metric::Metric{T} target_dist::TargetDist MLELossParams(; metric::Metric{T}, target_dist) where T = new{T}(metric, target_dist) end to_subpath(p::MLELossParams) = [name(p.metric), name(p.target_dist)] -function build_loss(loss_params::MLELossParams{STLC}, generation::STLCGeneration) +function create_loss_manager(loss_params::MLELossParams{STLC}, io, out_dir, var_vals, generation::STLCGeneration) metric = compute_metric(loss_params.metric, generation) - metric_loss(metric, loss_params.target_dist), metric + loss = metric_loss(metric, loss_params.target_dist) + mgr = create_simple_loss_manager(loss, io, out_dir, var_vals) + + # Also save distribution of metric being trained + function f_emit′(tag) + println_flush(io, "Saving $(tag) distribution...") + time_infer = @elapsed metric_dist = pr_mixed(var_vals)(metric) + println(io, " $(time_infer) seconds") + save_metric_dist(joinpath(out_dir, "dist_$(name(loss_params.metric))_$(tag).csv"), metric_dist; io) + println(io) + + emit_stats(mgr, tag) + end + SimpleLossMgr(f_emit′, mgr.train!, mgr.loss) end struct NumApps <: Metric{STLC} end @@ -182,12 +254,23 @@ function metric_loss(metric::Dist, ::Linear) ]) end +struct Target4321 <: TargetDist end +name(::Target4321) = "target4321" +function metric_loss(metric::Dist, ::Target4321) + mle_loss([ + BoolToMax(prob_equals(metric, DistUInt32(0)), weight=.4), + BoolToMax(prob_equals(metric, DistUInt32(1)), weight=.3), + BoolToMax(prob_equals(metric, DistUInt32(2)), weight=.2), + BoolToMax(prob_equals(metric, DistUInt32(3)), weight=.1), + ]) +end + ################################## # Mixed loss ################################## -struct MixedLossParams{T} <: LossParams{T} - weighted_losses::Vector{<:Pair{<:LossParams{T}, <:Real}} +struct MixedLossParams{T} <: SimpleLossParams{T} + weighted_losses::Vector{<:Pair{<:SimpleLossParams{T}, <:Real}} end function to_subpath(p::MixedLossParams) [join( @@ -198,14 +281,23 @@ function to_subpath(p::MixedLossParams) "_AND_" )] end -function build_loss(p::MixedLossParams{T}, generation::Generation{T}) where T +function create_loss_manager(p::MixedLossParams{T}, io, out_dir, var_vals, generation::Generation{T}) where T mixed_loss = Dice.Constant(0) - extras = [] - for (loss, weight) in p.weighted_losses - loss, extra = build_loss(loss, generation) - mixed_loss += Dice.Constant(weight) * loss - push!(extras, extra) + mgrs = SimpleLossMgr[] + for (subp, weight) in p.weighted_losses + mgr::SimpleLossMgr = create_loss_manager(subp, io, out_dir, var_vals, generation) + push!(mgrs, mgr) + mixed_loss += Dice.Constant(weight) * mgr.loss + end + mgr = create_simple_loss_manager(mixed_loss, io, out_dir, var_vals) + + # also emit for submgrs + function emit_stats(tag) + mgr.emit_stats(tag) + for submgr in mgrs + submgr.emit_stats(tag) + end end - mixed_loss, extras + SimpleLossMgr(emit_stats, mgr.train!, mgr.loss) end diff --git a/examples/qc/benchmarks/lib/util.jl b/examples/qc/benchmarks/lib/util.jl index f43cea95..3097cc0f 100644 --- a/examples/qc/benchmarks/lib/util.jl +++ b/examples/qc/benchmarks/lib/util.jl @@ -151,3 +151,10 @@ function println_flush(io, args...) println(io, args...) flush(io) end + +function showln(io::IO, v) + show(io, v) + println(io) + println(io) + flush(io) +end \ No newline at end of file diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index fa85974c..1e2237cc 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -13,10 +13,17 @@ include("benchmarks.jl") generation_params = STLCGenerationParams( param_vars_by_size=true, - size=5, + size=3, ty_size=2, ) -loss_params = STLC4321AppsLoss() +loss_params = MixedLossParams(Pair{SimpleLossParams{STLC}, Real}[ + ApproxSTLCConstructorEntropy() => 10, + MLELossParams( + metric=NumApps(), + target_dist=Target4321(), + ) => 1, +]) + # generation_params = BSTGenerationParams(size=3) # loss_params = ApproxBSTConstructorEntropy() @@ -24,7 +31,7 @@ loss_params = STLC4321AppsLoss() EPOCHS = 500 LEARNING_RATE = if loss_params isa ApproxSTLCConstructorEntropy 0.03 else 0.01 end -TAG = "v04_infra" +TAG = "v05" LOG_TO_FILE = true @@ -43,7 +50,6 @@ OUT_DIR = "examples/qc/benchmarks/output/$(path)" ########################### LOG_PATH = joinpath(OUT_DIR, "log.log") -LEARNING_CURVE_PATH = joinpath(OUT_DIR, "learning_curve.csv") mkpath(OUT_DIR) io = if LOG_TO_FILE open(LOG_PATH, "w") else stdout end @@ -80,102 +86,18 @@ function register_weight!(s) weight end -println_flush(io, "Building generation computation graph...") -time_build_generation = @elapsed generation = generate(generation_params) -println(io, " $(time_build_generation) seconds") -println(io) - -println_flush(io, "Building generation loss computation graph...") -time_build_loss = @elapsed loss, extra = build_loss(loss_params, generation) -println(io, " $(time_build_loss) seconds") -println(io) - - -############################ -# Before -############################ - -println(io, "Initial var_vals:") -show(io, var_vals) -println(io) -println(io) -println(io, "Initial adnodes_of_interest:") +println_flush(io, "Initial adnodes_of_interest:") vals = compute(var_vals, values(adnodes_of_interest)) -show(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) -println(io) -println(io) - -if loss_params isa MLELossParams{STLC} - println_flush(io, "Inferring initial distribution...") - time_infer_init = @elapsed metric_dist = pr_mixed(var_vals)(extra) - println(io, " $(time_infer_init) seconds") - save_metric_dist(joinpath(OUT_DIR, "dist_before.csv"), metric_dist; io) - println(io) -end - -if generation isa STLCGeneration - println_flush(io, "Saving samples...") - time_sample_init = @elapsed with_concrete_ad_flips(var_vals, generation.e) do - save_samples(joinpath(OUT_DIR, "terms_before.txt"), generation.e; io=io) - end - println(io, " $(time_sample_init) seconds") - println(io) -end - -initial_loss = compute_mixed(var_vals, loss) -println(io, "Initial loss: $(initial_loss)") -println(io) - -############################ -# Train -############################ +showln(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) -println_flush(io, "Training...") -time_train = @elapsed learning_curve = train!(var_vals, loss; epochs=EPOCHS, learning_rate=LEARNING_RATE) -println(io, " $(time_train) seconds") -println(io) +mgr = create_benchmark_manager(io, OUT_DIR, var_vals, generation_params, loss_params) +mgr.emit_stats("initial") +mgr.train!(epochs=EPOCHS, learning_rate=LEARNING_RATE) -open(LEARNING_CURVE_PATH, "w") do file - for (epoch, logpr) in zip(0:EPOCHS, learning_curve) - println(file, "$(epoch)\t$(logpr)") - end -end - -############################ -# After -############################ -final_loss = compute_mixed(var_vals, loss) -println(io, "Final loss: $(final_loss)") -if loss_params isa MLELossParams - approx_improvement = round(exp(initial_loss - final_loss), digits=2) - println(io, "Drawing the target dataset is $(approx_improvement)x more likely") -end -println(io) - -println(io, "Learned var_vals:") -show(io, var_vals) -println(io) -println(io) - -println(io, "Learned adnodes_of_interest:") +println(io, "Trained adnodes_of_interest:") vals = compute(var_vals, values(adnodes_of_interest)) -show(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) -println(io) -println(io) - -if generation isa STLCGeneration - println(io, "Inferring trained num apps distribution...") - time_infer_final = @elapsed metric_dist_after = pr_mixed(var_vals)(num_apps(generation.e)) - save_metric_dist(joinpath(OUT_DIR, "dist_trained.csv"), metric_dist_after; io) - println(io, " $(time_infer_final) seconds") - println(io) - - println(io, "Saving samples...") - time_sample_final = @elapsed with_concrete_ad_flips(var_vals, generation.e) do - save_samples(joinpath(OUT_DIR, "terms_trained.txt"), generation.e; io) - end - println(io, " $(time_sample_final) seconds") - println(io) -end +showln(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) + +mgr.emit_stats("trained") From 688ce362cd8186e2fa8c1d765b4df26067961aea Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 3 Feb 2024 18:04:02 -0800 Subject: [PATCH 045/231] Add Plots to Project.toml --- Project.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Project.toml b/Project.toml index 8a967150..b0962b36 100644 --- a/Project.toml +++ b/Project.toml @@ -12,6 +12,7 @@ Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6" IRTools = "7869d1d1-7146-5819-86e3-90919afe41df" Jive = "ba5e3d4b-8524-549f-bc71-e76ad9e9deed" MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" +Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a" [compat] From bf16b1b6794c5bf10b033ef50909f10ceeb580d8 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 3 Feb 2024 18:04:34 -0800 Subject: [PATCH 046/231] Add Infiltrator to Project.toml --- Project.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Project.toml b/Project.toml index b0962b36..01e1661f 100644 --- a/Project.toml +++ b/Project.toml @@ -10,6 +10,7 @@ DirectedAcyclicGraphs = "1e6dae5e-d6e2-422d-9af3-452e7a3785ee" Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6" IRTools = "7869d1d1-7146-5819-86e3-90919afe41df" +Infiltrator = "5903a43b-9cc3-4c30-8d17-598619ec4e9b" Jive = "ba5e3d4b-8524-549f-bc71-e76ad9e9deed" MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" From c4d0657640d289d4a01a1bfcab98879d6e03a311 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 3 Feb 2024 18:17:44 -0800 Subject: [PATCH 047/231] Generate learning curve image --- examples/qc/benchmarks/benchmarks.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index ee4375c3..e6799c82 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -1,3 +1,5 @@ +using Plots + abstract type Benchmark end abstract type GenerationParams{T} end abstract type LossParams{T} end @@ -124,6 +126,8 @@ function create_simple_loss_manager(loss, io, out_dir, var_vals) for (epoch, logpr) in zip(0:epochs, learning_curve) println(file, "$(epoch)\t$(logpr)") end + plot(0:epochs, learning_curve) + savefig(joinpath(out_dir, "learning_curve.png")) end end SimpleLossMgr(emit_stats, f_train, loss) From 63a3be50c02b8df955fedba6fa99307aac00c3b7 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 3 Feb 2024 20:27:00 -0800 Subject: [PATCH 048/231] qc bench: print more times --- examples/qc/benchmarks/benchmarks.jl | 52 ++++++++++++++++++---------- 1 file changed, 34 insertions(+), 18 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index e6799c82..f77073d2 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -13,7 +13,6 @@ struct BenchmarkMgr train!::Function # epochs::Integer -> learning_rate::Real -> learning_curve::Vector{<:Real} end - function create_benchmark_manager( io::IO, out_dir::String, @@ -87,10 +86,10 @@ function generate(p::STLCGenerationParams) STLCGeneration(e, constructors_overapproximation) end -function generation_emit_stats(generation::STLCGeneration, io::IO, out_dir::String, s::String, var_vals::Valuation) +function generation_emit_stats(g::STLCGeneration, io::IO, out_dir::String, s::String, var_vals::Valuation) println_flush(io, "Saving samples...") - time_sample = @elapsed with_concrete_ad_flips(var_vals, generation.e) do - save_samples(joinpath(out_dir, "terms_$(s).txt"), generation.e; io=io) + time_sample = @elapsed with_concrete_ad_flips(var_vals, g.e) do + save_samples(joinpath(out_dir, "terms_$(s).txt"), g.e; io=io) end println(io, " $(time_sample) seconds") println(io) @@ -102,11 +101,14 @@ end struct ApproxSTLCConstructorEntropy <: SimpleLossParams{STLC} end to_subpath(::ApproxSTLCConstructorEntropy) = ["approx_entropy"] -function create_loss_manager(::ApproxSTLCConstructorEntropy, io, out_dir, var_vals, generation) - loss = sum( +function create_loss_manager(p::ApproxSTLCConstructorEntropy, io, out_dir, var_vals, generation) + println_flush(io, "Building computation graph for $(p)...") + time_build_loss = @elapsed loss = sum( neg_entropy(opt_ctor_to_id(ctor), values(stlc_ctor_to_id), ignore_non_support=true) for ctor in generation.constructors_overapproximation ) + println(io, " $(time_build_loss) seconds") + println(io) create_simple_loss_manager(loss, io, out_dir, var_vals) end @@ -143,12 +145,17 @@ end struct STLCConstructorEntropy <: SimpleLossParams{STLC} end to_subpath(::STLCConstructorEntropy) = ["entropy"] -function create_loss_manager(::STLCConstructorEntropy, io, out_dir, var_vals, generation::STLCGeneration) - random_term = match(generation.e, [ - "Some" => e -> DistSome(choice(collect_constructors(e))), - "None" => () -> DistNone(DistInt32), - ]) - loss = neg_entropy(random_term, Set([DistSome(i) for i in values(stlc_ctor_to_id)])) +function create_loss_manager(p::STLCConstructorEntropy, io, out_dir, var_vals, generation::STLCGeneration) + println_flush(io, "Building computation graph for $(p)...") + time_build_loss = @elapsed begin + random_term = match(generation.e, [ + "Some" => e -> DistSome(choice(collect_constructors(e))), + "None" => () -> DistNone(DistInt32), + ]) + loss = neg_entropy(random_term, Set([DistSome(i) for i in values(stlc_ctor_to_id)])) + end + println(io, " $(time_build_loss) seconds") + println(io) create_simple_loss_manager(loss, io, out_dir, var_vals) end @@ -193,11 +200,14 @@ end struct ApproxBSTConstructorEntropy <: SimpleLossParams{BST} end to_subpath(::ApproxBSTConstructorEntropy) = ["approx_entropy"] -function create_loss_manager(::ApproxBSTConstructorEntropy, io, out_dir, var_vals, generation::BSTGeneration) - loss = sum( +function create_loss_manager(p::ApproxBSTConstructorEntropy, io, out_dir, var_vals, generation::BSTGeneration) + println_flush(io, "Building computation graph for $(p)...") + time_build_loss = @elapsed loss = sum( neg_entropy(ctor_to_id(ctor), values(bst_ctor_to_id), ignore_non_support=true) for ctor in generation.constructors_overapproximation ) + println(io, " $(time_build_loss) seconds") + println(io) create_simple_loss_manager(loss, io, out_dir, var_vals) end @@ -214,9 +224,15 @@ struct MLELossParams{T} <: SimpleLossParams{T} MLELossParams(; metric::Metric{T}, target_dist) where T = new{T}(metric, target_dist) end to_subpath(p::MLELossParams) = [name(p.metric), name(p.target_dist)] -function create_loss_manager(loss_params::MLELossParams{STLC}, io, out_dir, var_vals, generation::STLCGeneration) - metric = compute_metric(loss_params.metric, generation) - loss = metric_loss(metric, loss_params.target_dist) +function create_loss_manager(p::MLELossParams{STLC}, io, out_dir, var_vals, generation::STLCGeneration) + println_flush(io, "Building computation graph for $(p)...") + time_build_loss = @elapsed begin + metric = compute_metric(p.metric, generation) + loss = metric_loss(metric, p.target_dist) + end + println(io, " $(time_build_loss) seconds") + println(io) + mgr = create_simple_loss_manager(loss, io, out_dir, var_vals) # Also save distribution of metric being trained @@ -224,7 +240,7 @@ function create_loss_manager(loss_params::MLELossParams{STLC}, io, out_dir, var_ println_flush(io, "Saving $(tag) distribution...") time_infer = @elapsed metric_dist = pr_mixed(var_vals)(metric) println(io, " $(time_infer) seconds") - save_metric_dist(joinpath(out_dir, "dist_$(name(loss_params.metric))_$(tag).csv"), metric_dist; io) + save_metric_dist(joinpath(out_dir, "dist_$(name(p.metric))_$(tag).csv"), metric_dist; io) println(io) emit_stats(mgr, tag) From 8c012c2dc68206323269d972fb65e496b74f7f3d Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 3 Feb 2024 22:10:44 -0800 Subject: [PATCH 049/231] add sample_as_dist --- src/autodiff_pr/train.jl | 3 ++- src/dist/number/int.jl | 4 +++ src/dist/number/uint.jl | 4 +++ src/inference/sample.jl | 54 +++++++++++++++++++++++++++++++++++++--- 4 files changed, 60 insertions(+), 5 deletions(-) diff --git a/src/autodiff_pr/train.jl b/src/autodiff_pr/train.jl index c5e4183e..af306211 100644 --- a/src/autodiff_pr/train.jl +++ b/src/autodiff_pr/train.jl @@ -73,6 +73,7 @@ function train!( loss::ADNode; epochs::Integer, learning_rate::Real, + append_last_loss=true, ) losses = [] l = LogPrExpander(WMC(BDDCompiler(bool_roots([loss])))) @@ -89,7 +90,7 @@ function train!( push!(losses, vals[loss]) end - push!(losses, compute_mixed(var_vals, loss)) + append_last_loss && push!(losses, compute_mixed(var_vals, loss)) losses end diff --git a/src/dist/number/int.jl b/src/dist/number/int.jl index 81c75bd3..c7921352 100644 --- a/src/dist/number/int.jl +++ b/src/dist/number/int.jl @@ -69,6 +69,10 @@ function frombits(x::DistInt{W}, world) where W base + frombits(drop_bits(DistUInt{W-1}, x.number), world) end +function frombits_as_dist(x::DistInt{W}, world) where W + DistInt(frombits_as_dist(x.number, world)) +end + function expectation(x::DistInt{W}; kwargs...) where W bitprobs = pr(x.number.bits...; kwargs...) base = -(2^(W-1)) * bitprobs[1][true] diff --git a/src/dist/number/uint.jl b/src/dist/number/uint.jl index d5d0a47d..27138f21 100644 --- a/src/dist/number/uint.jl +++ b/src/dist/number/uint.jl @@ -213,6 +213,10 @@ function frombits(x::DistUInt{W}, world) where W v end +function frombits_as_dist(x::DistUInt{W}, world) where W + DistUInt{W}([frombits(b, world) for b in x.bits]) +end + function expectation(x::DistUInt; kwargs...) bitprobs = pr(x.bits...; kwargs...) expectation(bitprobs) diff --git a/src/inference/sample.jl b/src/inference/sample.jl index 41f61a15..b307b703 100644 --- a/src/inference/sample.jl +++ b/src/inference/sample.jl @@ -1,15 +1,61 @@ -export sample +export sample, sample_as_dist using DirectedAcyclicGraphs: foldup """Run vanilla rejection sampling without any compilation""" function sample(x; evidence=true) - vals = Dict{ADNode, Real}() + while true + vcache = Dict() + fl(n::Flip) = begin + if !haskey(vcache, n) + vcache[n] = rand() < n.prob + end + vcache[n] + end + + fi(n::DistAnd, call) = begin + if !haskey(vcache, n) + vcache[n] = call(n.x) && call(n.y) + end + vcache[n] + end + + fi(n::DistOr, call) = begin + if !haskey(vcache, n) + vcache[n] = call(n.x) || call(n.y) + end + vcache[n] + end + + fi(n::DistNot, call) = begin + if !haskey(vcache, n) + vcache[n] = !call(n.x) + end + vcache[n] + end + + vcache = Dict() + evidence_computed = if evidence isa Bool + evidence + else + foldup(evidence, fl, fi, Bool) + end + evidence_computed || continue + for bit in tobits(x) + bit isa Bool && continue + foldup(bit, fl, fi, Bool) + end + return frombits(x, vcache) + end +end + +function sample_as_dist(var_vals, x; evidence=true) + a = ADComputer(var_vals) while true vcache = Dict() fl(n::Flip) = begin if !haskey(vcache, n) p = if n.prob isa ADNode - compute(n.prob, vals) + compute(a, n.prob) else n.prob end @@ -50,6 +96,6 @@ function sample(x; evidence=true) bit isa Bool && continue foldup(bit, fl, fi, Bool) end - return frombits(x, vcache) + return frombits_as_dist(x, vcache) end end From 3d282b4dfd3157921d05cc24b090913603e2e75e Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 3 Feb 2024 22:28:06 -0800 Subject: [PATCH 050/231] Add STLC sampling entropy loss --- examples/qc/benchmarks/benchmarks.jl | 155 +++++++++++++++++++++++---- examples/qc/benchmarks/main.jl | 28 ++--- 2 files changed, 148 insertions(+), 35 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index f77073d2..f816c9e5 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -38,6 +38,14 @@ function create_benchmark_manager( BenchmarkMgr(emit_stats, loss_mgr.train!) end +struct LossMgrImpl <: LossMgr + emit_stats::Function # tag::String -> () + train!::Function # epochs::Integer -> learning_rate::Real -> learning_curve::Vector{<:Real} +end +emit_stats(m::LossMgrImpl, tag) = m.emit_stats(tag) +train!(m::LossMgrImpl; epochs, learning_rate) = m.train!(; epochs, learning_rate) + + struct SimpleLossMgr <: LossMgr emit_stats::Function # tag::String -> () train!::Function # epochs::Integer -> learning_rate::Real -> learning_curve::Vector{<:Real} @@ -46,6 +54,74 @@ end emit_stats(m::SimpleLossMgr, tag) = m.emit_stats(tag) train!(m::SimpleLossMgr; epochs, learning_rate) = m.train!(; epochs, learning_rate) +function save_learning_curve(out_dir, learning_curve) + open(joinpath(out_dir, "learning_curve.csv"), "w") do file + xs = 0:length(learning_curve)-1 + for (epoch, logpr) in zip(xs, learning_curve) + println(file, "$(epoch)\t$(logpr)") + end + plot(xs, learning_curve) + savefig(joinpath(out_dir, "learning_curve.png")) + end +end + +function create_simple_loss_manager(loss, io, out_dir, var_vals) + function emit_stats(tag) + loss_val = compute_mixed(var_vals, loss) + println(io, "Loss ($(tag)): $(loss_val)") + println(io) + end + function f_train(; epochs, learning_rate) + println_flush(io, "Training...") + time_train = @elapsed learning_curve = Dice.train!(var_vals, loss; epochs, learning_rate) + println(io, " $(time_train) seconds") + println(io) + + save_learning_curve(out_dir, learning_curve) + end + SimpleLossMgr(emit_stats, f_train, loss) +end + +function train_via_sampling_entropy!(io, out_dir, var_vals, e; epochs, learning_rate, resampling_frequency, samples_per_batch, domain, ignored_domain) + learning_rate = learning_rate / sqrt(samples_per_batch) + + learning_curve = [] + time_sample = 0 + time_step = 0 + println_flush(io, "Training...") + for epochs_done in 0:resampling_frequency:epochs-1 + println_flush(io, "Sampling...") + time_sample_here = @elapsed samples = with_concrete_ad_flips(var_vals, e) do + [sample_as_dist(Valuation(), e) for _ in 1:samples_per_batch] + end + time_sample += time_sample_here + println(io, " $(time_sample_here) seconds") + + loss = sum( + LogPr(prob_equals(e, sample)) + for sample in samples + if any(prob_equals(sample, i) === true for i in domain) + ) + for sample in samples + @assert any(prob_equals(sample, i) === true for i in union(domain, ignored_domain)) + end + + epochs_this_batch = min(epochs - epochs_done, resampling_frequency) + last_batch = epochs_done + epochs_this_batch == epochs + + println_flush(io, "Stepping...") + time_step_here = @elapsed subcurve = Dice.train!(var_vals, loss; epochs=epochs_this_batch, learning_rate, append_last_loss=last_batch) + time_step += time_step_here + append!(learning_curve, subcurve) + println(io, " $(time_step_here) seconds") + end + println(io, "Sample time: $(time_sample) seconds") + println(io, "Step time: $(time_step) seconds") + println(io) + + save_learning_curve(out_dir, learning_curve) +end + ################################## # STLC generation ################################## @@ -112,32 +188,35 @@ function create_loss_manager(p::ApproxSTLCConstructorEntropy, io, out_dir, var_v create_simple_loss_manager(loss, io, out_dir, var_vals) end -function create_simple_loss_manager(loss, io, out_dir, var_vals) - function emit_stats(tag) - loss_val = compute_mixed(var_vals, loss) - println(io, "Loss ($(tag)): $(loss_val)") - println(io) - end - function f_train(; epochs, learning_rate) - println_flush(io, "Training...") - time_train = @elapsed learning_curve = Dice.train!(var_vals, loss; epochs, learning_rate) - println(io, " $(time_train) seconds") - println(io) +################################## +# Sampling STLC constructor entropy loss +################################## - open(joinpath(out_dir, "learning_curve.csv"), "w") do file - for (epoch, logpr) in zip(0:epochs, learning_curve) - println(file, "$(epoch)\t$(logpr)") - end - plot(0:epochs, learning_curve) - savefig(joinpath(out_dir, "learning_curve.png")) - end +struct SamplingSTLCConstructorEntropy <: LossParams{STLC} + resampling_frequency::Integer + samples_per_batch::Integer + function SamplingSTLCConstructorEntropy(; resampling_frequency, samples_per_batch) + new(resampling_frequency, samples_per_batch) end - SimpleLossMgr(emit_stats, f_train, loss) end - -# struct SamplingSTLCConstructorEntropy <: LossParams{STLC} end -# to_subpath(::SamplingSTLCConstructorEntropy) = ["sampling_entropy"] -# function m +to_subpath(p::SamplingSTLCConstructorEntropy) = ["sampling_entropy", "freq=$(p.resampling_frequency),spb=$(p.samples_per_batch)"] +function create_loss_manager(p::SamplingSTLCConstructorEntropy, io, out_dir, var_vals, g::STLCGeneration) + println_flush(io, "Building random_ctor graph...") + time_build_random_ctor = @elapsed random_ctor = match(g.e, [ + "Some" => e -> choice(collect_constructors(e)), + "None" => () -> DistInt32(-1), + ]) + println(io, " $(time_build_random_ctor) seconds") + function train!(; epochs, learning_rate) + train_via_sampling_entropy!( + io, out_dir, var_vals, random_ctor; epochs, learning_rate, + resampling_frequency=p.resampling_frequency, samples_per_batch=p.samples_per_batch, + domain=values(stlc_ctor_to_id), + ignored_domain=[DistInt32(-1)] + ) + end + LossMgrImpl(_ -> nothing, train!) +end ################################## # Exact STLC constructor entropy loss @@ -211,6 +290,36 @@ function create_loss_manager(p::ApproxBSTConstructorEntropy, io, out_dir, var_va create_simple_loss_manager(loss, io, out_dir, var_vals) end +################################## +# Sampling BST constructor entropy loss +################################## + +# struct SamplingBSTConstructorEntropy <: LossParams{BST} +# resampling_frequency::Integer +# samples_per_batch::Integer +# function SamplingBSTConstructorEntropy(; resampling_frequency, samples_per_batch) +# new(resampling_frequency, samples_per_batch) +# end +# end +# to_subpath(p::SamplingBSTConstructorEntropy) = ["sampling_entropy", "freq=$(p.resampling_frequency),spb=$(p.samples_per_batch)"] +# function create_loss_manager(p::SamplingBSTConstructorEntropy, io, out_dir, var_vals, g::BSTGeneration) +# println_flush(io, "Building random_ctor graph...") +# time_build_random_ctor = @elapsed random_ctor = match(g.constructors_overapproximation, [ +# "Some" => e -> choice(collect_constructors(e)), # TODO: implement collect_constructors +# "None" => () -> DistInt32(-1), +# ]) +# println(io, " $(time_build_random_ctor) seconds") +# function train!(; epochs, learning_rate) +# train_via_sampling_entropy!( +# io, out_dir, var_vals, random_ctor; epochs, learning_rate, +# resampling_frequency=p.resampling_frequency, samples_per_batch=p.samples_per_batch, +# domain=values(bst_ctor_to_id), +# ignored_domain=[DistInt32(-1)] +# ) +# end +# LossMgrImpl(_ -> nothing, train!) +# end + ################################## # MLE loss ################################## diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 1e2237cc..decc237d 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -13,16 +13,20 @@ include("benchmarks.jl") generation_params = STLCGenerationParams( param_vars_by_size=true, - size=3, - ty_size=2, + size=2, + ty_size=1, +) +# loss_params = MixedLossParams(Pair{SimpleLossParams{STLC}, Real}[ +# ApproxSTLCConstructorEntropy() => 10, +# MLELossParams( +# metric=NumApps(), +# target_dist=Target4321(), +# ) => 1, +# ]) +loss_params = SamplingSTLCConstructorEntropy( + resampling_frequency=10, + samples_per_batch=1000, ) -loss_params = MixedLossParams(Pair{SimpleLossParams{STLC}, Real}[ - ApproxSTLCConstructorEntropy() => 10, - MLELossParams( - metric=NumApps(), - target_dist=Target4321(), - ) => 1, -]) # generation_params = BSTGenerationParams(size=3) @@ -86,17 +90,17 @@ function register_weight!(s) weight end +mgr = create_benchmark_manager(io, OUT_DIR, var_vals, generation_params, loss_params) -println_flush(io, "Initial adnodes_of_interest:") +println_flush(io, "ADNodes of interest (initial):") vals = compute(var_vals, values(adnodes_of_interest)) showln(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) -mgr = create_benchmark_manager(io, OUT_DIR, var_vals, generation_params, loss_params) mgr.emit_stats("initial") mgr.train!(epochs=EPOCHS, learning_rate=LEARNING_RATE) -println(io, "Trained adnodes_of_interest:") +println_flush(io, "ADNodes of interest (trained):") vals = compute(var_vals, values(adnodes_of_interest)) showln(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) From 69dcb2f4a2e7bb870ae7962922bcaf7db715b8ac Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 3 Feb 2024 22:55:38 -0800 Subject: [PATCH 051/231] fix nodelogpr bug --- src/autodiff/adnode.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/autodiff/adnode.jl b/src/autodiff/adnode.jl index eba456a7..d90c0681 100644 --- a/src/autodiff/adnode.jl +++ b/src/autodiff/adnode.jl @@ -240,7 +240,7 @@ node_logprob(pr::ADNode, hi::ADNodeCompatible, lo::ADNode) = NodeLogPr(pr, Const node_logprob(pr::ADNode, hi::ADNodeCompatible, lo::ADNodeCompatible) = NodeLogPr(pr, Constant(hi), Constant(lo)) node_logprob(pr::ADNodeCompatible, hi::ADNode, lo::ADNode) = NodeLogPr(Constant(pr), hi, lo) node_logprob(pr::ADNodeCompatible, hi::ADNode, lo::ADNodeCompatible) = NodeLogPr(Constant(pr), hi, Constant(lo)) -node_logprob(pr::ADNodeCompatible, hi::ADNodeCompatible, lo::ADNode) = NodeLogPr(Constant(pr), hi, Constant(lo)) +node_logprob(pr::ADNodeCompatible, hi::ADNodeCompatible, lo::ADNode) = NodeLogPr(Constant(pr), Constant(hi), lo) # Desugared ops Base.zero(::ADNode) = Constant(0) From 8492891a478795da3dc356ebd10d83c8a4d84ba8 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 3 Feb 2024 22:58:33 -0800 Subject: [PATCH 052/231] impl frombits_as_dist for inductive and enum --- src/dist/bool.jl | 1 + src/dist/enum.jl | 3 +++ src/dist/inductive/inductive.jl | 14 ++++++++++++++ 3 files changed, 18 insertions(+) diff --git a/src/dist/bool.jl b/src/dist/bool.jl index 40c454dc..3860785c 100644 --- a/src/dist/bool.jl +++ b/src/dist/bool.jl @@ -119,6 +119,7 @@ tobits(::Bool) = [] tobits(b::Dist{Bool}) = [b] frombits(b::Bool, _) = b frombits(b::Dist{Bool}, world) = world[b] +frombits_as_dist(b::Dist{Bool}, world) = world[b] ################################## # DirectedAcyclicGraphs.jl diff --git a/src/dist/enum.jl b/src/dist/enum.jl index 54b4d49e..ed6a053b 100644 --- a/src/dist/enum.jl +++ b/src/dist/enum.jl @@ -24,3 +24,6 @@ tobits(x::DistEnum) = tobits(x.i) frombits(x::DistEnum, world) = x.enum(frombits(x.i, world)) + +frombits_as_dist(x::DistEnum, world) = + DistEnum(x.enum, frombits_as_dist(x.i, world)) diff --git a/src/dist/inductive/inductive.jl b/src/dist/inductive/inductive.jl index e8443597..a5066e63 100644 --- a/src/dist/inductive/inductive.jl +++ b/src/dist/inductive/inductive.jl @@ -43,6 +43,20 @@ function frombits(x::DistI{T}, world) where T (param_lists(T)[constructor][1], args) end +function frombits_as_dist(x::DistI{T}, world) where T + DistI{T}( + frombits_as_dist(x.constructor, world), + [ + if arg_list === nothing + nothing + else + [frombits_as_dist(arg, world) for arg in arg_list] + end + for arg_list in x.arg_lists + ] + ) +end + function Base.ifelse(cond::Dist{Bool}, then::DistI{T}, elze::DistI{T}) where T arg_lists = [ if then_args === nothing From ee3d6a862c152436aa6e127b328b727bd9140fe6 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 3 Feb 2024 22:58:55 -0800 Subject: [PATCH 053/231] qc bench: add sampling stlc term entropy --- examples/qc/benchmarks/benchmarks.jl | 40 ++++++++++++++++++++++------ examples/qc/benchmarks/main.jl | 2 +- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index f816c9e5..ea1223ea 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -82,7 +82,7 @@ function create_simple_loss_manager(loss, io, out_dir, var_vals) SimpleLossMgr(emit_stats, f_train, loss) end -function train_via_sampling_entropy!(io, out_dir, var_vals, e; epochs, learning_rate, resampling_frequency, samples_per_batch, domain, ignored_domain) +function train_via_sampling_entropy!(io, out_dir, var_vals, e; epochs, learning_rate, resampling_frequency, samples_per_batch, consider, ignore) learning_rate = learning_rate / sqrt(samples_per_batch) learning_curve = [] @@ -100,10 +100,10 @@ function train_via_sampling_entropy!(io, out_dir, var_vals, e; epochs, learning_ loss = sum( LogPr(prob_equals(e, sample)) for sample in samples - if any(prob_equals(sample, i) === true for i in domain) + if consider(sample) ) for sample in samples - @assert any(prob_equals(sample, i) === true for i in union(domain, ignored_domain)) + @assert consider(sample) ^ ignore(sample) end epochs_this_batch = min(epochs - epochs_done, resampling_frequency) @@ -188,6 +188,30 @@ function create_loss_manager(p::ApproxSTLCConstructorEntropy, io, out_dir, var_v create_simple_loss_manager(loss, io, out_dir, var_vals) end +################################## +# Sampling STLC entropy loss +################################## + +struct SamplingSTLCEntropy <: LossParams{STLC} + resampling_frequency::Integer + samples_per_batch::Integer + function SamplingSTLCEntropy(; resampling_frequency, samples_per_batch) + new(resampling_frequency, samples_per_batch) + end +end +to_subpath(p::SamplingSTLCEntropy) = ["sampling_entropy", "freq=$(p.resampling_frequency),spb=$(p.samples_per_batch)"] +function create_loss_manager(p::SamplingSTLCEntropy, io, out_dir, var_vals, g::STLCGeneration) + function train!(; epochs, learning_rate) + train_via_sampling_entropy!( + io, out_dir, var_vals, g.e; epochs, learning_rate, + resampling_frequency=p.resampling_frequency, samples_per_batch=p.samples_per_batch, + consider=_->true, + ignore=_->false + ) + end + LossMgrImpl(_ -> nothing, train!) +end + ################################## # Sampling STLC constructor entropy loss ################################## @@ -199,7 +223,7 @@ struct SamplingSTLCConstructorEntropy <: LossParams{STLC} new(resampling_frequency, samples_per_batch) end end -to_subpath(p::SamplingSTLCConstructorEntropy) = ["sampling_entropy", "freq=$(p.resampling_frequency),spb=$(p.samples_per_batch)"] +to_subpath(p::SamplingSTLCConstructorEntropy) = ["sampling_ctor_entropy", "freq=$(p.resampling_frequency),spb=$(p.samples_per_batch)"] function create_loss_manager(p::SamplingSTLCConstructorEntropy, io, out_dir, var_vals, g::STLCGeneration) println_flush(io, "Building random_ctor graph...") time_build_random_ctor = @elapsed random_ctor = match(g.e, [ @@ -211,8 +235,8 @@ function create_loss_manager(p::SamplingSTLCConstructorEntropy, io, out_dir, var train_via_sampling_entropy!( io, out_dir, var_vals, random_ctor; epochs, learning_rate, resampling_frequency=p.resampling_frequency, samples_per_batch=p.samples_per_batch, - domain=values(stlc_ctor_to_id), - ignored_domain=[DistInt32(-1)] + consider=s->any(prob_equals(s, x)===true for x in values(stlc_ctor_to_id)), + ignore=s->prob_equals(s, DistInt32(-1))===true, ) end LossMgrImpl(_ -> nothing, train!) @@ -223,7 +247,7 @@ end ################################## struct STLCConstructorEntropy <: SimpleLossParams{STLC} end -to_subpath(::STLCConstructorEntropy) = ["entropy"] +to_subpath(::STLCConstructorEntropy) = ["ctor_entropy"] function create_loss_manager(p::STLCConstructorEntropy, io, out_dir, var_vals, generation::STLCGeneration) println_flush(io, "Building computation graph for $(p)...") time_build_loss = @elapsed begin @@ -278,7 +302,7 @@ end ################################## struct ApproxBSTConstructorEntropy <: SimpleLossParams{BST} end -to_subpath(::ApproxBSTConstructorEntropy) = ["approx_entropy"] +to_subpath(::ApproxBSTConstructorEntropy) = ["approx_ctor_entropy"] function create_loss_manager(p::ApproxBSTConstructorEntropy, io, out_dir, var_vals, generation::BSTGeneration) println_flush(io, "Building computation graph for $(p)...") time_build_loss = @elapsed loss = sum( diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index decc237d..83dd8b18 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -23,7 +23,7 @@ generation_params = STLCGenerationParams( # target_dist=Target4321(), # ) => 1, # ]) -loss_params = SamplingSTLCConstructorEntropy( +loss_params = SamplingSTLCEntropy( resampling_frequency=10, samples_per_batch=1000, ) From e55d38b29254d556317fbe22b08cf6ca3dcb13cf Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 3 Feb 2024 23:12:26 -0800 Subject: [PATCH 054/231] qc bench: add sampling bst term entropy loss --- examples/qc/benchmarks/benchmarks.jl | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index ea1223ea..c69d8267 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -61,7 +61,7 @@ function save_learning_curve(out_dir, learning_curve) println(file, "$(epoch)\t$(logpr)") end plot(xs, learning_curve) - savefig(joinpath(out_dir, "learning_curve.png")) + # savefig(joinpath(out_dir, "learning_curve.png")) end end @@ -296,6 +296,32 @@ function generate(p::BSTGenerationParams) ) BSTGeneration(t, constructors_overapproximation) end +function generation_emit_stats(g::BSTGeneration, io::IO, out_dir::String, s::String, var_vals::Valuation) +end + +################################## +# Sampling BST entropy loss +################################## + +struct SamplingBSTEntropy <: LossParams{BST} + resampling_frequency::Integer + samples_per_batch::Integer + function SamplingBSTEntropy(; resampling_frequency, samples_per_batch) + new(resampling_frequency, samples_per_batch) + end +end +to_subpath(p::SamplingBSTEntropy) = ["sampling_entropy", "freq=$(p.resampling_frequency),spb=$(p.samples_per_batch)"] +function create_loss_manager(p::SamplingBSTEntropy, io, out_dir, var_vals, g::BSTGeneration) + function train!(; epochs, learning_rate) + train_via_sampling_entropy!( + io, out_dir, var_vals, g.t; epochs, learning_rate, + resampling_frequency=p.resampling_frequency, samples_per_batch=p.samples_per_batch, + consider=_->true, + ignore=_->false + ) + end + LossMgrImpl(_ -> nothing, train!) +end ################################## # Approx BST constructor entropy loss From 9411e3b488123be74eb8bdbc7e9fd150b28c8c10 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 4 Feb 2024 12:34:30 -0800 Subject: [PATCH 055/231] qc bench: plots in headless, bst with dummy values --- examples/qc/benchmarks/benchmarks.jl | 24 ++++++++++++++------- examples/qc/benchmarks/lib/bst/generator.jl | 19 ++++++++++++++++ examples/qc/benchmarks/main.jl | 16 ++++++++------ 3 files changed, 45 insertions(+), 14 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index c69d8267..a04fceaf 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -1,4 +1,5 @@ using Plots +ENV["GKSwstype"] = "100" # prevent plots from displaying abstract type Benchmark end abstract type GenerationParams{T} end @@ -61,7 +62,7 @@ function save_learning_curve(out_dir, learning_curve) println(file, "$(epoch)\t$(logpr)") end plot(xs, learning_curve) - # savefig(joinpath(out_dir, "learning_curve.png")) + savefig(joinpath(out_dir, "learning_curve.png")) end end @@ -270,7 +271,8 @@ abstract type BST <: Benchmark end struct BSTGenerationParams <: GenerationParams{BST} size::Integer - BSTGenerationParams(; size) = new(size) + dummy_vals::Bool + BSTGenerationParams(; size, dummy_vals) = new(size, dummy_vals) end struct BSTGeneration <: Generation{BST} t::DistI{Tree} @@ -279,6 +281,7 @@ end function to_subpath(p::BSTGenerationParams) [ "bst", + if p.dummy_vals "dummy_vals" else "actual_vals" end, "sz=$(p.size)", ] end @@ -288,12 +291,17 @@ function generate(p::BSTGenerationParams) push!(constructors_overapproximation, v) v end - t = gen_tree( - p.size, - DistNat(0), - DistNat(40), - add_ctor, - ) + t = if p.dummy_vals + gen_tree_dummy_vals(p.size, add_ctor) + else + gen_tree( + p.size, + DistNat(0), + DistNat(40), + add_ctor, + ) + end + BSTGeneration(t, constructors_overapproximation) end function generation_emit_stats(g::BSTGeneration, io::IO, out_dir::String, s::String, var_vals::Valuation) diff --git a/examples/qc/benchmarks/lib/bst/generator.jl b/examples/qc/benchmarks/lib/bst/generator.jl index cea4a3a5..259ab207 100644 --- a/examples/qc/benchmarks/lib/bst/generator.jl +++ b/examples/qc/benchmarks/lib/bst/generator.jl @@ -17,3 +17,22 @@ function gen_tree(s::Integer, lo::DistNat, hi::DistNat, track_return) end ) end + +function gen_tree_dummy_vals(s::Integer, track_return) + track_return( + @dice_ite if s == 0 + DistE() + else + s′ = s - 1 + if flip(register_weight!("sz$(s)")) + DistE() + else + k = DistNat(0) + v = DistNat(0) # arbitrary + l = gen_tree_dummy_vals(s′, track_return) + r = gen_tree_dummy_vals(s′, track_return) + DistT(l, k, v, r) + end + end + ) +end diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 83dd8b18..ffe4b4c2 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -13,9 +13,14 @@ include("benchmarks.jl") generation_params = STLCGenerationParams( param_vars_by_size=true, - size=2, + size=1, ty_size=1, ) +loss_params = SamplingSTLCEntropy( + resampling_frequency=10, + samples_per_batch=1000, +) + # loss_params = MixedLossParams(Pair{SimpleLossParams{STLC}, Real}[ # ApproxSTLCConstructorEntropy() => 10, # MLELossParams( @@ -23,15 +28,14 @@ generation_params = STLCGenerationParams( # target_dist=Target4321(), # ) => 1, # ]) -loss_params = SamplingSTLCEntropy( + + +generation_params = BSTGenerationParams(size=5; dummy_vals=true) +loss_params = SamplingBSTEntropy( resampling_frequency=10, samples_per_batch=1000, ) - -# generation_params = BSTGenerationParams(size=3) -# loss_params = ApproxBSTConstructorEntropy() - EPOCHS = 500 LEARNING_RATE = if loss_params isa ApproxSTLCConstructorEntropy 0.03 else 0.01 end From bd89aed9b99293ac1d22247563b79b324f5f6d5b Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 4 Feb 2024 12:57:32 -0800 Subject: [PATCH 056/231] qc bench: print commit --- examples/qc/benchmarks/lib/util.jl | 8 +++++++- examples/qc/benchmarks/main.jl | 16 ++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/examples/qc/benchmarks/lib/util.jl b/examples/qc/benchmarks/lib/util.jl index 3097cc0f..c22223e4 100644 --- a/examples/qc/benchmarks/lib/util.jl +++ b/examples/qc/benchmarks/lib/util.jl @@ -157,4 +157,10 @@ function showln(io::IO, v) println(io) println(io) flush(io) -end \ No newline at end of file +end + +function cmd_out(cmd) + io = IOBuffer() + run(pipeline(cmd, stdout=io)) + String(take!(io)) +end diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index ffe4b4c2..81e5a0cb 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -20,7 +20,6 @@ loss_params = SamplingSTLCEntropy( resampling_frequency=10, samples_per_batch=1000, ) - # loss_params = MixedLossParams(Pair{SimpleLossParams{STLC}, Real}[ # ApproxSTLCConstructorEntropy() => 10, # MLELossParams( @@ -29,15 +28,11 @@ loss_params = SamplingSTLCEntropy( # ) => 1, # ]) +generation_params = BSTGenerationParams(size=5, dummy_vals=true) +loss_params = SamplingBSTEntropy(resampling_frequency=10, samples_per_batch=10000) -generation_params = BSTGenerationParams(size=5; dummy_vals=true) -loss_params = SamplingBSTEntropy( - resampling_frequency=10, - samples_per_batch=1000, -) - -EPOCHS = 500 -LEARNING_RATE = if loss_params isa ApproxSTLCConstructorEntropy 0.03 else 0.01 end +EPOCHS = 2000 +LEARNING_RATE = 0.01 TAG = "v05" @@ -64,8 +59,9 @@ io = if LOG_TO_FILE open(LOG_PATH, "w") else stdout end using Dates t = now() +commit = strip(cmd_out(`git rev-parse --short HEAD`)) for io′ in Set([io, stdout]) - println(io′, t) + println(io′, "$(t) $(commit)") println(io′, "== Config ==") println(io′, "TAG: $(TAG)") println(io′, generation_params) From 3852cdca72949206a13d598d170d04b084464c74 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 4 Feb 2024 15:38:10 -0800 Subject: [PATCH 057/231] qc bench: svg learning rate, fix sampling entropy loss, avoid overwrite --- examples/qc/benchmarks/benchmarks.jl | 4 ++-- examples/qc/benchmarks/main.jl | 20 +++++++++++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index a04fceaf..f40fd75a 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -62,7 +62,7 @@ function save_learning_curve(out_dir, learning_curve) println(file, "$(epoch)\t$(logpr)") end plot(xs, learning_curve) - savefig(joinpath(out_dir, "learning_curve.png")) + savefig(joinpath(out_dir, "learning_curve.svg")) end end @@ -98,7 +98,7 @@ function train_via_sampling_entropy!(io, out_dir, var_vals, e; epochs, learning_ time_sample += time_sample_here println(io, " $(time_sample_here) seconds") - loss = sum( + loss = -sum( LogPr(prob_equals(e, sample)) for sample in samples if consider(sample) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 81e5a0cb..ca687802 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -28,11 +28,11 @@ loss_params = SamplingSTLCEntropy( # ) => 1, # ]) -generation_params = BSTGenerationParams(size=5, dummy_vals=true) -loss_params = SamplingBSTEntropy(resampling_frequency=10, samples_per_batch=10000) +generation_params = BSTGenerationParams(size=2, dummy_vals=false) +loss_params = SamplingBSTEntropy(resampling_frequency=20, samples_per_batch=10000) -EPOCHS = 2000 -LEARNING_RATE = 0.01 +EPOCHS = 1000 +LEARNING_RATE = 0.1 TAG = "v05" @@ -54,6 +54,12 @@ OUT_DIR = "examples/qc/benchmarks/output/$(path)" LOG_PATH = joinpath(OUT_DIR, "log.log") +if isfile(LOG_PATH) && "-f" ∉ ARGS + println("Error: Log already exists at the following path:") + println(LOG_PATH) + exit(1) +end + mkpath(OUT_DIR) io = if LOG_TO_FILE open(LOG_PATH, "w") else stdout end @@ -61,7 +67,7 @@ using Dates t = now() commit = strip(cmd_out(`git rev-parse --short HEAD`)) for io′ in Set([io, stdout]) - println(io′, "$(t) $(commit)") + println(io′, "$(t) $(commit) $(join(ARGS, " "))") println(io′, "== Config ==") println(io′, "TAG: $(TAG)") println(io′, generation_params) @@ -105,3 +111,7 @@ vals = compute(var_vals, values(adnodes_of_interest)) showln(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) mgr.emit_stats("trained") + +t′ = now() +println(io, t′) +println(io, "Total time elapsed: $(canonicalize(t′ - t))") From 238b2f7d86ebd2158becf5b4c737b32d00ace9a3 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 4 Feb 2024 16:06:08 -0800 Subject: [PATCH 058/231] add stop if inf or nan in train\!, old unif impl --- src/autodiff_pr/train.jl | 6 ++++++ src/dist/number/uint.jl | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/src/autodiff_pr/train.jl b/src/autodiff_pr/train.jl index af306211..ddf9e07c 100644 --- a/src/autodiff_pr/train.jl +++ b/src/autodiff_pr/train.jl @@ -74,6 +74,7 @@ function train!( epochs::Integer, learning_rate::Real, append_last_loss=true, + stop_if_inf_or_nan=true, ) losses = [] l = LogPrExpander(WMC(BDDCompiler(bool_roots([loss])))) @@ -81,6 +82,11 @@ function train!( for _ in 1:epochs vals, derivs = differentiate(var_vals, Derivs(loss => 1)) + if stop_if_inf_or_nan && (isinf(vals[loss]) || isnan(vals[loss])) + push!(losses, vals[loss]) + return losses + end + # update vars for (adnode, d) in derivs if adnode isa Var diff --git a/src/dist/number/uint.jl b/src/dist/number/uint.jl index 27138f21..bdfbe406 100644 --- a/src/dist/number/uint.jl +++ b/src/dist/number/uint.jl @@ -433,3 +433,35 @@ function unif_half(hi::DistUInt{W})::DistUInt{W} where W rem_trunc(u, hi) end +# function unif_half(hi::DistUInt{W})::DistUInt{W} where W +# max_hi = maxvalue(hi) +# max_hi > 60 && error("Likely to time out") +# prod = BigInt(1) +# for prime in primes_at_most(max_hi) +# prod *= prime ^ floor_log(prime, max_hi) +# end +# u = uniform(DistUInt{ndigits(prod, base=2)}, 0, prod) +# rem_trunc(u, hi) +# end + +function primes_at_most(n::Int) + isprime = [true for _ in 1:n] + for p in 2:trunc(Int, sqrt(n)) + if isprime[p] + for i in p^2:p:n + isprime[i] = false + end + end + end + [i for i in 2:n if isprime[i]] +end + +function floor_log(base, n) + v = 1 + pow = 0 + while v * base <= n + v *= base + pow += 1 + end + pow +end \ No newline at end of file From 27f53910b7fdd7ab9ea71a1b5ebf02252e4da850 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 4 Feb 2024 16:06:58 -0800 Subject: [PATCH 059/231] linear instead of sqrt LR adjustment --- examples/qc/benchmarks/benchmarks.jl | 7 ++++++- examples/qc/benchmarks/main.jl | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index f40fd75a..b18aa803 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -84,7 +84,7 @@ function create_simple_loss_manager(loss, io, out_dir, var_vals) end function train_via_sampling_entropy!(io, out_dir, var_vals, e; epochs, learning_rate, resampling_frequency, samples_per_batch, consider, ignore) - learning_rate = learning_rate / sqrt(samples_per_batch) + learning_rate = learning_rate / samples_per_batch learning_curve = [] time_sample = 0 @@ -115,6 +115,11 @@ function train_via_sampling_entropy!(io, out_dir, var_vals, e; epochs, learning_ time_step += time_step_here append!(learning_curve, subcurve) println(io, " $(time_step_here) seconds") + if isinf(last(learning_curve)) || isnan(last(learning_curve)) + println(io, "Stopping early due to Inf/NaN loss") + break + end + end println(io, "Sample time: $(time_sample) seconds") println(io, "Step time: $(time_step) seconds") diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index ca687802..1546e4ba 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -28,13 +28,13 @@ loss_params = SamplingSTLCEntropy( # ) => 1, # ]) -generation_params = BSTGenerationParams(size=2, dummy_vals=false) +generation_params = BSTGenerationParams(size=5, dummy_vals=true) loss_params = SamplingBSTEntropy(resampling_frequency=20, samples_per_batch=10000) EPOCHS = 1000 -LEARNING_RATE = 0.1 +LEARNING_RATE = 3.0 -TAG = "v05" +TAG = "v06" LOG_TO_FILE = true From 7634f27fc5b4b4ed11c09e15dd39ac5ff0fd3a13 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 12 Feb 2024 10:21:11 -0800 Subject: [PATCH 060/231] draft stlc type-based generator --- examples/qc/benchmarks/lib/stlc/generator.jl | 47 +++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/examples/qc/benchmarks/lib/stlc/generator.jl b/examples/qc/benchmarks/lib/stlc/generator.jl index fe643251..a261e2ef 100644 --- a/examples/qc/benchmarks/lib/stlc/generator.jl +++ b/examples/qc/benchmarks/lib/stlc/generator.jl @@ -25,7 +25,7 @@ end # TODO: try returning expr instead of opt extr? what does env do? function gen_zero(env::Ctx, tau::DistI{Typ}) match(tau, [ - "TBool" => () -> DistSome(DistBoolean(flip(0.5))), + "TBool" => () -> DistSome(DistBoolean(flip(0.5))), # TODO: should this be constant for just learning structure? "TFun" => (T1, T2) -> bind_opt(gen_zero(DistCons(T1, env), T2)) do e DistSome(DistAbs(T1, e)) end @@ -91,3 +91,48 @@ function gen_expr(env::Ctx, tau::DistI{Typ}, sz::Integer, gen_typ_sz::Integer, b end ) end + +function tb_gen_expr(sz::Integer, track_return) + track_return( + if sz == 0 + @dice_ite if flip(register_weight!("sz$(s)_pvar")) + DistVar(0) # really, this is arbitrary + else + DistBoolean(true) # really, this is arbitrary + end + else + sz′ = sz - 1 + frequency_for("sz$(s)", [ + DistVar(0), # really, this is arbitrary + DistBoolean(true), # really, this is arbitrary + begin + typ = tb_gen_type(2, track_return) # TODO: what size to pass here? + e = tb_gen_expr(sz′, track_return) + DistAbs(typ, e) + end, + begin + e1 = tb_gen_expr(sz′, track_return) + e2 = tb_gen_expr(sz′, track_return) + DistApp(e1, e2) + end, + ]) + end + ) +end + +function tb_gen_type(sz::Integer, track_return) + track_return( + if sz == 0 + DistTBool() + else + sz′ = sz - 1 + @dice_ite if flip(register_weight!("tysz$(s)_ptbool")) + DistTBool() + else + ty1 = tb_gen_type(sz′, track_return) + ty2 = tb_gen_type(sz′, track_return) + DistTFun(ty1, ty2) + end + end + ) +end \ No newline at end of file From 3b2ab8841a7160f02bd7603ec3d5029d34d45956 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 20 Feb 2024 19:27:00 -0800 Subject: [PATCH 061/231] add stlc ae --- examples/qc/benchmarks/main.jl | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 1546e4ba..fbf537b1 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -13,13 +13,13 @@ include("benchmarks.jl") generation_params = STLCGenerationParams( param_vars_by_size=true, - size=1, - ty_size=1, + size=5, + ty_size=2, ) -loss_params = SamplingSTLCEntropy( - resampling_frequency=10, - samples_per_batch=1000, +loss_params = ApproxSTLCConstructorEntropy( ) +EPOCHS = 2000 +LEARNING_RATE = 0.03 # loss_params = MixedLossParams(Pair{SimpleLossParams{STLC}, Real}[ # ApproxSTLCConstructorEntropy() => 10, # MLELossParams( @@ -28,13 +28,12 @@ loss_params = SamplingSTLCEntropy( # ) => 1, # ]) -generation_params = BSTGenerationParams(size=5, dummy_vals=true) -loss_params = SamplingBSTEntropy(resampling_frequency=20, samples_per_batch=10000) +# generation_params = BSTGenerationParams(size=5, dummy_vals=true) +# loss_params = SamplingBSTEntropy(resampling_frequency=5, samples_per_batch=300) +# EPOCHS = 10000 +# LEARNING_RATE = 0.003 -EPOCHS = 1000 -LEARNING_RATE = 3.0 - -TAG = "v06" +TAG = "v07_loss_div_by_spb" LOG_TO_FILE = true From 0a92e7a3b6db1f45576f5a07e39540fa5f713d37 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 20 Feb 2024 21:05:48 -0800 Subject: [PATCH 062/231] fix stlc format --- examples/qc/benchmarks/format.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/qc/benchmarks/format.jl b/examples/qc/benchmarks/format.jl index da268529..cbba9274 100644 --- a/examples/qc/benchmarks/format.jl +++ b/examples/qc/benchmarks/format.jl @@ -11,7 +11,7 @@ println("""genType get [ (1, ($(w("tysz1_gen_type_tbool")), 1000-$(w("tysz1_gen_type_tbool")))); - (2, ($(w("tysz2_gen_type_tbool")), 2000-$(w("tysz2_gen_type_tbool")))) + (2, ($(w("tysz2_gen_type_tbool")), 1000-$(w("tysz2_gen_type_tbool")))) ] Fixpoint genExpr env tau (sz: nat) : G (option Expr) := From 532cca0c801d2a04710139f66eeaa3be7236dd05 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 20 Feb 2024 22:00:16 -0800 Subject: [PATCH 063/231] format bespoke stlc --- examples/qc/benchmarks/format.jl | 34 -- examples/qc/benchmarks/format_bespoke_stlc.jl | 293 ++++++++++++++++++ 2 files changed, 293 insertions(+), 34 deletions(-) delete mode 100644 examples/qc/benchmarks/format.jl create mode 100644 examples/qc/benchmarks/format_bespoke_stlc.jl diff --git a/examples/qc/benchmarks/format.jl b/examples/qc/benchmarks/format.jl deleted file mode 100644 index cbba9274..00000000 --- a/examples/qc/benchmarks/format.jl +++ /dev/null @@ -1,34 +0,0 @@ -adnodes_of_interest = - -Dict("tysz2_gen_type_tbool" => 0.7207727519197863, "sz4_succ_var" => 0.4903234929252827, "tysz1_gen_type_tbool" => 0.5079797882722665, "sz0_zero_pr_var2" => 0.5, "sz2_succ_app" => 0.08352877939489839, "sz4_succ_abs" => 0.7066063985105583, "sz5_succ_var" => 0.5, "sz5_succ_abs" => 0.41721675684910503, "sz2_succ_var" => 0.5435857870063115, "sz1_succ_var" => 0.5460302801221573, "sz1_succ_app" => 0.1617094113296376, "sz1_succ_abs" => 0.6925946397620913, "sz3_succ_abs" => 0.7633559861209368, "sz3_succ_app" => 0.06947521647387661, "sz5_succ_app" => 0.5711467012997115, "sz4_succ_app" => 0.19063677116251065, "sz2_succ_abs" => 0.7423080357841665, "sz3_succ_var" => 0.5151953122355372) -@assert issetequal(keys(adnodes_of_interest), ["sz1_succ_abs", "tysz2_gen_type_tbool", "sz3_succ_abs", "sz4_succ_var", "sz3_succ_app", "sz5_succ_app", "tysz1_gen_type_tbool", "sz0_zero_pr_var2", "sz2_succ_app", "sz4_succ_abs", "sz5_succ_var", "sz4_succ_app", "sz2_succ_abs", "sz5_succ_abs", "sz3_succ_var", "sz2_succ_var", "sz1_succ_var", "sz1_succ_app"]) - -thousandths(n) = Integer(round(n, digits=3) * 1000) -w(s) = thousandths(adnodes_of_interest[s]) - -println("""genType - let '(boolWeight, funWeight) := - get - [ - (1, ($(w("tysz1_gen_type_tbool")), 1000-$(w("tysz1_gen_type_tbool")))); - (2, ($(w("tysz2_gen_type_tbool")), 1000-$(w("tysz2_gen_type_tbool")))) - ] - -Fixpoint genExpr env tau (sz: nat) : G (option Expr) := - match sz with - | 0 => - let '(var_weight, zero_weight) := ($(w("sz0_zero_pr_var2")), 1000-$(w("sz0_zero_pr_var2"))) in - backtrack - [(var_weight, oneOf_ (ret None) (map (fun x => returnGen (Some (Var x))) (genVar' env tau 0 []))) - ;(zero_weight, genZero env tau)] - | S sz' => - let '(val_weight, app_weight, var_weight) := - get - [ - (1, ($(w("sz1_succ_abs")), $(w("sz1_succ_app")), $(w("sz1_succ_var")))); - (2, ($(w("sz2_succ_abs")), $(w("sz2_succ_app")), $(w("sz2_succ_var")))); - (3, ($(w("sz3_succ_abs")), $(w("sz3_succ_app")), $(w("sz3_succ_var")))); - (4, ($(w("sz4_succ_abs")), $(w("sz4_succ_app")), $(w("sz4_succ_var")))); - (5, ($(w("sz5_succ_abs")), $(w("sz5_succ_app")), $(w("sz5_succ_var")))) - ] -""") \ No newline at end of file diff --git a/examples/qc/benchmarks/format_bespoke_stlc.jl b/examples/qc/benchmarks/format_bespoke_stlc.jl new file mode 100644 index 00000000..557abf5d --- /dev/null +++ b/examples/qc/benchmarks/format_bespoke_stlc.jl @@ -0,0 +1,293 @@ +gen_to_adnodes_of_interest = Dict( + "W95_996_301_18_834_309_92Generator" => Dict{String, BigFloat}("tysz2_gen_type_tbool" => 0.9958860803834127581051798938551650402115284572008501804626740585442483264202683, "sz4_succ_var" => 0.5555135325826616876316829360539587311191383704357987682846567263119579498738498, "tysz1_gen_type_tbool" => 0.09521566167786227494703411688322314784521063687830728594787150178721132797032849, "sz0_zero_pr_var2" => 0.0687824377005745605607470735156207658872527409814467725025579728430270394444093, "sz2_succ_app" => 0.8278724576109117787246287871734912294251601472850537162286103361725250721408978, "sz4_succ_abs" => 0.3089005603911179785894971195614337115905026675150993991755571798932813518939221, "sz5_succ_var" => 0.5, "sz5_succ_abs" => 0.09240567375296773724251537845777818317289268263681539077022341985889458410328009, "sz2_succ_var" => 0.4629304115476302193408958980191130280350926767463319529650789792104391906327555, "sz1_succ_var" => 0.4189884820891497554413093111257656908271650448118762763984949205006515636272106, "sz1_succ_app" => 0.7028090439771752923143759607732418634618908287349296358317585240601663256212681, "sz1_succ_abs" => 0.300708665093580655296213140014473371494141827354513478876184406113679575172175, "sz3_succ_abs" => 0.8340466699407043515706136082425579210124096779460303058803963621511431869599463, "sz3_succ_app" => 0.06625733909610343061443835163605843772662998696847251842717139126879442614165382, "sz5_succ_app" => 0.7577063625047924641130832774155242967977919250538905987595813899869365994625273, "sz4_succ_app" => 0.6090613946482099584511599789979600158859488485459069513842262120756237096072077, "sz2_succ_abs" => 0.01846613009931596555302268641310159724057274188774880335653997283289146685775442, "sz3_succ_var" => 0.2301705815163302533709959537913487485267179537638742849599692474544065870654975), +) + +OUT_DIR = "out" +mkpath(OUT_DIR) + +function main() + for (g, d) in gen_to_adnodes_of_interest + path = joinpath(OUT_DIR, "$(g).v") + if isfile(path) + println("Error: file already exists at the following path:") + println(path) + else + f = open(path, "w") + println(f, format_bespoke_stlc(d)) + close(f) + end + end +end + +thousandths(n) = Integer(round(n, digits=3) * 1000) + +function format_bespoke_stlc(adnodes_of_interest) + @assert issetequal(keys(adnodes_of_interest), ["sz1_succ_abs", "tysz2_gen_type_tbool", "sz3_succ_abs", "sz4_succ_var", "sz3_succ_app", "sz5_succ_app", "tysz1_gen_type_tbool", "sz0_zero_pr_var2", "sz2_succ_app", "sz4_succ_abs", "sz5_succ_var", "sz4_succ_app", "sz2_succ_abs", "sz5_succ_abs", "sz3_succ_var", "sz2_succ_var", "sz1_succ_var", "sz1_succ_app"]) + w(s) = thousandths(adnodes_of_interest[s]) + """ +From QuickChick Require Import QuickChick. Import QcNotation. +From Coq Require Import Bool ZArith List. Import ListNotations. +From ExtLib Require Import Monad. +From ExtLib.Data.Monads Require Import OptionMonad. +Import MonadNotation. + +From STLC Require Import Impl Spec. + +Derive (Arbitrary) for Typ. +Derive (Arbitrary) for Expr. + +Inductive bind : Ctx -> nat -> Typ -> Prop := +| BindNow : forall tau env, bind (tau :: env) 0 tau +| BindLater : forall tau tau' x env, + bind env x tau -> bind (tau' :: env) (S x) tau. + +Inductive typing (G : Ctx) : Expr -> Typ -> Prop := +| TyVar : + forall x T, + bind G x T -> + typing G (Var x) T +| TyBool : + forall b, + typing G (Bool b) TBool +| TyAbs : + forall e T1 T2, + typing (T1 :: G) e T2 -> + typing G (Abs T1 e) (TFun T1 T2) +| TyApp : + forall e1 e2 T1 T2, + typing G e1 (TFun T1 T2) -> + typing G e2 T1 -> + typing G (App e1 e2) T2. + + +(* Look up in list of backtrack weights *) +Fixpoint get {a: Type} (l : list (nat * a)) (target_key : nat) (default : a): a := + match l with + | [] => + (* This branch should never return *) + default + | (key, value) :: l' => + if Nat.eqb key target_key then + value + else get l' target_key default + end. + + +#[export] Instance dec_type (t1 t2 : Typ) : Dec (t1 = t2). +Proof. dec_eq. Defined. +Derive Arbitrary for Typ. + +Fixpoint genVar' (ctx: Ctx) (t: Typ) (p: nat) (r: list nat) : list nat := + match ctx with + | nil => r + | t'::ctx' => + if t = t'? then genVar' ctx' t (p + 1) (p :: r) + else genVar' ctx' t (p + 1) r + end. + +Fixpoint genZero env tau : G (option Expr) := + match tau with + | TBool => + bindGen arbitrary + (fun b : bool => + returnGen (Some (Bool b))) + | TFun T1 T2 => + bindOpt + (genZero (T1 :: env) T2) + (fun e : Expr => + returnGen (Some (Abs T1 e))) + end. + +Fixpoint genTyp (s: nat) : G Typ := + match s with + | 0 => ret TBool + | S s' => + let '(boolWeight, funWeight) := + get + [ + (1, ($(w("tysz1_gen_type_tbool")), 1000-$(w("tysz1_gen_type_tbool")))); + (2, ($(w("tysz2_gen_type_tbool")), 1000-$(w("tysz2_gen_type_tbool")))) + ] + s + (0, 0) in + freq [ + (boolWeight, ret (TBool)) + ; + (funWeight, + t1 <- genTyp s';; + t2 <- genTyp s';; + ret (TFun t1 t2)) + ] + end. + +Fixpoint genExpr env tau (sz: nat) : G (option Expr) := + match sz with + | 0 => + let '(var_weight, zero_weight) := ($(w("sz0_zero_pr_var2")), 1000-$(w("sz0_zero_pr_var2"))) in + backtrack + [(var_weight, oneOf_ (ret None) (map (fun x => returnGen (Some (Var x))) (genVar' env tau 0 []))) + ;(zero_weight, genZero env tau)] + | S sz' => + let '(val_weight, app_weight, var_weight) := + get + [ + (1, ($(w("sz1_succ_abs")), $(w("sz1_succ_app")), $(w("sz1_succ_var")))); + (2, ($(w("sz2_succ_abs")), $(w("sz2_succ_app")), $(w("sz2_succ_var")))); + (3, ($(w("sz3_succ_abs")), $(w("sz3_succ_app")), $(w("sz3_succ_var")))); + (4, ($(w("sz4_succ_abs")), $(w("sz4_succ_app")), $(w("sz4_succ_var")))); + (5, ($(w("sz5_succ_abs")), $(w("sz5_succ_app")), $(w("sz5_succ_var")))) + ] + sz + (0, 0 ,0) in + backtrack + [(var_weight, oneOf_ (ret None) (map (fun x => returnGen (Some (Var x))) (genVar' env tau 0 []))) + ; + (app_weight, + bindGen (genTyp 2) + (fun T1 : Typ => + bindOpt + (genExpr env (TFun T1 tau) sz') + (fun e1 : Expr => + bindOpt + (genExpr env T1 sz') + (fun e2 : Expr => + returnGen (Some (App e1 e2)))))) + ; + (val_weight, + match tau with + | TBool => + bindGen arbitrary + (fun b : bool => + returnGen (Some (Bool b))) + | TFun T1 T2 => + bindOpt + (genExpr (T1 :: env) T2 sz') + (fun e : Expr => + returnGen (Some (Abs T1 e))) + end)] + end. + +Definition gSized := + typ <- arbitrary ;; + genExpr [] typ 5. + + +Definition test_prop_SinglePreserve := + forAllMaybe gSized (fun (e: Expr) => + prop_SinglePreserve e). + +(*! QuickChick test_prop_SinglePreserve. *) + +Definition test_prop_MultiPreserve := + forAllMaybe gSized (fun (e: Expr) => + prop_MultiPreserve e). + +(*! QuickChick test_prop_MultiPreserve. *) + +(* +Derive (Arbitrary) for Typ. + + +(* Fixpoint genTyp (s: nat) : G Typ := + match s with + | 0 => ret TBool + | S s' => oneOf [ + t1 <- genTyp s' ;; + t2 <- genTyp s' ;; + ret (TFun t1 t2) ; + ret TBool + ] + end. + *) + +(* #[export] Instance genArbitrary : GenSized Typ := +{| + arbitrarySized x := genTyp x +|}. *) + +Definition genTyp (s: nat) : G Typ := arbitrary. + +Fixpoint genOne (ctx: Ctx) (t: Typ) : G Expr := + match t with + | TBool => + b <- arbitrary ;; + ret (Bool b) + | TFun t1 t2 => + t' <- genOne (t1 :: ctx) t2 ;; + ret (Abs t1 t') + end. + + +Fixpoint genVar' (ctx: Ctx) (t: Typ) (p: nat) (r: list nat) : list nat := + match ctx with + | nil => r + | t'::ctx' => if t == t' then genVar' ctx' t (p + 1) (p :: r) + else genVar' ctx' t (p + 1) r + end. + + +Definition genVar (ctx: Ctx) (t: Typ) : list (G Expr) := + let positions := genVar' ctx t 0 [] in + let tf := (fun n => ret (Var n)) in + map tf positions. + + +Fixpoint genExactExpr (f: nat) (ctx: Ctx) (t: Typ) : G Expr := + match f with + | O => oneOf_ (genOne ctx t) (genOne ctx t :: genVar ctx t) + | S f' => + let abs : list (G Expr) := match t with + | TFun t1 t2 => + [bindGen (genExactExpr f' (t1 :: ctx) t2) (fun t' => + returnGen (Abs t1 t'))] + | _ => nil + end in + let one := genOne ctx t in + let app := + t' <- genTyp f' ;; + e1 <- genExactExpr f' ctx (TFun t' t) ;; + e2 <- genExactExpr f' ctx t' ;; + ret (App e1 e2) in + let var := genVar ctx t in + + oneOf_ one ([one] ++ abs ++ [app] ++ var) + end. + + + + + +Definition genExpr (s: nat) : G Expr := + t <- genTyp 3 ;; + genExactExpr s [] t +. + +#[export] Instance arbitrarySizedExpr : GenSized Expr := +{| + arbitrarySized s := genExpr s +|}. + +Definition gTyped := genExpr 5. + +Definition test_prop_SinglePreserve := + forAll gTyped (fun (e: Expr) => + prop_SinglePreserve e). + +(* QuickChick test_prop_SinglePreserve. *) + +Definition test_prop_MultiPreserve := + forAll gTyped (fun (e: Expr) => + prop_MultiPreserve e). + +(* QuickChick test_prop_MultiPreserve. *) + + + + + + +*) +""" +end + +main() \ No newline at end of file From f0ec4124da669c0c7a89a162e39909d536486945 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 20 Feb 2024 23:16:20 -0800 Subject: [PATCH 064/231] add stlc type-based generator --- examples/qc/benchmarks/benchmarks.jl | 67 +++++++++++++++----- examples/qc/benchmarks/dump_loss_graph.jl | 8 ++- examples/qc/benchmarks/lib/stlc/dist.jl | 4 +- examples/qc/benchmarks/lib/stlc/generator.jl | 40 ++++++------ examples/qc/benchmarks/lib/util.jl | 24 +++---- examples/qc/benchmarks/main.jl | 13 ++-- 6 files changed, 95 insertions(+), 61 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index b18aa803..fe9572a4 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -11,7 +11,8 @@ abstract type Generation{T} end struct BenchmarkMgr emit_stats::Function # tag::String -> () - train!::Function # epochs::Integer -> learning_rate::Real -> learning_curve::Vector{<:Real} + # train!::Function # epochs::Integer -> learning_rate::Real -> learning_curve::Vector{<:Real} + loss_mgr end function create_benchmark_manager( @@ -36,7 +37,7 @@ function create_benchmark_manager( loss_mgr.emit_stats(s) end - BenchmarkMgr(emit_stats, loss_mgr.train!) + BenchmarkMgr(emit_stats, loss_mgr) end struct LossMgrImpl <: LossMgr @@ -133,25 +134,38 @@ end ################################## abstract type STLC <: Benchmark end +struct STLCGeneration <: Generation{STLC} + e::DistI{Opt{DistI{Expr}}} + constructors_overapproximation::Vector{DistI{Opt{DistI{Expr}}}} +end +function generation_emit_stats(g::STLCGeneration, io::IO, out_dir::String, s::String, var_vals::Valuation) + println_flush(io, "Saving samples...") + time_sample = @elapsed with_concrete_ad_flips(var_vals, g.e) do + save_samples(joinpath(out_dir, "terms_$(s).txt"), g.e; io=io) + end + println(io, " $(time_sample) seconds") + println(io) +end + +################################## +# Bespoke STLC generator +################################## -struct STLCGenerationParams <: GenerationParams{STLC} +struct BespokeSTLCGenerator <: GenerationParams{STLC} param_vars_by_size::Bool size::Integer ty_size::Integer - STLCGenerationParams(;param_vars_by_size, size, ty_size) = new(param_vars_by_size, size, ty_size) + BespokeSTLCGenerator(;param_vars_by_size, size, ty_size) = new(param_vars_by_size, size, ty_size) end -struct STLCGeneration <: Generation{STLC} - e::DistI{Opt{DistI{Expr}}} - constructors_overapproximation::Vector{DistI{Opt{DistI{Expr}}}} -end -function to_subpath(p::STLCGenerationParams) +function to_subpath(p::BespokeSTLCGenerator) [ "stlc", + "bespoke", if p.param_vars_by_size "by_sz" else "not_by_sz" end, "sz=$(p.size),tysz=$(p.ty_size)", ] end -function generate(p::STLCGenerationParams) +function generate(p::BespokeSTLCGenerator) constructors_overapproximation = [] function add_ctor(v::DistI{Opt{DistI{Expr}}}) push!(constructors_overapproximation, v) @@ -168,13 +182,34 @@ function generate(p::STLCGenerationParams) STLCGeneration(e, constructors_overapproximation) end -function generation_emit_stats(g::STLCGeneration, io::IO, out_dir::String, s::String, var_vals::Valuation) - println_flush(io, "Saving samples...") - time_sample = @elapsed with_concrete_ad_flips(var_vals, g.e) do - save_samples(joinpath(out_dir, "terms_$(s).txt"), g.e; io=io) +################################## +# Type-based STLC generator +################################## + +struct TypeBasedSTLCGenerator <: GenerationParams{STLC} + size::Integer + ty_size::Integer + TypeBasedSTLCGenerator(; size, ty_size) = new(size, ty_size) +end +function to_subpath(p::TypeBasedSTLCGenerator) + [ + "stlc", + "typebased", + "sz=$(p.size),tysz=$(p.ty_size)", + ] +end +function generate(p::TypeBasedSTLCGenerator) + constructors_overapproximation = [] + function add_ctor(v::DistI{Expr}) + push!(constructors_overapproximation, DistSome(v)) + v end - println(io, " $(time_sample) seconds") - println(io) + e = tb_gen_expr( + p.size, + p.ty_size, + add_ctor, + ) + STLCGeneration(DistSome(e), constructors_overapproximation) end ################################## diff --git a/examples/qc/benchmarks/dump_loss_graph.jl b/examples/qc/benchmarks/dump_loss_graph.jl index b28bb0b5..d40cf648 100644 --- a/examples/qc/benchmarks/dump_loss_graph.jl +++ b/examples/qc/benchmarks/dump_loss_graph.jl @@ -3,7 +3,11 @@ bool_roots = Dice.bool_roots LogPrExpander = Dice.LogPrExpander expand_logprs = Dice.expand_logprs -to_graph + +@assert mgr.loss_mgr isa SimpleLossMgr + +loss = mgr.loss_mgr.loss + l = LogPrExpander(WMC(BDDCompiler(bool_roots([loss])))) eloss = expand_logprs(l, loss) @@ -30,7 +34,7 @@ function dump_graph(path, node) open(path, "w") do file println(file, "digraph G {") for (i, n) in enumerate(nodes) - if n isa Var + if n isa Var || n isa LogPr println(file, " $(i) [fillcolor=lightcyan, style=filled];") end println(file, " $(i) [label=\"$(node_to_label(n))\"];") diff --git a/examples/qc/benchmarks/lib/stlc/dist.jl b/examples/qc/benchmarks/lib/stlc/dist.jl index faf291c1..dac9d88b 100644 --- a/examples/qc/benchmarks/lib/stlc/dist.jl +++ b/examples/qc/benchmarks/lib/stlc/dist.jl @@ -110,7 +110,9 @@ end function var_str(i) i += 1 # 1-idx vars = ["x", "y", "z", "w"] - if i <= length(vars) + if i <= 0 + "badvar_$(i)" + elseif i <= length(vars) vars[i] else string('a' + i - length(vars) - 1) diff --git a/examples/qc/benchmarks/lib/stlc/generator.jl b/examples/qc/benchmarks/lib/stlc/generator.jl index a261e2ef..0c661676 100644 --- a/examples/qc/benchmarks/lib/stlc/generator.jl +++ b/examples/qc/benchmarks/lib/stlc/generator.jl @@ -92,27 +92,27 @@ function gen_expr(env::Ctx, tau::DistI{Typ}, sz::Integer, gen_typ_sz::Integer, b ) end -function tb_gen_expr(sz::Integer, track_return) +function tb_gen_expr(sz::Integer, ty_sz, track_return) track_return( if sz == 0 - @dice_ite if flip(register_weight!("sz$(s)_pvar")) - DistVar(0) # really, this is arbitrary + @dice_ite if flip(register_weight!("sz$(sz)_pvar")) + DistVar(DistNat(0)) # really, this is arbitrary else DistBoolean(true) # really, this is arbitrary end else sz′ = sz - 1 - frequency_for("sz$(s)", [ - DistVar(0), # really, this is arbitrary + frequency_for("sz$(sz)_freq", [ + DistVar(DistNat(0)), # really, this is arbitrary DistBoolean(true), # really, this is arbitrary begin - typ = tb_gen_type(2, track_return) # TODO: what size to pass here? - e = tb_gen_expr(sz′, track_return) + typ = tb_gen_type(ty_sz) # TODO + e = tb_gen_expr(sz′, ty_sz, track_return) DistAbs(typ, e) end, begin - e1 = tb_gen_expr(sz′, track_return) - e2 = tb_gen_expr(sz′, track_return) + e1 = tb_gen_expr(sz′, ty_sz, track_return) + e2 = tb_gen_expr(sz′, ty_sz, track_return) DistApp(e1, e2) end, ]) @@ -120,19 +120,17 @@ function tb_gen_expr(sz::Integer, track_return) ) end -function tb_gen_type(sz::Integer, track_return) - track_return( - if sz == 0 +function tb_gen_type(sz::Integer) + if sz == 0 + DistTBool() + else + sz′ = sz - 1 + @dice_ite if flip(register_weight!("tysz$(sz)_ptbool")) DistTBool() else - sz′ = sz - 1 - @dice_ite if flip(register_weight!("tysz$(s)_ptbool")) - DistTBool() - else - ty1 = tb_gen_type(sz′, track_return) - ty2 = tb_gen_type(sz′, track_return) - DistTFun(ty1, ty2) - end + ty1 = tb_gen_type(sz′) + ty2 = tb_gen_type(sz′) + DistTFun(ty1, ty2) end - ) + end end \ No newline at end of file diff --git a/examples/qc/benchmarks/lib/util.jl b/examples/qc/benchmarks/lib/util.jl index c22223e4..752a7951 100644 --- a/examples/qc/benchmarks/lib/util.jl +++ b/examples/qc/benchmarks/lib/util.jl @@ -74,24 +74,18 @@ function map(::Type{RetT}) where RetT end function frequency_for(name, xs) - # Hand-build shuffle for lengths 2 and 3 - @dice_ite if length(xs) == 2 - if flip_for("$(name)_var_") - xs[1] - else - xs[2] - end - elseif length(xs) == 3 - if flip_for("$(name)_var", 1/3) - xs[1] - elseif flip_for("$(name)_app") - xs[2] + weights = [register_weight!("$(name)_$(i)") for i in 1:length(xs)] + res = last(xs) + weight_sum = last(weights) + for i in length(xs) - 1 : -1 : 1 + weight_sum += weights[i] + res = @dice_ite if flip(weights[i] / weight_sum) + xs[i] else - xs[3] + res end - else - error("todo: generic frequency_for") end + res end function opt_stlc_str(ast) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index fbf537b1..f3ff333c 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -11,13 +11,11 @@ include("benchmarks.jl") # Config ############################ -generation_params = STLCGenerationParams( - param_vars_by_size=true, +generation_params = TypeBasedSTLCGenerator( size=5, ty_size=2, ) -loss_params = ApproxSTLCConstructorEntropy( -) +loss_params = ApproxSTLCConstructorEntropy() EPOCHS = 2000 LEARNING_RATE = 0.03 # loss_params = MixedLossParams(Pair{SimpleLossParams{STLC}, Real}[ @@ -33,7 +31,7 @@ LEARNING_RATE = 0.03 # EPOCHS = 10000 # LEARNING_RATE = 0.003 -TAG = "v07_loss_div_by_spb" +TAG = "v8" LOG_TO_FILE = true @@ -90,6 +88,7 @@ function register_weight!(s) else println(io, "WARNING: not registering fresh weight for $(s)") end + # var_vals[var] = inverse_sigmoid(rand()) weight = sigmoid(var) adnodes_of_interest[s] = weight weight @@ -102,7 +101,7 @@ vals = compute(var_vals, values(adnodes_of_interest)) showln(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) mgr.emit_stats("initial") -mgr.train!(epochs=EPOCHS, learning_rate=LEARNING_RATE) +mgr.loss_mgr.train!(epochs=EPOCHS, learning_rate=LEARNING_RATE) println_flush(io, "ADNodes of interest (trained):") @@ -114,3 +113,5 @@ mgr.emit_stats("trained") t′ = now() println(io, t′) println(io, "Total time elapsed: $(canonicalize(t′ - t))") + +include("dump_loss_graph.jl") \ No newline at end of file From 5fe9ecefb6dca41ec0158be419e8af731a084dcb Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 20 Feb 2024 23:19:08 -0800 Subject: [PATCH 065/231] add qcbench.sh --- qcbench.sh | 1 + 1 file changed, 1 insertion(+) create mode 100755 qcbench.sh diff --git a/qcbench.sh b/qcbench.sh new file mode 100755 index 00000000..e133534f --- /dev/null +++ b/qcbench.sh @@ -0,0 +1 @@ +julia --project examples/qc/benchmarks/main.jl $@ \ No newline at end of file From 7ebcbcd512daace9b0ed0ecc00d22748bed7830f Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 21 Feb 2024 11:48:39 -0800 Subject: [PATCH 066/231] add unif_half2 --- src/dist/number/uint.jl | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/dist/number/uint.jl b/src/dist/number/uint.jl index bdfbe406..d379fc5a 100644 --- a/src/dist/number/uint.jl +++ b/src/dist/number/uint.jl @@ -1,6 +1,6 @@ export DistUInt, DistUInt8, DistUInt16, DistUInt32, DistUInt64, uniform, uniform_arith, uniform_ite, triangle, discrete, unif, unif_obs, - flip_reciprocal + flip_reciprocal, unif2, unif_half2 ################################## # types, structs, and constructors @@ -417,6 +417,28 @@ function unif(lo::DistUInt{W}, hi::DistUInt{W}) where W lo + unif_half(hi + DistUInt32(1) - lo) end +# Uniform from lo to hi, inclusive +function unif2(lo::DistUInt{W}, hi::DistUInt{W}) where W + lo + unif_half2(hi + DistUInt32(1) - lo) +end + +# Uniform from 0 to hi, exclusive +function unif_half2(u::DistUInt{W}) where W + res = nothing + for x in support_mixed(u) + res = if res === nothing + uniform(DistUInt{W}, 0, x) + else + @dice_ite if prob_equals(u, DistUInt32(x)) + uniform(DistUInt{W}, 0, x) + else + res + end + end + end + res +end + flip_reciprocal(x) = prob_equals(DistUInt32(0), unif_half(x)) # (x, evid) where x is uniform from lo to hi, inclusive, given evid From 21e6d42b7628107faf98004556b77edb0fb897bc Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 27 Feb 2024 21:07:32 -0800 Subject: [PATCH 067/231] add unif3, unif2 --- examples/qc/benchmarks/benchmarks.jl | 32 ++++++++++++++------- examples/qc/benchmarks/lib/bst/generator.jl | 13 ++++++--- examples/qc/benchmarks/main.jl | 12 ++++---- src/dist/number/uint.jl | 14 +++++++-- 4 files changed, 49 insertions(+), 22 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index fe9572a4..c915c932 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -309,10 +309,23 @@ end abstract type BST <: Benchmark end +@enum BSTValues BSTActualVals BSTDummyVals BSTApproxVals +function str(x::BSTValues) + if x == BSTActualVals + "actual" + elseif x == BSTDummyVals + "dummy" + elseif x == BSTApproxVals + "approx" + else + error("") + end +end + struct BSTGenerationParams <: GenerationParams{BST} size::Integer - dummy_vals::Bool - BSTGenerationParams(; size, dummy_vals) = new(size, dummy_vals) + vals::BSTValues + BSTGenerationParams(; size, vals) = new(size, vals) end struct BSTGeneration <: Generation{BST} t::DistI{Tree} @@ -321,7 +334,7 @@ end function to_subpath(p::BSTGenerationParams) [ "bst", - if p.dummy_vals "dummy_vals" else "actual_vals" end, + str(p.vals), "sz=$(p.size)", ] end @@ -331,15 +344,14 @@ function generate(p::BSTGenerationParams) push!(constructors_overapproximation, v) v end - t = if p.dummy_vals + t = if p.vals == BSTDummyVals gen_tree_dummy_vals(p.size, add_ctor) + elseif p.vals == BSTApproxVals + gen_tree(p.size, DistNat(0), DistNat(40), true, add_ctor) + elseif p.vals == BSTActualVals + gen_tree(p.size, DistNat(0), DistNat(40), false, add_ctor) else - gen_tree( - p.size, - DistNat(0), - DistNat(40), - add_ctor, - ) + error() end BSTGeneration(t, constructors_overapproximation) diff --git a/examples/qc/benchmarks/lib/bst/generator.jl b/examples/qc/benchmarks/lib/bst/generator.jl index 259ab207..4677fa11 100644 --- a/examples/qc/benchmarks/lib/bst/generator.jl +++ b/examples/qc/benchmarks/lib/bst/generator.jl @@ -1,5 +1,6 @@ +safedec(x::DistUInt{T}) where T = @dice_ite if prob_equals(x, DistUInt{T}(0)) DistUInt{T}(0) else x - DistUInt{T}(1) end -function gen_tree(s::Integer, lo::DistNat, hi::DistNat, track_return) +function gen_tree(s::Integer, lo::DistNat, hi::DistNat, approx_unif::Bool, track_return) track_return( @dice_ite if s == 0 || hi - lo < DistNat(2) DistE() @@ -8,10 +9,14 @@ function gen_tree(s::Integer, lo::DistNat, hi::DistNat, track_return) if flip(register_weight!("sz$(s)")) DistE() else - k = unif(lo + DistNat(1), hi - DistNat(1)) + k = if approx_unif + unif_approx(lo + DistNat(1), safedec(hi)) + else + unif(lo + DistNat(1), safedec(hi)) + end v = DistNat(0) # arbitrary - l = gen_tree(s′, lo, k, track_return) - r = gen_tree(s′, k, hi, track_return) + l = gen_tree(s′, lo, k, approx_unif, track_return) + r = gen_tree(s′, k, hi, approx_unif, track_return) DistT(l, k, v, r) end end diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index f3ff333c..8aba0b1d 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -11,13 +11,13 @@ include("benchmarks.jl") # Config ############################ -generation_params = TypeBasedSTLCGenerator( - size=5, - ty_size=2, +generation_params = BSTGenerationParams( + size=3, + vals=BSTActualVals, ) -loss_params = ApproxSTLCConstructorEntropy() +loss_params = ApproxBSTConstructorEntropy() EPOCHS = 2000 -LEARNING_RATE = 0.03 +LEARNING_RATE = 0.01 # loss_params = MixedLossParams(Pair{SimpleLossParams{STLC}, Real}[ # ApproxSTLCConstructorEntropy() => 10, # MLELossParams( @@ -31,7 +31,7 @@ LEARNING_RATE = 0.03 # EPOCHS = 10000 # LEARNING_RATE = 0.003 -TAG = "v8" +TAG = "v9_unif2" LOG_TO_FILE = true diff --git a/src/dist/number/uint.jl b/src/dist/number/uint.jl index d379fc5a..1c6795cb 100644 --- a/src/dist/number/uint.jl +++ b/src/dist/number/uint.jl @@ -1,6 +1,6 @@ export DistUInt, DistUInt8, DistUInt16, DistUInt32, DistUInt64, uniform, uniform_arith, uniform_ite, triangle, discrete, unif, unif_obs, - flip_reciprocal, unif2, unif_half2 + flip_reciprocal, unif2, unif_half2, unif_approx, unif_half_approx, unif_half ################################## # types, structs, and constructors @@ -61,7 +61,7 @@ end "Construct a uniform random number by offsetting a 0-based uniform" function uniform_arith(::Type{DistUInt{W}}, start, stop) where W - @assert 0 <= start < stop <= 2 ^ W # don't make this BigInt or the dynamo will fail + @assert 0 <= start < stop <= 2 ^ W "$(start) $(stop)" # don't make this BigInt or the dynamo will fail DInt = DistUInt{W} if start > 0 DInt(start) + uniform_arith(DInt, 0, stop-start) @@ -412,6 +412,13 @@ function minvalue(x::DistUInt{W}) where W v end +function unif_approx(lo::DistUInt{W}, hi::DistUInt{W}) where W + lo + unif_half_approx(hi + DistUInt32(1) - lo) +end +function unif_half_approx(u::DistUInt{W}) where W + uniform(DistUInt{W}) % u +end + # Uniform from lo to hi, inclusive function unif(lo::DistUInt{W}, hi::DistUInt{W}) where W lo + unif_half(hi + DistUInt32(1) - lo) @@ -426,6 +433,9 @@ end function unif_half2(u::DistUInt{W}) where W res = nothing for x in support_mixed(u) + if x == 0 + continue + end res = if res === nothing uniform(DistUInt{W}, 0, x) else From e934f72767318de28b7b174e79b4855a085d7559 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 27 Feb 2024 23:52:03 -0800 Subject: [PATCH 068/231] add type-based bst generator --- examples/qc/benchmarks/benchmarks.jl | 48 +++++++++++++++++---- examples/qc/benchmarks/lib/bst/generator.jl | 19 ++++++++ examples/qc/benchmarks/main.jl | 5 +-- 3 files changed, 59 insertions(+), 13 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index c915c932..e5e9a04e 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -308,6 +308,16 @@ end ################################## abstract type BST <: Benchmark end +struct BSTGeneration <: Generation{BST} + t::DistI{Tree} + constructors_overapproximation::Vector{DistI{Tree}} +end +function generation_emit_stats(g::BSTGeneration, io::IO, out_dir::String, s::String, var_vals::Valuation) +end + +################################## +# Bespoke BST generator +################################## @enum BSTValues BSTActualVals BSTDummyVals BSTApproxVals function str(x::BSTValues) @@ -322,23 +332,20 @@ function str(x::BSTValues) end end -struct BSTGenerationParams <: GenerationParams{BST} +struct BespokeBSTGenerator <: GenerationParams{BST} size::Integer vals::BSTValues - BSTGenerationParams(; size, vals) = new(size, vals) + BespokeBSTGenerator(; size, vals) = new(size, vals) end -struct BSTGeneration <: Generation{BST} - t::DistI{Tree} - constructors_overapproximation::Vector{DistI{Tree}} -end -function to_subpath(p::BSTGenerationParams) +function to_subpath(p::BespokeBSTGenerator) [ "bst", + "bespoke", str(p.vals), "sz=$(p.size)", ] end -function generate(p::BSTGenerationParams) +function generate(p::BespokeBSTGenerator) constructors_overapproximation = [] function add_ctor(v::DistI{Tree}) push!(constructors_overapproximation, v) @@ -356,7 +363,30 @@ function generate(p::BSTGenerationParams) BSTGeneration(t, constructors_overapproximation) end -function generation_emit_stats(g::BSTGeneration, io::IO, out_dir::String, s::String, var_vals::Valuation) + +################################## +# Type-based BST generator +################################## + +struct TypeBasedBSTGenerator <: GenerationParams{BST} + size::Integer + TypeBasedBSTGenerator(; size) = new(size) +end +function to_subpath(p::TypeBasedBSTGenerator) + [ + "bst", + "typebased", + "sz=$(p.size)", + ] +end +function generate(p::TypeBasedBSTGenerator) + constructors_overapproximation = [] + function add_ctor(v::DistI{Tree}) + push!(constructors_overapproximation, v) + v + end + t = typebased_gen_tree(p.size, add_ctor) + BSTGeneration(t, constructors_overapproximation) end ################################## diff --git a/examples/qc/benchmarks/lib/bst/generator.jl b/examples/qc/benchmarks/lib/bst/generator.jl index 4677fa11..8de3c920 100644 --- a/examples/qc/benchmarks/lib/bst/generator.jl +++ b/examples/qc/benchmarks/lib/bst/generator.jl @@ -41,3 +41,22 @@ function gen_tree_dummy_vals(s::Integer, track_return) end ) end + + +function typebased_gen_tree(s::Integer, track_return) + track_return( + @dice_ite if s == 0 + DistE() + else + s′ = s - 1 + if flip(register_weight!("sz$(s)")) + DistE() + else + l = typebased_gen_tree(s′, track_return) + r = typebased_gen_tree(s′, track_return) + k = v = DistNat(0) # arbitrary + DistT(l, k, v, r) + end + end + ) +end diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 8aba0b1d..875f9d40 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -11,10 +11,7 @@ include("benchmarks.jl") # Config ############################ -generation_params = BSTGenerationParams( - size=3, - vals=BSTActualVals, -) +generation_params = TypeBasedBSTGenerator(size=2) loss_params = ApproxBSTConstructorEntropy() EPOCHS = 2000 LEARNING_RATE = 0.01 From 6589d0503ed3e06583dbb2325573799a02574f2a Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 28 Feb 2024 21:10:07 -0800 Subject: [PATCH 069/231] add tree size and output --- examples/qc/benchmarks/benchmarks.jl | 6 +++++- examples/qc/benchmarks/lib/bst/generator.jl | 7 +++++++ examples/qc/benchmarks/main.jl | 6 +++--- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index e5e9a04e..574b9971 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -473,7 +473,7 @@ struct MLELossParams{T} <: SimpleLossParams{T} MLELossParams(; metric::Metric{T}, target_dist) where T = new{T}(metric, target_dist) end to_subpath(p::MLELossParams) = [name(p.metric), name(p.target_dist)] -function create_loss_manager(p::MLELossParams{STLC}, io, out_dir, var_vals, generation::STLCGeneration) +function create_loss_manager(p::MLELossParams, io, out_dir, var_vals, generation) println_flush(io, "Building computation graph for $(p)...") time_build_loss = @elapsed begin metric = compute_metric(p.metric, generation) @@ -497,6 +497,10 @@ function create_loss_manager(p::MLELossParams{STLC}, io, out_dir, var_vals, gene SimpleLossMgr(f_emit′, mgr.train!, mgr.loss) end +struct TreeSize <: Metric{BST} end +compute_metric(::TreeSize, gen::BSTGeneration) = tree_size(gen.t) +name(::TreeSize) = "tree_size" + struct NumApps <: Metric{STLC} end compute_metric(::NumApps, gen::STLCGeneration) = num_apps(gen.e) name(::NumApps) = "num_apps" diff --git a/examples/qc/benchmarks/lib/bst/generator.jl b/examples/qc/benchmarks/lib/bst/generator.jl index 8de3c920..5916a160 100644 --- a/examples/qc/benchmarks/lib/bst/generator.jl +++ b/examples/qc/benchmarks/lib/bst/generator.jl @@ -60,3 +60,10 @@ function typebased_gen_tree(s::Integer, track_return) end ) end + +function tree_size(e::DistI{Tree}) + match(e, [ + "E" => () -> DistUInt32(0), + "T" => (l, k, v, r) -> DistUInt32(1) + tree_size(l) + tree_size(r), + ]) +end diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 875f9d40..d718d51e 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -11,9 +11,9 @@ include("benchmarks.jl") # Config ############################ -generation_params = TypeBasedBSTGenerator(size=2) -loss_params = ApproxBSTConstructorEntropy() -EPOCHS = 2000 +generation_params = TypeBasedBSTGenerator(size=5) +loss_params = MLELossParams(metric=TreeSize(), target_dist=Target4321()) +EPOCHS = 50000 LEARNING_RATE = 0.01 # loss_params = MixedLossParams(Pair{SimpleLossParams{STLC}, Real}[ # ApproxSTLCConstructorEntropy() => 10, From 9ef8e0a34533638ae9fe51e4df5114ac6f40a9b3 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 28 Feb 2024 22:02:27 -0800 Subject: [PATCH 070/231] RBT draft, gen bespoke stlc coq, outputs --- examples/qc/benchmarks/benchmarks.jl | 30 +++- examples/qc/benchmarks/format_bespoke_stlc.jl | 103 ----------- examples/qc/benchmarks/lib/lib.jl | 3 + examples/qc/benchmarks/lib/rbt/dist.jl | 33 ++++ examples/qc/benchmarks/lib/rbt/generator.jl | 60 +++++++ examples/qc/benchmarks/lib/stlc/to_coq.jl | 165 ++++++++++++++++++ examples/qc/benchmarks/lib/util.jl | 2 + examples/qc/benchmarks/main.jl | 6 +- 8 files changed, 294 insertions(+), 108 deletions(-) create mode 100644 examples/qc/benchmarks/lib/rbt/dist.jl create mode 100644 examples/qc/benchmarks/lib/rbt/generator.jl create mode 100644 examples/qc/benchmarks/lib/stlc/to_coq.jl diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 574b9971..7f0248a7 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -24,8 +24,8 @@ function create_benchmark_manager( ) where T println_flush(io, "Building generation computation graph...") time_build_generation = @elapsed generation = generate(generation_params) - println(io, " $(time_build_generation) seconds") - println(io) + println_flush(io, " $(time_build_generation) seconds") + println_flush(io) loss_mgr = create_loss_manager(loss_params, io, out_dir, var_vals, generation) @@ -35,11 +35,18 @@ function create_benchmark_manager( generation_emit_stats(generation, io, out_dir, s, var_vals) loss_mgr.emit_stats(s) + + generation_params_emit_stats(generation_params, io, out_dir, s, var_vals) end BenchmarkMgr(emit_stats, loss_mgr) end +function generation_params_emit_stats(generation_params, io, out_dir, s, var_vals) + println_flush(io, "Default generation_params_emit_stats") + println_flush(io) +end + struct LossMgrImpl <: LossMgr emit_stats::Function # tag::String -> () train!::Function # epochs::Integer -> learning_rate::Real -> learning_curve::Vector{<:Real} @@ -162,7 +169,7 @@ function to_subpath(p::BespokeSTLCGenerator) "stlc", "bespoke", if p.param_vars_by_size "by_sz" else "not_by_sz" end, - "sz=$(p.size),tysz=$(p.ty_size)", + "sz=$(p.size)-tysz=$(p.ty_size)", ] end function generate(p::BespokeSTLCGenerator) @@ -182,6 +189,21 @@ function generate(p::BespokeSTLCGenerator) STLCGeneration(e, constructors_overapproximation) end +function generation_params_emit_stats(p::BespokeSTLCGenerator, io, out_dir, s, var_vals) + if p == BespokeSTLCGenerator(param_vars_by_size=true,size=5,ty_size=2) + path = joinpath(out_dir, "$(s)_Generator.v") + open(path, "w") do file + vals = compute(var_vals, values(adnodes_of_interest)) + adnodes_vals = Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest) + println(file, bespoke_stlc_to_coq(adnodes_vals)) + end + println_flush(io, "Saved Coq generator to $(path)") + else + println_flush(io, "Translation back to Coq not defined") + end + println_flush(io) +end + ################################## # Type-based STLC generator ################################## @@ -195,7 +217,7 @@ function to_subpath(p::TypeBasedSTLCGenerator) [ "stlc", "typebased", - "sz=$(p.size),tysz=$(p.ty_size)", + "sz=$(p.size)-tysz=$(p.ty_size)", ] end function generate(p::TypeBasedSTLCGenerator) diff --git a/examples/qc/benchmarks/format_bespoke_stlc.jl b/examples/qc/benchmarks/format_bespoke_stlc.jl index 557abf5d..b708a76b 100644 --- a/examples/qc/benchmarks/format_bespoke_stlc.jl +++ b/examples/qc/benchmarks/format_bespoke_stlc.jl @@ -184,109 +184,6 @@ Definition test_prop_MultiPreserve := (*! QuickChick test_prop_MultiPreserve. *) -(* -Derive (Arbitrary) for Typ. - - -(* Fixpoint genTyp (s: nat) : G Typ := - match s with - | 0 => ret TBool - | S s' => oneOf [ - t1 <- genTyp s' ;; - t2 <- genTyp s' ;; - ret (TFun t1 t2) ; - ret TBool - ] - end. - *) - -(* #[export] Instance genArbitrary : GenSized Typ := -{| - arbitrarySized x := genTyp x -|}. *) - -Definition genTyp (s: nat) : G Typ := arbitrary. - -Fixpoint genOne (ctx: Ctx) (t: Typ) : G Expr := - match t with - | TBool => - b <- arbitrary ;; - ret (Bool b) - | TFun t1 t2 => - t' <- genOne (t1 :: ctx) t2 ;; - ret (Abs t1 t') - end. - - -Fixpoint genVar' (ctx: Ctx) (t: Typ) (p: nat) (r: list nat) : list nat := - match ctx with - | nil => r - | t'::ctx' => if t == t' then genVar' ctx' t (p + 1) (p :: r) - else genVar' ctx' t (p + 1) r - end. - - -Definition genVar (ctx: Ctx) (t: Typ) : list (G Expr) := - let positions := genVar' ctx t 0 [] in - let tf := (fun n => ret (Var n)) in - map tf positions. - - -Fixpoint genExactExpr (f: nat) (ctx: Ctx) (t: Typ) : G Expr := - match f with - | O => oneOf_ (genOne ctx t) (genOne ctx t :: genVar ctx t) - | S f' => - let abs : list (G Expr) := match t with - | TFun t1 t2 => - [bindGen (genExactExpr f' (t1 :: ctx) t2) (fun t' => - returnGen (Abs t1 t'))] - | _ => nil - end in - let one := genOne ctx t in - let app := - t' <- genTyp f' ;; - e1 <- genExactExpr f' ctx (TFun t' t) ;; - e2 <- genExactExpr f' ctx t' ;; - ret (App e1 e2) in - let var := genVar ctx t in - - oneOf_ one ([one] ++ abs ++ [app] ++ var) - end. - - - - - -Definition genExpr (s: nat) : G Expr := - t <- genTyp 3 ;; - genExactExpr s [] t -. - -#[export] Instance arbitrarySizedExpr : GenSized Expr := -{| - arbitrarySized s := genExpr s -|}. - -Definition gTyped := genExpr 5. - -Definition test_prop_SinglePreserve := - forAll gTyped (fun (e: Expr) => - prop_SinglePreserve e). - -(* QuickChick test_prop_SinglePreserve. *) - -Definition test_prop_MultiPreserve := - forAll gTyped (fun (e: Expr) => - prop_MultiPreserve e). - -(* QuickChick test_prop_MultiPreserve. *) - - - - - - -*) """ end diff --git a/examples/qc/benchmarks/lib/lib.jl b/examples/qc/benchmarks/lib/lib.jl index 889cfe75..505084ba 100644 --- a/examples/qc/benchmarks/lib/lib.jl +++ b/examples/qc/benchmarks/lib/lib.jl @@ -1,6 +1,9 @@ DistNat = DistUInt32 include("stlc/dist.jl") include("stlc/generator.jl") +include("stlc/to_coq.jl") include("bst/dist.jl") include("bst/generator.jl") +include("rbt/dist.jl") +include("rbt/generator.jl") include("util.jl") diff --git a/examples/qc/benchmarks/lib/rbt/dist.jl b/examples/qc/benchmarks/lib/rbt/dist.jl new file mode 100644 index 00000000..8edc417a --- /dev/null +++ b/examples/qc/benchmarks/lib/rbt/dist.jl @@ -0,0 +1,33 @@ + +# Define RBTree +import Dice: param_lists + +struct Color <: InductiveType end +function param_lists(::Type{Color})::Vector{Pair{String,Vector{Type}}} + [ + "Red" => [], + "Black" => [] + ] +end +DistRed() = construct(Color, "Red", []) +DistBlack() = construct(Color, "Black", []) + +struct RBTree <: InductiveType end + +function param_lists(::Type{RBTree})::Vector{Pair{String,Vector{Type}}} + [ + "E" => [], + "T" => [DistI{Color}, DistI{RBTree}, DistInt32, DistInt32, DistI{RBTree}], + ] +end + +DistRBE() = construct(RBTree, "E", []) +DistRBT(c::DistI{Color}, l::DistI{RBTree}, k::DistInt32, v::DistInt32, r::DistI{RBTree}) = + construct(RBTree, "T", [c, l, k, v, r]) + +function tree_size(e::DistI{RBTree}) + match(e, [ + "E" => () -> DistUInt32(0), + "T" => (c, l, k, v, r) -> DistUInt32(1) + tree_size(l) + tree_size(r), + ]) +end diff --git a/examples/qc/benchmarks/lib/rbt/generator.jl b/examples/qc/benchmarks/lib/rbt/generator.jl new file mode 100644 index 00000000..2f7a8c3f --- /dev/null +++ b/examples/qc/benchmarks/lib/rbt/generator.jl @@ -0,0 +1,60 @@ +#== +Coq < Coq < Coq < GenSizedColor = +{| + arbitrarySized := + fun s : nat => + (let + fix arb_aux (size : nat) : G Color := + match size with + | 0 => oneOf [returnGen R; returnGen B] + | S _ => freq [ (1, returnGen R); (1, returnGen B)] + end in + arb_aux) s +|} + : GenSized Color +==# + +#== +Coq < Coq < Coq < GenSizedTree = +{| + arbitrarySized := + fun s : nat => + (let + fix arb_aux (size : nat) : G Tree := + match size with + | 0 => returnGen E + | S size' => + freq [ (1, returnGen E); + (1, + bindGen arbitrary + (fun p0 : Color => + bindGen (arb_aux size') + (fun p1 : Tree => + bindGen arbitrary + (fun p2 : Z => + bindGen arbitrary + (fun p3 : Z => + bindGen (arb_aux size') + (fun p4 : Tree => returnGen (T p0 p1 p2 p3 p4)))))))] + end in + arb_aux) s +|} + : GenSized Tree +==# +function tb_gen_rbt(sz, color_by_sz) + if sz == 0 + DistRBE() + else + @dice_ite if flip(register_weight!("leaf_sz$(sz)")) + DistRBE() + else + color_group = if color_by_sz "red_sz$(sz)" else "red" end + color = if flip(register_weight!(color_group)) DistRed() else DistBlack() end + k = DistInt32(0) + v = DistInt32(0) + l = tb_gen_rbt(sz - 1, color_by_sz) + r = tb_gen_rbt(sz - 1, color_by_sz) + DistRBT(color, l, k, v, r) + end + end +end \ No newline at end of file diff --git a/examples/qc/benchmarks/lib/stlc/to_coq.jl b/examples/qc/benchmarks/lib/stlc/to_coq.jl new file mode 100644 index 00000000..363974f6 --- /dev/null +++ b/examples/qc/benchmarks/lib/stlc/to_coq.jl @@ -0,0 +1,165 @@ +function bespoke_stlc_to_coq(adnodes_of_interest) + @assert issetequal(keys(adnodes_of_interest), ["sz1_succ_abs", "tysz2_gen_type_tbool", "sz3_succ_abs", "sz4_succ_var", "sz3_succ_app", "sz5_succ_app", "tysz1_gen_type_tbool", "sz0_zero_pr_var2", "sz2_succ_app", "sz4_succ_abs", "sz5_succ_var", "sz4_succ_app", "sz2_succ_abs", "sz5_succ_abs", "sz3_succ_var", "sz2_succ_var", "sz1_succ_var", "sz1_succ_app"]) + w(s) = thousandths(adnodes_of_interest[s]) + """ +From QuickChick Require Import QuickChick. Import QcNotation. +From Coq Require Import Bool ZArith List. Import ListNotations. +From ExtLib Require Import Monad. +From ExtLib.Data.Monads Require Import OptionMonad. +Import MonadNotation. + +From STLC Require Import Impl Spec. + +Derive (Arbitrary) for Typ. +Derive (Arbitrary) for Expr. + +Inductive bind : Ctx -> nat -> Typ -> Prop := +| BindNow : forall tau env, bind (tau :: env) 0 tau +| BindLater : forall tau tau' x env, + bind env x tau -> bind (tau' :: env) (S x) tau. + +Inductive typing (G : Ctx) : Expr -> Typ -> Prop := +| TyVar : + forall x T, + bind G x T -> + typing G (Var x) T +| TyBool : + forall b, + typing G (Bool b) TBool +| TyAbs : + forall e T1 T2, + typing (T1 :: G) e T2 -> + typing G (Abs T1 e) (TFun T1 T2) +| TyApp : + forall e1 e2 T1 T2, + typing G e1 (TFun T1 T2) -> + typing G e2 T1 -> + typing G (App e1 e2) T2. + + +(* Look up in list of backtrack weights *) +Fixpoint get {a: Type} (l : list (nat * a)) (target_key : nat) (default : a): a := + match l with + | [] => + (* This branch should never return *) + default + | (key, value) :: l' => + if Nat.eqb key target_key then + value + else get l' target_key default + end. + + +#[export] Instance dec_type (t1 t2 : Typ) : Dec (t1 = t2). +Proof. dec_eq. Defined. +Derive Arbitrary for Typ. + +Fixpoint genVar' (ctx: Ctx) (t: Typ) (p: nat) (r: list nat) : list nat := + match ctx with + | nil => r + | t'::ctx' => + if t = t'? then genVar' ctx' t (p + 1) (p :: r) + else genVar' ctx' t (p + 1) r + end. + +Fixpoint genZero env tau : G (option Expr) := + match tau with + | TBool => + bindGen arbitrary + (fun b : bool => + returnGen (Some (Bool b))) + | TFun T1 T2 => + bindOpt + (genZero (T1 :: env) T2) + (fun e : Expr => + returnGen (Some (Abs T1 e))) + end. + +Fixpoint genTyp (s: nat) : G Typ := + match s with + | 0 => ret TBool + | S s' => + let '(boolWeight, funWeight) := + get + [ + (1, ($(w("tysz1_gen_type_tbool")), 1000-$(w("tysz1_gen_type_tbool")))); + (2, ($(w("tysz2_gen_type_tbool")), 1000-$(w("tysz2_gen_type_tbool")))) + ] + s + (0, 0) in + freq [ + (boolWeight, ret (TBool)) + ; + (funWeight, + t1 <- genTyp s';; + t2 <- genTyp s';; + ret (TFun t1 t2)) + ] + end. + +Fixpoint genExpr env tau (sz: nat) : G (option Expr) := + match sz with + | 0 => + let '(var_weight, zero_weight) := ($(w("sz0_zero_pr_var2")), 1000-$(w("sz0_zero_pr_var2"))) in + backtrack + [(var_weight, oneOf_ (ret None) (map (fun x => returnGen (Some (Var x))) (genVar' env tau 0 []))) + ;(zero_weight, genZero env tau)] + | S sz' => + let '(val_weight, app_weight, var_weight) := + get + [ + (1, ($(w("sz1_succ_abs")), $(w("sz1_succ_app")), $(w("sz1_succ_var")))); + (2, ($(w("sz2_succ_abs")), $(w("sz2_succ_app")), $(w("sz2_succ_var")))); + (3, ($(w("sz3_succ_abs")), $(w("sz3_succ_app")), $(w("sz3_succ_var")))); + (4, ($(w("sz4_succ_abs")), $(w("sz4_succ_app")), $(w("sz4_succ_var")))); + (5, ($(w("sz5_succ_abs")), $(w("sz5_succ_app")), $(w("sz5_succ_var")))) + ] + sz + (0, 0 ,0) in + backtrack + [(var_weight, oneOf_ (ret None) (map (fun x => returnGen (Some (Var x))) (genVar' env tau 0 []))) + ; + (app_weight, + bindGen (genTyp 2) + (fun T1 : Typ => + bindOpt + (genExpr env (TFun T1 tau) sz') + (fun e1 : Expr => + bindOpt + (genExpr env T1 sz') + (fun e2 : Expr => + returnGen (Some (App e1 e2)))))) + ; + (val_weight, + match tau with + | TBool => + bindGen arbitrary + (fun b : bool => + returnGen (Some (Bool b))) + | TFun T1 T2 => + bindOpt + (genExpr (T1 :: env) T2 sz') + (fun e : Expr => + returnGen (Some (Abs T1 e))) + end)] + end. + +Definition gSized := + typ <- arbitrary ;; + genExpr [] typ 5. + + +Definition test_prop_SinglePreserve := + forAllMaybe gSized (fun (e: Expr) => + prop_SinglePreserve e). + +(*! QuickChick test_prop_SinglePreserve. *) + +Definition test_prop_MultiPreserve := + forAllMaybe gSized (fun (e: Expr) => + prop_MultiPreserve e). + +(*! QuickChick test_prop_MultiPreserve. *) + +""" +end diff --git a/examples/qc/benchmarks/lib/util.jl b/examples/qc/benchmarks/lib/util.jl index 752a7951..b40cc2bf 100644 --- a/examples/qc/benchmarks/lib/util.jl +++ b/examples/qc/benchmarks/lib/util.jl @@ -158,3 +158,5 @@ function cmd_out(cmd) run(pipeline(cmd, stdout=io)) String(take!(io)) end + +thousandths(n) = Integer(round(n, digits=3) * 1000) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index d718d51e..f269ab20 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -23,6 +23,10 @@ LEARNING_RATE = 0.01 # ) => 1, # ]) +generation_params = BespokeSTLCGenerator(param_vars_by_size=true, size=5, ty_size=2) +loss_params = ApproxSTLCConstructorEntropy() +EPOCHS=1 +LEARNING_RATE = 0.3 # generation_params = BSTGenerationParams(size=5, dummy_vals=true) # loss_params = SamplingBSTEntropy(resampling_frequency=5, samples_per_batch=300) # EPOCHS = 10000 @@ -39,7 +43,7 @@ path = joinpath( [TAG], to_subpath(generation_params), to_subpath(loss_params), - ["epochs=$(EPOCHS),learning_rate=$(LEARNING_RATE)"], + ["epochs=$(EPOCHS)-learning_rate=$(LEARNING_RATE)"], ) ) OUT_DIR = "examples/qc/benchmarks/output/$(path)" From 48ebf82fc6d0c3f509935e08b547205b8c763ae2 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 3 Mar 2024 16:54:47 -0800 Subject: [PATCH 071/231] add TB RBT --- examples/qc/benchmarks/benchmarks.jl | 97 ++++++++++++++ examples/qc/benchmarks/lib/lib.jl | 5 +- examples/qc/benchmarks/lib/rbt/dist.jl | 54 ++++++++ examples/qc/benchmarks/lib/rbt/to_coq.jl | 158 +++++++++++++++++++++++ examples/qc/benchmarks/lib/util.jl | 30 +++++ examples/qc/benchmarks/main.jl | 5 + 6 files changed, 348 insertions(+), 1 deletion(-) create mode 100644 examples/qc/benchmarks/lib/rbt/to_coq.jl diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 7f0248a7..50527227 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -596,3 +596,100 @@ function create_loss_manager(p::MixedLossParams{T}, io, out_dir, var_vals, gener SimpleLossMgr(emit_stats, mgr.train!, mgr.loss) end +################################## +# RBT generation +################################## + +abstract type RBT <: Benchmark end +struct RBTGeneration <: Generation{RBT} + t::DistI{RBTree} +end +function generation_emit_stats(g::RBTGeneration, io::IO, out_dir::String, s::String, var_vals::Valuation) +end + +################################## +# Type-based RBT generator +################################## + +struct TypeBasedRBTGenerator <: GenerationParams{RBT} + size::Integer + color_by_size::Bool + TypeBasedRBTGenerator(; size, color_by_size) = new(size, color_by_size) +end +function to_subpath(p::TypeBasedRBTGenerator) + [ + "rbt", + "bespoke", + "sz=$(p.size)", + "color_by_size=$(p.color_by_size)" + ] +end +function generate(p::TypeBasedRBTGenerator) + RBTGeneration(tb_gen_rbt(p.size, p.color_by_size)) +end +function generation_params_emit_stats(p::TypeBasedRBTGenerator, io, out_dir, s, var_vals) + path = joinpath(out_dir, "$(s)_Generator.v") + open(path, "w") do file + vals = compute(var_vals, values(adnodes_of_interest)) + adnodes_vals = Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest) + println(file, typebased_rbt_to_coq(p, adnodes_vals, io)) + end + println_flush(io, "Saved Coq generator to $(path)") +end + +abstract type Property{T} end + +struct SatisfyPropertyLoss{T} <: SimpleLossParams{T} + property::Property{T} +end +to_subpath(p::SatisfyPropertyLoss) = [name(p.property)] +function create_loss_manager(p::SatisfyPropertyLoss, io, out_dir, var_vals, generation) + println_flush(io, "Building computation graph for $(p)...") + time_build_loss = @elapsed begin + meets_property = check_property(p.property, generation) + loss = -LogPr(meets_property) + end + println(io, " $(time_build_loss) seconds") + println(io) + + mgr = create_simple_loss_manager(loss, io, out_dir, var_vals) + + # Also print probability that property is met + function f_emit′(tag) + println_flush(io, "Checking pr property met...") + time_infer = @elapsed p_meets = pr_mixed(var_vals)(meets_property)[true] + println(io, " $(time_infer) seconds") + + println_flush(io, "Pr meets property: $(p_meets)") + println_flush(io) + + emit_stats(mgr, tag) + end + SimpleLossMgr(f_emit′, mgr.train!, mgr.loss) +end + +struct BookkeepingInvariant <: Property{RBT} end +check_property(::BookkeepingInvariant, g::RBTGeneration) = + satisfies_bookkeeping_invariant(g.t) +name(::BookkeepingInvariant) = "bookkeeping" + +struct BalanceInvariant <: Property{RBT} end +check_property(::BalanceInvariant, g::RBTGeneration) = + satisfies_balance_invariant(g.t) +name(::BalanceInvariant) = "balance" + +struct BlackRootInvariant <: Property{RBT} end +check_property(::BlackRootInvariant, g::RBTGeneration) = + satisfies_black_root_invariant(g.t) +name(::BlackRootInvariant) = "blackroot" + +struct MultipleInvariants{T} <: Property{T} + properties::Vector{<:Property{T}} +end +check_property(p::MultipleInvariants{T}, g::Generation{T}) where T = + reduce(&, [ + check_property(property, g) + for property in p.properties + ]) +name(::MultipleInvariants{T}) where T = + join([name(property) for property in p.properties], "AND") \ No newline at end of file diff --git a/examples/qc/benchmarks/lib/lib.jl b/examples/qc/benchmarks/lib/lib.jl index 505084ba..aab4d472 100644 --- a/examples/qc/benchmarks/lib/lib.jl +++ b/examples/qc/benchmarks/lib/lib.jl @@ -1,4 +1,7 @@ +using Dice + DistNat = DistUInt32 +include("util.jl") include("stlc/dist.jl") include("stlc/generator.jl") include("stlc/to_coq.jl") @@ -6,4 +9,4 @@ include("bst/dist.jl") include("bst/generator.jl") include("rbt/dist.jl") include("rbt/generator.jl") -include("util.jl") +include("rbt/to_coq.jl") diff --git a/examples/qc/benchmarks/lib/rbt/dist.jl b/examples/qc/benchmarks/lib/rbt/dist.jl index 8edc417a..360e4bb7 100644 --- a/examples/qc/benchmarks/lib/rbt/dist.jl +++ b/examples/qc/benchmarks/lib/rbt/dist.jl @@ -31,3 +31,57 @@ function tree_size(e::DistI{RBTree}) "T" => (c, l, k, v, r) -> DistUInt32(1) + tree_size(l) + tree_size(r), ]) end + +function is_red(c::DistI{Color}) + match(c, [ + "Red" => () -> true, + "Black" => () -> false + ]) +end + +# Check that all paths through the tree have the same number of black nodes +function satisfies_bookkeeping_invariant(e::DistI{RBTree}) + function black_height_and_valid(t::DistI{RBTree}) + match(t, [ + "E" => () -> (DistUInt32(1), true), + "T" => (c, l, k, v, r) -> begin + left_black_height, left_valid = black_height_and_valid(l) + right_black_height, right_valid = black_height_and_valid(r) + @dice_ite if left_valid && right_valid && prob_equals(left_black_height, right_black_height) + left_black_height + if is_red(c) DistUInt32(0) else DistUInt32(1) end, true + else + DistUInt32(0), false + end + end, + ]) + end + _black_height, valid = black_height_and_valid(e) + valid +end + +# Check that all red nodes have black children +function satisfied_balance_invariant(e::DistI{RBTree}) + function color_and_valid(t::DistI{RBTree}) + match(t, [ + "E" => () -> (DistBlack(), true), + "T" => (c, l, k, v, r) -> begin + left_color, left_valid = color_and_valid(l) + right_color, right_valid = color_and_valid(r) + if left_valid && right_valid && !(is_red(c) && (is_red(left_color) || is_red(right_color))) + c, true + else + c, false + end + end, + ]) + end + _color, valid = color_and_valid(e) + valid +end + +function satisfies_black_root_invariant(t::DistI{RBTree}) + match(t, [ + "E" => () -> true, + "T" => (c, l, k, v, r) -> !isred(c) + ]) +end diff --git a/examples/qc/benchmarks/lib/rbt/to_coq.jl b/examples/qc/benchmarks/lib/rbt/to_coq.jl new file mode 100644 index 00000000..6da4438e --- /dev/null +++ b/examples/qc/benchmarks/lib/rbt/to_coq.jl @@ -0,0 +1,158 @@ +flatten = Iterators.flatten + +function typebased_rbt_to_coq(p, adnodes_vals, io) + w(s) = thousandths(adnodes_vals[s]) + red_wt_key(sz) = if p.color_by_size "red_sz$(sz)" else "red" end + red_wt(sz) = w(red_wt_key(sz)) + leaf_wt_key(sz) = "leaf_sz$(sz)" + leaf_wt(sz) = w(leaf_wt_key(sz)) + + expected_keys = Set(flatten([red_wt_key(sz),leaf_wt_key(sz)] for sz in 1:p.size)) + @soft_assert io issetequal(keys(adnodes_vals), expected_keys) "$(adnodes_vals) $(expected_keys)" + """ +Require Import ZArith. +From QuickChick Require Import QuickChick. +From ExtLib Require Import Monad. +From ExtLib.Data.Monads Require Import OptionMonad. +Import QcNotation. +Import MonadNotation. +From Coq Require Import List. +Import ListNotations. + +From RBT Require Import Impl Spec. + +(* Look up in list of backtrack weights *) +Fixpoint get {a: Type} (l : list (nat * a)) (target_key : nat) (default : a): a := + match l with + | [] => + (* This branch should never return *) + default + | (key, value) :: l' => + if Nat.eqb key target_key then + value + else get l' target_key default + end. + +Definition manual_gen_tree := + fun s : nat => + (let + fix arb_aux (size : nat) : G Tree := + let weight_red := get [ + $( + join(["($(sz), $(red_wt(sz)))" for sz in 1:p.size], "; ") + ) + ] s 0 in + let weight_leaf := get [ + $( + join(["($(sz), $(leaf_wt(sz)))" for sz in 1:p.size], "; ") + ) + ] s 0 in + match size with + | 0 => returnGen E + | S size' => + freq [ (weight_leaf, returnGen E); + (1000 - weight_leaf, + bindGen (freq [ (weight_red, returnGen R); (1000-weight_red, returnGen B)]) + (fun p0 : Color => + bindGen (arb_aux size') + (fun p1 : Tree => + bindGen arbitrary + (fun p2 : Z => + bindGen arbitrary + (fun p3 : Z => + bindGen (arb_aux size') + (fun p4 : Tree => returnGen (T p0 p1 p2 p3 p4)))))))] + end in + arb_aux) s. + +#[global] +Instance genTree : GenSized (Tree) := + {| arbitrarySized n := manual_gen_tree n |}. + +(* --------------------- Tests --------------------- *) + +Definition test_prop_InsertValid := + forAll arbitrary (fun t => + forAll arbitrary (fun k => + forAll arbitrary (fun v => + (prop_InsertValid t k v)))). + +(*! QuickChick test_prop_InsertValid. *) + +Definition test_prop_DeleteValid := + forAll arbitrary (fun t => + forAll arbitrary (fun k => + prop_DeleteValid t k)). + +(*! QuickChick test_prop_DeleteValid. *) + +Definition test_prop_InsertPost := + forAll arbitrary (fun t => + forAll arbitrary (fun k => + forAll arbitrary (fun k' => + forAll arbitrary (fun v => + prop_InsertPost t k k' v)))). + +(*! QuickChick test_prop_InsertPost. *) + +Definition test_prop_DeletePost := + forAll arbitrary (fun t => + forAll arbitrary (fun k => + forAll arbitrary (fun k' => + prop_DeletePost t k k'))). + +(*! QuickChick test_prop_DeletePost. *) + +Definition test_prop_InsertModel := + forAll arbitrary (fun t => + forAll arbitrary (fun k => + forAll arbitrary (fun v => + prop_InsertModel t k v))). + +(*! QuickChick test_prop_InsertModel. *) + +Definition test_prop_DeleteModel := + forAll arbitrary (fun t => + forAll arbitrary (fun k => + prop_DeleteModel t k)). + +(*! QuickChick test_prop_DeleteModel. *) + +Definition test_prop_InsertInsert := + forAll arbitrary (fun t => + forAll arbitrary (fun k => + forAll arbitrary (fun k' => + forAll arbitrary (fun v => + forAll arbitrary (fun v' => + prop_InsertInsert t k k' v v'))))). + +(*! QuickChick test_prop_InsertInsert. *) + +Definition test_prop_InsertDelete := + forAll arbitrary (fun t => + forAll arbitrary (fun k => + forAll arbitrary (fun k' => + forAll arbitrary (fun v => + prop_InsertDelete t k k' v)))). + +(*! QuickChick test_prop_InsertDelete. *) + +Definition test_prop_DeleteInsert := + forAll arbitrary (fun t => + forAll arbitrary (fun k => + forAll arbitrary (fun k' => + forAll arbitrary (fun v' => + prop_DeleteInsert t k k' v')))). + +(*! QuickChick test_prop_DeleteInsert. *) + +Definition test_prop_DeleteDelete := + forAll arbitrary (fun t => + forAll arbitrary (fun k => + forAll arbitrary (fun k' => + prop_DeleteDelete t k k'))). + +(*! QuickChick test_prop_DeleteDelete. *) + +""" +end diff --git a/examples/qc/benchmarks/lib/util.jl b/examples/qc/benchmarks/lib/util.jl index b40cc2bf..9ed54b70 100644 --- a/examples/qc/benchmarks/lib/util.jl +++ b/examples/qc/benchmarks/lib/util.jl @@ -160,3 +160,33 @@ function cmd_out(cmd) end thousandths(n) = Integer(round(n, digits=3) * 1000) + +global _soft_assert_ever_triggered = Ref(false) + + +function to_unquoted(e) + io = IOBuffer() + Base.show_unquoted(io, e) + String(take!(io)) +end + +macro soft_assert(io, b, msg) + src = "$(__source__.file):$(__source__.line)" + b_s = to_unquoted(b) + quote + if !$(esc(b)) + global _soft_assert_ever_triggered[] = true + for io in Set([$(esc(io)), stdout]) + println(io, "Assertion failed at $($src)") + println(io, $b_s) + println(io, $(esc(msg))) + end + end + end +end +atexit() do + if _soft_assert_ever_triggered[] + println("WARNING: this program failed soft assertion(s)") + exit(1) + end +end diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index f269ab20..6273976d 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -32,6 +32,11 @@ LEARNING_RATE = 0.3 # EPOCHS = 10000 # LEARNING_RATE = 0.003 +generation_params = TypeBasedRBTGenerator(size=2, color_by_size=true) +loss_params = SatisfyPropertyLoss(BookkeepingInvariant()) +EPOCHS=1 +LEARNING_RATE = 0.3 + TAG = "v9_unif2" LOG_TO_FILE = true From e7ad436726e36ee12b2bfb5e35e4ec2c1a483cbe Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 4 Mar 2024 10:11:25 -0800 Subject: [PATCH 072/231] RBT: learn_leaf_weights and fix bugs --- examples/qc/benchmarks/benchmarks.jl | 11 +++++++---- examples/qc/benchmarks/lib/rbt/dist.jl | 8 ++++---- examples/qc/benchmarks/lib/rbt/generator.jl | 8 ++++---- examples/qc/benchmarks/lib/rbt/to_coq.jl | 18 +++++++++++++++--- examples/qc/benchmarks/main.jl | 13 +++++++++---- 5 files changed, 39 insertions(+), 19 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 50527227..60696182 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -614,18 +614,21 @@ end struct TypeBasedRBTGenerator <: GenerationParams{RBT} size::Integer color_by_size::Bool - TypeBasedRBTGenerator(; size, color_by_size) = new(size, color_by_size) + learn_leaf_weights::Bool + TypeBasedRBTGenerator(; size, color_by_size, learn_leaf_weights) = + new(size, color_by_size, learn_leaf_weights) end function to_subpath(p::TypeBasedRBTGenerator) [ "rbt", "bespoke", "sz=$(p.size)", - "color_by_size=$(p.color_by_size)" + "color_by_size=$(p.color_by_size)", + "learn_leaf_weights=$(p.learn_leaf_weights)", ] end function generate(p::TypeBasedRBTGenerator) - RBTGeneration(tb_gen_rbt(p.size, p.color_by_size)) + RBTGeneration(tb_gen_rbt(p.size, p.color_by_size, p.learn_leaf_weights)) end function generation_params_emit_stats(p::TypeBasedRBTGenerator, io, out_dir, s, var_vals) path = joinpath(out_dir, "$(s)_Generator.v") @@ -691,5 +694,5 @@ check_property(p::MultipleInvariants{T}, g::Generation{T}) where T = check_property(property, g) for property in p.properties ]) -name(::MultipleInvariants{T}) where T = +name(p::MultipleInvariants{T}) where T = join([name(property) for property in p.properties], "AND") \ No newline at end of file diff --git a/examples/qc/benchmarks/lib/rbt/dist.jl b/examples/qc/benchmarks/lib/rbt/dist.jl index 360e4bb7..308f3118 100644 --- a/examples/qc/benchmarks/lib/rbt/dist.jl +++ b/examples/qc/benchmarks/lib/rbt/dist.jl @@ -47,7 +47,7 @@ function satisfies_bookkeeping_invariant(e::DistI{RBTree}) "T" => (c, l, k, v, r) -> begin left_black_height, left_valid = black_height_and_valid(l) right_black_height, right_valid = black_height_and_valid(r) - @dice_ite if left_valid && right_valid && prob_equals(left_black_height, right_black_height) + @dice_ite if left_valid & right_valid & prob_equals(left_black_height, right_black_height) left_black_height + if is_red(c) DistUInt32(0) else DistUInt32(1) end, true else DistUInt32(0), false @@ -60,14 +60,14 @@ function satisfies_bookkeeping_invariant(e::DistI{RBTree}) end # Check that all red nodes have black children -function satisfied_balance_invariant(e::DistI{RBTree}) +function satisfies_balance_invariant(e::DistI{RBTree}) function color_and_valid(t::DistI{RBTree}) match(t, [ "E" => () -> (DistBlack(), true), "T" => (c, l, k, v, r) -> begin left_color, left_valid = color_and_valid(l) right_color, right_valid = color_and_valid(r) - if left_valid && right_valid && !(is_red(c) && (is_red(left_color) || is_red(right_color))) + @dice_ite if left_valid & right_valid & !(is_red(c) & (is_red(left_color) | is_red(right_color))) c, true else c, false @@ -82,6 +82,6 @@ end function satisfies_black_root_invariant(t::DistI{RBTree}) match(t, [ "E" => () -> true, - "T" => (c, l, k, v, r) -> !isred(c) + "T" => (c, l, k, v, r) -> !is_red(c) ]) end diff --git a/examples/qc/benchmarks/lib/rbt/generator.jl b/examples/qc/benchmarks/lib/rbt/generator.jl index 2f7a8c3f..99c5dd5e 100644 --- a/examples/qc/benchmarks/lib/rbt/generator.jl +++ b/examples/qc/benchmarks/lib/rbt/generator.jl @@ -41,19 +41,19 @@ Coq < Coq < Coq < GenSizedTree = |} : GenSized Tree ==# -function tb_gen_rbt(sz, color_by_sz) +function tb_gen_rbt(sz, color_by_sz, learn_leaf_weights) if sz == 0 DistRBE() else - @dice_ite if flip(register_weight!("leaf_sz$(sz)")) + @dice_ite if flip(if learn_leaf_weights register_weight!("leaf_sz$(sz)") else .5 end) DistRBE() else color_group = if color_by_sz "red_sz$(sz)" else "red" end color = if flip(register_weight!(color_group)) DistRed() else DistBlack() end k = DistInt32(0) v = DistInt32(0) - l = tb_gen_rbt(sz - 1, color_by_sz) - r = tb_gen_rbt(sz - 1, color_by_sz) + l = tb_gen_rbt(sz - 1, color_by_sz, learn_leaf_weights) + r = tb_gen_rbt(sz - 1, color_by_sz, learn_leaf_weights) DistRBT(color, l, k, v, r) end end diff --git a/examples/qc/benchmarks/lib/rbt/to_coq.jl b/examples/qc/benchmarks/lib/rbt/to_coq.jl index 6da4438e..d251364a 100644 --- a/examples/qc/benchmarks/lib/rbt/to_coq.jl +++ b/examples/qc/benchmarks/lib/rbt/to_coq.jl @@ -7,7 +7,15 @@ function typebased_rbt_to_coq(p, adnodes_vals, io) leaf_wt_key(sz) = "leaf_sz$(sz)" leaf_wt(sz) = w(leaf_wt_key(sz)) - expected_keys = Set(flatten([red_wt_key(sz),leaf_wt_key(sz)] for sz in 1:p.size)) + expected_keys = Set( + flatten( + if p.learn_leaf_weights + ([red_wt_key(sz),leaf_wt_key(sz)]) + else + ([red_wt_key(sz)]) + end + for sz in 1:p.size + )) @soft_assert io issetequal(keys(adnodes_vals), expected_keys) "$(adnodes_vals) $(expected_keys)" """ Require Import ZArith. @@ -42,11 +50,15 @@ Definition manual_gen_tree := join(["($(sz), $(red_wt(sz)))" for sz in 1:p.size], "; ") ) ] s 0 in - let weight_leaf := get [ + let weight_leaf := $( + if p.learn_leaf_weights + "get [ $( join(["($(sz), $(leaf_wt(sz)))" for sz in 1:p.size], "; ") ) - ] s 0 in + ] s 0" + else "500" end + ) in match size with | 0 => returnGen E | S size' => diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 6273976d..f509e62f 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -32,10 +32,15 @@ LEARNING_RATE = 0.3 # EPOCHS = 10000 # LEARNING_RATE = 0.003 -generation_params = TypeBasedRBTGenerator(size=2, color_by_size=true) -loss_params = SatisfyPropertyLoss(BookkeepingInvariant()) -EPOCHS=1 -LEARNING_RATE = 0.3 +generation_params = TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=false) +loss_params = SatisfyPropertyLoss(MultipleInvariants([ + BookkeepingInvariant(), + BalanceInvariant(), + BlackRootInvariant(), +])) +# loss_params = SatisfyPropertyLoss(BookkeepingInvariant()) +EPOCHS=20000 +LEARNING_RATE = .3 TAG = "v9_unif2" From 23875ea2f43a5a902785a4eb38942d0e46c66de7 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 4 Mar 2024 10:13:08 -0800 Subject: [PATCH 073/231] rbt fix name --- examples/qc/benchmarks/benchmarks.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 60696182..49cd6856 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -621,7 +621,7 @@ end function to_subpath(p::TypeBasedRBTGenerator) [ "rbt", - "bespoke", + "typebased", "sz=$(p.size)", "color_by_size=$(p.color_by_size)", "learn_leaf_weights=$(p.learn_leaf_weights)", From dfd5af4ce9a476dd12bb1b3d2d3ff32dd91e6a24 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 7 Mar 2024 10:00:00 -0800 Subject: [PATCH 074/231] add sampling entropy rbt loss, loop --- examples/qc/benchmarks/benchmarks.jl | 64 +++++++++- examples/qc/benchmarks/main.jl | 182 +++++++++++++-------------- src/autodiff_pr/train.jl | 9 +- 3 files changed, 158 insertions(+), 97 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 49cd6856..d0ba5963 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -91,7 +91,7 @@ function create_simple_loss_manager(loss, io, out_dir, var_vals) SimpleLossMgr(emit_stats, f_train, loss) end -function train_via_sampling_entropy!(io, out_dir, var_vals, e; epochs, learning_rate, resampling_frequency, samples_per_batch, consider, ignore) +function train_via_sampling_entropy!(io, out_dir, var_vals, e; epochs, learning_rate, resampling_frequency, samples_per_batch, consider, ignore, additional_loss, additional_loss_lr) learning_rate = learning_rate / samples_per_batch learning_curve = [] @@ -119,7 +119,9 @@ function train_via_sampling_entropy!(io, out_dir, var_vals, e; epochs, learning_ last_batch = epochs_done + epochs_this_batch == epochs println_flush(io, "Stepping...") - time_step_here = @elapsed subcurve = Dice.train!(var_vals, loss; epochs=epochs_this_batch, learning_rate, append_last_loss=last_batch) + time_step_here = @elapsed subcurve = Dice.train!(var_vals, + loss + (additional_loss * additional_loss_lr / learning_rate) + ; epochs=epochs_this_batch, learning_rate, append_last_loss=last_batch) time_step += time_step_here append!(learning_curve, subcurve) println(io, " $(time_step_here) seconds") @@ -269,12 +271,20 @@ function create_loss_manager(p::SamplingSTLCEntropy, io, out_dir, var_vals, g::S io, out_dir, var_vals, g.e; epochs, learning_rate, resampling_frequency=p.resampling_frequency, samples_per_batch=p.samples_per_batch, consider=_->true, - ignore=_->false + ignore=_->false, + additional_loss=Dice.Constant(0), + additional_loss_lr=0, ) end LossMgrImpl(_ -> nothing, train!) end +struct NullLoss{T} <: SimpleLossParams{T} end +to_subpath(::NullLoss) = ["null"] +function create_loss_manager(::NullLoss{T}, io, out_dir, var_vals, g::Generation{T}) where T + create_simple_loss_manager(Dice.Constant(0), io, out_dir, var_vals) +end + ################################## # Sampling STLC constructor entropy loss ################################## @@ -300,6 +310,8 @@ function create_loss_manager(p::SamplingSTLCConstructorEntropy, io, out_dir, var resampling_frequency=p.resampling_frequency, samples_per_batch=p.samples_per_batch, consider=s->any(prob_equals(s, x)===true for x in values(stlc_ctor_to_id)), ignore=s->prob_equals(s, DistInt32(-1))===true, + additional_loss=Dice.Constant(0), + additional_loss_lr=0, ) end LossMgrImpl(_ -> nothing, train!) @@ -429,7 +441,9 @@ function create_loss_manager(p::SamplingBSTEntropy, io, out_dir, var_vals, g::BS io, out_dir, var_vals, g.t; epochs, learning_rate, resampling_frequency=p.resampling_frequency, samples_per_batch=p.samples_per_batch, consider=_->true, - ignore=_->false + ignore=_->false, + additional_loss=Dice.Constant(0), + additional_loss_lr=0, ) end LossMgrImpl(_ -> nothing, train!) @@ -695,4 +709,44 @@ check_property(p::MultipleInvariants{T}, g::Generation{T}) where T = for property in p.properties ]) name(p::MultipleInvariants{T}) where T = - join([name(property) for property in p.properties], "AND") \ No newline at end of file + join([name(property) for property in p.properties], "AND") + +################################## +# Sampling RBT entropy loss +################################## + +struct SamplingRBTEntropy <: LossParams{RBT} + resampling_frequency::Integer + samples_per_batch::Integer + additional_loss_params::SimpleLossParams{RBT} + additional_loss_lr::Real +end +function SamplingRBTEntropy(; resampling_frequency, samples_per_batch, additional_loss_params, additional_loss_lr) + SamplingRBTEntropy(resampling_frequency, samples_per_batch, additional_loss_params, additional_loss_lr) +end +to_subpath(p::SamplingRBTEntropy) = [ + "sampling_entropy", + "freq=$(p.resampling_frequency),spb=$(p.samples_per_batch)", + "additional_loss=$(join(to_subpath(p.additional_loss_params),"-"))", + "allr=$(p.additional_loss_lr)", +] +function create_loss_manager(p::SamplingRBTEntropy, io, out_dir, var_vals, g::RBTGeneration) + mgr::SimpleLossMgr = create_loss_manager(p.additional_loss_params, io, out_dir, var_vals, g) + function train!(; epochs, learning_rate) + train_via_sampling_entropy!( + io, out_dir, var_vals, g.t; epochs, learning_rate, + resampling_frequency=p.resampling_frequency, samples_per_batch=p.samples_per_batch, + consider=_->true, + ignore=_->false, + additional_loss=mgr.loss, + additional_loss_lr=p.additional_loss_lr, + ) + end + LossMgrImpl(tag -> emit_stats(mgr, tag), train!) +end + +struct NullLoss{T} <: SimpleLossParams{T} end +to_subpath(::NullLoss) = ["null"] +function create_loss_manager(::NullLoss{T}, io, out_dir, var_vals, g::Generation{T}) where T + create_simple_loss_manager(Dice.Constant(0), io, out_dir, var_vals) +end \ No newline at end of file diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index f509e62f..efee4e6d 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -11,84 +11,19 @@ include("benchmarks.jl") # Config ############################ -generation_params = TypeBasedBSTGenerator(size=5) -loss_params = MLELossParams(metric=TreeSize(), target_dist=Target4321()) -EPOCHS = 50000 -LEARNING_RATE = 0.01 -# loss_params = MixedLossParams(Pair{SimpleLossParams{STLC}, Real}[ -# ApproxSTLCConstructorEntropy() => 10, -# MLELossParams( -# metric=NumApps(), -# target_dist=Target4321(), -# ) => 1, -# ]) - -generation_params = BespokeSTLCGenerator(param_vars_by_size=true, size=5, ty_size=2) -loss_params = ApproxSTLCConstructorEntropy() -EPOCHS=1 -LEARNING_RATE = 0.3 -# generation_params = BSTGenerationParams(size=5, dummy_vals=true) -# loss_params = SamplingBSTEntropy(resampling_frequency=5, samples_per_batch=300) -# EPOCHS = 10000 -# LEARNING_RATE = 0.003 - -generation_params = TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=false) -loss_params = SatisfyPropertyLoss(MultipleInvariants([ - BookkeepingInvariant(), - BalanceInvariant(), - BlackRootInvariant(), -])) +# loss_params = SamplingRBTEntropy( +# resampling_frequency=2, +# samples_per_batch=10000, +# additional_loss_params=NullLoss{RBT}(), +# # additional_loss_params=SatisfyPropertyLoss(MultipleInvariants([ +# # BookkeepingInvariant(), +# # BalanceInvariant(), +# # BlackRootInvariant(), +# # ])), +# additional_loss_lr=0 +# ) # loss_params = SatisfyPropertyLoss(BookkeepingInvariant()) -EPOCHS=20000 -LEARNING_RATE = .3 - -TAG = "v9_unif2" - -LOG_TO_FILE = true - -############################ - -path = joinpath( - vcat( - [TAG], - to_subpath(generation_params), - to_subpath(loss_params), - ["epochs=$(EPOCHS)-learning_rate=$(LEARNING_RATE)"], - ) -) -OUT_DIR = "examples/qc/benchmarks/output/$(path)" - -########################### - -LOG_PATH = joinpath(OUT_DIR, "log.log") - -if isfile(LOG_PATH) && "-f" ∉ ARGS - println("Error: Log already exists at the following path:") - println(LOG_PATH) - exit(1) -end - -mkpath(OUT_DIR) -io = if LOG_TO_FILE open(LOG_PATH, "w") else stdout end - -using Dates -t = now() -commit = strip(cmd_out(`git rev-parse --short HEAD`)) -for io′ in Set([io, stdout]) - println(io′, "$(t) $(commit) $(join(ARGS, " "))") - println(io′, "== Config ==") - println(io′, "TAG: $(TAG)") - println(io′, generation_params) - println(io′, loss_params) - println(io′, "EPOCHS: $(EPOCHS)") - println(io′, "LEARNING_RATE: $(LEARNING_RATE)") - println(io′, "DistNat: $(DistNat)") - println(io′) -end -if LOG_TO_FILE - println("Logging to $(LOG_PATH)") - println() -end +EPOCHS=10000 var_vals = Valuation() adnodes_of_interest = Dict{String, ADNode}() @@ -105,24 +40,89 @@ function register_weight!(s) weight end -mgr = create_benchmark_manager(io, OUT_DIR, var_vals, generation_params, loss_params) +for (generation_params, learning_rate) in Base.product( + [ + TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=true), + TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=false), + ], + [0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1.], +) + empty!(var_vals) + empty!(adnodes_of_interest) + + loss_params=SatisfyPropertyLoss(MultipleInvariants([ + BookkeepingInvariant(), + BalanceInvariant(), + ])) + + TAG = "v9_unif2" + + LOG_TO_FILE = true + + ############################ + + path = joinpath( + vcat( + [TAG], + to_subpath(generation_params), + to_subpath(loss_params), + ["epochs=$(EPOCHS)-learning_rate=$(learning_rate)"], + ) + ) + OUT_DIR = "examples/qc/benchmarks/output/$(path)" + + ########################### + + LOG_PATH = joinpath(OUT_DIR, "log.log") + + if isfile(LOG_PATH) && "-f" ∉ ARGS + println("Error: Log already exists at the following path:") + println(LOG_PATH) + println() + continue + end + + mkpath(OUT_DIR) + io = if LOG_TO_FILE open(LOG_PATH, "w") else stdout end + + using Dates + t = now() + commit = strip(cmd_out(`git rev-parse --short HEAD`)) + for io′ in Set([io, stdout]) + println(io′, "$(t) $(commit) $(join(ARGS, " "))") + println(io′, "== Config ==") + println(io′, "TAG: $(TAG)") + println(io′, generation_params) + println(io′, loss_params) + println(io′, "EPOCHS: $(EPOCHS)") + println(io′, "LEARNING_RATE: $(learning_rate)") + println(io′, "DistNat: $(DistNat)") + println(io′) + end + if LOG_TO_FILE + println("Logging to $(LOG_PATH)") + println() + end + + mgr = create_benchmark_manager(io, OUT_DIR, var_vals, generation_params, loss_params) -println_flush(io, "ADNodes of interest (initial):") -vals = compute(var_vals, values(adnodes_of_interest)) -showln(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) + println_flush(io, "ADNodes of interest (initial):") + vals = compute(var_vals, values(adnodes_of_interest)) + showln(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) -mgr.emit_stats("initial") -mgr.loss_mgr.train!(epochs=EPOCHS, learning_rate=LEARNING_RATE) + mgr.emit_stats("initial") + mgr.loss_mgr.train!(; epochs=EPOCHS, learning_rate) -println_flush(io, "ADNodes of interest (trained):") -vals = compute(var_vals, values(adnodes_of_interest)) -showln(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) + println_flush(io, "ADNodes of interest (trained):") + vals = compute(var_vals, values(adnodes_of_interest)) + showln(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) -mgr.emit_stats("trained") + mgr.emit_stats("trained") -t′ = now() -println(io, t′) -println(io, "Total time elapsed: $(canonicalize(t′ - t))") + t′ = now() + println(io, t′) + println(io, "Total time elapsed: $(canonicalize(t′ - t))") -include("dump_loss_graph.jl") \ No newline at end of file + # include("dump_loss_graph.jl") +end \ No newline at end of file diff --git a/src/autodiff_pr/train.jl b/src/autodiff_pr/train.jl index ddf9e07c..e69b7dc8 100644 --- a/src/autodiff_pr/train.jl +++ b/src/autodiff_pr/train.jl @@ -17,7 +17,14 @@ mutable struct LogPrExpander end function expand_logprs(l::LogPrExpander, root::ADNode)::ADNode - fl(x::LogPr) = expand_logprs(l, logprob(l.w, x.bool)) + fl(x::LogPr) = begin + lpr = logprob(l.w, x.bool) + if lpr isa AbstractFloat + Constant(lpr) + else + expand_logprs(l, logprob(l.w, x.bool)) + end + end fl(x::Var) = x fl(x::Constant) = x fi(x::Add, call) = Add(call(x.x), call(x.y)) From e72ffe79465ebbda0403a080d5bbbcda66ec3ea0 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Fri, 8 Mar 2024 20:58:10 -0800 Subject: [PATCH 075/231] generalize train, two curves --- examples/qc/benchmarks/benchmarks.jl | 26 ++++++++----- src/autodiff_pr/train.jl | 56 +++++++++++++++++++++------- 2 files changed, 60 insertions(+), 22 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index d0ba5963..edf68352 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -63,14 +63,14 @@ end emit_stats(m::SimpleLossMgr, tag) = m.emit_stats(tag) train!(m::SimpleLossMgr; epochs, learning_rate) = m.train!(; epochs, learning_rate) -function save_learning_curve(out_dir, learning_curve) - open(joinpath(out_dir, "learning_curve.csv"), "w") do file +function save_learning_curve(out_dir, learning_curve, name) + open(joinpath(out_dir, "$(name).csv"), "w") do file xs = 0:length(learning_curve)-1 for (epoch, logpr) in zip(xs, learning_curve) println(file, "$(epoch)\t$(logpr)") end plot(xs, learning_curve) - savefig(joinpath(out_dir, "learning_curve.svg")) + savefig(joinpath(out_dir, "$(name).svg")) end end @@ -86,7 +86,7 @@ function create_simple_loss_manager(loss, io, out_dir, var_vals) println(io, " $(time_train) seconds") println(io) - save_learning_curve(out_dir, learning_curve) + save_learning_curve(out_dir, learning_curve, "loss") end SimpleLossMgr(emit_stats, f_train, loss) end @@ -95,6 +95,8 @@ function train_via_sampling_entropy!(io, out_dir, var_vals, e; epochs, learning_ learning_rate = learning_rate / samples_per_batch learning_curve = [] + additional_learning_curve = [] + time_sample = 0 time_step = 0 println_flush(io, "Training...") @@ -119,13 +121,18 @@ function train_via_sampling_entropy!(io, out_dir, var_vals, e; epochs, learning_ last_batch = epochs_done + epochs_this_batch == epochs println_flush(io, "Stepping...") - time_step_here = @elapsed subcurve = Dice.train!(var_vals, - loss + (additional_loss * additional_loss_lr / learning_rate) - ; epochs=epochs_this_batch, learning_rate, append_last_loss=last_batch) + time_step_here = @elapsed subcurve, additional_subcurve = Dice.train!( + var_vals, + [loss => learning_rate, additional_loss => additional_loss_lr]; + epochs=epochs_this_batch, append_last_loss=last_batch) time_step += time_step_here append!(learning_curve, subcurve) + append!(additional_learning_curve, additional_subcurve) println(io, " $(time_step_here) seconds") - if isinf(last(learning_curve)) || isnan(last(learning_curve)) + if (isinf(last(learning_curve)) || isnan(last(learning_curve)) + || isinf(last(additional_learning_curve)) + || isnan(last(additional_learning_curve)) + ) println(io, "Stopping early due to Inf/NaN loss") break end @@ -135,7 +142,8 @@ function train_via_sampling_entropy!(io, out_dir, var_vals, e; epochs, learning_ println(io, "Step time: $(time_step) seconds") println(io) - save_learning_curve(out_dir, learning_curve) + save_learning_curve(out_dir, learning_curve, "sampling_loss") + save_learning_curve(out_dir, additional_learning_curve, "additional_loss") end ################################## diff --git a/src/autodiff_pr/train.jl b/src/autodiff_pr/train.jl index e69b7dc8..73d42342 100644 --- a/src/autodiff_pr/train.jl +++ b/src/autodiff_pr/train.jl @@ -77,34 +77,64 @@ end function train!( var_vals::Valuation, - loss::ADNode; + loss_lrs::Vector{<:Pair{<:ADNode, <:Real}}; epochs::Integer, - learning_rate::Real, append_last_loss=true, stop_if_inf_or_nan=true, ) - losses = [] - l = LogPrExpander(WMC(BDDCompiler(bool_roots([loss])))) - loss = expand_logprs(l, loss) + # Unzip + losses = ADNode[] + lrs = Real[] + for (loss, lr) in loss_lrs + push!(losses, loss) + push!(lrs, lr) + end + + # Expand + l = LogPrExpander(WMC(BDDCompiler(bool_roots(losses)))) + losses = [expand_logprs(l, loss) for loss in losses] + + curves = [[] for _ in 1:length(losses)] + function update_curves(vals) + for (i, loss) in enumerate(losses) + push!(curves[i], vals[loss]) + end + end + for _ in 1:epochs - vals, derivs = differentiate(var_vals, Derivs(loss => 1)) + vals, derivs = differentiate( + var_vals, + Derivs(loss => lr for (loss, lr) in zip(losses, lrs)) + ) - if stop_if_inf_or_nan && (isinf(vals[loss]) || isnan(vals[loss])) - push!(losses, vals[loss]) - return losses + if stop_if_inf_or_nan && any(isinf(vals[loss]) || isnan(vals[loss]) for loss in losses) + update_curves(vals) + return curves end # update vars for (adnode, d) in derivs if adnode isa Var - var_vals[adnode] -= d * learning_rate + var_vals[adnode] -= d end end - push!(losses, vals[loss]) + update_curves(vals) end - append_last_loss && push!(losses, compute_mixed(var_vals, loss)) - losses + + append_last_loss && update_curves(compute(var_vals, losses)) + curves +end + +function train!( + var_vals::Valuation, + loss::ADNode; + epochs::Integer, + learning_rate::Real, + append_last_loss=true, + stop_if_inf_or_nan=true, +) + train!(var_vals, [loss => learning_rate]; epochs, append_last_loss, stop_if_inf_or_nan)[1] end function collect_flips(bools) From 8daf00fc1da039081218c0f3fa0dd2325f59cfb4 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Fri, 8 Mar 2024 21:54:40 -0800 Subject: [PATCH 076/231] allow RBT to depend on parent flip --- examples/qc/benchmarks/benchmarks.jl | 8 +-- examples/qc/benchmarks/lib/rbt/generator.jl | 25 ++++++--- examples/qc/benchmarks/lib/rbt/to_coq.jl | 58 ++++++++++++--------- 3 files changed, 58 insertions(+), 33 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index edf68352..84203489 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -637,8 +637,9 @@ struct TypeBasedRBTGenerator <: GenerationParams{RBT} size::Integer color_by_size::Bool learn_leaf_weights::Bool - TypeBasedRBTGenerator(; size, color_by_size, learn_leaf_weights) = - new(size, color_by_size, learn_leaf_weights) + use_parent_color::Bool + TypeBasedRBTGenerator(; size, color_by_size, learn_leaf_weights, use_parent_color) = + new(size, color_by_size, learn_leaf_weights, use_parent_color) end function to_subpath(p::TypeBasedRBTGenerator) [ @@ -647,10 +648,11 @@ function to_subpath(p::TypeBasedRBTGenerator) "sz=$(p.size)", "color_by_size=$(p.color_by_size)", "learn_leaf_weights=$(p.learn_leaf_weights)", + "use_parent_color=$(p.use_parent_color)", ] end function generate(p::TypeBasedRBTGenerator) - RBTGeneration(tb_gen_rbt(p.size, p.color_by_size, p.learn_leaf_weights)) + RBTGeneration(tb_gen_rbt(p, p.size, false)) end function generation_params_emit_stats(p::TypeBasedRBTGenerator, io, out_dir, s, var_vals) path = joinpath(out_dir, "$(s)_Generator.v") diff --git a/examples/qc/benchmarks/lib/rbt/generator.jl b/examples/qc/benchmarks/lib/rbt/generator.jl index 99c5dd5e..1e522174 100644 --- a/examples/qc/benchmarks/lib/rbt/generator.jl +++ b/examples/qc/benchmarks/lib/rbt/generator.jl @@ -41,19 +41,32 @@ Coq < Coq < Coq < GenSizedTree = |} : GenSized Tree ==# -function tb_gen_rbt(sz, color_by_sz, learn_leaf_weights) +function tb_gen_rbt(p, sz, parent_red) if sz == 0 DistRBE() else - @dice_ite if flip(if learn_leaf_weights register_weight!("leaf_sz$(sz)") else .5 end) + flip_leaf = if p.learn_leaf_weights + @dice_ite if parent_red | !p.use_parent_color + flip(register_weight!("leaf_sz$(sz)_redparent")) + else + flip(register_weight!("leaf_sz$(sz)_blackparent")) + end + else + flip(.5) + end + @dice_ite if flip_leaf DistRBE() else - color_group = if color_by_sz "red_sz$(sz)" else "red" end - color = if flip(register_weight!(color_group)) DistRed() else DistBlack() end + flip_red = @dice_ite if parent_red | !p.use_parent_color + flip(register_weight!(if p.color_by_size "red_sz$(sz)_redparent" else "red_redparent" end)) + else + flip(register_weight!(if p.color_by_size "red_sz$(sz)_blackparent" else "red_blackparent" end)) + end + color = if flip_red DistRed() else DistBlack() end k = DistInt32(0) v = DistInt32(0) - l = tb_gen_rbt(sz - 1, color_by_sz, learn_leaf_weights) - r = tb_gen_rbt(sz - 1, color_by_sz, learn_leaf_weights) + l = tb_gen_rbt(p, sz - 1, flip_red) + r = tb_gen_rbt(p, sz - 1, flip_red) DistRBT(color, l, k, v, r) end end diff --git a/examples/qc/benchmarks/lib/rbt/to_coq.jl b/examples/qc/benchmarks/lib/rbt/to_coq.jl index d251364a..b3904c6c 100644 --- a/examples/qc/benchmarks/lib/rbt/to_coq.jl +++ b/examples/qc/benchmarks/lib/rbt/to_coq.jl @@ -2,19 +2,21 @@ flatten = Iterators.flatten function typebased_rbt_to_coq(p, adnodes_vals, io) w(s) = thousandths(adnodes_vals[s]) - red_wt_key(sz) = if p.color_by_size "red_sz$(sz)" else "red" end - red_wt(sz) = w(red_wt_key(sz)) - leaf_wt_key(sz) = "leaf_sz$(sz)" - leaf_wt(sz) = w(leaf_wt_key(sz)) + ap(s, rp) = if rp || !p.use_parent_color "$(s)_redparent" else "$(s)_blackparent" end + red_wt_key(sz, rp) = ap(if p.color_by_size "red_sz$(sz)" else "red" end, rp) + red_wt(sz, rp) = w(red_wt_key(sz, rp)) + leaf_wt_key(sz, rp) = ap("leaf_sz$(sz)", rp) + leaf_wt(sz, rp) = w(leaf_wt_key(sz, rp)) expected_keys = Set( flatten( if p.learn_leaf_weights - ([red_wt_key(sz),leaf_wt_key(sz)]) + ([red_wt_key(sz, rp),leaf_wt_key(sz, rp)]) else - ([red_wt_key(sz)]) + ([red_wt_key(sz, rp)]) end - for sz in 1:p.size + for (sz, rp) in Base.product(1:p.size, [false, true]) + if (sz, rp) != (p.size, true) )) @soft_assert io issetequal(keys(adnodes_vals), expected_keys) "$(adnodes_vals) $(expected_keys)" """ @@ -44,21 +46,29 @@ Fixpoint get {a: Type} (l : list (nat * a)) (target_key : nat) (default : a): a Definition manual_gen_tree := fun s : nat => (let - fix arb_aux (size : nat) : G Tree := - let weight_red := get [ - $( - join(["($(sz), $(red_wt(sz)))" for sz in 1:p.size], "; ") - ) - ] s 0 in + fix arb_aux (size : nat) (parent_color : Color) : G Tree := + let weight_red := match parent_color with + | R => + get [ + $(join(["($(sz), $(red_wt(sz, true)))" for sz in 1:p.size - 1], "; ")) + ] s 0 + | B => + get [ + $(join(["($(sz), $(red_wt(sz, false)))" for sz in 1:p.size], "; ")) + ] s 0 + end in let weight_leaf := $( - if p.learn_leaf_weights - "get [ - $( - join(["($(sz), $(leaf_wt(sz)))" for sz in 1:p.size], "; ") - ) - ] s 0" - else "500" end - ) in +if p.learn_leaf_weights "match parent_color with + | R => + get [ + $(join(["($(sz), $(leaf_wt(sz, true)))" for sz in 1:p.size - 1], "; ")) + ] s 0 + | B => + get [ + $(join(["($(sz), $(leaf_wt(sz, false)))" for sz in 1:p.size], "; ")) + ] s 0 + end" +else "500" end) in match size with | 0 => returnGen E | S size' => @@ -66,20 +76,20 @@ Definition manual_gen_tree := (1000 - weight_leaf, bindGen (freq [ (weight_red, returnGen R); (1000-weight_red, returnGen B)]) (fun p0 : Color => - bindGen (arb_aux size') + bindGen (arb_aux size' p0) (fun p1 : Tree => bindGen arbitrary (fun p2 : Z => bindGen arbitrary (fun p3 : Z => - bindGen (arb_aux size') + bindGen (arb_aux size' p0) (fun p4 : Tree => returnGen (T p0 p1 p2 p3 p4)))))))] end in arb_aux) s. #[global] Instance genTree : GenSized (Tree) := - {| arbitrarySized n := manual_gen_tree n |}. + {| arbitrarySized n := manual_gen_tree n B |}. (* --------------------- Tests --------------------- *) From d422f572f924fb7343a660cf4f2c85dc3072e352 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 12 Mar 2024 22:45:48 -0700 Subject: [PATCH 077/231] have sample take rng --- src/inference/sample.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/inference/sample.jl b/src/inference/sample.jl index b307b703..0bad5524 100644 --- a/src/inference/sample.jl +++ b/src/inference/sample.jl @@ -2,12 +2,12 @@ export sample, sample_as_dist using DirectedAcyclicGraphs: foldup """Run vanilla rejection sampling without any compilation""" -function sample(x; evidence=true) +function sample(rng, x; evidence=true) while true vcache = Dict() fl(n::Flip) = begin if !haskey(vcache, n) - vcache[n] = rand() < n.prob + vcache[n] = rand(rng) < n.prob end vcache[n] end @@ -48,7 +48,7 @@ function sample(x; evidence=true) end end -function sample_as_dist(var_vals, x; evidence=true) +function sample_as_dist(rng, var_vals, x; evidence=true) a = ADComputer(var_vals) while true vcache = Dict() @@ -59,7 +59,7 @@ function sample_as_dist(var_vals, x; evidence=true) else n.prob end - vcache[n] = rand() < p + vcache[n] = rand(rng) < p end vcache[n] end From c3b422027174f85ca8d3be075124020429a358d3 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 12 Mar 2024 22:47:09 -0700 Subject: [PATCH 078/231] runstate and fix sampling entropy sign --- examples/qc/benchmarks/benchmarks.jl | 298 +++++++++--------- examples/qc/benchmarks/format_bespoke_stlc.jl | 190 ----------- examples/qc/benchmarks/lib/bst/generator.jl | 24 +- examples/qc/benchmarks/lib/lib.jl | 11 + examples/qc/benchmarks/lib/rbt/generator.jl | 14 +- examples/qc/benchmarks/lib/stlc/generator.jl | 40 +-- examples/qc/benchmarks/lib/util.jl | 46 ++- examples/qc/benchmarks/main.jl | 169 ++++------ 8 files changed, 297 insertions(+), 495 deletions(-) delete mode 100644 examples/qc/benchmarks/format_bespoke_stlc.jl diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 84203489..1bcc4150 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -1,4 +1,8 @@ +include("lib/lib.jl") + using Plots +using Random + ENV["GKSwstype"] = "100" # prevent plots from displaying abstract type Benchmark end @@ -16,35 +20,32 @@ struct BenchmarkMgr end function create_benchmark_manager( - io::IO, - out_dir::String, - var_vals::Valuation, + rs::RunState, generation_params::GenerationParams{T}, loss_params::LossParams{T} ) where T - println_flush(io, "Building generation computation graph...") - time_build_generation = @elapsed generation = generate(generation_params) - println_flush(io, " $(time_build_generation) seconds") - println_flush(io) + println_flush(rs.io, "Building generation computation graph...") + time_build_generation = @elapsed generation = generate(rs, generation_params) + println_flush(rs.io, " $(time_build_generation) seconds") + println_flush(rs.io) - loss_mgr = create_loss_manager(loss_params, io, out_dir, var_vals, generation) + loss_mgr = create_loss_manager(rs, loss_params, generation) - function emit_stats(s::String) - println_flush(io, "Parameter values ($(s)):") - showln(io, var_vals) + function f_emit_stats(s::String) + println_flush(rs.io, "Parameter values ($(s)):") + showln(rs.io, rs.var_vals) - generation_emit_stats(generation, io, out_dir, s, var_vals) - loss_mgr.emit_stats(s) - - generation_params_emit_stats(generation_params, io, out_dir, s, var_vals) + generation_emit_stats(rs, generation, s) + emit_stats(loss_mgr, s) + generation_params_emit_stats(rs, generation_params, s) end - BenchmarkMgr(emit_stats, loss_mgr) + BenchmarkMgr(f_emit_stats, loss_mgr) end -function generation_params_emit_stats(generation_params, io, out_dir, s, var_vals) - println_flush(io, "Default generation_params_emit_stats") - println_flush(io) +function generation_params_emit_stats(rs::RunState, generation_params, s) + println_flush(rs.io, "Default generation_params_emit_stats") + println_flush(rs.io) end struct LossMgrImpl <: LossMgr @@ -74,24 +75,24 @@ function save_learning_curve(out_dir, learning_curve, name) end end -function create_simple_loss_manager(loss, io, out_dir, var_vals) +function create_simple_loss_manager(rs, loss) function emit_stats(tag) - loss_val = compute_mixed(var_vals, loss) - println(io, "Loss ($(tag)): $(loss_val)") - println(io) + loss_val = compute_mixed(rs.var_vals, loss) + println(rs.io, "Loss ($(tag)): $(loss_val)") + println(rs.io) end function f_train(; epochs, learning_rate) - println_flush(io, "Training...") - time_train = @elapsed learning_curve = Dice.train!(var_vals, loss; epochs, learning_rate) - println(io, " $(time_train) seconds") - println(io) + println_flush(rs.io, "Training...") + time_train = @elapsed learning_curve = Dice.train!(rs.var_vals, loss; epochs, learning_rate) + println(rs.io, " $(time_train) seconds") + println(rs.io) - save_learning_curve(out_dir, learning_curve, "loss") + save_learning_curve(rs.out_dir, learning_curve, "loss") end SimpleLossMgr(emit_stats, f_train, loss) end -function train_via_sampling_entropy!(io, out_dir, var_vals, e; epochs, learning_rate, resampling_frequency, samples_per_batch, consider, ignore, additional_loss, additional_loss_lr) +function train_via_sampling_entropy!(rs, e; epochs, learning_rate, resampling_frequency, samples_per_batch, consider, ignore, additional_loss, additional_loss_lr) learning_rate = learning_rate / samples_per_batch learning_curve = [] @@ -99,16 +100,16 @@ function train_via_sampling_entropy!(io, out_dir, var_vals, e; epochs, learning_ time_sample = 0 time_step = 0 - println_flush(io, "Training...") + println_flush(rs.io, "Training...") for epochs_done in 0:resampling_frequency:epochs-1 - println_flush(io, "Sampling...") - time_sample_here = @elapsed samples = with_concrete_ad_flips(var_vals, e) do - [sample_as_dist(Valuation(), e) for _ in 1:samples_per_batch] + println_flush(rs.io, "Sampling...") + time_sample_here = @elapsed samples = with_concrete_ad_flips(rs.var_vals, e) do + [sample_as_dist(rs.rng, Valuation(), e) for _ in 1:samples_per_batch] end time_sample += time_sample_here - println(io, " $(time_sample_here) seconds") + println(rs.io, " $(time_sample_here) seconds") - loss = -sum( + loss = sum( LogPr(prob_equals(e, sample)) for sample in samples if consider(sample) @@ -120,30 +121,30 @@ function train_via_sampling_entropy!(io, out_dir, var_vals, e; epochs, learning_ epochs_this_batch = min(epochs - epochs_done, resampling_frequency) last_batch = epochs_done + epochs_this_batch == epochs - println_flush(io, "Stepping...") + println_flush(rs.io, "Stepping...") time_step_here = @elapsed subcurve, additional_subcurve = Dice.train!( - var_vals, + rs.var_vals, [loss => learning_rate, additional_loss => additional_loss_lr]; epochs=epochs_this_batch, append_last_loss=last_batch) time_step += time_step_here append!(learning_curve, subcurve) append!(additional_learning_curve, additional_subcurve) - println(io, " $(time_step_here) seconds") + println(rs.io, " $(time_step_here) seconds") if (isinf(last(learning_curve)) || isnan(last(learning_curve)) || isinf(last(additional_learning_curve)) || isnan(last(additional_learning_curve)) ) - println(io, "Stopping early due to Inf/NaN loss") + println(rs.io, "Stopping early due to Inf/NaN loss") break end end - println(io, "Sample time: $(time_sample) seconds") - println(io, "Step time: $(time_step) seconds") - println(io) + println(rs.io, "Sample time: $(time_sample) seconds") + println(rs.io, "Step time: $(time_step) seconds") + println(rs.io) - save_learning_curve(out_dir, learning_curve, "sampling_loss") - save_learning_curve(out_dir, additional_learning_curve, "additional_loss") + save_learning_curve(rs.out_dir, learning_curve, "sampling_loss") + save_learning_curve(rs.out_dir, additional_learning_curve, "additional_loss") end ################################## @@ -155,13 +156,13 @@ struct STLCGeneration <: Generation{STLC} e::DistI{Opt{DistI{Expr}}} constructors_overapproximation::Vector{DistI{Opt{DistI{Expr}}}} end -function generation_emit_stats(g::STLCGeneration, io::IO, out_dir::String, s::String, var_vals::Valuation) - println_flush(io, "Saving samples...") - time_sample = @elapsed with_concrete_ad_flips(var_vals, g.e) do - save_samples(joinpath(out_dir, "terms_$(s).txt"), g.e; io=io) +function generation_emit_stats(rs::RunState, g::STLCGeneration, s::String) + println_flush(rs.io, "Saving samples...") + time_sample = @elapsed with_concrete_ad_flips(rs.var_vals, g.e) do + save_samples(joinpath(rs.out_dir, "terms_$(s).txt"), g.e; io=rs.io) end - println(io, " $(time_sample) seconds") - println(io) + println(rs.io, " $(time_sample) seconds") + println(rs.io) end ################################## @@ -172,8 +173,8 @@ struct BespokeSTLCGenerator <: GenerationParams{STLC} param_vars_by_size::Bool size::Integer ty_size::Integer - BespokeSTLCGenerator(;param_vars_by_size, size, ty_size) = new(param_vars_by_size, size, ty_size) end +BespokeSTLCGenerator(;param_vars_by_size, size, ty_size) = BespokeSTLCGenerator(param_vars_by_size, size, ty_size) function to_subpath(p::BespokeSTLCGenerator) [ "stlc", @@ -182,15 +183,16 @@ function to_subpath(p::BespokeSTLCGenerator) "sz=$(p.size)-tysz=$(p.ty_size)", ] end -function generate(p::BespokeSTLCGenerator) +function generate(rs::RunState, p::BespokeSTLCGenerator) constructors_overapproximation = [] function add_ctor(v::DistI{Opt{DistI{Expr}}}) push!(constructors_overapproximation, v) v end e = gen_expr( + rs, DistNil(DistI{Typ}), - gen_type(p.ty_size, p.param_vars_by_size), + gen_type(rs, p.ty_size, p.param_vars_by_size), p.size, p.ty_size, p.param_vars_by_size, @@ -199,19 +201,19 @@ function generate(p::BespokeSTLCGenerator) STLCGeneration(e, constructors_overapproximation) end -function generation_params_emit_stats(p::BespokeSTLCGenerator, io, out_dir, s, var_vals) +function generation_params_emit_stats(rs::RunState, p::BespokeSTLCGenerator, s) if p == BespokeSTLCGenerator(param_vars_by_size=true,size=5,ty_size=2) - path = joinpath(out_dir, "$(s)_Generator.v") + path = joinpath(rs.out_dir, "$(s)_Generator.v") open(path, "w") do file - vals = compute(var_vals, values(adnodes_of_interest)) - adnodes_vals = Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest) + vals = compute(rs.var_vals, values(rs.adnodes_of_interest)) + adnodes_vals = Dict(s => vals[adnode] for (s, adnode) in rs.adnodes_of_interest) println(file, bespoke_stlc_to_coq(adnodes_vals)) end - println_flush(io, "Saved Coq generator to $(path)") + println_flush(rs.io, "Saved Coq generator to $(path)") else - println_flush(io, "Translation back to Coq not defined") + println_flush(rs.io, "Translation back to Coq not defined") end - println_flush(io) + println_flush(rs.io) end ################################## @@ -221,8 +223,8 @@ end struct TypeBasedSTLCGenerator <: GenerationParams{STLC} size::Integer ty_size::Integer - TypeBasedSTLCGenerator(; size, ty_size) = new(size, ty_size) end +TypeBasedSTLCGenerator(; size, ty_size) = TypeBasedSTLCGenerator(size, ty_size) function to_subpath(p::TypeBasedSTLCGenerator) [ "stlc", @@ -230,17 +232,13 @@ function to_subpath(p::TypeBasedSTLCGenerator) "sz=$(p.size)-tysz=$(p.ty_size)", ] end -function generate(p::TypeBasedSTLCGenerator) +function generate(rs::RunState, p::TypeBasedSTLCGenerator) constructors_overapproximation = [] function add_ctor(v::DistI{Expr}) push!(constructors_overapproximation, DistSome(v)) v end - e = tb_gen_expr( - p.size, - p.ty_size, - add_ctor, - ) + e = tb_gen_expr(rs, p.size, p.ty_size, add_ctor) STLCGeneration(DistSome(e), constructors_overapproximation) end @@ -250,15 +248,15 @@ end struct ApproxSTLCConstructorEntropy <: SimpleLossParams{STLC} end to_subpath(::ApproxSTLCConstructorEntropy) = ["approx_entropy"] -function create_loss_manager(p::ApproxSTLCConstructorEntropy, io, out_dir, var_vals, generation) - println_flush(io, "Building computation graph for $(p)...") +function create_loss_manager(rs::RunState, p::ApproxSTLCConstructorEntropy, generation) + println_flush(rs.io, "Building computation graph for $(p)...") time_build_loss = @elapsed loss = sum( neg_entropy(opt_ctor_to_id(ctor), values(stlc_ctor_to_id), ignore_non_support=true) for ctor in generation.constructors_overapproximation ) - println(io, " $(time_build_loss) seconds") - println(io) - create_simple_loss_manager(loss, io, out_dir, var_vals) + println(rs.io, " $(time_build_loss) seconds") + println(rs.io) + create_simple_loss_manager(rs, loss) end ################################## @@ -268,15 +266,15 @@ end struct SamplingSTLCEntropy <: LossParams{STLC} resampling_frequency::Integer samples_per_batch::Integer - function SamplingSTLCEntropy(; resampling_frequency, samples_per_batch) - new(resampling_frequency, samples_per_batch) - end +end +function SamplingSTLCEntropy(; resampling_frequency, samples_per_batch) + SamplingSTLCEntropy(resampling_frequency, samples_per_batch) end to_subpath(p::SamplingSTLCEntropy) = ["sampling_entropy", "freq=$(p.resampling_frequency),spb=$(p.samples_per_batch)"] -function create_loss_manager(p::SamplingSTLCEntropy, io, out_dir, var_vals, g::STLCGeneration) +function create_loss_manager(rs::RunState, p::SamplingSTLCEntropy, g::STLCGeneration) function train!(; epochs, learning_rate) train_via_sampling_entropy!( - io, out_dir, var_vals, g.e; epochs, learning_rate, + rs.io, rs.out_dir, rs.var_vals, g.e; epochs, learning_rate, resampling_frequency=p.resampling_frequency, samples_per_batch=p.samples_per_batch, consider=_->true, ignore=_->false, @@ -289,8 +287,8 @@ end struct NullLoss{T} <: SimpleLossParams{T} end to_subpath(::NullLoss) = ["null"] -function create_loss_manager(::NullLoss{T}, io, out_dir, var_vals, g::Generation{T}) where T - create_simple_loss_manager(Dice.Constant(0), io, out_dir, var_vals) +function create_loss_manager(rs::RunState, ::NullLoss{T}, ::Generation{T}) where T + create_simple_loss_manager(rs, Dice.Constant(0)) end ################################## @@ -300,21 +298,21 @@ end struct SamplingSTLCConstructorEntropy <: LossParams{STLC} resampling_frequency::Integer samples_per_batch::Integer - function SamplingSTLCConstructorEntropy(; resampling_frequency, samples_per_batch) - new(resampling_frequency, samples_per_batch) - end +end +function SamplingSTLCConstructorEntropy(; resampling_frequency, samples_per_batch) + SamplingSTLCConstructorEntropy(resampling_frequency, samples_per_batch) end to_subpath(p::SamplingSTLCConstructorEntropy) = ["sampling_ctor_entropy", "freq=$(p.resampling_frequency),spb=$(p.samples_per_batch)"] -function create_loss_manager(p::SamplingSTLCConstructorEntropy, io, out_dir, var_vals, g::STLCGeneration) - println_flush(io, "Building random_ctor graph...") +function create_loss_manager(rs::RunState, p::SamplingSTLCConstructorEntropy, g::STLCGeneration) + println_flush(rs.io, "Building random_ctor graph...") time_build_random_ctor = @elapsed random_ctor = match(g.e, [ "Some" => e -> choice(collect_constructors(e)), "None" => () -> DistInt32(-1), ]) - println(io, " $(time_build_random_ctor) seconds") + println(rs.io, " $(time_build_random_ctor) seconds") function train!(; epochs, learning_rate) train_via_sampling_entropy!( - io, out_dir, var_vals, random_ctor; epochs, learning_rate, + rs.io, random_ctor; epochs, learning_rate, resampling_frequency=p.resampling_frequency, samples_per_batch=p.samples_per_batch, consider=s->any(prob_equals(s, x)===true for x in values(stlc_ctor_to_id)), ignore=s->prob_equals(s, DistInt32(-1))===true, @@ -331,8 +329,8 @@ end struct STLCConstructorEntropy <: SimpleLossParams{STLC} end to_subpath(::STLCConstructorEntropy) = ["ctor_entropy"] -function create_loss_manager(p::STLCConstructorEntropy, io, out_dir, var_vals, generation::STLCGeneration) - println_flush(io, "Building computation graph for $(p)...") +function create_loss_manager(rs::RunState, p::STLCConstructorEntropy, generation::STLCGeneration) + println_flush(rs.io, "Building computation graph for $(p)...") time_build_loss = @elapsed begin random_term = match(generation.e, [ "Some" => e -> DistSome(choice(collect_constructors(e))), @@ -340,9 +338,9 @@ function create_loss_manager(p::STLCConstructorEntropy, io, out_dir, var_vals, g ]) loss = neg_entropy(random_term, Set([DistSome(i) for i in values(stlc_ctor_to_id)])) end - println(io, " $(time_build_loss) seconds") - println(io) - create_simple_loss_manager(loss, io, out_dir, var_vals) + println(rs.io, " $(time_build_loss) seconds") + println(rs.io) + create_simple_loss_manager(rs, loss) end ################################## @@ -354,7 +352,7 @@ struct BSTGeneration <: Generation{BST} t::DistI{Tree} constructors_overapproximation::Vector{DistI{Tree}} end -function generation_emit_stats(g::BSTGeneration, io::IO, out_dir::String, s::String, var_vals::Valuation) +function generation_emit_stats(rs::RunState, g::BSTGeneration, s::String) end ################################## @@ -377,8 +375,8 @@ end struct BespokeBSTGenerator <: GenerationParams{BST} size::Integer vals::BSTValues - BespokeBSTGenerator(; size, vals) = new(size, vals) end +BespokeBSTGenerator(; size, vals) = BespokeBSTGenerator(size, vals) function to_subpath(p::BespokeBSTGenerator) [ "bst", @@ -387,18 +385,18 @@ function to_subpath(p::BespokeBSTGenerator) "sz=$(p.size)", ] end -function generate(p::BespokeBSTGenerator) +function generate(rs::RunState, p::BespokeBSTGenerator) constructors_overapproximation = [] function add_ctor(v::DistI{Tree}) push!(constructors_overapproximation, v) v end t = if p.vals == BSTDummyVals - gen_tree_dummy_vals(p.size, add_ctor) + gen_tree_dummy_vals(rs, p.size, add_ctor) elseif p.vals == BSTApproxVals - gen_tree(p.size, DistNat(0), DistNat(40), true, add_ctor) + gen_tree(rs, p.size, DistNat(0), DistNat(40), true, add_ctor) elseif p.vals == BSTActualVals - gen_tree(p.size, DistNat(0), DistNat(40), false, add_ctor) + gen_tree(rs, p.size, DistNat(0), DistNat(40), false, add_ctor) else error() end @@ -412,8 +410,8 @@ end struct TypeBasedBSTGenerator <: GenerationParams{BST} size::Integer - TypeBasedBSTGenerator(; size) = new(size) end +TypeBasedBSTGenerator(; size) = TypeBasedBSTGenerator(size) function to_subpath(p::TypeBasedBSTGenerator) [ "bst", @@ -421,13 +419,13 @@ function to_subpath(p::TypeBasedBSTGenerator) "sz=$(p.size)", ] end -function generate(p::TypeBasedBSTGenerator) +function generate(rs::RunState, p::TypeBasedBSTGenerator) constructors_overapproximation = [] function add_ctor(v::DistI{Tree}) push!(constructors_overapproximation, v) v end - t = typebased_gen_tree(p.size, add_ctor) + t = typebased_gen_tree(rs, p.size, add_ctor) BSTGeneration(t, constructors_overapproximation) end @@ -438,15 +436,15 @@ end struct SamplingBSTEntropy <: LossParams{BST} resampling_frequency::Integer samples_per_batch::Integer - function SamplingBSTEntropy(; resampling_frequency, samples_per_batch) - new(resampling_frequency, samples_per_batch) - end +end +function SamplingBSTEntropy(; resampling_frequency, samples_per_batch) + SamplingBSTEntropy(resampling_frequency, samples_per_batch) end to_subpath(p::SamplingBSTEntropy) = ["sampling_entropy", "freq=$(p.resampling_frequency),spb=$(p.samples_per_batch)"] -function create_loss_manager(p::SamplingBSTEntropy, io, out_dir, var_vals, g::BSTGeneration) +function create_loss_manager(rs::RunState, p::SamplingBSTEntropy, g::BSTGeneration) function train!(; epochs, learning_rate) train_via_sampling_entropy!( - io, out_dir, var_vals, g.t; epochs, learning_rate, + rs, g.t; epochs, learning_rate, resampling_frequency=p.resampling_frequency, samples_per_batch=p.samples_per_batch, consider=_->true, ignore=_->false, @@ -463,15 +461,15 @@ end struct ApproxBSTConstructorEntropy <: SimpleLossParams{BST} end to_subpath(::ApproxBSTConstructorEntropy) = ["approx_ctor_entropy"] -function create_loss_manager(p::ApproxBSTConstructorEntropy, io, out_dir, var_vals, generation::BSTGeneration) - println_flush(io, "Building computation graph for $(p)...") +function create_loss_manager(rs::RunState, p::ApproxBSTConstructorEntropy, generation::BSTGeneration) + println_flush(rs.io, "Building computation graph for $(p)...") time_build_loss = @elapsed loss = sum( neg_entropy(ctor_to_id(ctor), values(bst_ctor_to_id), ignore_non_support=true) for ctor in generation.constructors_overapproximation ) - println(io, " $(time_build_loss) seconds") - println(io) - create_simple_loss_manager(loss, io, out_dir, var_vals) + println(rs.io, " $(time_build_loss) seconds") + println(rs.io) + create_simple_loss_manager(rs, loss) end ################################## @@ -517,24 +515,24 @@ struct MLELossParams{T} <: SimpleLossParams{T} MLELossParams(; metric::Metric{T}, target_dist) where T = new{T}(metric, target_dist) end to_subpath(p::MLELossParams) = [name(p.metric), name(p.target_dist)] -function create_loss_manager(p::MLELossParams, io, out_dir, var_vals, generation) - println_flush(io, "Building computation graph for $(p)...") +function create_loss_manager(rs::RunState, p::MLELossParams, generation) + println_flush(rs.io, "Building computation graph for $(p)...") time_build_loss = @elapsed begin metric = compute_metric(p.metric, generation) loss = metric_loss(metric, p.target_dist) end - println(io, " $(time_build_loss) seconds") - println(io) + println(rs.io, " $(time_build_loss) seconds") + println(rs.io) - mgr = create_simple_loss_manager(loss, io, out_dir, var_vals) + mgr = create_simple_loss_manager(rs, loss) # Also save distribution of metric being trained function f_emit′(tag) - println_flush(io, "Saving $(tag) distribution...") - time_infer = @elapsed metric_dist = pr_mixed(var_vals)(metric) - println(io, " $(time_infer) seconds") - save_metric_dist(joinpath(out_dir, "dist_$(name(p.metric))_$(tag).csv"), metric_dist; io) - println(io) + println_flush(rs.io, "Saving $(tag) distribution...") + time_infer = @elapsed metric_dist = pr_mixed(rs.var_vals)(metric) + println(rs.io, " $(time_infer) seconds") + save_metric_dist(joinpath(rs.out_dir, "dist_$(name(p.metric))_$(tag).csv"), metric_dist; rs.io) + println(rs.io) emit_stats(mgr, tag) end @@ -598,15 +596,15 @@ function to_subpath(p::MixedLossParams) "_AND_" )] end -function create_loss_manager(p::MixedLossParams{T}, io, out_dir, var_vals, generation::Generation{T}) where T +function create_loss_manager(rs::RunState, p::MixedLossParams{T}, generation::Generation{T}) where T mixed_loss = Dice.Constant(0) mgrs = SimpleLossMgr[] for (subp, weight) in p.weighted_losses - mgr::SimpleLossMgr = create_loss_manager(subp, io, out_dir, var_vals, generation) + mgr::SimpleLossMgr = create_loss_manager(rs, subp, generation) push!(mgrs, mgr) mixed_loss += Dice.Constant(weight) * mgr.loss end - mgr = create_simple_loss_manager(mixed_loss, io, out_dir, var_vals) + mgr = create_simple_loss_manager(rs, mixed_loss) # also emit for submgrs function emit_stats(tag) @@ -626,7 +624,7 @@ abstract type RBT <: Benchmark end struct RBTGeneration <: Generation{RBT} t::DistI{RBTree} end -function generation_emit_stats(g::RBTGeneration, io::IO, out_dir::String, s::String, var_vals::Valuation) +function generation_emit_stats(::RunState, g::RBTGeneration, s::String) end ################################## @@ -638,9 +636,9 @@ struct TypeBasedRBTGenerator <: GenerationParams{RBT} color_by_size::Bool learn_leaf_weights::Bool use_parent_color::Bool - TypeBasedRBTGenerator(; size, color_by_size, learn_leaf_weights, use_parent_color) = - new(size, color_by_size, learn_leaf_weights, use_parent_color) end +TypeBasedRBTGenerator(; size, color_by_size, learn_leaf_weights, use_parent_color) = + TypeBasedRBTGenerator(size, color_by_size, learn_leaf_weights, use_parent_color) function to_subpath(p::TypeBasedRBTGenerator) [ "rbt", @@ -651,17 +649,17 @@ function to_subpath(p::TypeBasedRBTGenerator) "use_parent_color=$(p.use_parent_color)", ] end -function generate(p::TypeBasedRBTGenerator) - RBTGeneration(tb_gen_rbt(p, p.size, false)) +function generate(rs::RunState, p::TypeBasedRBTGenerator) + RBTGeneration(tb_gen_rbt(rs, p, p.size, false)) end -function generation_params_emit_stats(p::TypeBasedRBTGenerator, io, out_dir, s, var_vals) - path = joinpath(out_dir, "$(s)_Generator.v") +function generation_params_emit_stats(rs::RunState, p::TypeBasedRBTGenerator, s) + path = joinpath(rs.out_dir, "$(s)_Generator.v") open(path, "w") do file - vals = compute(var_vals, values(adnodes_of_interest)) - adnodes_vals = Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest) - println(file, typebased_rbt_to_coq(p, adnodes_vals, io)) + vals = compute(rs.var_vals, values(rs.adnodes_of_interest)) + adnodes_vals = Dict(s => vals[adnode] for (s, adnode) in rs.adnodes_of_interest) + println(file, typebased_rbt_to_coq(p, adnodes_vals, rs.io)) end - println_flush(io, "Saved Coq generator to $(path)") + println_flush(rs.io, "Saved Coq generator to $(path)") end abstract type Property{T} end @@ -670,25 +668,25 @@ struct SatisfyPropertyLoss{T} <: SimpleLossParams{T} property::Property{T} end to_subpath(p::SatisfyPropertyLoss) = [name(p.property)] -function create_loss_manager(p::SatisfyPropertyLoss, io, out_dir, var_vals, generation) - println_flush(io, "Building computation graph for $(p)...") +function create_loss_manager(rs::RunState, p::SatisfyPropertyLoss, generation) + println_flush(rs.io, "Building computation graph for $(p)...") time_build_loss = @elapsed begin meets_property = check_property(p.property, generation) loss = -LogPr(meets_property) end - println(io, " $(time_build_loss) seconds") - println(io) + println(rs.io, " $(time_build_loss) seconds") + println(rs.io) - mgr = create_simple_loss_manager(loss, io, out_dir, var_vals) + mgr = create_simple_loss_manager(rs, loss) # Also print probability that property is met function f_emit′(tag) - println_flush(io, "Checking pr property met...") - time_infer = @elapsed p_meets = pr_mixed(var_vals)(meets_property)[true] - println(io, " $(time_infer) seconds") + println_flush(rs.io, "Checking pr property met...") + time_infer = @elapsed p_meets = pr_mixed(rs.var_vals)(meets_property)[true] + println(rs.io, " $(time_infer) seconds") - println_flush(io, "Pr meets property: $(p_meets)") - println_flush(io) + println_flush(rs.io, "Pr meets property: $(p_meets)") + println_flush(rs.io) emit_stats(mgr, tag) end @@ -740,11 +738,11 @@ to_subpath(p::SamplingRBTEntropy) = [ "additional_loss=$(join(to_subpath(p.additional_loss_params),"-"))", "allr=$(p.additional_loss_lr)", ] -function create_loss_manager(p::SamplingRBTEntropy, io, out_dir, var_vals, g::RBTGeneration) - mgr::SimpleLossMgr = create_loss_manager(p.additional_loss_params, io, out_dir, var_vals, g) +function create_loss_manager(rs::RunState, p::SamplingRBTEntropy, g::RBTGeneration) + mgr::SimpleLossMgr = create_loss_manager(rs, p.additional_loss_params, g) function train!(; epochs, learning_rate) train_via_sampling_entropy!( - io, out_dir, var_vals, g.t; epochs, learning_rate, + rs, g.t; epochs, learning_rate, resampling_frequency=p.resampling_frequency, samples_per_batch=p.samples_per_batch, consider=_->true, ignore=_->false, @@ -757,6 +755,6 @@ end struct NullLoss{T} <: SimpleLossParams{T} end to_subpath(::NullLoss) = ["null"] -function create_loss_manager(::NullLoss{T}, io, out_dir, var_vals, g::Generation{T}) where T - create_simple_loss_manager(Dice.Constant(0), io, out_dir, var_vals) -end \ No newline at end of file +function create_loss_manager(rs::RunState, ::NullLoss{T}) where T + create_simple_loss_manager(rs, Dice.Constant(0)) +end diff --git a/examples/qc/benchmarks/format_bespoke_stlc.jl b/examples/qc/benchmarks/format_bespoke_stlc.jl deleted file mode 100644 index b708a76b..00000000 --- a/examples/qc/benchmarks/format_bespoke_stlc.jl +++ /dev/null @@ -1,190 +0,0 @@ -gen_to_adnodes_of_interest = Dict( - "W95_996_301_18_834_309_92Generator" => Dict{String, BigFloat}("tysz2_gen_type_tbool" => 0.9958860803834127581051798938551650402115284572008501804626740585442483264202683, "sz4_succ_var" => 0.5555135325826616876316829360539587311191383704357987682846567263119579498738498, "tysz1_gen_type_tbool" => 0.09521566167786227494703411688322314784521063687830728594787150178721132797032849, "sz0_zero_pr_var2" => 0.0687824377005745605607470735156207658872527409814467725025579728430270394444093, "sz2_succ_app" => 0.8278724576109117787246287871734912294251601472850537162286103361725250721408978, "sz4_succ_abs" => 0.3089005603911179785894971195614337115905026675150993991755571798932813518939221, "sz5_succ_var" => 0.5, "sz5_succ_abs" => 0.09240567375296773724251537845777818317289268263681539077022341985889458410328009, "sz2_succ_var" => 0.4629304115476302193408958980191130280350926767463319529650789792104391906327555, "sz1_succ_var" => 0.4189884820891497554413093111257656908271650448118762763984949205006515636272106, "sz1_succ_app" => 0.7028090439771752923143759607732418634618908287349296358317585240601663256212681, "sz1_succ_abs" => 0.300708665093580655296213140014473371494141827354513478876184406113679575172175, "sz3_succ_abs" => 0.8340466699407043515706136082425579210124096779460303058803963621511431869599463, "sz3_succ_app" => 0.06625733909610343061443835163605843772662998696847251842717139126879442614165382, "sz5_succ_app" => 0.7577063625047924641130832774155242967977919250538905987595813899869365994625273, "sz4_succ_app" => 0.6090613946482099584511599789979600158859488485459069513842262120756237096072077, "sz2_succ_abs" => 0.01846613009931596555302268641310159724057274188774880335653997283289146685775442, "sz3_succ_var" => 0.2301705815163302533709959537913487485267179537638742849599692474544065870654975), -) - -OUT_DIR = "out" -mkpath(OUT_DIR) - -function main() - for (g, d) in gen_to_adnodes_of_interest - path = joinpath(OUT_DIR, "$(g).v") - if isfile(path) - println("Error: file already exists at the following path:") - println(path) - else - f = open(path, "w") - println(f, format_bespoke_stlc(d)) - close(f) - end - end -end - -thousandths(n) = Integer(round(n, digits=3) * 1000) - -function format_bespoke_stlc(adnodes_of_interest) - @assert issetequal(keys(adnodes_of_interest), ["sz1_succ_abs", "tysz2_gen_type_tbool", "sz3_succ_abs", "sz4_succ_var", "sz3_succ_app", "sz5_succ_app", "tysz1_gen_type_tbool", "sz0_zero_pr_var2", "sz2_succ_app", "sz4_succ_abs", "sz5_succ_var", "sz4_succ_app", "sz2_succ_abs", "sz5_succ_abs", "sz3_succ_var", "sz2_succ_var", "sz1_succ_var", "sz1_succ_app"]) - w(s) = thousandths(adnodes_of_interest[s]) - """ -From QuickChick Require Import QuickChick. Import QcNotation. -From Coq Require Import Bool ZArith List. Import ListNotations. -From ExtLib Require Import Monad. -From ExtLib.Data.Monads Require Import OptionMonad. -Import MonadNotation. - -From STLC Require Import Impl Spec. - -Derive (Arbitrary) for Typ. -Derive (Arbitrary) for Expr. - -Inductive bind : Ctx -> nat -> Typ -> Prop := -| BindNow : forall tau env, bind (tau :: env) 0 tau -| BindLater : forall tau tau' x env, - bind env x tau -> bind (tau' :: env) (S x) tau. - -Inductive typing (G : Ctx) : Expr -> Typ -> Prop := -| TyVar : - forall x T, - bind G x T -> - typing G (Var x) T -| TyBool : - forall b, - typing G (Bool b) TBool -| TyAbs : - forall e T1 T2, - typing (T1 :: G) e T2 -> - typing G (Abs T1 e) (TFun T1 T2) -| TyApp : - forall e1 e2 T1 T2, - typing G e1 (TFun T1 T2) -> - typing G e2 T1 -> - typing G (App e1 e2) T2. - - -(* Look up in list of backtrack weights *) -Fixpoint get {a: Type} (l : list (nat * a)) (target_key : nat) (default : a): a := - match l with - | [] => - (* This branch should never return *) - default - | (key, value) :: l' => - if Nat.eqb key target_key then - value - else get l' target_key default - end. - - -#[export] Instance dec_type (t1 t2 : Typ) : Dec (t1 = t2). -Proof. dec_eq. Defined. -Derive Arbitrary for Typ. - -Fixpoint genVar' (ctx: Ctx) (t: Typ) (p: nat) (r: list nat) : list nat := - match ctx with - | nil => r - | t'::ctx' => - if t = t'? then genVar' ctx' t (p + 1) (p :: r) - else genVar' ctx' t (p + 1) r - end. - -Fixpoint genZero env tau : G (option Expr) := - match tau with - | TBool => - bindGen arbitrary - (fun b : bool => - returnGen (Some (Bool b))) - | TFun T1 T2 => - bindOpt - (genZero (T1 :: env) T2) - (fun e : Expr => - returnGen (Some (Abs T1 e))) - end. - -Fixpoint genTyp (s: nat) : G Typ := - match s with - | 0 => ret TBool - | S s' => - let '(boolWeight, funWeight) := - get - [ - (1, ($(w("tysz1_gen_type_tbool")), 1000-$(w("tysz1_gen_type_tbool")))); - (2, ($(w("tysz2_gen_type_tbool")), 1000-$(w("tysz2_gen_type_tbool")))) - ] - s - (0, 0) in - freq [ - (boolWeight, ret (TBool)) - ; - (funWeight, - t1 <- genTyp s';; - t2 <- genTyp s';; - ret (TFun t1 t2)) - ] - end. - -Fixpoint genExpr env tau (sz: nat) : G (option Expr) := - match sz with - | 0 => - let '(var_weight, zero_weight) := ($(w("sz0_zero_pr_var2")), 1000-$(w("sz0_zero_pr_var2"))) in - backtrack - [(var_weight, oneOf_ (ret None) (map (fun x => returnGen (Some (Var x))) (genVar' env tau 0 []))) - ;(zero_weight, genZero env tau)] - | S sz' => - let '(val_weight, app_weight, var_weight) := - get - [ - (1, ($(w("sz1_succ_abs")), $(w("sz1_succ_app")), $(w("sz1_succ_var")))); - (2, ($(w("sz2_succ_abs")), $(w("sz2_succ_app")), $(w("sz2_succ_var")))); - (3, ($(w("sz3_succ_abs")), $(w("sz3_succ_app")), $(w("sz3_succ_var")))); - (4, ($(w("sz4_succ_abs")), $(w("sz4_succ_app")), $(w("sz4_succ_var")))); - (5, ($(w("sz5_succ_abs")), $(w("sz5_succ_app")), $(w("sz5_succ_var")))) - ] - sz - (0, 0 ,0) in - backtrack - [(var_weight, oneOf_ (ret None) (map (fun x => returnGen (Some (Var x))) (genVar' env tau 0 []))) - ; - (app_weight, - bindGen (genTyp 2) - (fun T1 : Typ => - bindOpt - (genExpr env (TFun T1 tau) sz') - (fun e1 : Expr => - bindOpt - (genExpr env T1 sz') - (fun e2 : Expr => - returnGen (Some (App e1 e2)))))) - ; - (val_weight, - match tau with - | TBool => - bindGen arbitrary - (fun b : bool => - returnGen (Some (Bool b))) - | TFun T1 T2 => - bindOpt - (genExpr (T1 :: env) T2 sz') - (fun e : Expr => - returnGen (Some (Abs T1 e))) - end)] - end. - -Definition gSized := - typ <- arbitrary ;; - genExpr [] typ 5. - - -Definition test_prop_SinglePreserve := - forAllMaybe gSized (fun (e: Expr) => - prop_SinglePreserve e). - -(*! QuickChick test_prop_SinglePreserve. *) - -Definition test_prop_MultiPreserve := - forAllMaybe gSized (fun (e: Expr) => - prop_MultiPreserve e). - -(*! QuickChick test_prop_MultiPreserve. *) - -""" -end - -main() \ No newline at end of file diff --git a/examples/qc/benchmarks/lib/bst/generator.jl b/examples/qc/benchmarks/lib/bst/generator.jl index 5916a160..4fad0fd8 100644 --- a/examples/qc/benchmarks/lib/bst/generator.jl +++ b/examples/qc/benchmarks/lib/bst/generator.jl @@ -1,12 +1,12 @@ safedec(x::DistUInt{T}) where T = @dice_ite if prob_equals(x, DistUInt{T}(0)) DistUInt{T}(0) else x - DistUInt{T}(1) end -function gen_tree(s::Integer, lo::DistNat, hi::DistNat, approx_unif::Bool, track_return) +function gen_tree(rs, s::Integer, lo::DistNat, hi::DistNat, approx_unif::Bool, track_return) track_return( @dice_ite if s == 0 || hi - lo < DistNat(2) DistE() else s′ = s - 1 - if flip(register_weight!("sz$(s)")) + if flip(register_weight!(rs, "sz$(s)")) DistE() else k = if approx_unif @@ -15,27 +15,27 @@ function gen_tree(s::Integer, lo::DistNat, hi::DistNat, approx_unif::Bool, track unif(lo + DistNat(1), safedec(hi)) end v = DistNat(0) # arbitrary - l = gen_tree(s′, lo, k, approx_unif, track_return) - r = gen_tree(s′, k, hi, approx_unif, track_return) + l = gen_tree(rs, s′, lo, k, approx_unif, track_return) + r = gen_tree(rs, s′, k, hi, approx_unif, track_return) DistT(l, k, v, r) end end ) end -function gen_tree_dummy_vals(s::Integer, track_return) +function gen_tree_dummy_vals(rs, s::Integer, track_return) track_return( @dice_ite if s == 0 DistE() else s′ = s - 1 - if flip(register_weight!("sz$(s)")) + if flip(register_weight!(rs, "sz$(s)")) DistE() else k = DistNat(0) v = DistNat(0) # arbitrary - l = gen_tree_dummy_vals(s′, track_return) - r = gen_tree_dummy_vals(s′, track_return) + l = gen_tree_dummy_vals(rs, s′, track_return) + r = gen_tree_dummy_vals(rs, s′, track_return) DistT(l, k, v, r) end end @@ -43,17 +43,17 @@ function gen_tree_dummy_vals(s::Integer, track_return) end -function typebased_gen_tree(s::Integer, track_return) +function typebased_gen_tree(rs, s::Integer, track_return) track_return( @dice_ite if s == 0 DistE() else s′ = s - 1 - if flip(register_weight!("sz$(s)")) + if flip(register_weight!(rs, "sz$(s)")) DistE() else - l = typebased_gen_tree(s′, track_return) - r = typebased_gen_tree(s′, track_return) + l = typebased_gen_tree(rs, s′, track_return) + r = typebased_gen_tree(rs, s′, track_return) k = v = DistNat(0) # arbitrary DistT(l, k, v, r) end diff --git a/examples/qc/benchmarks/lib/lib.jl b/examples/qc/benchmarks/lib/lib.jl index aab4d472..3b748e70 100644 --- a/examples/qc/benchmarks/lib/lib.jl +++ b/examples/qc/benchmarks/lib/lib.jl @@ -1,6 +1,17 @@ using Dice +using Dates +using Random DistNat = DistUInt32 + +struct RunState + var_vals::Valuation + adnodes_of_interest::Dict{String,ADNode} + io::IO + out_dir::String + rng::AbstractRNG +end + include("util.jl") include("stlc/dist.jl") include("stlc/generator.jl") diff --git a/examples/qc/benchmarks/lib/rbt/generator.jl b/examples/qc/benchmarks/lib/rbt/generator.jl index 1e522174..6e43fb3f 100644 --- a/examples/qc/benchmarks/lib/rbt/generator.jl +++ b/examples/qc/benchmarks/lib/rbt/generator.jl @@ -41,15 +41,15 @@ Coq < Coq < Coq < GenSizedTree = |} : GenSized Tree ==# -function tb_gen_rbt(p, sz, parent_red) +function tb_gen_rbt(rs, p, sz, parent_red) if sz == 0 DistRBE() else flip_leaf = if p.learn_leaf_weights @dice_ite if parent_red | !p.use_parent_color - flip(register_weight!("leaf_sz$(sz)_redparent")) + flip(register_weight!(rs, "leaf_sz$(sz)_redparent")) else - flip(register_weight!("leaf_sz$(sz)_blackparent")) + flip(register_weight!(rs, "leaf_sz$(sz)_blackparent")) end else flip(.5) @@ -58,15 +58,15 @@ function tb_gen_rbt(p, sz, parent_red) DistRBE() else flip_red = @dice_ite if parent_red | !p.use_parent_color - flip(register_weight!(if p.color_by_size "red_sz$(sz)_redparent" else "red_redparent" end)) + flip(register_weight!(rs, if p.color_by_size "red_sz$(sz)_redparent" else "red_redparent" end)) else - flip(register_weight!(if p.color_by_size "red_sz$(sz)_blackparent" else "red_blackparent" end)) + flip(register_weight!(rs, if p.color_by_size "red_sz$(sz)_blackparent" else "red_blackparent" end)) end color = if flip_red DistRed() else DistBlack() end k = DistInt32(0) v = DistInt32(0) - l = tb_gen_rbt(p, sz - 1, flip_red) - r = tb_gen_rbt(p, sz - 1, flip_red) + l = tb_gen_rbt(rs, p, sz - 1, flip_red) + r = tb_gen_rbt(rs, p, sz - 1, flip_red) DistRBT(color, l, k, v, r) end end diff --git a/examples/qc/benchmarks/lib/stlc/generator.jl b/examples/qc/benchmarks/lib/stlc/generator.jl index 0c661676..3b8f07e4 100644 --- a/examples/qc/benchmarks/lib/stlc/generator.jl +++ b/examples/qc/benchmarks/lib/stlc/generator.jl @@ -32,12 +32,12 @@ function gen_zero(env::Ctx, tau::DistI{Typ}) ]) end -function gen_type(sz, by_sz) +function gen_type(rs, sz, by_sz) group = if by_sz "tysz$(sz)_" else "" end * "gen_type_tbool" - @dice_ite if sz == 0 || flip(register_weight!(group)) + @dice_ite if sz == 0 || flip(register_weight!(rs, group)) DistTBool() else - DistTFun(gen_type(sz - 1, by_sz), gen_type(sz - 1, by_sz)) + DistTFun(gen_type(rs, sz - 1, by_sz), gen_type(rs, sz - 1, by_sz)) end end @@ -45,12 +45,12 @@ function gen_bool() DistBoolean(flip(0.5)) end -function gen_expr(env::Ctx, tau::DistI{Typ}, sz::Integer, gen_typ_sz::Integer, by_sz, track_return)::DistI{Opt{DistI{Expr}}} +function gen_expr(rs::RunState, env::Ctx, tau::DistI{Typ}, sz::Integer, gen_typ_sz::Integer, by_sz, track_return)::DistI{Opt{DistI{Expr}}} track_return( begin for_prefix = if by_sz "sz$(sz)_" else "" end if sz == 0 - backtrack_for(for_prefix * "zero", [ + backtrack_for(rs, for_prefix * "zero", [ one_of( map(DistI{Expr})( DistVar, @@ -61,7 +61,7 @@ function gen_expr(env::Ctx, tau::DistI{Typ}, sz::Integer, gen_typ_sz::Integer, b ]) else sz′ = sz - 1 - backtrack_for(for_prefix * "succ", [ + backtrack_for(rs, for_prefix * "succ", [ # Var one_of( map(DistI{Expr})( @@ -71,9 +71,9 @@ function gen_expr(env::Ctx, tau::DistI{Typ}, sz::Integer, gen_typ_sz::Integer, b ), # App begin - T1 = gen_type(gen_typ_sz, by_sz) - bind_opt(gen_expr(env, DistTFun(T1, tau), sz′, gen_typ_sz, by_sz, track_return)) do e1 - bind_opt(gen_expr(env, T1, sz′, gen_typ_sz, by_sz, track_return)) do e2 + T1 = gen_type(rs, gen_typ_sz, by_sz) + bind_opt(gen_expr(rs, env, DistTFun(T1, tau), sz′, gen_typ_sz, by_sz, track_return)) do e1 + bind_opt(gen_expr(rs, env, T1, sz′, gen_typ_sz, by_sz, track_return)) do e2 DistSome(DistApp(e1, e2)) end end @@ -82,7 +82,7 @@ function gen_expr(env::Ctx, tau::DistI{Typ}, sz::Integer, gen_typ_sz::Integer, b match(tau, [ "TBool" => () -> DistSome(gen_bool()), "TFun" => (T1, T2) -> - bind_opt(gen_expr(DistCons(T1, env), T2, sz′, gen_typ_sz, by_sz, track_return)) do e + bind_opt(gen_expr(rs, DistCons(T1, env), T2, sz′, gen_typ_sz, by_sz, track_return)) do e DistSome(DistAbs(T1, e)) end ]), @@ -92,27 +92,27 @@ function gen_expr(env::Ctx, tau::DistI{Typ}, sz::Integer, gen_typ_sz::Integer, b ) end -function tb_gen_expr(sz::Integer, ty_sz, track_return) +function tb_gen_expr(rs::RunState, sz::Integer, ty_sz, track_return) track_return( if sz == 0 - @dice_ite if flip(register_weight!("sz$(sz)_pvar")) + @dice_ite if flip(register_weight!(rs, "sz$(sz)_pvar")) DistVar(DistNat(0)) # really, this is arbitrary else DistBoolean(true) # really, this is arbitrary end else sz′ = sz - 1 - frequency_for("sz$(sz)_freq", [ + frequency_for(rs, "sz$(sz)_freq", [ DistVar(DistNat(0)), # really, this is arbitrary DistBoolean(true), # really, this is arbitrary begin typ = tb_gen_type(ty_sz) # TODO - e = tb_gen_expr(sz′, ty_sz, track_return) + e = tb_gen_expr(rs, sz′, ty_sz, track_return) DistAbs(typ, e) end, begin - e1 = tb_gen_expr(sz′, ty_sz, track_return) - e2 = tb_gen_expr(sz′, ty_sz, track_return) + e1 = tb_gen_expr(rs, sz′, ty_sz, track_return) + e2 = tb_gen_expr(rs, sz′, ty_sz, track_return) DistApp(e1, e2) end, ]) @@ -120,16 +120,16 @@ function tb_gen_expr(sz::Integer, ty_sz, track_return) ) end -function tb_gen_type(sz::Integer) +function tb_gen_type(rs::RunState, sz::Integer) if sz == 0 DistTBool() else sz′ = sz - 1 - @dice_ite if flip(register_weight!("tysz$(sz)_ptbool")) + @dice_ite if flip(register_weight!(rs, "tysz$(sz)_ptbool")) DistTBool() else - ty1 = tb_gen_type(sz′) - ty2 = tb_gen_type(sz′) + ty1 = tb_gen_type(rs, sz′) + ty2 = tb_gen_type(rs, sz′) DistTFun(ty1, ty2) end end diff --git a/examples/qc/benchmarks/lib/util.jl b/examples/qc/benchmarks/lib/util.jl index 9ed54b70..b903ee70 100644 --- a/examples/qc/benchmarks/lib/util.jl +++ b/examples/qc/benchmarks/lib/util.jl @@ -1,20 +1,20 @@ -function backtrack_for(name, opts::Vector{DistI{Opt{T}}})::DistI{Opt{T}} where T +function backtrack_for(rs, name, opts::Vector{DistI{Opt{T}}})::DistI{Opt{T}} where T first_some(T, shuffle_for(name, opts)) end -function shuffle_for(name, xs) +function shuffle_for(rs, name, xs) # Hand-build shuffle for lengths 2 and 3 @dice_ite if length(xs) == 2 - pr_var2 = register_weight!("$(name)_pr_var2") + pr_var2 = register_weight!(rs, "$(name)_pr_var2") if flip(pr_var2) [xs[1], xs[2]] else [xs[2], xs[1]] end elseif length(xs) == 3 - var = register_weight!("$(name)_var") - app = register_weight!("$(name)_app") - val = register_weight!("$(name)_abs") + var = register_weight!(rs, "$(name)_var") + app = register_weight!(rs, "$(name)_app") + val = register_weight!(rs, "$(name)_abs") if flip(var / (var + app + val)) # var is first if flip(app / (app + val)) @@ -73,8 +73,8 @@ function map(::Type{RetT}) where RetT end end -function frequency_for(name, xs) - weights = [register_weight!("$(name)_$(i)") for i in 1:length(xs)] +function frequency_for(rs, name, xs) + weights = [register_weight!(rs, "$(name)_$(i)") for i in 1:length(xs)] res = last(xs) weight_sum = last(weights) for i in length(xs) - 1 : -1 : 1 @@ -190,3 +190,33 @@ atexit() do exit(1) end end + +function register_weight!(rs, s) + var = Var("$(s)_before_sigmoid") + if !haskey(rs.var_vals, var) || rs.var_vals[var] == 0 + rs.var_vals[var] = 0 + else + println("WARNING: not registering fresh weight for $(s)") + end + # if random_value + # rs.var_vals[var] = inverse_sigmoid(rand(rs.rng)) + # end + weight = sigmoid(var) + rs.adnodes_of_interest[s] = weight + weight +end + +function print_adnodes_of_interest(rs::RunState, s::String) + println_flush(rs.io, "ADNodes of interest ($(s)):") + vals = compute(rs.var_vals, values(rs.adnodes_of_interest)) + d = Dict(s => vals[adnode] for (s, adnode) in rs.adnodes_of_interest) + showln(rs.io, d) +end + +function println_loud(rs::RunState, x) + for io in Set([rs.io, stdout]) + println_flush(io, x) + end +end + +println_loud(rs) = println_loud(rs, "") diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index efee4e6d..9740b538 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -1,128 +1,81 @@ -# Train an STLC generator to have some property (term size or num apps) match a -# specific distribution (linear or uniform). -# -# Saves the distributions and sampled terms before and after training. - -using Dice -include("lib/lib.jl") include("benchmarks.jl") -############################ -# Config -############################ - -# loss_params = SamplingRBTEntropy( -# resampling_frequency=2, -# samples_per_batch=10000, -# additional_loss_params=NullLoss{RBT}(), -# # additional_loss_params=SatisfyPropertyLoss(MultipleInvariants([ -# # BookkeepingInvariant(), -# # BalanceInvariant(), -# # BlackRootInvariant(), -# # ])), -# additional_loss_lr=0 -# ) -# loss_params = SatisfyPropertyLoss(BookkeepingInvariant()) -EPOCHS=10000 - -var_vals = Valuation() -adnodes_of_interest = Dict{String, ADNode}() -function register_weight!(s) - var = Var("$(s)_before_sigmoid") - if !haskey(var_vals, var) || var_vals[var] == 0 - var_vals[var] = 0 - else - println(io, "WARNING: not registering fresh weight for $(s)") - end - # var_vals[var] = inverse_sigmoid(rand()) - weight = sigmoid(var) - adnodes_of_interest[s] = weight - weight -end - -for (generation_params, learning_rate) in Base.product( - [ - TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=true), - TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=false), - ], - [0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1.], +GENERATION_PARAMS_LIST = [ + TypeBasedRBTGenerator(size=2, color_by_size=true, learn_leaf_weights=true, use_parent_color=true), +] + +LOSS_PARAMS_LIST = [ + SamplingRBTEntropy( + resampling_frequency=5, + samples_per_batch=1000, + additional_loss_params=NullLoss{RBT}(), + additional_loss_lr=0., + ), + SamplingRBTEntropy( + resampling_frequency=5, + samples_per_batch=1000, + additional_loss_params=SatisfyPropertyLoss(MultipleInvariants([ + BookkeepingInvariant(), + BalanceInvariant(), + ])), + additional_loss_lr=0.0003, + ), +] + +LEARNING_RATE_LIST = [0.3] +EPOCHS_LIST = [20] + +SEED = 0 +TAG = "pre_v12_neg_refac" + +for ( + generation_params, loss_params, learning_rate, epochs +) in Base.product( + GENERATION_PARAMS_LIST, LOSS_PARAMS_LIST, LEARNING_RATE_LIST, EPOCHS_LIST ) - empty!(var_vals) - empty!(adnodes_of_interest) - - loss_params=SatisfyPropertyLoss(MultipleInvariants([ - BookkeepingInvariant(), - BalanceInvariant(), - ])) - - TAG = "v9_unif2" - - LOG_TO_FILE = true - - ############################ - - path = joinpath( + out_dir = joinpath( vcat( + ["examples/qc/benchmarks/output"], [TAG], to_subpath(generation_params), to_subpath(loss_params), - ["epochs=$(EPOCHS)-learning_rate=$(learning_rate)"], + ["epochs=$(epochs)-learning_rate=$(learning_rate)"], ) ) - OUT_DIR = "examples/qc/benchmarks/output/$(path)" - - ########################### - - LOG_PATH = joinpath(OUT_DIR, "log.log") - - if isfile(LOG_PATH) && "-f" ∉ ARGS + log_path = joinpath(out_dir, "log.log") + if isfile(log_path) && "-f" ∉ ARGS println("Error: Log already exists at the following path:") - println(LOG_PATH) + println(log_path) println() continue end + mkpath(out_dir) + rs = RunState(Valuation(), Dict{String,ADNode}(), open(log_path, "w"), out_dir, MersenneTwister(SEED)) - mkpath(OUT_DIR) - io = if LOG_TO_FILE open(LOG_PATH, "w") else stdout end - - using Dates - t = now() commit = strip(cmd_out(`git rev-parse --short HEAD`)) - for io′ in Set([io, stdout]) - println(io′, "$(t) $(commit) $(join(ARGS, " "))") - println(io′, "== Config ==") - println(io′, "TAG: $(TAG)") - println(io′, generation_params) - println(io′, loss_params) - println(io′, "EPOCHS: $(EPOCHS)") - println(io′, "LEARNING_RATE: $(learning_rate)") - println(io′, "DistNat: $(DistNat)") - println(io′) - end - if LOG_TO_FILE - println("Logging to $(LOG_PATH)") - println() - end - - mgr = create_benchmark_manager(io, OUT_DIR, var_vals, generation_params, loss_params) - - println_flush(io, "ADNodes of interest (initial):") - vals = compute(var_vals, values(adnodes_of_interest)) - showln(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) - + t = now() + println_loud(rs, "$(t) $(commit) $(join(ARGS, " "))") + println_loud(rs, "== Config ==") + println_loud(rs, "TAG: $(TAG)") + println_loud(rs, generation_params) + println_loud(rs, loss_params) + println_loud(rs, "Epochs: $(epochs)") + println_loud(rs, "Learning rate: $(learning_rate)") + println_loud(rs, "DistNat: $(DistNat)") + println_loud(rs, "SEED: $(SEED)") + println_loud(rs) + println("Logging to $(log_path)") + println() + + mgr = create_benchmark_manager(rs, generation_params, loss_params) + print_adnodes_of_interest(rs, "initial") mgr.emit_stats("initial") - mgr.loss_mgr.train!(; epochs=EPOCHS, learning_rate) - - - println_flush(io, "ADNodes of interest (trained):") - vals = compute(var_vals, values(adnodes_of_interest)) - showln(io, Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) - + mgr.loss_mgr.train!(; epochs, learning_rate) + print_adnodes_of_interest(rs, "trained") mgr.emit_stats("trained") - t′ = now() - println(io, t′) - println(io, "Total time elapsed: $(canonicalize(t′ - t))") + println_loud(rs, t′) + println_loud(rs, "Total time elapsed: $(canonicalize(t′ - t))") # include("dump_loss_graph.jl") -end \ No newline at end of file +end From 9f4fc53184061f02f0e5b63bca45a7c2659e35be Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 13 Mar 2024 02:03:01 -0700 Subject: [PATCH 079/231] run_benchmark refactor --- examples/qc/benchmarks/benchmarks.jl | 400 +++++++++------------------ examples/qc/benchmarks/main.jl | 50 ++-- 2 files changed, 155 insertions(+), 295 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 1bcc4150..04e3acff 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -7,40 +7,75 @@ ENV["GKSwstype"] = "100" # prevent plots from displaying abstract type Benchmark end abstract type GenerationParams{T} end -abstract type LossParams{T} end -abstract type SimpleLossParams{T} <: LossParams{T} end +abstract type LossConfig{T} end abstract type LossMgr end abstract type Generation{T} end -struct BenchmarkMgr - emit_stats::Function # tag::String -> () - # train!::Function # epochs::Integer -> learning_rate::Real -> learning_curve::Vector{<:Real} - loss_mgr -end - -function create_benchmark_manager( +function run_benchmark( rs::RunState, generation_params::GenerationParams{T}, - loss_params::LossParams{T} + loss_config_weight_pairs::AbstractVector{<:Pair{<:LossConfig{T}, <:Real}}, + epochs::Integer ) where T println_flush(rs.io, "Building generation computation graph...") time_build_generation = @elapsed generation = generate(rs, generation_params) println_flush(rs.io, " $(time_build_generation) seconds") println_flush(rs.io) - loss_mgr = create_loss_manager(rs, loss_params, generation) + loss_configs, loss_weights = zip(loss_config_weight_pairs...) + loss_mgrs = [ + create_loss_manager(rs, loss_config, generation) + for loss_config in loss_configs + ] + curves = [[] for _ in loss_configs] + + function emit_stats(s::String) + print_adnodes_of_interest(rs, s) - function f_emit_stats(s::String) println_flush(rs.io, "Parameter values ($(s)):") showln(rs.io, rs.var_vals) generation_emit_stats(rs, generation, s) - emit_stats(loss_mgr, s) generation_params_emit_stats(rs, generation_params, s) end - BenchmarkMgr(f_emit_stats, loss_mgr) + emit_stats("initial") + + for epoch in 1:epochs + losses = [produce_loss(rs, m, epoch) for m in loss_mgrs] + function update_curves(vals) + for (i, loss) in enumerate(losses) + push!(curves[i], vals[loss]) + end + end + + vals, derivs = differentiate( + rs.var_vals, + Derivs(loss => w for (loss, w) in zip(losses, loss_weights)) + ) + update_curves(vals) + + if any(isinf(vals[loss]) || isnan(vals[loss]) for loss in losses) + break + end + + # update vars + for (adnode, d) in derivs + if adnode isa Var + rs.var_vals[adnode] -= d + end + end + + # append last loss + epoch == epochs && update_curves(compute(rs.var_vals, losses)) + end + + emit_stats("trained") + + for (loss_config, curve) in zip(loss_configs, curves) + save_learning_curve(rs.out_dir, curve, join(to_subpath(loss_config), "_")) + end end function generation_params_emit_stats(rs::RunState, generation_params, s) @@ -48,103 +83,64 @@ function generation_params_emit_stats(rs::RunState, generation_params, s) println_flush(rs.io) end -struct LossMgrImpl <: LossMgr - emit_stats::Function # tag::String -> () - train!::Function # epochs::Integer -> learning_rate::Real -> learning_curve::Vector{<:Real} -end -emit_stats(m::LossMgrImpl, tag) = m.emit_stats(tag) -train!(m::LossMgrImpl; epochs, learning_rate) = m.train!(; epochs, learning_rate) - - struct SimpleLossMgr <: LossMgr - emit_stats::Function # tag::String -> () - train!::Function # epochs::Integer -> learning_rate::Real -> learning_curve::Vector{<:Real} loss::ADNode -end -emit_stats(m::SimpleLossMgr, tag) = m.emit_stats(tag) -train!(m::SimpleLossMgr; epochs, learning_rate) = m.train!(; epochs, learning_rate) - -function save_learning_curve(out_dir, learning_curve, name) - open(joinpath(out_dir, "$(name).csv"), "w") do file - xs = 0:length(learning_curve)-1 - for (epoch, logpr) in zip(xs, learning_curve) - println(file, "$(epoch)\t$(logpr)") - end - plot(xs, learning_curve) - savefig(joinpath(out_dir, "$(name).svg")) + function SimpleLossMgr(loss::ADNode) + # TODO: share an expander? + l = Dice.LogPrExpander(WMC(BDDCompiler(Dice.bool_roots([loss])))) + loss = Dice.expand_logprs(l, loss) + new(loss) end end +produce_loss(rs::RunState, m::SimpleLossMgr, epoch::Integer) = m.loss -function create_simple_loss_manager(rs, loss) - function emit_stats(tag) - loss_val = compute_mixed(rs.var_vals, loss) - println(rs.io, "Loss ($(tag)): $(loss_val)") - println(rs.io) - end - function f_train(; epochs, learning_rate) - println_flush(rs.io, "Training...") - time_train = @elapsed learning_curve = Dice.train!(rs.var_vals, loss; epochs, learning_rate) - println(rs.io, " $(time_train) seconds") - println(rs.io) - - save_learning_curve(rs.out_dir, learning_curve, "loss") - end - SimpleLossMgr(emit_stats, f_train, loss) +struct SamplingEntropy{T} <: LossConfig{T} + resampling_frequency::Integer + samples_per_batch::Integer end -function train_via_sampling_entropy!(rs, e; epochs, learning_rate, resampling_frequency, samples_per_batch, consider, ignore, additional_loss, additional_loss_lr) - learning_rate = learning_rate / samples_per_batch - - learning_curve = [] - additional_learning_curve = [] - - time_sample = 0 - time_step = 0 - println_flush(rs.io, "Training...") - for epochs_done in 0:resampling_frequency:epochs-1 +mutable struct SamplingEntropyLossMgr <: LossMgr + p::SamplingEntropy + val::Dist + consider + ignore + current_loss::Union{Nothing,ADNode} + SamplingEntropyLossMgr(p, val, consider, ignore) = new(p, val, consider, ignore, nothing) +end +function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) + if (epoch - 1) % m.p.resampling_frequency == 0 println_flush(rs.io, "Sampling...") - time_sample_here = @elapsed samples = with_concrete_ad_flips(rs.var_vals, e) do - [sample_as_dist(rs.rng, Valuation(), e) for _ in 1:samples_per_batch] + time_sample = @elapsed samples = with_concrete_ad_flips(rs.var_vals, m.val) do + [sample_as_dist(rs.rng, Valuation(), m.val) for _ in 1:m.p.samples_per_batch] end - time_sample += time_sample_here - println(rs.io, " $(time_sample_here) seconds") + println(rs.io, " $(time_sample) seconds") loss = sum( - LogPr(prob_equals(e, sample)) + LogPr(prob_equals(m.val, sample)) for sample in samples - if consider(sample) + if m.consider(sample) ) for sample in samples - @assert consider(sample) ^ ignore(sample) + @assert m.consider(sample) ^ m.ignore(sample) end + l = Dice.LogPrExpander(WMC(BDDCompiler(Dice.bool_roots([loss])))) + loss = Dice.expand_logprs(l, loss) / m.p.samples_per_batch + m.current_loss = loss + end - epochs_this_batch = min(epochs - epochs_done, resampling_frequency) - last_batch = epochs_done + epochs_this_batch == epochs + @assert !isnothing(m.current_loss) + m.current_loss +end - println_flush(rs.io, "Stepping...") - time_step_here = @elapsed subcurve, additional_subcurve = Dice.train!( - rs.var_vals, - [loss => learning_rate, additional_loss => additional_loss_lr]; - epochs=epochs_this_batch, append_last_loss=last_batch) - time_step += time_step_here - append!(learning_curve, subcurve) - append!(additional_learning_curve, additional_subcurve) - println(rs.io, " $(time_step_here) seconds") - if (isinf(last(learning_curve)) || isnan(last(learning_curve)) - || isinf(last(additional_learning_curve)) - || isnan(last(additional_learning_curve)) - ) - println(rs.io, "Stopping early due to Inf/NaN loss") - break +function save_learning_curve(out_dir, learning_curve, name) + open(joinpath(out_dir, "$(name).csv"), "w") do file + xs = 0:length(learning_curve)-1 + for (epoch, logpr) in zip(xs, learning_curve) + println(file, "$(epoch)\t$(logpr)") end - + plot(xs, learning_curve) + savefig(joinpath(out_dir, "$(name).svg")) end - println(rs.io, "Sample time: $(time_sample) seconds") - println(rs.io, "Step time: $(time_step) seconds") - println(rs.io) - - save_learning_curve(rs.out_dir, learning_curve, "sampling_loss") - save_learning_curve(rs.out_dir, additional_learning_curve, "additional_loss") end ################################## @@ -164,6 +160,7 @@ function generation_emit_stats(rs::RunState, g::STLCGeneration, s::String) println(rs.io, " $(time_sample) seconds") println(rs.io) end +value(g::STLCGeneration) = g.e ################################## # Bespoke STLC generator @@ -246,7 +243,7 @@ end # Approx STLC constructor entropy loss ################################## -struct ApproxSTLCConstructorEntropy <: SimpleLossParams{STLC} end +struct ApproxSTLCConstructorEntropy <: LossConfig{STLC} end to_subpath(::ApproxSTLCConstructorEntropy) = ["approx_entropy"] function create_loss_manager(rs::RunState, p::ApproxSTLCConstructorEntropy, generation) println_flush(rs.io, "Building computation graph for $(p)...") @@ -256,46 +253,26 @@ function create_loss_manager(rs::RunState, p::ApproxSTLCConstructorEntropy, gene ) println(rs.io, " $(time_build_loss) seconds") println(rs.io) - create_simple_loss_manager(rs, loss) + SimpleLossMgr(loss) end ################################## # Sampling STLC entropy loss ################################## -struct SamplingSTLCEntropy <: LossParams{STLC} - resampling_frequency::Integer - samples_per_batch::Integer -end -function SamplingSTLCEntropy(; resampling_frequency, samples_per_batch) - SamplingSTLCEntropy(resampling_frequency, samples_per_batch) -end -to_subpath(p::SamplingSTLCEntropy) = ["sampling_entropy", "freq=$(p.resampling_frequency),spb=$(p.samples_per_batch)"] -function create_loss_manager(rs::RunState, p::SamplingSTLCEntropy, g::STLCGeneration) - function train!(; epochs, learning_rate) - train_via_sampling_entropy!( - rs.io, rs.out_dir, rs.var_vals, g.e; epochs, learning_rate, - resampling_frequency=p.resampling_frequency, samples_per_batch=p.samples_per_batch, - consider=_->true, - ignore=_->false, - additional_loss=Dice.Constant(0), - additional_loss_lr=0, - ) - end - LossMgrImpl(_ -> nothing, train!) +function SamplingEntropy{T}(; resampling_frequency, samples_per_batch) where T + SamplingEntropy{T}(resampling_frequency, samples_per_batch) end - -struct NullLoss{T} <: SimpleLossParams{T} end -to_subpath(::NullLoss) = ["null"] -function create_loss_manager(rs::RunState, ::NullLoss{T}, ::Generation{T}) where T - create_simple_loss_manager(rs, Dice.Constant(0)) +to_subpath(p::SamplingEntropy) = ["sampling_entropy", "freq=$(p.resampling_frequency),spb=$(p.samples_per_batch)"] +function create_loss_manager(::RunState, p::SamplingEntropy{T}, g::Generation{T}) where T + SamplingEntropyLossMgr(p, value(g), _->true, _->false) end ################################## # Sampling STLC constructor entropy loss ################################## -struct SamplingSTLCConstructorEntropy <: LossParams{STLC} +struct SamplingSTLCConstructorEntropy <: LossConfig{STLC} resampling_frequency::Integer samples_per_batch::Integer end @@ -310,24 +287,17 @@ function create_loss_manager(rs::RunState, p::SamplingSTLCConstructorEntropy, g: "None" => () -> DistInt32(-1), ]) println(rs.io, " $(time_build_random_ctor) seconds") - function train!(; epochs, learning_rate) - train_via_sampling_entropy!( - rs.io, random_ctor; epochs, learning_rate, - resampling_frequency=p.resampling_frequency, samples_per_batch=p.samples_per_batch, - consider=s->any(prob_equals(s, x)===true for x in values(stlc_ctor_to_id)), - ignore=s->prob_equals(s, DistInt32(-1))===true, - additional_loss=Dice.Constant(0), - additional_loss_lr=0, - ) - end - LossMgrImpl(_ -> nothing, train!) + + SamplingEntropyLossMgr(p, random_ctor, + s->any(prob_equals(s, x)===true for x in values(stlc_ctor_to_id)), + s->prob_equals(s, DistInt32(-1))===true) end ################################## # Exact STLC constructor entropy loss ################################## -struct STLCConstructorEntropy <: SimpleLossParams{STLC} end +struct STLCConstructorEntropy <: LossConfig{STLC} end to_subpath(::STLCConstructorEntropy) = ["ctor_entropy"] function create_loss_manager(rs::RunState, p::STLCConstructorEntropy, generation::STLCGeneration) println_flush(rs.io, "Building computation graph for $(p)...") @@ -340,7 +310,8 @@ function create_loss_manager(rs::RunState, p::STLCConstructorEntropy, generation end println(rs.io, " $(time_build_loss) seconds") println(rs.io) - create_simple_loss_manager(rs, loss) + + SimpleLossMgr(loss) end ################################## @@ -354,6 +325,7 @@ struct BSTGeneration <: Generation{BST} end function generation_emit_stats(rs::RunState, g::BSTGeneration, s::String) end +value(g::BSTGeneration) = g.t ################################## # Bespoke BST generator @@ -429,37 +401,11 @@ function generate(rs::RunState, p::TypeBasedBSTGenerator) BSTGeneration(t, constructors_overapproximation) end -################################## -# Sampling BST entropy loss -################################## - -struct SamplingBSTEntropy <: LossParams{BST} - resampling_frequency::Integer - samples_per_batch::Integer -end -function SamplingBSTEntropy(; resampling_frequency, samples_per_batch) - SamplingBSTEntropy(resampling_frequency, samples_per_batch) -end -to_subpath(p::SamplingBSTEntropy) = ["sampling_entropy", "freq=$(p.resampling_frequency),spb=$(p.samples_per_batch)"] -function create_loss_manager(rs::RunState, p::SamplingBSTEntropy, g::BSTGeneration) - function train!(; epochs, learning_rate) - train_via_sampling_entropy!( - rs, g.t; epochs, learning_rate, - resampling_frequency=p.resampling_frequency, samples_per_batch=p.samples_per_batch, - consider=_->true, - ignore=_->false, - additional_loss=Dice.Constant(0), - additional_loss_lr=0, - ) - end - LossMgrImpl(_ -> nothing, train!) -end - ################################## # Approx BST constructor entropy loss ################################## -struct ApproxBSTConstructorEntropy <: SimpleLossParams{BST} end +struct ApproxBSTConstructorEntropy <: LossConfig{BST} end to_subpath(::ApproxBSTConstructorEntropy) = ["approx_ctor_entropy"] function create_loss_manager(rs::RunState, p::ApproxBSTConstructorEntropy, generation::BSTGeneration) println_flush(rs.io, "Building computation graph for $(p)...") @@ -476,7 +422,7 @@ end # Sampling BST constructor entropy loss ################################## -# struct SamplingBSTConstructorEntropy <: LossParams{BST} +# struct SamplingBSTConstructorEntropy <: LossConfig{BST} # resampling_frequency::Integer # samples_per_batch::Integer # function SamplingBSTConstructorEntropy(; resampling_frequency, samples_per_batch) @@ -509,13 +455,13 @@ end abstract type Metric{T} end abstract type TargetDist end -struct MLELossParams{T} <: SimpleLossParams{T} +struct MLELossConfig{T} <: LossConfig{T} metric::Metric{T} target_dist::TargetDist - MLELossParams(; metric::Metric{T}, target_dist) where T = new{T}(metric, target_dist) + MLELossConfig(; metric::Metric{T}, target_dist) where T = new{T}(metric, target_dist) end -to_subpath(p::MLELossParams) = [name(p.metric), name(p.target_dist)] -function create_loss_manager(rs::RunState, p::MLELossParams, generation) +to_subpath(p::MLELossConfig) = [name(p.metric), name(p.target_dist)] +function create_loss_manager(rs::RunState, p::MLELossConfig, generation) println_flush(rs.io, "Building computation graph for $(p)...") time_build_loss = @elapsed begin metric = compute_metric(p.metric, generation) @@ -524,19 +470,19 @@ function create_loss_manager(rs::RunState, p::MLELossParams, generation) println(rs.io, " $(time_build_loss) seconds") println(rs.io) - mgr = create_simple_loss_manager(rs, loss) + SimpleLossMgr(loss) - # Also save distribution of metric being trained - function f_emit′(tag) - println_flush(rs.io, "Saving $(tag) distribution...") - time_infer = @elapsed metric_dist = pr_mixed(rs.var_vals)(metric) - println(rs.io, " $(time_infer) seconds") - save_metric_dist(joinpath(rs.out_dir, "dist_$(name(p.metric))_$(tag).csv"), metric_dist; rs.io) - println(rs.io) + # TODO: fix. allow us to register_stats! to rs, or create MLELossMgr + # # Also save distribution of metric being trained + # function f_emit′(tag) + # println_flush(rs.io, "Saving $(tag) distribution...") + # time_infer = @elapsed metric_dist = pr_mixed(rs.var_vals)(metric) + # println(rs.io, " $(time_infer) seconds") + # save_metric_dist(joinpath(rs.out_dir, "dist_$(name(p.metric))_$(tag).csv"), metric_dist; rs.io) + # println(rs.io) - emit_stats(mgr, tag) - end - SimpleLossMgr(f_emit′, mgr.train!, mgr.loss) + # emit_stats(mgr, tag) + # end end struct TreeSize <: Metric{BST} end @@ -579,43 +525,6 @@ function metric_loss(metric::Dist, ::Target4321) BoolToMax(prob_equals(metric, DistUInt32(3)), weight=.1), ]) end - -################################## -# Mixed loss -################################## - -struct MixedLossParams{T} <: SimpleLossParams{T} - weighted_losses::Vector{<:Pair{<:SimpleLossParams{T}, <:Real}} -end -function to_subpath(p::MixedLossParams) - [join( - [ - "$(join(to_subpath(loss), "_"))_w$(weight)" - for (loss, weight) in p.weighted_losses - ], - "_AND_" - )] -end -function create_loss_manager(rs::RunState, p::MixedLossParams{T}, generation::Generation{T}) where T - mixed_loss = Dice.Constant(0) - mgrs = SimpleLossMgr[] - for (subp, weight) in p.weighted_losses - mgr::SimpleLossMgr = create_loss_manager(rs, subp, generation) - push!(mgrs, mgr) - mixed_loss += Dice.Constant(weight) * mgr.loss - end - mgr = create_simple_loss_manager(rs, mixed_loss) - - # also emit for submgrs - function emit_stats(tag) - mgr.emit_stats(tag) - for submgr in mgrs - submgr.emit_stats(tag) - end - end - SimpleLossMgr(emit_stats, mgr.train!, mgr.loss) -end - ################################## # RBT generation ################################## @@ -626,6 +535,7 @@ struct RBTGeneration <: Generation{RBT} end function generation_emit_stats(::RunState, g::RBTGeneration, s::String) end +value(g::RBTGeneration) = g.t ################################## # Type-based RBT generator @@ -664,7 +574,7 @@ end abstract type Property{T} end -struct SatisfyPropertyLoss{T} <: SimpleLossParams{T} +struct SatisfyPropertyLoss{T} <: LossConfig{T} property::Property{T} end to_subpath(p::SatisfyPropertyLoss) = [name(p.property)] @@ -677,20 +587,20 @@ function create_loss_manager(rs::RunState, p::SatisfyPropertyLoss, generation) println(rs.io, " $(time_build_loss) seconds") println(rs.io) - mgr = create_simple_loss_manager(rs, loss) + SimpleLossMgr(loss) - # Also print probability that property is met - function f_emit′(tag) - println_flush(rs.io, "Checking pr property met...") - time_infer = @elapsed p_meets = pr_mixed(rs.var_vals)(meets_property)[true] - println(rs.io, " $(time_infer) seconds") + # TODO: fix + # # Also print probability that property is met + # function f_emit′(tag) + # println_flush(rs.io, "Checking pr property met...") + # time_infer = @elapsed p_meets = pr_mixed(rs.var_vals)(meets_property)[true] + # println(rs.io, " $(time_infer) seconds") - println_flush(rs.io, "Pr meets property: $(p_meets)") - println_flush(rs.io) + # println_flush(rs.io, "Pr meets property: $(p_meets)") + # println_flush(rs.io) - emit_stats(mgr, tag) - end - SimpleLossMgr(f_emit′, mgr.train!, mgr.loss) + # emit_stats(mgr, tag) + # end end struct BookkeepingInvariant <: Property{RBT} end @@ -718,43 +628,3 @@ check_property(p::MultipleInvariants{T}, g::Generation{T}) where T = ]) name(p::MultipleInvariants{T}) where T = join([name(property) for property in p.properties], "AND") - -################################## -# Sampling RBT entropy loss -################################## - -struct SamplingRBTEntropy <: LossParams{RBT} - resampling_frequency::Integer - samples_per_batch::Integer - additional_loss_params::SimpleLossParams{RBT} - additional_loss_lr::Real -end -function SamplingRBTEntropy(; resampling_frequency, samples_per_batch, additional_loss_params, additional_loss_lr) - SamplingRBTEntropy(resampling_frequency, samples_per_batch, additional_loss_params, additional_loss_lr) -end -to_subpath(p::SamplingRBTEntropy) = [ - "sampling_entropy", - "freq=$(p.resampling_frequency),spb=$(p.samples_per_batch)", - "additional_loss=$(join(to_subpath(p.additional_loss_params),"-"))", - "allr=$(p.additional_loss_lr)", -] -function create_loss_manager(rs::RunState, p::SamplingRBTEntropy, g::RBTGeneration) - mgr::SimpleLossMgr = create_loss_manager(rs, p.additional_loss_params, g) - function train!(; epochs, learning_rate) - train_via_sampling_entropy!( - rs, g.t; epochs, learning_rate, - resampling_frequency=p.resampling_frequency, samples_per_batch=p.samples_per_batch, - consider=_->true, - ignore=_->false, - additional_loss=mgr.loss, - additional_loss_lr=p.additional_loss_lr, - ) - end - LossMgrImpl(tag -> emit_stats(mgr, tag), train!) -end - -struct NullLoss{T} <: SimpleLossParams{T} end -to_subpath(::NullLoss) = ["null"] -function create_loss_manager(rs::RunState, ::NullLoss{T}) where T - create_simple_loss_manager(rs, Dice.Constant(0)) -end diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 9740b538..27697ebd 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -1,45 +1,41 @@ include("benchmarks.jl") GENERATION_PARAMS_LIST = [ - TypeBasedRBTGenerator(size=2, color_by_size=true, learn_leaf_weights=true, use_parent_color=true), + TypeBasedRBTGenerator(size=2,color_by_size=true,learn_leaf_weights=true,use_parent_color=true), ] -LOSS_PARAMS_LIST = [ - SamplingRBTEntropy( - resampling_frequency=5, - samples_per_batch=1000, - additional_loss_params=NullLoss{RBT}(), - additional_loss_lr=0., - ), - SamplingRBTEntropy( - resampling_frequency=5, - samples_per_batch=1000, - additional_loss_params=SatisfyPropertyLoss(MultipleInvariants([ - BookkeepingInvariant(), - BalanceInvariant(), - ])), - additional_loss_lr=0.0003, - ), +LOSS_CONFIG_WEIGHT_PAIRS_LIST = [ + [ + SamplingEntropy{RBT}(resampling_frequency=5, samples_per_batch=1000) => 0.3, + ], + [ + SamplingEntropy{RBT}(resampling_frequency=5, samples_per_batch=1000) => 0.3, + SatisfyPropertyLoss(MultipleInvariants([ + BookkeepingInvariant(), BalanceInvariant(), + ])) => 0.0003, + ], ] -LEARNING_RATE_LIST = [0.3] EPOCHS_LIST = [20] SEED = 0 TAG = "pre_v12_neg_refac" for ( - generation_params, loss_params, learning_rate, epochs + generation_params, loss_config_weight_pairs, epochs ) in Base.product( - GENERATION_PARAMS_LIST, LOSS_PARAMS_LIST, LEARNING_RATE_LIST, EPOCHS_LIST + GENERATION_PARAMS_LIST, LOSS_CONFIG_WEIGHT_PAIRS_LIST, EPOCHS_LIST ) out_dir = joinpath( vcat( ["examples/qc/benchmarks/output"], [TAG], to_subpath(generation_params), - to_subpath(loss_params), - ["epochs=$(epochs)-learning_rate=$(learning_rate)"], + vcat([ + vcat(to_subpath(c), ["$(w)"]) + for (c, w) in loss_config_weight_pairs + ]...), + ["epochs=$(epochs)"], ) ) log_path = joinpath(out_dir, "log.log") @@ -58,21 +54,15 @@ for ( println_loud(rs, "== Config ==") println_loud(rs, "TAG: $(TAG)") println_loud(rs, generation_params) - println_loud(rs, loss_params) + println_loud(rs, loss_config_weight_pairs) println_loud(rs, "Epochs: $(epochs)") - println_loud(rs, "Learning rate: $(learning_rate)") println_loud(rs, "DistNat: $(DistNat)") println_loud(rs, "SEED: $(SEED)") println_loud(rs) println("Logging to $(log_path)") println() - mgr = create_benchmark_manager(rs, generation_params, loss_params) - print_adnodes_of_interest(rs, "initial") - mgr.emit_stats("initial") - mgr.loss_mgr.train!(; epochs, learning_rate) - print_adnodes_of_interest(rs, "trained") - mgr.emit_stats("trained") + run_benchmark(rs, generation_params, loss_config_weight_pairs, epochs) t′ = now() println_loud(rs, t′) From a4b39527dc3cf7ad2f59d2515bc3909a1a9f6d3a Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 13 Mar 2024 02:03:31 -0700 Subject: [PATCH 080/231] fix stlc gen --- examples/qc/benchmarks/lib/stlc/generator.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/qc/benchmarks/lib/stlc/generator.jl b/examples/qc/benchmarks/lib/stlc/generator.jl index 3b8f07e4..ff298660 100644 --- a/examples/qc/benchmarks/lib/stlc/generator.jl +++ b/examples/qc/benchmarks/lib/stlc/generator.jl @@ -106,7 +106,7 @@ function tb_gen_expr(rs::RunState, sz::Integer, ty_sz, track_return) DistVar(DistNat(0)), # really, this is arbitrary DistBoolean(true), # really, this is arbitrary begin - typ = tb_gen_type(ty_sz) # TODO + typ = tb_gen_type(rs, ty_sz) # TODO e = tb_gen_expr(rs, sz′, ty_sz, track_return) DistAbs(typ, e) end, From 33ddf6dd5d92fabd56f4815b08fffa9e6baba07a Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 13 Mar 2024 21:11:54 -0700 Subject: [PATCH 081/231] add threebools --- examples/qc/benchmarks/benchmarks.jl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 04e3acff..4c6d223d 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -143,6 +143,24 @@ function save_learning_curve(out_dir, learning_curve, name) end end +abstract type ThreeBools <: Benchmark end +struct ThreeBoolsGeneration <: Generation{ThreeBools} + e::Tuple{AnyBool, AnyBool, AnyBool} +end +value(g::ThreeBoolsGeneration) = g.e + +struct FlipFlipFlip <: GenerationParams{ThreeBools} end +function to_subpath(::FlipFlipFlip) + ["flipflipflip"] +end +function generate(rs::RunState, ::FlipFlipFlip) + ThreeBoolsGeneration(( + register_weight!(rs, "f1", random_value=true), + register_weight!(rs, "f2", random_value=true), + register_weight!(rs, "f3", random_value=true), + )) +end + ################################## # STLC generation ################################## From b22c0f49afba73f4069cc6d24d77673f5df3c312 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 13 Mar 2024 21:12:57 -0700 Subject: [PATCH 082/231] parallel training runs --- examples/qc/benchmarks/lib/util.jl | 10 +-- examples/qc/benchmarks/main.jl | 116 +++++++++++++---------------- examples/qc/benchmarks/tool.jl | 69 +++++++++++++++++ 3 files changed, 124 insertions(+), 71 deletions(-) create mode 100644 examples/qc/benchmarks/tool.jl diff --git a/examples/qc/benchmarks/lib/util.jl b/examples/qc/benchmarks/lib/util.jl index b903ee70..9a1ff8a9 100644 --- a/examples/qc/benchmarks/lib/util.jl +++ b/examples/qc/benchmarks/lib/util.jl @@ -1,5 +1,5 @@ function backtrack_for(rs, name, opts::Vector{DistI{Opt{T}}})::DistI{Opt{T}} where T - first_some(T, shuffle_for(name, opts)) + first_some(T, shuffle_for(rs, name, opts)) end function shuffle_for(rs, name, xs) @@ -191,16 +191,16 @@ atexit() do end end -function register_weight!(rs, s) +function register_weight!(rs, s; random_value=false) var = Var("$(s)_before_sigmoid") if !haskey(rs.var_vals, var) || rs.var_vals[var] == 0 rs.var_vals[var] = 0 else println("WARNING: not registering fresh weight for $(s)") end - # if random_value - # rs.var_vals[var] = inverse_sigmoid(rand(rs.rng)) - # end + if random_value + rs.var_vals[var] = inverse_sigmoid(rand(rs.rng)) + end weight = sigmoid(var) rs.adnodes_of_interest[s] = weight weight diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 27697ebd..95d0ff86 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -1,71 +1,55 @@ include("benchmarks.jl") -GENERATION_PARAMS_LIST = [ - TypeBasedRBTGenerator(size=2,color_by_size=true,learn_leaf_weights=true,use_parent_color=true), -] -LOSS_CONFIG_WEIGHT_PAIRS_LIST = [ - [ - SamplingEntropy{RBT}(resampling_frequency=5, samples_per_batch=1000) => 0.3, - ], - [ - SamplingEntropy{RBT}(resampling_frequency=5, samples_per_batch=1000) => 0.3, - SatisfyPropertyLoss(MultipleInvariants([ - BookkeepingInvariant(), BalanceInvariant(), - ])) => 0.0003, - ], -] - -EPOCHS_LIST = [20] - -SEED = 0 -TAG = "pre_v12_neg_refac" - -for ( - generation_params, loss_config_weight_pairs, epochs -) in Base.product( - GENERATION_PARAMS_LIST, LOSS_CONFIG_WEIGHT_PAIRS_LIST, EPOCHS_LIST -) - out_dir = joinpath( - vcat( - ["examples/qc/benchmarks/output"], - [TAG], - to_subpath(generation_params), - vcat([ - vcat(to_subpath(c), ["$(w)"]) - for (c, w) in loss_config_weight_pairs - ]...), - ["epochs=$(epochs)"], - ) - ) - log_path = joinpath(out_dir, "log.log") - if isfile(log_path) && "-f" ∉ ARGS - println("Error: Log already exists at the following path:") - println(log_path) - println() - continue +# GENERATION_PARAMS_LIST = [ +# TypeBasedRBTGenerator(size=5,color_by_size=true,learn_leaf_weights=false,use_parent_color=true), +# TypeBasedRBTGenerator(size=5,color_by_size=true,learn_leaf_weights=false,use_parent_color=false), +# ] +# LR_LIST = [0.1, 0.3, 1, 3, 10, 30, 100, 300] +# LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ +# ( +# [ +# SamplingEntropy{RBT}(resampling_frequency=2, samples_per_batch=10000) => lr, +# ] +# for lr in LR_LIST +# ), +# ])) +# EPOCHS_LIST = [100_000] + +GENERATION_PARAMS_LIST = [FlipFlipFlip()] +LR_LIST = [0.0001, 0.0003, 0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1, 3, 10, 30, 100, 300] +LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ + ( + [ + SamplingEntropy{ThreeBools}(resampling_frequency=2, samples_per_batch=10000) => lr, + ] + for lr in LR_LIST + ), +])) +EPOCHS_LIST = [100_000] + +TOOL_PATH = "examples/qc/benchmarks/tool.jl" + +@sync for (p, lcws, epochs) in Base.product(GENERATION_PARAMS_LIST, LOSS_CONFIG_WEIGHT_PAIRS_LIST, EPOCHS_LIST) + flags = join([s for s in ARGS if startswith(s, "-")], " ") + lcws_s = replace(string(lcws), " "=>"") + p_s = replace(string(p), " "=>"") + s = "julia --project $(TOOL_PATH) $(flags) $(p_s) $(lcws_s) $(epochs)" + cmd = Cmd(Cmd(convert(Vector{String}, split(s))), ignorestatus=true) + println(s) + out = IOBuffer() + err = IOBuffer() + @async begin + proc = run(pipeline(cmd; stdout=out, stderr=err),) + if proc.exitcode != 0 + println() + so = String(take!(out)) + se = String(take!(err)) + println("FAILED: $(s)\nSTDOUT ===\n$(so)\nSTDERR ===\n$(se)\n") + else + se = String(take!(err)) + println(se) + end end - mkpath(out_dir) - rs = RunState(Valuation(), Dict{String,ADNode}(), open(log_path, "w"), out_dir, MersenneTwister(SEED)) - - commit = strip(cmd_out(`git rev-parse --short HEAD`)) - t = now() - println_loud(rs, "$(t) $(commit) $(join(ARGS, " "))") - println_loud(rs, "== Config ==") - println_loud(rs, "TAG: $(TAG)") - println_loud(rs, generation_params) - println_loud(rs, loss_config_weight_pairs) - println_loud(rs, "Epochs: $(epochs)") - println_loud(rs, "DistNat: $(DistNat)") - println_loud(rs, "SEED: $(SEED)") - println_loud(rs) - println("Logging to $(log_path)") - println() - - run_benchmark(rs, generation_params, loss_config_weight_pairs, epochs) - t′ = now() - - println_loud(rs, t′) - println_loud(rs, "Total time elapsed: $(canonicalize(t′ - t))") - # include("dump_loss_graph.jl") end + diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl new file mode 100644 index 00000000..035da7c7 --- /dev/null +++ b/examples/qc/benchmarks/tool.jl @@ -0,0 +1,69 @@ +include("benchmarks.jl") + +## PARSE ARGS +args = ARGS +allow_overwrite = "-f" ∈ args +args = filter(a -> a != "-f", args) +if length(args) != 3 + println("Expected 3 positional args, got $(length(args))") + exit(1) +end +expected_types = [GenerationParams, AbstractVector{<:Pair{<:LossConfig, <:Real}}, Integer] +evaled_args = [] +for (i, (arg, expected_type)) in enumerate(zip(args, expected_types)) + evaled_arg = eval(Meta.parse(arg)) + if !(evaled_arg isa expected_type) + println("Expected arg $(i) to be $(expected_type), got $(typeof(evaled_arg))") + exit(1) + end + push!(evaled_args, evaled_arg) +end +generation_params, loss_config_weight_pairs, epochs = evaled_args + +SEED = 0 +TAG = "fff_v12" + +out_dir = joinpath( + vcat( + ["examples/qc/benchmarks/output"], + [TAG], + to_subpath(generation_params), + vcat([ + vcat(to_subpath(c), ["$(w)"]) + for (c, w) in loss_config_weight_pairs + ]...), + ["epochs=$(epochs)"], + ) +) +log_path = joinpath(out_dir, "log.log") +if isfile(log_path) && !allow_overwrite + println("Error: Log already exists at the following path:") + println(log_path) + println() + exit(1) +end +mkpath(out_dir) +rs = RunState(Valuation(), Dict{String,ADNode}(), open(log_path, "w"), out_dir, MersenneTwister(SEED)) + +commit = strip(cmd_out(`git rev-parse --short HEAD`)) +t = now() +println_loud(rs, "$(t) $(commit) $(join(ARGS, " "))") +println_loud(rs, "== Config ==") +println_loud(rs, "TAG: $(TAG)") +println_loud(rs, generation_params) +println_loud(rs, loss_config_weight_pairs) +println_loud(rs, "Epochs: $(epochs)") +println_loud(rs, "DistNat: $(DistNat)") +println_loud(rs, "SEED: $(SEED)") +println_loud(rs) +println("Logging to $(log_path)") +println() + +run_benchmark(rs, generation_params, loss_config_weight_pairs, epochs) +t′ = now() + +println_loud(rs, t′) +println_loud(rs, "Total time elapsed: $(canonicalize(t′ - t))") + +println(stderr, log_path) +# include("dump_loss_graph.jl") \ No newline at end of file From 67103ffb17238982cf87590a6986d97c6475461d Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 13 Mar 2024 21:13:19 -0700 Subject: [PATCH 083/231] reduce code duplication in train! --- src/autodiff_pr/train.jl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/autodiff_pr/train.jl b/src/autodiff_pr/train.jl index 73d42342..05f47451 100644 --- a/src/autodiff_pr/train.jl +++ b/src/autodiff_pr/train.jl @@ -106,9 +106,9 @@ function train!( var_vals, Derivs(loss => lr for (loss, lr) in zip(losses, lrs)) ) + update_curves(vals) if stop_if_inf_or_nan && any(isinf(vals[loss]) || isnan(vals[loss]) for loss in losses) - update_curves(vals) return curves end @@ -118,8 +118,6 @@ function train!( var_vals[adnode] -= d end end - - update_curves(vals) end append_last_loss && update_curves(compute(var_vals, losses)) From 1981e7e759317b5b4b374c189b335fbf68c63c42 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 13 Mar 2024 21:42:41 -0700 Subject: [PATCH 084/231] vec/tuple: add frombits_as_dist and prob_equals --- src/dist/misc.jl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/dist/misc.jl b/src/dist/misc.jl index 2d9e64ea..30159a6f 100644 --- a/src/dist/misc.jl +++ b/src/dist/misc.jl @@ -1,3 +1,5 @@ +prob_all(xs) = reduce(&, xs; init=true) + ################################## # Nothing ################################## @@ -15,16 +17,32 @@ tobits(x::Tuple) = frombits(x::Tuple, world) = map(v -> frombits(v, world), x) +frombits_as_dist(x::Tuple, world) = + map(v -> frombits_as_dist(v, world), x) + Base.ifelse(cond::Dist{Bool}, then::Tuple, elze::Tuple) = Tuple(ifelse(cond, x, y) for (x, y) in zip(then,elze)) +function prob_equals(x::Tuple, y::Tuple) + @assert length(x) == length(y) + prob_all(prob_equals(a, b) for (a, b) in zip(x, y)) +end + tobits(x::Vector) = mapreduce(tobits, vcat, x) frombits(x::Vector, world) = map(v -> frombits(v, world), x) +frombits_as_dist(x::Vector, world) = + map(v -> frombits_as_dist(v, world), x) + Base.ifelse(cond::Dist{Bool}, then::Vector, elze::Vector) = [ifelse(cond, x, y) for (x, y) in zip(then,elze)] +function prob_equals(x::Vector, y::Vector) + @assert length(x) == length(y) + prob_all(prob_equals(a, b) for (a, b) in zip(x, y)) +end + From 62e23f4f622e528a166afa48c04ea9611f34cc85 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 13 Mar 2024 21:43:50 -0700 Subject: [PATCH 085/231] add threebools --- examples/qc/benchmarks/benchmarks.jl | 10 ++++++---- examples/qc/benchmarks/main.jl | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 4c6d223d..6c685930 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -101,7 +101,7 @@ end mutable struct SamplingEntropyLossMgr <: LossMgr p::SamplingEntropy - val::Dist + val consider ignore current_loss::Union{Nothing,ADNode} @@ -148,6 +148,8 @@ struct ThreeBoolsGeneration <: Generation{ThreeBools} e::Tuple{AnyBool, AnyBool, AnyBool} end value(g::ThreeBoolsGeneration) = g.e +function generation_emit_stats(rs::RunState, g::ThreeBoolsGeneration, s::String) +end struct FlipFlipFlip <: GenerationParams{ThreeBools} end function to_subpath(::FlipFlipFlip) @@ -155,9 +157,9 @@ function to_subpath(::FlipFlipFlip) end function generate(rs::RunState, ::FlipFlipFlip) ThreeBoolsGeneration(( - register_weight!(rs, "f1", random_value=true), - register_weight!(rs, "f2", random_value=true), - register_weight!(rs, "f3", random_value=true), + flip(register_weight!(rs, "f1", random_value=true)), + flip(register_weight!(rs, "f2", random_value=true)), + flip(register_weight!(rs, "f3", random_value=true)), )) end diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 95d0ff86..1fa9e4d0 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -21,12 +21,12 @@ LR_LIST = [0.0001, 0.0003, 0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1, 3, 10, 30, 100 LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ - SamplingEntropy{ThreeBools}(resampling_frequency=2, samples_per_batch=10000) => lr, + SamplingEntropy{ThreeBools}(resampling_frequency=2, samples_per_batch=1) => lr, ] for lr in LR_LIST ), ])) -EPOCHS_LIST = [100_000] +EPOCHS_LIST = [1000] TOOL_PATH = "examples/qc/benchmarks/tool.jl" From 2cbb6d52c1a1ac31f335dc6286a9edf677d7902a Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 14 Mar 2024 03:02:12 -0700 Subject: [PATCH 086/231] debugging weird behavior wip --- examples/qc/benchmarks/benchmarks.jl | 73 +++++++++++++++++++++------- examples/qc/benchmarks/main.jl | 6 +-- examples/qc/benchmarks/tool.jl | 12 ++++- 3 files changed, 69 insertions(+), 22 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 6c685930..42739779 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -64,6 +64,7 @@ function run_benchmark( for (adnode, d) in derivs if adnode isa Var rs.var_vals[adnode] -= d + println(rs.io, "$(adnode) $(-d)") end end @@ -105,9 +106,19 @@ mutable struct SamplingEntropyLossMgr <: LossMgr consider ignore current_loss::Union{Nothing,ADNode} - SamplingEntropyLossMgr(p, val, consider, ignore) = new(p, val, consider, ignore, nothing) + current_samples + SamplingEntropyLossMgr(p, val, consider, ignore) = new(p, val, consider, ignore, nothing, nothing) end function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) + samples_path = joinpath(rs.out_dir, "samples.csv") + dist_path = joinpath(rs.out_dir, "dist.csv") + + clear_file(path) = open(path, "w") do f end + if epoch == 1 + clear_file(samples_path) + clear_file(dist_path) + end + if (epoch - 1) % m.p.resampling_frequency == 0 println_flush(rs.io, "Sampling...") time_sample = @elapsed samples = with_concrete_ad_flips(rs.var_vals, m.val) do @@ -126,6 +137,35 @@ function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) l = Dice.LogPrExpander(WMC(BDDCompiler(Dice.bool_roots([loss])))) loss = Dice.expand_logprs(l, loss) / m.p.samples_per_batch m.current_loss = loss + m.current_samples = samples + end + + d = pr_mixed(rs.var_vals)(m.val) + open(dist_path, "a") do f + println(f, join([d[i] for i in 0:7],"\t")) + end + open(samples_path, "a") do f + println(f, join([ + # sum(1 for s in samples if prob_equals(s, DistUInt{3}(i)) === true; init=0) + count(s -> prob_equals(s, DistUInt{3}(i)) === true, m.current_samples) + for i in 0:7 + ], "\t")) + end + + if epoch == 10000 + for path in [samples_path, dist_path] + open(path, "r") do f + v = [[parse(Float64, s) for s in split(line,"\t")] for line in readlines(f)] + # v = [[parse(Real, String(s)) for s in split(line,"\t")] for line in readlines(f)] + mat = mapreduce(permutedims, vcat, v) + # println(stderr, typeof(mat)) + torow(v) = reshape(v, 1, length(v)) + areaplot(mat, labels=torow(["$(i)" for i in 0:7]), + # palette=:lightrainbow) + palette=cgrad(:thermal)) + savefig("$(path).svg") + end + end end @assert !isnothing(m.current_loss) @@ -143,24 +183,23 @@ function save_learning_curve(out_dir, learning_curve, name) end end -abstract type ThreeBools <: Benchmark end -struct ThreeBoolsGeneration <: Generation{ThreeBools} - e::Tuple{AnyBool, AnyBool, AnyBool} +abstract type Bools{W} <: Benchmark end +struct BoolsGeneration{W} <: Generation{Bools{W}} + v::DistUInt{W} end -value(g::ThreeBoolsGeneration) = g.e -function generation_emit_stats(rs::RunState, g::ThreeBoolsGeneration, s::String) +value(g::BoolsGeneration) = g.v +function generation_emit_stats(rs::RunState, g::BoolsGeneration, s::String) end -struct FlipFlipFlip <: GenerationParams{ThreeBools} end -function to_subpath(::FlipFlipFlip) - ["flipflipflip"] +struct Flips{W} <: GenerationParams{Bools{W}} end +function to_subpath(::Flips) + ["flips"] end -function generate(rs::RunState, ::FlipFlipFlip) - ThreeBoolsGeneration(( - flip(register_weight!(rs, "f1", random_value=true)), - flip(register_weight!(rs, "f2", random_value=true)), - flip(register_weight!(rs, "f3", random_value=true)), - )) +function generate(rs::RunState, ::Flips{W}) where W + BoolsGeneration(DistUInt{W}([ + flip(register_weight!(rs, "f$(i)", random_value=true)) + for i in 1:W + ])) end ################################## @@ -283,7 +322,7 @@ end function SamplingEntropy{T}(; resampling_frequency, samples_per_batch) where T SamplingEntropy{T}(resampling_frequency, samples_per_batch) end -to_subpath(p::SamplingEntropy) = ["sampling_entropy", "freq=$(p.resampling_frequency),spb=$(p.samples_per_batch)"] +to_subpath(p::SamplingEntropy) = ["sampling_entropy", "freq=$(p.resampling_frequency)-spb=$(p.samples_per_batch)"] function create_loss_manager(::RunState, p::SamplingEntropy{T}, g::Generation{T}) where T SamplingEntropyLossMgr(p, value(g), _->true, _->false) end @@ -299,7 +338,7 @@ end function SamplingSTLCConstructorEntropy(; resampling_frequency, samples_per_batch) SamplingSTLCConstructorEntropy(resampling_frequency, samples_per_batch) end -to_subpath(p::SamplingSTLCConstructorEntropy) = ["sampling_ctor_entropy", "freq=$(p.resampling_frequency),spb=$(p.samples_per_batch)"] +to_subpath(p::SamplingSTLCConstructorEntropy) = ["sampling_ctor_entropy", "freq=$(p.resampling_frequency)-spb=$(p.samples_per_batch)"] function create_loss_manager(rs::RunState, p::SamplingSTLCConstructorEntropy, g::STLCGeneration) println_flush(rs.io, "Building random_ctor graph...") time_build_random_ctor = @elapsed random_ctor = match(g.e, [ diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 1fa9e4d0..0d135607 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -16,17 +16,17 @@ include("benchmarks.jl") # ])) # EPOCHS_LIST = [100_000] -GENERATION_PARAMS_LIST = [FlipFlipFlip()] +GENERATION_PARAMS_LIST = [Flips{3}()] LR_LIST = [0.0001, 0.0003, 0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1, 3, 10, 30, 100, 300] LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ - SamplingEntropy{ThreeBools}(resampling_frequency=2, samples_per_batch=1) => lr, + SamplingEntropy{Bools{3}}(resampling_frequency=1000, samples_per_batch=100) => lr, ] for lr in LR_LIST ), ])) -EPOCHS_LIST = [1000] +EPOCHS_LIST = [10000] TOOL_PATH = "examples/qc/benchmarks/tool.jl" diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 035da7c7..756e8ecb 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -1,6 +1,14 @@ include("benchmarks.jl") ## PARSE ARGS +if isempty(ARGS) + as = ["-f", "Flips{3}()", "Pair{SamplingEntropy{Bools{3}},Float64}[SamplingEntropy{Bools{3}}(20,100)=>0.3]", "10000"] + empty!(ARGS) + for a in as + push!(ARGS, a) + end +end + args = ARGS allow_overwrite = "-f" ∈ args args = filter(a -> a != "-f", args) @@ -21,7 +29,7 @@ end generation_params, loss_config_weight_pairs, epochs = evaled_args SEED = 0 -TAG = "fff_v12" +TAG = "neg_fff_v12" out_dir = joinpath( vcat( @@ -47,7 +55,7 @@ rs = RunState(Valuation(), Dict{String,ADNode}(), open(log_path, "w"), out_dir, commit = strip(cmd_out(`git rev-parse --short HEAD`)) t = now() -println_loud(rs, "$(t) $(commit) $(join(ARGS, " "))") +println_loud(rs, "$(t) $(commit) $(ARGS)") println_loud(rs, "== Config ==") println_loud(rs, "TAG: $(TAG)") println_loud(rs, generation_params) From 9ddfb260815492e7d68f3da3afc1c158763ebd9e Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Fri, 15 Mar 2024 01:16:10 -0700 Subject: [PATCH 087/231] exact entropy flipflipflip --- examples/qc/benchmarks/benchmarks.jl | 88 +++++++++++++++++++--------- examples/qc/benchmarks/main.jl | 8 ++- 2 files changed, 66 insertions(+), 30 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 42739779..8db267c2 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -64,7 +64,7 @@ function run_benchmark( for (adnode, d) in derivs if adnode isa Var rs.var_vals[adnode] -= d - println(rs.io, "$(adnode) $(-d)") + # println(rs.io, "$(adnode) $(-d)") end end @@ -86,14 +86,29 @@ end struct SimpleLossMgr <: LossMgr loss::ADNode - function SimpleLossMgr(loss::ADNode) + val + function SimpleLossMgr(loss::ADNode, val) # TODO: share an expander? l = Dice.LogPrExpander(WMC(BDDCompiler(Dice.bool_roots([loss])))) loss = Dice.expand_logprs(l, loss) - new(loss) + new(loss, val) + end +end +function produce_loss(rs::RunState, m::SimpleLossMgr, epoch::Integer) + dist_path = joinpath(rs.out_dir, "dist.csv") + if epoch == 1 + clear_file(dist_path) + end + d = pr_mixed(rs.var_vals)(m.val) + open(dist_path, "a") do f + println(f, join([d[i] for i in 0:7],"\t")) end + if epoch == 10000 + mk_areaplot(dist_path) + end + m.loss end -produce_loss(rs::RunState, m::SimpleLossMgr, epoch::Integer) = m.loss + struct SamplingEntropy{T} <: LossConfig{T} resampling_frequency::Integer @@ -109,22 +124,34 @@ mutable struct SamplingEntropyLossMgr <: LossMgr current_samples SamplingEntropyLossMgr(p, val, consider, ignore) = new(p, val, consider, ignore, nothing, nothing) end -function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) - samples_path = joinpath(rs.out_dir, "samples.csv") - dist_path = joinpath(rs.out_dir, "dist.csv") - clear_file(path) = open(path, "w") do f end - if epoch == 1 - clear_file(samples_path) - clear_file(dist_path) +function save_areaplot(path, v) + mat = mapreduce(permutedims, vcat, v) + torow(v) = reshape(v, 1, length(v)) + areaplot( + mat, + labels=torow(["$(i)" for i in 0:size(mat, 2)]), + # palette=:lightrainbow) + palette=cgrad(:thermal) + ) + savefig("$(path).svg") +end + +function mk_areaplot(path) + open(path, "r") do f + v = [[parse(Float64, s) for s in split(line,"\t")] for line in readlines(f)] + save_areaplot(path, v) end +end +clear_file(path) = open(path, "w") do f end +function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) if (epoch - 1) % m.p.resampling_frequency == 0 - println_flush(rs.io, "Sampling...") + # println_flush(rs.io, "Sampling...") time_sample = @elapsed samples = with_concrete_ad_flips(rs.var_vals, m.val) do [sample_as_dist(rs.rng, Valuation(), m.val) for _ in 1:m.p.samples_per_batch] end - println(rs.io, " $(time_sample) seconds") + # println(rs.io, " $(time_sample) seconds") loss = sum( LogPr(prob_equals(m.val, sample)) @@ -140,6 +167,12 @@ function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) m.current_samples = samples end + samples_path = joinpath(rs.out_dir, "samples.csv") + dist_path = joinpath(rs.out_dir, "dist.csv") + if epoch == 1 + clear_file(samples_path) + clear_file(dist_path) + end d = pr_mixed(rs.var_vals)(m.val) open(dist_path, "a") do f println(f, join([d[i] for i in 0:7],"\t")) @@ -151,21 +184,9 @@ function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) for i in 0:7 ], "\t")) end - if epoch == 10000 - for path in [samples_path, dist_path] - open(path, "r") do f - v = [[parse(Float64, s) for s in split(line,"\t")] for line in readlines(f)] - # v = [[parse(Real, String(s)) for s in split(line,"\t")] for line in readlines(f)] - mat = mapreduce(permutedims, vcat, v) - # println(stderr, typeof(mat)) - torow(v) = reshape(v, 1, length(v)) - areaplot(mat, labels=torow(["$(i)" for i in 0:7]), - # palette=:lightrainbow) - palette=cgrad(:thermal)) - savefig("$(path).svg") - end - end + mk_areaplot(samples_path) + mk_areaplot(dist_path) end @assert !isnothing(m.current_loss) @@ -202,6 +223,19 @@ function generate(rs::RunState, ::Flips{W}) where W ])) end +struct BoolsExactEntropy{W} <: LossConfig{Bools{W}} end +to_subpath(::BoolsExactEntropy) = ["exact_entropy"] +function create_loss_manager(rs::RunState, p::BoolsExactEntropy{W}, generation) where W + println_flush(rs.io, "Building computation graph for $(p)...") + time_build_loss = @elapsed loss = + neg_entropy(generation.v, [DistUInt{W}(i) for i in 0:2^W-1]) + println(rs.io, " $(time_build_loss) seconds") + println(rs.io) + SimpleLossMgr(loss, generation.v) +end + + + ################################## # STLC generation ################################## diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 0d135607..fe49feb1 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -17,16 +17,18 @@ include("benchmarks.jl") # EPOCHS_LIST = [100_000] GENERATION_PARAMS_LIST = [Flips{3}()] -LR_LIST = [0.0001, 0.0003, 0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1, 3, 10, 30, 100, 300] +# LR_LIST = [0.0001, 0.0003, 0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1, 3, 10, 30, 100, 300] +LR_LIST = [0.0001, 0.0002, 0.0005, 0.001, 0.002, 0.005, 0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 3, 10, 30, 100] LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ - SamplingEntropy{Bools{3}}(resampling_frequency=1000, samples_per_batch=100) => lr, + BoolsExactEntropy{3}() => lr, + # SamplingEntropy{Bools{3}}(resampling_frequency=1, samples_per_batch=10_000) => lr, ] for lr in LR_LIST ), ])) -EPOCHS_LIST = [10000] +EPOCHS_LIST = [100_000] TOOL_PATH = "examples/qc/benchmarks/tool.jl" From e701e924e034636b5944b3abfbe03107581261cf Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Fri, 15 Mar 2024 01:16:28 -0700 Subject: [PATCH 088/231] single flip sampling entropy test --- examples/qc/benchmarks/test.jl | 62 ++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 examples/qc/benchmarks/test.jl diff --git a/examples/qc/benchmarks/test.jl b/examples/qc/benchmarks/test.jl new file mode 100644 index 00000000..e56d530e --- /dev/null +++ b/examples/qc/benchmarks/test.jl @@ -0,0 +1,62 @@ +using Dates +include("benchmarks.jl") + +function main() + for (lr, samples_per_batch) in Base.product( + [0.0001, 0.0003, 0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1.], + [100, 1000, 10000], + ) + test(samples_per_batch, lr) + end +end + +function test(samples_per_batch, lr) + SEED = 0 + + out_dir = "tmp/out_dir$(Dates.format(now(), dateformat"yyyy-mm-ddTHH_MM_SS"))-lr$(lr)-spb$(samples_per_batch)" + println(out_dir) + mkdir(out_dir) + + log_path = "tmp/log" + rs = RunState(Valuation(), Dict{String,ADNode}(), open(log_path, "w"), out_dir, MersenneTwister(SEED)) + + v = flip(register_weight!(rs, "v"; random_value=true)) + + curve = [] + dists = [] + + for epoch in 1:1000 + samples = with_concrete_ad_flips(rs.var_vals, v) do + [sample_as_dist(rs.rng, Valuation(), v) for _ in 1:samples_per_batch] + end + + loss = sum( + LogPr(prob_equals(v, sample)) + for sample in samples + ) + l = Dice.LogPrExpander(WMC(BDDCompiler(Dice.bool_roots([loss])))) + loss = Dice.expand_logprs(l, loss) / samples_per_batch + vals, derivs = differentiate( + rs.var_vals, + Derivs(loss => lr) + ) + push!(curve, vals[loss]) + d = pr_mixed(rs.var_vals)(v) + push!(dists, [d[false], d[true]]) + + if isinf(vals[loss]) || isnan(vals[loss]) + break + end + + for (adnode, d) in derivs + if adnode isa Var + rs.var_vals[adnode] -= d + end + end + end + + save_learning_curve(rs.out_dir, curve, "loss.csv") + save_areaplot(joinpath(rs.out_dir, "dist.svg"), dists) +end + +main() \ No newline at end of file From c3f48302d0b00d6784f27e0d95d7b354a0c6f45d Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 16 Mar 2024 01:58:10 -0700 Subject: [PATCH 089/231] gumbel and other junk! --- examples/qc/benchmarks/benchmarks.jl | 54 ++++++++++++++-------------- examples/qc/benchmarks/main.jl | 11 +++--- examples/qc/benchmarks/tool.jl | 3 +- src/autodiff/adnode.jl | 14 ++++++++ src/inference/sample.jl | 29 +++++++++------ 5 files changed, 67 insertions(+), 44 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 8db267c2..1dea4261 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -57,7 +57,8 @@ function run_benchmark( update_curves(vals) if any(isinf(vals[loss]) || isnan(vals[loss]) for loss in losses) - break + continue + # break end # update vars @@ -95,17 +96,17 @@ struct SimpleLossMgr <: LossMgr end end function produce_loss(rs::RunState, m::SimpleLossMgr, epoch::Integer) - dist_path = joinpath(rs.out_dir, "dist.csv") - if epoch == 1 - clear_file(dist_path) - end - d = pr_mixed(rs.var_vals)(m.val) - open(dist_path, "a") do f - println(f, join([d[i] for i in 0:7],"\t")) - end - if epoch == 10000 - mk_areaplot(dist_path) - end + # dist_path = joinpath(rs.out_dir, "dist.csv") + # if epoch == 1 + # clear_file(dist_path) + # end + # d = pr_mixed(rs.var_vals)(m.val) + # open(dist_path, "a") do f + # println(f, join([d[i] for i in 0:7],"\t")) + # end + # if epoch == EPOCHS + # mk_areaplot(dist_path) + # end m.loss end @@ -148,13 +149,12 @@ clear_file(path) = open(path, "w") do f end function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) if (epoch - 1) % m.p.resampling_frequency == 0 # println_flush(rs.io, "Sampling...") - time_sample = @elapsed samples = with_concrete_ad_flips(rs.var_vals, m.val) do - [sample_as_dist(rs.rng, Valuation(), m.val) for _ in 1:m.p.samples_per_batch] - end + temperature = 10 * 0.99 ^ epoch + time_sample = @elapsed samples = [sample_as_dist(rs.rng, m.val; temperature) for _ in 1:m.p.samples_per_batch] # println(rs.io, " $(time_sample) seconds") loss = sum( - LogPr(prob_equals(m.val, sample)) + exp(LogPr(prob_equals(m.val, sample))) for sample in samples if m.consider(sample) ) @@ -167,25 +167,25 @@ function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) m.current_samples = samples end - samples_path = joinpath(rs.out_dir, "samples.csv") + # samples_path = joinpath(rs.out_dir, "samples.csv") dist_path = joinpath(rs.out_dir, "dist.csv") if epoch == 1 - clear_file(samples_path) + # clear_file(samples_path) clear_file(dist_path) end d = pr_mixed(rs.var_vals)(m.val) open(dist_path, "a") do f println(f, join([d[i] for i in 0:7],"\t")) end - open(samples_path, "a") do f - println(f, join([ - # sum(1 for s in samples if prob_equals(s, DistUInt{3}(i)) === true; init=0) - count(s -> prob_equals(s, DistUInt{3}(i)) === true, m.current_samples) - for i in 0:7 - ], "\t")) - end - if epoch == 10000 - mk_areaplot(samples_path) + # open(samples_path, "a") do f + # println(f, join([ + # # sum(1 for s in samples if prob_equals(s, DistUInt{3}(i)) === true; init=0) + # count(s -> prob_equals(s, DistUInt{3}(i)) === true, m.current_samples) + # for i in 0:7 + # ], "\t")) + # end + if epoch == EPOCHS + # mk_areaplot(samples_path) mk_areaplot(dist_path) end diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index fe49feb1..618d8651 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -2,10 +2,11 @@ include("benchmarks.jl") # GENERATION_PARAMS_LIST = [ -# TypeBasedRBTGenerator(size=5,color_by_size=true,learn_leaf_weights=false,use_parent_color=true), +# # TypeBasedRBTGenerator(size=5,color_by_size=true,learn_leaf_weights=false,use_parent_color=true), +# # TypeBasedRBTGenerator(size=5,color_by_size=true,learn_leaf_weights=false,use_parent_color=false), # TypeBasedRBTGenerator(size=5,color_by_size=true,learn_leaf_weights=false,use_parent_color=false), # ] -# LR_LIST = [0.1, 0.3, 1, 3, 10, 30, 100, 300] +# LR_LIST = [0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1, 3, 10] # LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ # ( # [ @@ -22,13 +23,13 @@ LR_LIST = [0.0001, 0.0002, 0.0005, 0.001, 0.002, 0.005, 0.01, 0.02, 0.05, 0.1, 0 LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ - BoolsExactEntropy{3}() => lr, - # SamplingEntropy{Bools{3}}(resampling_frequency=1, samples_per_batch=10_000) => lr, + # BoolsExactEntropy{3}() => lr, + SamplingEntropy{Bools{3}}(resampling_frequency=5, samples_per_batch=100) => lr, ] for lr in LR_LIST ), ])) -EPOCHS_LIST = [100_000] +EPOCHS_LIST = [10_000] TOOL_PATH = "examples/qc/benchmarks/tool.jl" diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 756e8ecb..274fb56c 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -28,8 +28,9 @@ for (i, (arg, expected_type)) in enumerate(zip(args, expected_types)) end generation_params, loss_config_weight_pairs, epochs = evaled_args +EPOCHS = epochs SEED = 0 -TAG = "neg_fff_v12" +TAG = "gumbel" out_dir = joinpath( vcat( diff --git a/src/autodiff/adnode.jl b/src/autodiff/adnode.jl index d90c0681..d099934d 100644 --- a/src/autodiff/adnode.jl +++ b/src/autodiff/adnode.jl @@ -1,4 +1,5 @@ export ADNode, ADMatrix, Var, ad_map, sigmoid, deriv_sigmoid, inverse_sigmoid, to_graph +using Distributions using Graphs @@ -216,6 +217,19 @@ compute_inner(x::Transpose, call) = transpose(call(x.x)) function backward(n::Transpose, vals, derivs) add_deriv(derivs, n.x, transpose(derivs[n])) end +# mutable struct Gumbel <: ADNode +# p::ADNode +# rng::AbstractRNG +# end +# NodeType(::Type{Gumbel}) = Inner() +# chidlren(x::Gumbel) = x.p +# function compute_inner(x::Gumbel, call) +# pr_true = call(gumbel_proxy(x.p, x.rng)) +# rand() +# end +# function backward(x::Gumbel, vals, derivs) +# backward(gumbel_proxy(x.p, x.rng), vals, derivs) +# end # Give override for add_logprobs so logprob in wmc.jl is differentiable. # computes log(exp(x) + exp(y)) diff --git a/src/inference/sample.jl b/src/inference/sample.jl index 0bad5524..c9d697a6 100644 --- a/src/inference/sample.jl +++ b/src/inference/sample.jl @@ -1,5 +1,6 @@ export sample, sample_as_dist using DirectedAcyclicGraphs: foldup +using Distributions """Run vanilla rejection sampling without any compilation""" function sample(rng, x; evidence=true) @@ -48,32 +49,38 @@ function sample(rng, x; evidence=true) end end -function sample_as_dist(rng, var_vals, x; evidence=true) - a = ADComputer(var_vals) +softmax2(a) = [ + exp(a[1]) / (exp(a[1]) + exp(a[2])), + exp(a[2]) / (exp(a[1]) + exp(a[2])) +] +function gumbel_softmax(rng, p, temperature) + y = softmax2([ + (log(1-p)+rand(rng, Gumbel(0, 1))) / temperature, + (log(p)+rand(rng, Gumbel(0, 1))) / temperature, + ]) + y[2] +end + +function sample_as_dist(rng, x; evidence=true, temperature) while true vcache = Dict() fl(n::Flip) = begin if !haskey(vcache, n) - p = if n.prob isa ADNode - compute(a, n.prob) - else - n.prob - end - vcache[n] = rand(rng) < p + vcache[n] = flip(gumbel_softmax(rng, n.prob, temperature)) end vcache[n] end fi(n::DistAnd, call) = begin if !haskey(vcache, n) - vcache[n] = call(n.x) && call(n.y) + vcache[n] = call(n.x) & call(n.y) end vcache[n] end fi(n::DistOr, call) = begin if !haskey(vcache, n) - vcache[n] = call(n.x) || call(n.y) + vcache[n] = call(n.x) | call(n.y) end vcache[n] end @@ -94,7 +101,7 @@ function sample_as_dist(rng, var_vals, x; evidence=true) evidence_computed || continue for bit in tobits(x) bit isa Bool && continue - foldup(bit, fl, fi, Bool) + foldup(bit, fl, fi, AnyBool) end return frombits_as_dist(x, vcache) end From 5129d53543e3dbc13b66360f1d8ecb4a040f5b11 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 24 Mar 2024 23:12:50 -0700 Subject: [PATCH 090/231] Revert "gumbel and other junk!" This reverts commit c3f48302d0b00d6784f27e0d95d7b354a0c6f45d. --- examples/qc/benchmarks/benchmarks.jl | 54 ++++++++++++++-------------- examples/qc/benchmarks/main.jl | 11 +++--- examples/qc/benchmarks/tool.jl | 3 +- src/autodiff/adnode.jl | 14 -------- src/inference/sample.jl | 29 ++++++--------- 5 files changed, 44 insertions(+), 67 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 1dea4261..8db267c2 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -57,8 +57,7 @@ function run_benchmark( update_curves(vals) if any(isinf(vals[loss]) || isnan(vals[loss]) for loss in losses) - continue - # break + break end # update vars @@ -96,17 +95,17 @@ struct SimpleLossMgr <: LossMgr end end function produce_loss(rs::RunState, m::SimpleLossMgr, epoch::Integer) - # dist_path = joinpath(rs.out_dir, "dist.csv") - # if epoch == 1 - # clear_file(dist_path) - # end - # d = pr_mixed(rs.var_vals)(m.val) - # open(dist_path, "a") do f - # println(f, join([d[i] for i in 0:7],"\t")) - # end - # if epoch == EPOCHS - # mk_areaplot(dist_path) - # end + dist_path = joinpath(rs.out_dir, "dist.csv") + if epoch == 1 + clear_file(dist_path) + end + d = pr_mixed(rs.var_vals)(m.val) + open(dist_path, "a") do f + println(f, join([d[i] for i in 0:7],"\t")) + end + if epoch == 10000 + mk_areaplot(dist_path) + end m.loss end @@ -149,12 +148,13 @@ clear_file(path) = open(path, "w") do f end function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) if (epoch - 1) % m.p.resampling_frequency == 0 # println_flush(rs.io, "Sampling...") - temperature = 10 * 0.99 ^ epoch - time_sample = @elapsed samples = [sample_as_dist(rs.rng, m.val; temperature) for _ in 1:m.p.samples_per_batch] + time_sample = @elapsed samples = with_concrete_ad_flips(rs.var_vals, m.val) do + [sample_as_dist(rs.rng, Valuation(), m.val) for _ in 1:m.p.samples_per_batch] + end # println(rs.io, " $(time_sample) seconds") loss = sum( - exp(LogPr(prob_equals(m.val, sample))) + LogPr(prob_equals(m.val, sample)) for sample in samples if m.consider(sample) ) @@ -167,25 +167,25 @@ function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) m.current_samples = samples end - # samples_path = joinpath(rs.out_dir, "samples.csv") + samples_path = joinpath(rs.out_dir, "samples.csv") dist_path = joinpath(rs.out_dir, "dist.csv") if epoch == 1 - # clear_file(samples_path) + clear_file(samples_path) clear_file(dist_path) end d = pr_mixed(rs.var_vals)(m.val) open(dist_path, "a") do f println(f, join([d[i] for i in 0:7],"\t")) end - # open(samples_path, "a") do f - # println(f, join([ - # # sum(1 for s in samples if prob_equals(s, DistUInt{3}(i)) === true; init=0) - # count(s -> prob_equals(s, DistUInt{3}(i)) === true, m.current_samples) - # for i in 0:7 - # ], "\t")) - # end - if epoch == EPOCHS - # mk_areaplot(samples_path) + open(samples_path, "a") do f + println(f, join([ + # sum(1 for s in samples if prob_equals(s, DistUInt{3}(i)) === true; init=0) + count(s -> prob_equals(s, DistUInt{3}(i)) === true, m.current_samples) + for i in 0:7 + ], "\t")) + end + if epoch == 10000 + mk_areaplot(samples_path) mk_areaplot(dist_path) end diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 618d8651..fe49feb1 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -2,11 +2,10 @@ include("benchmarks.jl") # GENERATION_PARAMS_LIST = [ -# # TypeBasedRBTGenerator(size=5,color_by_size=true,learn_leaf_weights=false,use_parent_color=true), -# # TypeBasedRBTGenerator(size=5,color_by_size=true,learn_leaf_weights=false,use_parent_color=false), +# TypeBasedRBTGenerator(size=5,color_by_size=true,learn_leaf_weights=false,use_parent_color=true), # TypeBasedRBTGenerator(size=5,color_by_size=true,learn_leaf_weights=false,use_parent_color=false), # ] -# LR_LIST = [0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1, 3, 10] +# LR_LIST = [0.1, 0.3, 1, 3, 10, 30, 100, 300] # LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ # ( # [ @@ -23,13 +22,13 @@ LR_LIST = [0.0001, 0.0002, 0.0005, 0.001, 0.002, 0.005, 0.01, 0.02, 0.05, 0.1, 0 LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ - # BoolsExactEntropy{3}() => lr, - SamplingEntropy{Bools{3}}(resampling_frequency=5, samples_per_batch=100) => lr, + BoolsExactEntropy{3}() => lr, + # SamplingEntropy{Bools{3}}(resampling_frequency=1, samples_per_batch=10_000) => lr, ] for lr in LR_LIST ), ])) -EPOCHS_LIST = [10_000] +EPOCHS_LIST = [100_000] TOOL_PATH = "examples/qc/benchmarks/tool.jl" diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 274fb56c..756e8ecb 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -28,9 +28,8 @@ for (i, (arg, expected_type)) in enumerate(zip(args, expected_types)) end generation_params, loss_config_weight_pairs, epochs = evaled_args -EPOCHS = epochs SEED = 0 -TAG = "gumbel" +TAG = "neg_fff_v12" out_dir = joinpath( vcat( diff --git a/src/autodiff/adnode.jl b/src/autodiff/adnode.jl index d099934d..d90c0681 100644 --- a/src/autodiff/adnode.jl +++ b/src/autodiff/adnode.jl @@ -1,5 +1,4 @@ export ADNode, ADMatrix, Var, ad_map, sigmoid, deriv_sigmoid, inverse_sigmoid, to_graph -using Distributions using Graphs @@ -217,19 +216,6 @@ compute_inner(x::Transpose, call) = transpose(call(x.x)) function backward(n::Transpose, vals, derivs) add_deriv(derivs, n.x, transpose(derivs[n])) end -# mutable struct Gumbel <: ADNode -# p::ADNode -# rng::AbstractRNG -# end -# NodeType(::Type{Gumbel}) = Inner() -# chidlren(x::Gumbel) = x.p -# function compute_inner(x::Gumbel, call) -# pr_true = call(gumbel_proxy(x.p, x.rng)) -# rand() -# end -# function backward(x::Gumbel, vals, derivs) -# backward(gumbel_proxy(x.p, x.rng), vals, derivs) -# end # Give override for add_logprobs so logprob in wmc.jl is differentiable. # computes log(exp(x) + exp(y)) diff --git a/src/inference/sample.jl b/src/inference/sample.jl index c9d697a6..0bad5524 100644 --- a/src/inference/sample.jl +++ b/src/inference/sample.jl @@ -1,6 +1,5 @@ export sample, sample_as_dist using DirectedAcyclicGraphs: foldup -using Distributions """Run vanilla rejection sampling without any compilation""" function sample(rng, x; evidence=true) @@ -49,38 +48,32 @@ function sample(rng, x; evidence=true) end end -softmax2(a) = [ - exp(a[1]) / (exp(a[1]) + exp(a[2])), - exp(a[2]) / (exp(a[1]) + exp(a[2])) -] -function gumbel_softmax(rng, p, temperature) - y = softmax2([ - (log(1-p)+rand(rng, Gumbel(0, 1))) / temperature, - (log(p)+rand(rng, Gumbel(0, 1))) / temperature, - ]) - y[2] -end - -function sample_as_dist(rng, x; evidence=true, temperature) +function sample_as_dist(rng, var_vals, x; evidence=true) + a = ADComputer(var_vals) while true vcache = Dict() fl(n::Flip) = begin if !haskey(vcache, n) - vcache[n] = flip(gumbel_softmax(rng, n.prob, temperature)) + p = if n.prob isa ADNode + compute(a, n.prob) + else + n.prob + end + vcache[n] = rand(rng) < p end vcache[n] end fi(n::DistAnd, call) = begin if !haskey(vcache, n) - vcache[n] = call(n.x) & call(n.y) + vcache[n] = call(n.x) && call(n.y) end vcache[n] end fi(n::DistOr, call) = begin if !haskey(vcache, n) - vcache[n] = call(n.x) | call(n.y) + vcache[n] = call(n.x) || call(n.y) end vcache[n] end @@ -101,7 +94,7 @@ function sample_as_dist(rng, x; evidence=true, temperature) evidence_computed || continue for bit in tobits(x) bit isa Bool && continue - foldup(bit, fl, fi, AnyBool) + foldup(bit, fl, fi, Bool) end return frombits_as_dist(x, vcache) end From a026b3b9c0d7ee5a939ed0c2455e204f14eed4ba Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 26 Mar 2024 14:59:55 -0700 Subject: [PATCH 091/231] reinforce --- examples/qc/benchmarks/benchmarks.jl | 22 +++++++++++++++------- examples/qc/benchmarks/main.jl | 6 +++--- examples/qc/benchmarks/tool.jl | 3 ++- src/inference/sample.jl | 3 +-- 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 8db267c2..bb0ea220 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -103,7 +103,7 @@ function produce_loss(rs::RunState, m::SimpleLossMgr, epoch::Integer) open(dist_path, "a") do f println(f, join([d[i] for i in 0:7],"\t")) end - if epoch == 10000 + if epoch == EPOCHS mk_areaplot(dist_path) end m.loss @@ -148,20 +148,28 @@ clear_file(path) = open(path, "w") do f end function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) if (epoch - 1) % m.p.resampling_frequency == 0 # println_flush(rs.io, "Sampling...") + a = ADComputer(rs.var_vals) time_sample = @elapsed samples = with_concrete_ad_flips(rs.var_vals, m.val) do - [sample_as_dist(rs.rng, Valuation(), m.val) for _ in 1:m.p.samples_per_batch] + [sample_as_dist(rs.rng, a, m.val) for _ in 1:m.p.samples_per_batch] end - # println(rs.io, " $(time_sample) seconds") + + l = Dice.LogPrExpander(WMC(BDDCompiler([ + prob_equals(m.val,sample) + for sample in samples + ]))) loss = sum( - LogPr(prob_equals(m.val, sample)) + begin + lpr_eq = LogPr(prob_equals(m.val,sample)) + lpr_eq_expanded = Dice.expand_logprs(l, lpr_eq) + lpr_eq * compute(a, lpr_eq_expanded) + end for sample in samples if m.consider(sample) ) for sample in samples @assert m.consider(sample) ^ m.ignore(sample) end - l = Dice.LogPrExpander(WMC(BDDCompiler(Dice.bool_roots([loss])))) loss = Dice.expand_logprs(l, loss) / m.p.samples_per_batch m.current_loss = loss m.current_samples = samples @@ -184,7 +192,7 @@ function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) for i in 0:7 ], "\t")) end - if epoch == 10000 + if epoch == EPOCHS mk_areaplot(samples_path) mk_areaplot(dist_path) end @@ -356,7 +364,7 @@ end function SamplingEntropy{T}(; resampling_frequency, samples_per_batch) where T SamplingEntropy{T}(resampling_frequency, samples_per_batch) end -to_subpath(p::SamplingEntropy) = ["sampling_entropy", "freq=$(p.resampling_frequency)-spb=$(p.samples_per_batch)"] +to_subpath(p::SamplingEntropy) = ["reinforce_sampling_entropy", "freq=$(p.resampling_frequency)-spb=$(p.samples_per_batch)"] function create_loss_manager(::RunState, p::SamplingEntropy{T}, g::Generation{T}) where T SamplingEntropyLossMgr(p, value(g), _->true, _->false) end diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index fe49feb1..0143df4d 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -22,13 +22,13 @@ LR_LIST = [0.0001, 0.0002, 0.0005, 0.001, 0.002, 0.005, 0.01, 0.02, 0.05, 0.1, 0 LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ - BoolsExactEntropy{3}() => lr, - # SamplingEntropy{Bools{3}}(resampling_frequency=1, samples_per_batch=10_000) => lr, + # BoolsExactEntropy{3}() => lr, + SamplingEntropy{Bools{3}}(resampling_frequency=20, samples_per_batch=100) => lr, ] for lr in LR_LIST ), ])) -EPOCHS_LIST = [100_000] +EPOCHS_LIST = [10_000] TOOL_PATH = "examples/qc/benchmarks/tool.jl" diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 756e8ecb..6c12aecd 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -27,9 +27,10 @@ for (i, (arg, expected_type)) in enumerate(zip(args, expected_types)) push!(evaled_args, evaled_arg) end generation_params, loss_config_weight_pairs, epochs = evaled_args +EPOCHS = epochs SEED = 0 -TAG = "neg_fff_v12" +TAG = "v13" out_dir = joinpath( vcat( diff --git a/src/inference/sample.jl b/src/inference/sample.jl index 0bad5524..12ca8732 100644 --- a/src/inference/sample.jl +++ b/src/inference/sample.jl @@ -48,8 +48,7 @@ function sample(rng, x; evidence=true) end end -function sample_as_dist(rng, var_vals, x; evidence=true) - a = ADComputer(var_vals) +function sample_as_dist(rng, a, x; evidence=true) while true vcache = Dict() fl(n::Flip) = begin From 9c96ec423b7475b3f5e4bdbb80bccdaf6525a932 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 31 Mar 2024 19:19:55 -0700 Subject: [PATCH 092/231] tweaks --- examples/qc/benchmarks/benchmarks.jl | 67 ++++++++++++++-------------- examples/qc/benchmarks/lib/util.jl | 8 ++-- examples/qc/benchmarks/main.jl | 42 ++++++++--------- 3 files changed, 60 insertions(+), 57 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index bb0ea220..157090c8 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -95,17 +95,18 @@ struct SimpleLossMgr <: LossMgr end end function produce_loss(rs::RunState, m::SimpleLossMgr, epoch::Integer) - dist_path = joinpath(rs.out_dir, "dist.csv") - if epoch == 1 - clear_file(dist_path) - end - d = pr_mixed(rs.var_vals)(m.val) - open(dist_path, "a") do f - println(f, join([d[i] for i in 0:7],"\t")) - end - if epoch == EPOCHS - mk_areaplot(dist_path) - end + # dist_path = joinpath(rs.out_dir, "dist.csv") + # if epoch == 1 + # clear_file(dist_path) + # end + # d = pr_mixed(rs.var_vals)(m.val) + # open(dist_path, "a") do f + # println(f, join([d[i] for i in 0:15],"\t")) + # end + # if epoch == EPOCHS + # mk_areaplot(dist_path) + # end + m.loss end @@ -131,6 +132,7 @@ function save_areaplot(path, v) areaplot( mat, labels=torow(["$(i)" for i in 0:size(mat, 2)]), + legend=false, # palette=:lightrainbow) palette=cgrad(:thermal) ) @@ -175,27 +177,26 @@ function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) m.current_samples = samples end - samples_path = joinpath(rs.out_dir, "samples.csv") - dist_path = joinpath(rs.out_dir, "dist.csv") - if epoch == 1 - clear_file(samples_path) - clear_file(dist_path) - end - d = pr_mixed(rs.var_vals)(m.val) - open(dist_path, "a") do f - println(f, join([d[i] for i in 0:7],"\t")) - end - open(samples_path, "a") do f - println(f, join([ - # sum(1 for s in samples if prob_equals(s, DistUInt{3}(i)) === true; init=0) - count(s -> prob_equals(s, DistUInt{3}(i)) === true, m.current_samples) - for i in 0:7 - ], "\t")) - end - if epoch == EPOCHS - mk_areaplot(samples_path) - mk_areaplot(dist_path) - end + # samples_path = joinpath(rs.out_dir, "samples.csv") + # dist_path = joinpath(rs.out_dir, "dist.csv") + # if epoch == 1 + # clear_file(samples_path) + # clear_file(dist_path) + # end + # d = pr_mixed(rs.var_vals)(m.val) + # open(dist_path, "a") do f + # println(f, join([d[i] for i in 0:15],"\t")) + # end + # open(samples_path, "a") do f + # println(f, join([ + # count(s -> prob_equals(s, DistUInt{4}(i)) === true, m.current_samples) + # for i in 0:15 + # ], "\t")) + # end + # if epoch == EPOCHS + # mk_areaplot(samples_path) + # mk_areaplot(dist_path) + # end @assert !isnothing(m.current_loss) m.current_loss @@ -256,7 +257,7 @@ end function generation_emit_stats(rs::RunState, g::STLCGeneration, s::String) println_flush(rs.io, "Saving samples...") time_sample = @elapsed with_concrete_ad_flips(rs.var_vals, g.e) do - save_samples(joinpath(rs.out_dir, "terms_$(s).txt"), g.e; io=rs.io) + save_samples(rs, joinpath(rs.out_dir, "terms_$(s).txt"), g.e) end println(rs.io, " $(time_sample) seconds") println(rs.io) diff --git a/examples/qc/benchmarks/lib/util.jl b/examples/qc/benchmarks/lib/util.jl index 9a1ff8a9..82f80791 100644 --- a/examples/qc/benchmarks/lib/util.jl +++ b/examples/qc/benchmarks/lib/util.jl @@ -130,15 +130,15 @@ function preview_distribution(e; full_dist) end end -function save_samples(filename, e; n_samples=200, io=stdout) +function save_samples(rs, filename, e; n_samples=200) open(filename, "w") do file for _ in 1:n_samples - expr = sample(e) + expr = sample(rs.rng, e) println(file, opt_stlc_str(expr)) typecheck_opt(expr) end end - println(io, "Saved samples to $(filename).") + println(rs.io, "Saved samples to $(filename).") end function println_flush(io, args...) @@ -159,7 +159,7 @@ function cmd_out(cmd) String(take!(io)) end -thousandths(n) = Integer(round(n, digits=3) * 1000) +thousandths(n) = if isnan(n) "nan" else Integer(round(n, digits=3) * 1000) end global _soft_assert_ever_triggered = Ref(false) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 0143df4d..34f04481 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -1,35 +1,37 @@ include("benchmarks.jl") -# GENERATION_PARAMS_LIST = [ -# TypeBasedRBTGenerator(size=5,color_by_size=true,learn_leaf_weights=false,use_parent_color=true), -# TypeBasedRBTGenerator(size=5,color_by_size=true,learn_leaf_weights=false,use_parent_color=false), -# ] -# LR_LIST = [0.1, 0.3, 1, 3, 10, 30, 100, 300] -# LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ -# ( -# [ -# SamplingEntropy{RBT}(resampling_frequency=2, samples_per_batch=10000) => lr, -# ] -# for lr in LR_LIST -# ), -# ])) -# EPOCHS_LIST = [100_000] - -GENERATION_PARAMS_LIST = [Flips{3}()] -# LR_LIST = [0.0001, 0.0003, 0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1, 3, 10, 30, 100, 300] -LR_LIST = [0.0001, 0.0002, 0.0005, 0.001, 0.002, 0.005, 0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 3, 10, 30, 100] +GENERATION_PARAMS_LIST = [ + BespokeSTLCGenerator(param_vars_by_size=true,size=5,ty_size=2), + # BespokeBSTGenerator(size=5, vals=BSTDummyVals), + # TypeBasedBSTGenerator(size=5), +] +LR_LIST = [0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1, 3, 10] LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ - # BoolsExactEntropy{3}() => lr, - SamplingEntropy{Bools{3}}(resampling_frequency=20, samples_per_batch=100) => lr, + SamplingEntropy{STLC}(resampling_frequency=2, samples_per_batch=1_000) => lr, ] for lr in LR_LIST ), ])) EPOCHS_LIST = [10_000] +# N = 4 +# GENERATION_PARAMS_LIST = [Flips{N}()] +# # LR_LIST = [0.0001, 0.0003, 0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1, 3, 10, 30, 100, 300] +# LR_LIST = [0.0001, 0.0002, 0.0005, 0.001, 0.002, 0.005, 0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 3, 10, 30, 100] +# LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ +# ( +# [ +# # BoolsExactEntropy{3}() => lr, +# SamplingEntropy{Bools{N}}(resampling_frequency=10, samples_per_batch=100) => lr, +# ] +# for lr in LR_LIST +# ), +# ])) +# EPOCHS_LIST = [10_000] + TOOL_PATH = "examples/qc/benchmarks/tool.jl" @sync for (p, lcws, epochs) in Base.product(GENERATION_PARAMS_LIST, LOSS_CONFIG_WEIGHT_PAIRS_LIST, EPOCHS_LIST) From 82dd5aa399cfcf0ee073dbb963bf28af683ca1cb Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 31 Mar 2024 19:34:58 -0700 Subject: [PATCH 093/231] Add comment about roots/GC to BDDCompiler --- src/inference/cudd/compile.jl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/inference/cudd/compile.jl b/src/inference/cudd/compile.jl index 15133330..1fa6226c 100644 --- a/src/inference/cudd/compile.jl +++ b/src/inference/cudd/compile.jl @@ -29,6 +29,13 @@ function BDDCompiler() c end +# It's okay if not all of these are actually actually roots (i.e. some are +# descendants of others), because including a descendant will not change the set +# of nodes that foreach_node(roots) considers. +# +# It may be problematic to add roots once we've started compiling, though. +# Currently all users of this code add all roots at the start, but if this +# changes, we need to think more about GC. function BDDCompiler(roots) c = BDDCompiler() add_roots!(c, roots) From defe37febec57872951864d32bd90dbd18c395d8 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 1 Apr 2024 11:35:42 -0700 Subject: [PATCH 094/231] LRUset --- examples/qc/benchmarks/benchmarks.jl | 36 ++++++++++++- examples/qc/benchmarks/lib/lib.jl | 2 + examples/qc/benchmarks/lib/lruset/dist.jl | 52 +++++++++++++++++++ .../qc/benchmarks/lib/lruset/generator.jl | 17 ++++++ examples/qc/benchmarks/lib/util.jl | 20 +++++-- examples/qc/benchmarks/main.jl | 7 ++- examples/qc/benchmarks/tool.jl | 20 +++++-- 7 files changed, 142 insertions(+), 12 deletions(-) create mode 100644 examples/qc/benchmarks/lib/lruset/dist.jl create mode 100644 examples/qc/benchmarks/lib/lruset/generator.jl diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 157090c8..4a3a6585 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -243,7 +243,41 @@ function create_loss_manager(rs::RunState, p::BoolsExactEntropy{W}, generation) SimpleLossMgr(loss, generation.v) end - +################################## +# LRUSetTestcase Generation +################################## +abstract type LRUSetTestcase <: Benchmark end +struct LRUSetTestcaseGeneration <: Generation{LRUSetTestcase} + v::DistI{LRUS.Program} +end +value(g::LRUSetTestcaseGeneration) = g.v +function generation_emit_stats(rs::RunState, g::LRUSetTestcaseGeneration, s::String) + p = pr_mixed(rs.var_vals)(prob_equals( + g.v, + LRUS.vec_to_program([ + LRUS.Insert(DistInt32(0)), + LRUS.Insert(DistInt32(1)), + LRUS.Insert(DistInt32(0)), + LRUS.PopStale(), + LRUS.Contains(DistInt32(1)), + ]), + ))[true] + # 3 p 2 * 2 c 1 = 12 ways to make programs like the above + println(rs.io, "Pr of finding bug: $(12 * p)") + println() +end + +struct BespokeLRUSetTestcaseGenerator <: GenerationParams{LRUSetTestcase} + size +end +function to_subpath(::BespokeLRUSetTestcaseGenerator) + ["BespokeLRUSetTestcaseGenerator"] +end +function generate(rs::RunState, p::BespokeLRUSetTestcaseGenerator) + LRUSetTestcaseGeneration( + bespoke_gen_lrusp(rs, p.size) + ) +end ################################## # STLC generation diff --git a/examples/qc/benchmarks/lib/lib.jl b/examples/qc/benchmarks/lib/lib.jl index 3b748e70..5af9ae63 100644 --- a/examples/qc/benchmarks/lib/lib.jl +++ b/examples/qc/benchmarks/lib/lib.jl @@ -13,6 +13,8 @@ struct RunState end include("util.jl") +include("lruset/dist.jl") +include("lruset/generator.jl") include("stlc/dist.jl") include("stlc/generator.jl") include("stlc/to_coq.jl") diff --git a/examples/qc/benchmarks/lib/lruset/dist.jl b/examples/qc/benchmarks/lib/lruset/dist.jl new file mode 100644 index 00000000..dc489361 --- /dev/null +++ b/examples/qc/benchmarks/lib/lruset/dist.jl @@ -0,0 +1,52 @@ +module LRUS + using Dice + import Dice: param_lists + + struct Statement <: InductiveType end + function param_lists(::Type{LRUS.Statement})::Vector{Pair{String,Vector{Type}}} + [ + "Insert" => [DistInt32], + "Contains" => [DistInt32], + "PopStale" => [], + ] + end + Insert(v::DistInt32) = construct(Statement, "Insert", [v]) + Contains(v::DistInt32) = construct(Statement, "Contains", [v]) + PopStale() = construct(Statement, "PopStale", []) + + struct Program <: InductiveType end + + function param_lists(::Type{LRUS.Program})::Vector{Pair{String,Vector{Type}}} + [ + "Nil" => [], + "Cons" => [DistI{Statement}, DistI{Program}], + ] + end + + Nil() = construct(Program, "Nil",[]) + Cons(s::DistI{Statement}, p::DistI{Program}) = + construct(Program, "Cons", [s, p]) + + function vec_to_program(v) + if isempty(v) + Nil() + else + Cons(v[1], vec_to_program(v[2:end])) + end + end +end + # import Dice: param_lists + + # function param_lists(::Type{LRUS.Statement})::Vector{Pair{String,Vector{Type}}} + # [ + # "Insert" => [DistInt32], + # "Contains" => [DistInt32], + # "PopStale" => [], + # ] + # end + # function param_lists(::Type{LRUS.Program})::Vector{Pair{String,Vector{Type}}} + # [ + # "Nil" => [], + # "Cons" => [DistI{LRUS.Statement}, DistI{LRUS.Program}], + # ] + # end diff --git a/examples/qc/benchmarks/lib/lruset/generator.jl b/examples/qc/benchmarks/lib/lruset/generator.jl new file mode 100644 index 00000000..fdfdf825 --- /dev/null +++ b/examples/qc/benchmarks/lib/lruset/generator.jl @@ -0,0 +1,17 @@ +function bespoke_gen_lrusp(rs, sz) + @dice_ite if sz == 0 || flip(register_weight!(rs, "nil$(sz)")) + LRUS.Nil() + else + LRUS.Cons( + frequency([ + register_weight!(rs, "insert$(sz)") => + LRUS.Insert(uniform(DistInt32, 0, 3)), + register_weight!(rs, "contains$(sz)") => + LRUS.Contains(uniform(DistInt32, 0, 3)), + register_weight!(rs, "popstale$(sz)") => + LRUS.PopStale(), + ]), + bespoke_gen_lrusp(rs, sz - 1) + ) + end +end \ No newline at end of file diff --git a/examples/qc/benchmarks/lib/util.jl b/examples/qc/benchmarks/lib/util.jl index 82f80791..9737ae19 100644 --- a/examples/qc/benchmarks/lib/util.jl +++ b/examples/qc/benchmarks/lib/util.jl @@ -42,9 +42,9 @@ function shuffle_for(rs, name, xs) end end -function frequency(xs) - sample_from(xs) -end +# function frequency(xs) +# sample_from(xs) +# end function backtrack(xs) isempty(xs) && return DistNone() @@ -73,8 +73,13 @@ function map(::Type{RetT}) where RetT end end -function frequency_for(rs, name, xs) - weights = [register_weight!(rs, "$(name)_$(i)") for i in 1:length(xs)] +function frequency(weights_xs) + weights, xs = [], [] + for (weight, x) in weights_xs + push!(weights, weight) + push!(xs,x) + end + res = last(xs) weight_sum = last(weights) for i in length(xs) - 1 : -1 : 1 @@ -88,6 +93,11 @@ function frequency_for(rs, name, xs) res end +function frequency_for(rs, name, xs) + weights = [register_weight!(rs, "$(name)_$(i)") for i in 1:length(xs)] + frequency(collect(zip(xs, weights))) +end + function opt_stlc_str(ast) name, children = ast if name == "None" diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 34f04481..d7915a10 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -2,15 +2,18 @@ include("benchmarks.jl") GENERATION_PARAMS_LIST = [ - BespokeSTLCGenerator(param_vars_by_size=true,size=5,ty_size=2), + # BespokeSTLCGenerator(param_vars_by_size=true,size=5,ty_size=2), # BespokeBSTGenerator(size=5, vals=BSTDummyVals), # TypeBasedBSTGenerator(size=5), + # TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=true, use_parent_color=false), + # TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=false, use_parent_color=true), + BespokeLRUSetTestcaseGenerator(5), ] LR_LIST = [0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1, 3, 10] LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ - SamplingEntropy{STLC}(resampling_frequency=2, samples_per_batch=1_000) => lr, + SamplingEntropy{LRUSetTestcase}(resampling_frequency=2, samples_per_batch=100) => lr, ] for lr in LR_LIST ), diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 6c12aecd..3c7eec6c 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -2,11 +2,23 @@ include("benchmarks.jl") ## PARSE ARGS if isempty(ARGS) - as = ["-f", "Flips{3}()", "Pair{SamplingEntropy{Bools{3}},Float64}[SamplingEntropy{Bools{3}}(20,100)=>0.3]", "10000"] + as = ["-f"] + push!(as, replace(string( + BespokeLRUSetTestcaseGenerator(5) + ), " "=>"")) + push!(as, replace(string( + [ + SamplingEntropy{LRUSetTestcase}( + resampling_frequency=1, + samples_per_batch=1, + ) => 0.01, + ] + ), " "=>"")) + push!(as, string( + 2 + )) empty!(ARGS) - for a in as - push!(ARGS, a) - end + append!(ARGS, as) end args = ARGS From 82bc2b1bef6b82be5a5c404448900b49f203013f Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 1 Apr 2024 22:08:29 -0700 Subject: [PATCH 095/231] save actual loss curves --- examples/qc/benchmarks/benchmarks.jl | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 4a3a6585..400067ba 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -29,6 +29,7 @@ function run_benchmark( for loss_config in loss_configs ] curves = [[] for _ in loss_configs] + al_curves = [[] for _ in loss_configs] function emit_stats(s::String) print_adnodes_of_interest(rs, s) @@ -56,6 +57,15 @@ function run_benchmark( ) update_curves(vals) + for (i, m) in enumerate(loss_mgrs) + if m isa SamplingEntropyLossMgr + a = ADComputer(Valuation()) + a.vals = vals + al_val = compute(a, m.current_actual_loss) + push!(al_curves[i], al_val) + end + end + if any(isinf(vals[loss]) || isnan(vals[loss]) for loss in losses) break end @@ -77,6 +87,12 @@ function run_benchmark( for (loss_config, curve) in zip(loss_configs, curves) save_learning_curve(rs.out_dir, curve, join(to_subpath(loss_config), "_")) end + + for (al_curve, loss_config, m) in zip(al_curves, loss_configs, loss_mgrs) + if m isa SamplingEntropyLossMgr + save_learning_curve(out_dir, al_curve, "actual_loss_" * join(to_subpath(loss_config), "_")) + end + end end function generation_params_emit_stats(rs::RunState, generation_params, s) @@ -122,8 +138,10 @@ mutable struct SamplingEntropyLossMgr <: LossMgr consider ignore current_loss::Union{Nothing,ADNode} + current_actual_loss::Union{Nothing,ADNode} current_samples - SamplingEntropyLossMgr(p, val, consider, ignore) = new(p, val, consider, ignore, nothing, nothing) + SamplingEntropyLossMgr(p, val, consider, ignore) = + new(p, val, consider, ignore, nothing, nothing, nothing) end function save_areaplot(path, v) @@ -160,11 +178,14 @@ function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) for sample in samples ]))) - loss = sum( + loss, actual_loss = sum( begin lpr_eq = LogPr(prob_equals(m.val,sample)) lpr_eq_expanded = Dice.expand_logprs(l, lpr_eq) - lpr_eq * compute(a, lpr_eq_expanded) + [ + lpr_eq_expanded * compute(a, lpr_eq_expanded), + lpr_eq_expanded + ] end for sample in samples if m.consider(sample) @@ -174,6 +195,7 @@ function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) end loss = Dice.expand_logprs(l, loss) / m.p.samples_per_batch m.current_loss = loss + m.current_actual_loss = actual_loss m.current_samples = samples end From f090b98decd7f89bcdc9ade83038f8d0b97ed14e Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 3 Apr 2024 00:10:29 -0700 Subject: [PATCH 096/231] @inductive wip --- src/dist/inductive/inductive.jl | 36 ++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/src/dist/inductive/inductive.jl b/src/dist/inductive/inductive.jl index a5066e63..e497a725 100644 --- a/src/dist/inductive/inductive.jl +++ b/src/dist/inductive/inductive.jl @@ -1,6 +1,6 @@ # Distributions over inductively-defined types -export InductiveType, DistI, construct, match, matches +export InductiveType, DistI, construct, match, matches, @inductive abstract type InductiveType end @@ -136,3 +136,37 @@ function prob_equals(x::DistI{T}, y::DistI{T}) where T end res end + +# Usage: +# @inductive Option Some(DistInt32) None() +# @inductive List{T} Nil() Cons(T, DistI{List{T}}) +macro inductive(type, constructors...) + ty = esc(type) + plist = [ + begin + @assert constructor.head == :call + constructor, args... = constructor.args + constructor => args + end + for constructor in constructors + ] + tvs = if type isa Expr && type.head == :curly map(esc, type.args[2:end]) else [] end + block = quote + struct $(ty) <: InductiveType end + function $(esc(:param_lists))(::Type{$(ty)})::Vector{Pair{String,Vector{Type}}} where {$(tvs...)} + [ + $([ + :($(string(ctor)) => [$([esc(arg) for arg in args]...)]) + for (ctor, args) in plist + ]...) + ] + end + end + for (ctor, args) in plist + vars = [gensym("$(i)") for i in 1:length(args)] + push!(block.args, + :($(esc(ctor))($(vars...)) = construct($(ty), $(string(ctor)), [$(vars...)])) + ) + end + block +end From c08b00288a9f00879a1a4a83d57d886ac7844ce2 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 3 Apr 2024 21:05:13 -0700 Subject: [PATCH 097/231] add typevars to front of inductive ctor params --- src/dist/inductive/inductive.jl | 2 +- src/dist/inductive/list.jl | 21 +++++---------------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/src/dist/inductive/inductive.jl b/src/dist/inductive/inductive.jl index e497a725..9ee9a758 100644 --- a/src/dist/inductive/inductive.jl +++ b/src/dist/inductive/inductive.jl @@ -165,7 +165,7 @@ macro inductive(type, constructors...) for (ctor, args) in plist vars = [gensym("$(i)") for i in 1:length(args)] push!(block.args, - :($(esc(ctor))($(vars...)) = construct($(ty), $(string(ctor)), [$(vars...)])) + :($(esc(ctor))($(vcat(tvs,vars)...)) = construct($(ty), $(string(ctor)), [$(vars...)])) ) end block diff --git a/src/dist/inductive/list.jl b/src/dist/inductive/list.jl index de27a627..2fe2cd56 100644 --- a/src/dist/inductive/list.jl +++ b/src/dist/inductive/list.jl @@ -1,18 +1,7 @@ # Define List -export List, DistNil, DistCons, prob_append, concat, one_of +export List, Nil, Cons, prob_append, concat, one_of -struct List{T} <: InductiveType end - -function param_lists(::Type{List{T}})::Vector{Pair{String,Vector{Type}}} where T <: Union{Dist, AnyBool} - [ - "Nil" => [], - "Cons" => [T, DistI{List{T}}], - ] -end - -DistNil(T) = construct(List{T}, "Nil", []) -DistCons(x::T, xs::DistI{List{T}}) where T = - construct(List{T}, "Cons", [x, xs]) +@inductive List{T} Nil() Cons(T, DistI{List{T}}) function Base.length(l::DistI{List{T}}) where T match(l, [ @@ -24,12 +13,12 @@ end function rev_concat(l::DistI{List{T}}, acc::DistI{List{T}}) where T match(l, [ "Nil" => () -> acc, - "Cons" => (x, xs) -> rev_concat(xs, DistCons(x, acc)), + "Cons" => (x, xs) -> rev_concat(xs, Cons(T, x, acc)), ]) end function Base.reverse(l::DistI{List{T}}) where T - rev_concat(l, DistNil(T)) + rev_concat(l, Nil(T)) end function concat(l1::DistI{List{T}}, l2::DistI{List{T}}) where T @@ -37,7 +26,7 @@ function concat(l1::DistI{List{T}}, l2::DistI{List{T}}) where T end function prob_append(l::DistI{List{T}}, x::T) where T - concat(l, DistCons(x, DistNil(T))) + concat(l, Cons(T, x, Nil(T))) end function one_of(l::DistI{List{T}})::DistI{Opt{T}} where T <: Dist From 6cf78987c1135c31028b322e0415e9fc887a4634 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 3 Apr 2024 22:16:15 -0700 Subject: [PATCH 098/231] finish @inductive --- src/dist/inductive/inductive.jl | 6 ++++-- src/dist/inductive/list.jl | 6 +++--- src/dist/inductive/nat.jl | 34 ++++++++++++------------------ src/dist/inductive/option.jl | 17 ++++++--------- test/autodiff_test.jl | 2 +- test/dist/inductive/list_test.jl | 14 ++++++------ test/dist/inductive/option_test.jl | 15 +++++++------ test/inference/sample_test.jl | 5 +++-- 8 files changed, 46 insertions(+), 53 deletions(-) diff --git a/src/dist/inductive/inductive.jl b/src/dist/inductive/inductive.jl index 9ee9a758..47424bc3 100644 --- a/src/dist/inductive/inductive.jl +++ b/src/dist/inductive/inductive.jl @@ -153,7 +153,7 @@ macro inductive(type, constructors...) tvs = if type isa Expr && type.head == :curly map(esc, type.args[2:end]) else [] end block = quote struct $(ty) <: InductiveType end - function $(esc(:param_lists))(::Type{$(ty)})::Vector{Pair{String,Vector{Type}}} where {$(tvs...)} + function $(esc(:param_lists))(::$(esc(:(Base.Type))){$(ty)})::$(esc(:(Base.Vector{Base.Pair{Base.String,Base.Vector{Base.Type}}}))) where {$(tvs...)} [ $([ :($(string(ctor)) => [$([esc(arg) for arg in args]...)]) @@ -164,8 +164,10 @@ macro inductive(type, constructors...) end for (ctor, args) in plist vars = [gensym("$(i)") for i in 1:length(args)] + vars_annotated = [:($(var)::$(esc(arg))) for (var, arg) in zip(vars, args)] + tvs_args = [:(::$(esc(:(Base.Type))){$(tv)}) for tv in tvs] push!(block.args, - :($(esc(ctor))($(vcat(tvs,vars)...)) = construct($(ty), $(string(ctor)), [$(vars...)])) + :($(esc(ctor))($(vcat(tvs_args,vars_annotated)...)) where {$(tvs...)}= construct($(ty), $(string(ctor)), [$(vars...)])) ) end block diff --git a/src/dist/inductive/list.jl b/src/dist/inductive/list.jl index 2fe2cd56..7b9aaae9 100644 --- a/src/dist/inductive/list.jl +++ b/src/dist/inductive/list.jl @@ -29,11 +29,11 @@ function prob_append(l::DistI{List{T}}, x::T) where T concat(l, Cons(T, x, Nil(T))) end -function one_of(l::DistI{List{T}})::DistI{Opt{T}} where T <: Dist +function one_of(l::DistI{List{T}})::DistI{Opt.T{T}} where T <: Dist match(l, [ - "Nil" => () -> DistNone(T), + "Nil" => () -> Opt.None(T), "Cons" => (x, xs) -> @dice_ite if flip_reciprocal(length(l)) - DistSome(x) + Opt.Some(T, x) else one_of(xs) end diff --git a/src/dist/inductive/nat.jl b/src/dist/inductive/nat.jl index 50df342d..850f1a4a 100644 --- a/src/dist/inductive/nat.jl +++ b/src/dist/inductive/nat.jl @@ -1,18 +1,12 @@ -export Nat, DistZero, DistSucc, nat_ast_to_int +export Nat, nat_ast_to_int -struct Nat <: InductiveType end - -function param_lists(::Type{Nat}) - [ - "Zero" => [], - "Succ" => [DistI{Nat}], - ] +module Nat + using Dice + import Dice: param_lists + @inductive T Z() S(DistI{T}) end -DistZero() = construct(Nat, "Zero", []) -DistSucc(x) = construct(Nat, "Succ", [x]) - -function DistI{Nat}(x) +function DistI{Nat.T}(x) res = DistZero() for _ in 1:x res = DistSucc(res) @@ -20,20 +14,20 @@ function DistI{Nat}(x) res end -Base.zero(::Type{DistI{Nat}}) = DistZero() +Base.zero(::Type{DistI{Nat.T}}) = Nat.Z() -function Base.:(+)(x::DistI{Nat}, y::DistI{Nat}) +function Base.:(+)(x::DistI{Nat.T}, y::DistI{Nat.T}) match(y, [ - "Zero" => () -> x - "Succ" => y′ -> DistSucc(x) + y′ + "Z" => () -> x + "S" => y′ -> Nat.S(x) + y′ ]) end function nat_ast_to_int(ast) name, children = ast - if name == "Zero" + if name == "Z" 0 - elseif name == "Succ" + elseif name == "S" ast′, = children 1 + nat_ast_to_int(ast′) else @@ -53,8 +47,8 @@ end function Dice.match(x::DistUInt32, branches) branch_dict = Dict(branches) @dice_ite if prob_equals(x, DistUInt32(0)) - branch_dict["Zero"]() + branch_dict["Z"]() else - branch_dict["Succ"](sticky_sub(x, DistUInt32(1))) + branch_dict["S"](sticky_sub(x, DistUInt32(1))) end end diff --git a/src/dist/inductive/option.jl b/src/dist/inductive/option.jl index e91ffd74..66f5771b 100644 --- a/src/dist/inductive/option.jl +++ b/src/dist/inductive/option.jl @@ -1,13 +1,8 @@ -export Opt, DistNone, DistSome +export Opt -struct Opt{T} <: InductiveType end -function param_lists(::Type{Opt{T}})::Vector{Pair{String,Vector{Type}}} where T - [ - "None" => [], - "Some" => [T], - ] -end - -DistNone(T) = construct(Opt{T}, "None", []) -DistSome(x::T) where T = construct(Opt{T}, "Some", [x]) +module Opt + using Dice + import Dice: param_lists + @inductive T{A} None() Some(A) +end \ No newline at end of file diff --git a/test/autodiff_test.jl b/test/autodiff_test.jl index eab50f49..136a3db8 100644 --- a/test/autodiff_test.jl +++ b/test/autodiff_test.jl @@ -58,7 +58,7 @@ end # Variables can also be matrices! # Transform by [1, 2] by what matrix to get closest to [-3, -3]? A = Var("A") - var_vals = Valuation(A => [[1 0]; [0 1]]) + var_vals = Valuation(A => [[1. 0]; [0 1]]) v = to_matrix([1, 2]) v′ = A * v target_vec = to_matrix([-3, -3]) diff --git a/test/dist/inductive/list_test.jl b/test/dist/inductive/list_test.jl index 4cad59f2..d0c69a15 100644 --- a/test/dist/inductive/list_test.jl +++ b/test/dist/inductive/list_test.jl @@ -6,9 +6,9 @@ dist_type(::String) = DistString function to_dist_list(v) t = if isempty(v) DistUInt32 else dist_type(first(v)) end - res = DistNil(t) + res = Nil(t) for x in Iterators.reverse(v) - res = DistCons(t(x), res) + res = Cons(t, t(x), res) end res end @@ -43,7 +43,7 @@ end @test dist[to_ast([7, 6, 5, 555])] ≈ 2/5 * 1/3 * 9/10 cg = @dice begin - v1 = DistNil(DistUInt32) + v1 = Nil(DistUInt32) v2 = ifelse(flip(1/2), prob_append(v1, DistUInt32(6)), v1) v3 = ifelse(flip(1/2), prob_append(v2, DistUInt32(7)), v2) ifelse(flip(1/2), prob_append(v3, DistUInt32(6)), v3) @@ -65,12 +65,12 @@ end to_dist_list([1,2,3]), ifelse(flip(0.1), to_dist_list([1,2]), - DistNil(DistUInt32)))) + Nil(DistUInt32)))) @test pr(x)[true] ≈ 0.5 * 0.1 # Test concatenation for empty vectors cg = @dice begin - concat(DistNil(DistUInt32), DistNil(DistUInt32)) + concat(Nil(DistUInt32), Nil(DistUInt32)) end dist = pr(cg) @test sum(values(dist)) ≈ 1 @@ -78,14 +78,14 @@ end cg = @dice begin - concat(DistNil(DistString), DistCons(DistString("hi"), DistNil(DistString))) + concat(Nil(DistString), Cons(DistString, DistString("hi"), Nil(DistString))) end dist = pr(cg) @test sum(values(dist)) ≈ 1 @test dist[to_ast(["hi"])] ≈ 1 foo_bar = to_dist_list(["foo", "bar"]) - cg = one_of(ifelse(flip(2/3), DistNil(DistString), foo_bar)) + cg = one_of(ifelse(flip(2/3), Nil(DistString), foo_bar)) dist = pr(cg) @test sum(values(dist)) == 1 @test dist[("None", [])] ≈ 2/3 diff --git a/test/dist/inductive/option_test.jl b/test/dist/inductive/option_test.jl index 8a17d9c9..eaf6d4c2 100644 --- a/test/dist/inductive/option_test.jl +++ b/test/dist/inductive/option_test.jl @@ -2,17 +2,18 @@ using Test using Dice @testset "Option test" begin - none_int = DistNone(DistUInt32) - none_string = DistNone(DistString) + none_int = Opt.None(DistUInt32) + none_string = Opt.None(DistString) @test_throws MethodError prob_equals(none_int, none_string) - dist = pr(prob_equals(none_int, DistNone(DistUInt32))) + dist = pr(prob_equals(none_int, Opt.None(DistUInt32))) @test dist[true] == 1 probably_none = @dice_ite if flip(9/10) - DistNone(DistString) + Opt.None(DistString) else - DistSome( + Opt.Some( + DistString, @dice_ite if flip(2/3) DistString("foo") else @@ -32,8 +33,8 @@ end @testset "Right thunks called" begin - none_str = DistNone(DistString) - some_str = DistSome(DistString("hi")) + none_str = Opt.None(DistString) + some_str = Opt.Some(DistString, DistString("hi")) error_none1(x) = match(x, [ "None" => () -> error() diff --git a/test/inference/sample_test.jl b/test/inference/sample_test.jl index 9188e82b..ce1e4975 100644 --- a/test/inference/sample_test.jl +++ b/test/inference/sample_test.jl @@ -1,16 +1,17 @@ using Test using Dice +using Random @testset "Sample tests" begin # This test flakes with probability O(1/2^RUNS) RUNS = 200 x = DistUInt{3}([flip(.5), true, true]) - samples = [sample(x) for _ in 1:RUNS] + samples = [sample(Random.default_rng(), x) for _ in 1:RUNS] @test Set(samples) == Set([3, 7]) x = DistUInt{3}([flip(.5), true, flip(.99)]) is_even(n::T) where T = prob_equals(T(0), n % T(2)) - samples = [sample(x, evidence=is_even(x)) for _ in 1:RUNS] + samples = [sample(Random.default_rng(), x, evidence=is_even(x)) for _ in 1:RUNS] @test Set(samples) == Set([2, 6]) end From 2facb51be7a7ebbc6ad87caed00098e18b09421d Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 4 Apr 2024 17:36:21 -0700 Subject: [PATCH 099/231] overhaul @inductive --- src/dist/inductive/inductive.jl | 234 ++++++++++++++--------------- src/dist/inductive/list.jl | 26 ++-- src/dist/inductive/nat.jl | 9 +- src/dist/inductive/option.jl | 3 +- src/dist/misc.jl | 2 +- src/dsl.jl | 2 +- test/dist/inductive/list_test.jl | 6 +- test/dist/inductive/option_test.jl | 24 +-- 8 files changed, 151 insertions(+), 155 deletions(-) diff --git a/src/dist/inductive/inductive.jl b/src/dist/inductive/inductive.jl index 47424bc3..593c78f9 100644 --- a/src/dist/inductive/inductive.jl +++ b/src/dist/inductive/inductive.jl @@ -1,145 +1,93 @@ # Distributions over inductively-defined types +export @inductive, matches -export InductiveType, DistI, construct, match, matches, @inductive +# alternative to `nothing`, so `nothing` can be used as value +_UNSET = gensym("unset") +isunset(x) = x === _UNSET +getunset() = _UNSET -abstract type InductiveType end - -function param_lists(::Type{T})::Vector{Pair{String,Vector{Type}}} where T <: InductiveType - error("param_lists not implemented for $(T)") -end - -function param_list_dict(T::Type{<:InductiveType}) - Dict( - ctr => (i, params) - for (i, (ctr, params)) in enumerate(param_lists(T)) - ) -end - -struct DistI{T<:InductiveType} <: Dist{Any} - constructor::DistUInt32 - arg_lists::Vector{Union{Vector,Nothing}} +struct DistTaggedUnion <: Dist{Any} + which::DistUInt32 + dists::Vector end - -function tobits(x::DistI) +function tobits(x::DistTaggedUnion) collect( Iterators.flatten([ - Iterators.flatten( - tobits(y) - for args in x.arg_lists - if args !== nothing - for y in args - ), - tobits(x.constructor) + Iterators.flatten([tobits(d) for d in x.dists if !isunset(d)]), + tobits(x.which), ]) ) end -function frombits(x::DistI{T}, world) where T - constructor = frombits(x.constructor, world) - dist_args = x.arg_lists[constructor] - @assert dist_args !== nothing - args = [frombits(arg, world) for arg in dist_args] - (param_lists(T)[constructor][1], args) +function frombits(x::DistTaggedUnion, world) + which = frombits(x.which, world) + v = frombits(x.dists[which], world) + (which, v) end -function frombits_as_dist(x::DistI{T}, world) where T - DistI{T}( - frombits_as_dist(x.constructor, world), +function frombits_as_dist(x::DistTaggedUnion, world) + DistTaggedUnion( + frombits_as_dist(x.which, world), [ - if arg_list === nothing - nothing + if isunset(dist) + getunset() else - [frombits_as_dist(arg, world) for arg in arg_list] + frombits_as_dist(dist, world) end - for arg_list in x.arg_lists + for dist in x.dists ] ) end -function Base.ifelse(cond::Dist{Bool}, then::DistI{T}, elze::DistI{T}) where T - arg_lists = [ - if then_args === nothing - elze_args - elseif elze_args === nothing - then_args +function Base.ifelse(cond::Dist{Bool}, then::DistTaggedUnion, elze::DistTaggedUnion) + dists = [ + if isunset(then_dist) + elze_dist + elseif isunset(elze_dist) + then_dist else - ifelse(cond, then_args, elze_args) + ifelse(cond, then_dist, elze_dist) end - for (then_args, elze_args) in zip(then.arg_lists, elze.arg_lists) + for (then_dist, elze_dist) in zip(then.dists, elze.dists) ] - DistI{T}( - ifelse(cond, then.constructor, elze.constructor), - arg_lists - ) + DistTaggedUnion(ifelse(cond, then.which, elze.which), dists) end -function construct(t::Type{<:InductiveType}, constructor::String, args::Vector) - ctr_i, params = get(param_list_dict(t), constructor) do - error("$(t) has no constructor $(constructor)") - end - - @assert length(params) == length(args) - for (param, arg) in zip(params, args) - @assert arg isa param "$(t) $(constructor) ctr: expected $(param) got $(arg)" - end - - arg_lists = Vector{Union{Vector,Nothing}}([nothing for _ in param_lists(t)]) - arg_lists[ctr_i] = args - DistI{t}(DistUInt32(ctr_i), arg_lists) -end - -function Base.match(x::DistI{T}, cases) where T - pld = param_list_dict(T) - - branches = Set(map(first, cases)) - branches != keys(pld) && error("branches $(branches) do not match $(typeof(x))'s ctrs") - - res = nothing - for (ctr, f) in cases - i, params = pld[ctr] - args = x.arg_lists[i] - args === nothing && continue - v = f(args...) - if res === nothing +function Base.match(x::DistTaggedUnion, branches::Vector{Function}) + @assert length(x.dists) == length(branches) + res = getunset() + for (i, (dist, f)) in enumerate(zip(x.dists, branches)) + isunset(dist) && continue + v = f(dist) + if isunset(res) res = v else - res = ifelse(prob_equals(DistUInt32(i), x.constructor), v, res) + res = ifelse(prob_equals(x.which, DistUInt32(i)), v, res) end end res end -function matches(x::DistI{T}, ctr) where T - pld = param_list_dict(T) - @assert haskey(pld, ctr) - match(x, [ - k => (args...) -> k == ctr - for k in keys(pld) - ]) -end - -function prob_equals(x::DistI{T}, y::DistI{T}) where T +# Note: this requires that the "which" index of both unions are equal +function prob_equals(x::DistTaggedUnion, y::DistTaggedUnion) res = false - @assert length(x.arg_lists) == length(y.arg_lists) - for (i, (x_args, y_args)) in enumerate(zip(x.arg_lists, y.arg_lists)) - if isnothing(x_args) || isnothing(y_args) - continue - end - @assert length(x_args) == length(y_args) - res |= ( - prob_equals(x.constructor, DistUInt32(i)) - & prob_equals(y.constructor, DistUInt32(i)) - & reduce(&, [prob_equals(xa, ya) for (xa, ya) in zip(x_args, y_args)], init=true) + @assert length(x.dists) == length(y.dists) + for (i, (a, b)) in enumerate(zip(x.dists, y.dists)) + ii = DistUInt32(i) + res |= !isunset(a) && !isunset(b) && ( + prob_equals(x.which, ii) & prob_equals(y.which, ii) & prob_equals(a, b) ) end res end +function matches end + # Usage: # @inductive Option Some(DistInt32) None() -# @inductive List{T} Nil() Cons(T, DistI{List{T}}) +# @inductive List{T} Nil() Cons(T, List{T}) macro inductive(type, constructors...) ty = esc(type) plist = [ @@ -151,24 +99,74 @@ macro inductive(type, constructors...) for constructor in constructors ] tvs = if type isa Expr && type.head == :curly map(esc, type.args[2:end]) else [] end - block = quote - struct $(ty) <: InductiveType end - function $(esc(:param_lists))(::$(esc(:(Base.Type))){$(ty)})::$(esc(:(Base.Vector{Base.Pair{Base.String,Base.Vector{Base.Type}}}))) where {$(tvs...)} - [ - $([ - :($(string(ctor)) => [$([esc(arg) for arg in args]...)]) - for (ctor, args) in plist - ]...) - ] + quote + struct $(ty) <: $(esc(:(Dice.Dist{Base.Any}))) + union::$(esc(:(Dice.DistTaggedUnion))) end - end - for (ctor, args) in plist - vars = [gensym("$(i)") for i in 1:length(args)] - vars_annotated = [:($(var)::$(esc(arg))) for (var, arg) in zip(vars, args)] - tvs_args = [:(::$(esc(:(Base.Type))){$(tv)}) for tv in tvs] - push!(block.args, - :($(esc(ctor))($(vcat(tvs_args,vars_annotated)...)) where {$(tvs...)}= construct($(ty), $(string(ctor)), [$(vars...)])) + + dict = Dict( + $([ + :($(QuoteNode(ctor)) => $(i)) + for (i, (ctor, args)) in enumerate(plist) + ]...) ) + a = [$([ + QuoteNode(ctor) for (ctor, _) in plist + ]...)] + + function $(esc(:(Base.match)))(x::$(ty), cases) where {$(tvs...)} + @assert length(cases) == $(length(constructors)) + branches = [$([ + :(_ -> error("Constructor $($(QuoteNode(ctor))) missing branch")) + for (ctor, _) in plist + ]...)] + for (ctr, f) in cases + branches[dict[ctr]] = args -> f(args...) + end + $(esc(:(Base.match)))(x.union, branches) + end + + function $(esc(:(Dice.matches)))(x::$(ty), ctor) where {$(tvs...)} + prob_equals(x.union.which, DistUInt32(dict[ctor])) + end + + function $(esc(:(Dice.ifelse)))(c::$(esc(Dist{Bool})), x::$(ty), y::$(ty)) where {$(tvs...)} + $(ty)($(esc(:(Base.ifelse)))(c, x.union, y.union)) + end + + function $(esc(:(Dice.prob_equals)))(x::$(ty), y::$(ty)) where {$(tvs...)} + $(esc(:(Dice.prob_equals)))(x.union, y.union) + end + + function $(esc(:(Dice.tobits)))(x::$(ty)) where {$(tvs...)} + $(esc(:(Dice.tobits)))(x.union) + end + + function $(esc(:(Dice.frombits)))(x::$(ty), world) where {$(tvs...)} + i, v = $(esc(:(Dice.frombits)))(x.union, world) + (a[i], v) + end + + function $(esc(:(Dice.frombits_as_dist)))(x::$(ty), world) where {$(tvs...)} + $(ty)($(esc(:(Dice.frombits_as_dist)))(x.union, world)) + end + + $([ + begin + vars = [gensym("$(i)") for i in 1:length(args)] + vars_annotated = [:($(var)::$(esc(arg))) for (var, arg) in zip(vars, args)] + tvs_args = [:(::$(esc(:(Base.Type))){$(tv)}) for tv in tvs] + quote + function $(esc(ctor))($(vcat(tvs_args,vars_annotated)...)) where {$(tvs...)} + args = Any[$([ + :($(esc(:(Dice.getunset)))()) for _ in 1:length(constructors) + ]...)] + args[$(ctor_i)] = [$(vars...)] + $(ty)($(esc(:(Dice.DistTaggedUnion)))($(esc(:(Dice.DistUInt32)))($(ctor_i)), args)) + end + end + end + for (ctor_i, (ctor, args)) in enumerate(plist) + ]...) end - block end diff --git a/src/dist/inductive/list.jl b/src/dist/inductive/list.jl index 7b9aaae9..60794db4 100644 --- a/src/dist/inductive/list.jl +++ b/src/dist/inductive/list.jl @@ -1,38 +1,38 @@ # Define List export List, Nil, Cons, prob_append, concat, one_of -@inductive List{T} Nil() Cons(T, DistI{List{T}}) +@inductive List{T} Nil() Cons(T, List{T}) -function Base.length(l::DistI{List{T}}) where T +function Base.length(l::List{T}) where T match(l, [ - "Nil" => () -> DistUInt32(0), - "Cons" => (x, xs) -> DistUInt32(1) + length(xs), + :Nil => () -> DistUInt32(0), + :Cons => (x, xs) -> DistUInt32(1) + length(xs), ]) end -function rev_concat(l::DistI{List{T}}, acc::DistI{List{T}}) where T +function rev_concat(l::List{T}, acc::List{T}) where T match(l, [ - "Nil" => () -> acc, - "Cons" => (x, xs) -> rev_concat(xs, Cons(T, x, acc)), + :Nil => () -> acc, + :Cons => (x, xs) -> rev_concat(xs, Cons(T, x, acc)), ]) end -function Base.reverse(l::DistI{List{T}}) where T +function Base.reverse(l::List{T}) where T rev_concat(l, Nil(T)) end -function concat(l1::DistI{List{T}}, l2::DistI{List{T}}) where T +function concat(l1::List{T}, l2::List{T}) where T rev_concat(reverse(l1), l2) end -function prob_append(l::DistI{List{T}}, x::T) where T +function prob_append(l::List{T}, x::T) where T concat(l, Cons(T, x, Nil(T))) end -function one_of(l::DistI{List{T}})::DistI{Opt.T{T}} where T <: Dist +function one_of(l::List{T})::Opt.T{T} where T <: Dist match(l, [ - "Nil" => () -> Opt.None(T), - "Cons" => (x, xs) -> @dice_ite if flip_reciprocal(length(l)) + :Nil => () -> Opt.None(T), + :Cons => (x, xs) -> @dice_ite if flip_reciprocal(length(l)) Opt.Some(T, x) else one_of(xs) diff --git a/src/dist/inductive/nat.jl b/src/dist/inductive/nat.jl index 850f1a4a..b4f0c276 100644 --- a/src/dist/inductive/nat.jl +++ b/src/dist/inductive/nat.jl @@ -2,11 +2,10 @@ export Nat, nat_ast_to_int module Nat using Dice - import Dice: param_lists - @inductive T Z() S(DistI{T}) + @inductive T Z() S(T) end -function DistI{Nat.T}(x) +function Nat.T(x::Unsigned) res = DistZero() for _ in 1:x res = DistSucc(res) @@ -14,9 +13,9 @@ function DistI{Nat.T}(x) res end -Base.zero(::Type{DistI{Nat.T}}) = Nat.Z() +Base.zero(::Type{Nat.T}) = Nat.Z() -function Base.:(+)(x::DistI{Nat.T}, y::DistI{Nat.T}) +function Base.:(+)(x::Nat.T, y::Nat.T) match(y, [ "Z" => () -> x "S" => y′ -> Nat.S(x) + y′ diff --git a/src/dist/inductive/option.jl b/src/dist/inductive/option.jl index 66f5771b..74f88719 100644 --- a/src/dist/inductive/option.jl +++ b/src/dist/inductive/option.jl @@ -3,6 +3,5 @@ export Opt module Opt using Dice - import Dice: param_lists @inductive T{A} None() Some(A) -end \ No newline at end of file +end diff --git a/src/dist/misc.jl b/src/dist/misc.jl index 30159a6f..65c774e4 100644 --- a/src/dist/misc.jl +++ b/src/dist/misc.jl @@ -29,7 +29,7 @@ function prob_equals(x::Tuple, y::Tuple) end tobits(x::Vector) = - mapreduce(tobits, vcat, x) + collect(Iterators.flatten(map(tobits, x))) frombits(x::Vector, world) = map(v -> frombits(v, world), x) diff --git a/src/dsl.jl b/src/dsl.jl index 3eea5481..0accecf0 100644 --- a/src/dsl.jl +++ b/src/dsl.jl @@ -129,6 +129,6 @@ end for f in :[xor, atleast_two, prob_equals, (&), (|), (!), isless, ifelse, Base.collect_to!, Base.collect, Base.steprange_last, oneunit, Base.pairwise_blocksize, eltype, firstindex, iterate, - bitblast, uniform, flip, truncated, param_lists, param_list_dict, construct].args + bitblast, uniform, flip, truncated].args @eval (::DiceDyna)(::typeof($f), args...) = $f(args...) end \ No newline at end of file diff --git a/test/dist/inductive/list_test.jl b/test/dist/inductive/list_test.jl index d0c69a15..4358cbda 100644 --- a/test/dist/inductive/list_test.jl +++ b/test/dist/inductive/list_test.jl @@ -88,7 +88,7 @@ end cg = one_of(ifelse(flip(2/3), Nil(DistString), foo_bar)) dist = pr(cg) @test sum(values(dist)) == 1 - @test dist[("None", [])] ≈ 2/3 - @test dist[("Some", ["foo"])] ≈ 1/6 - @test dist[("Some", ["bar"])] ≈ 1/6 + @test dist[(:None, [])] ≈ 2/3 + @test dist[(:Some, ["foo"])] ≈ 1/6 + @test dist[(:Some, ["bar"])] ≈ 1/6 end diff --git a/test/dist/inductive/option_test.jl b/test/dist/inductive/option_test.jl index eaf6d4c2..63665885 100644 --- a/test/dist/inductive/option_test.jl +++ b/test/dist/inductive/option_test.jl @@ -22,13 +22,13 @@ using Dice ) end res = match(probably_none, [ - "Some" => (s) -> s + DistString("bar"), - "None" => () -> DistString("impossible") + :Some => (s) -> s + DistString("bar"), + :None => () -> DistString("impossible") ]) evid = !prob_equals(res, DistString("impossible")) @test pr(res, evidence=evid)["foobar"] ≈ 2/3 - @test pr(matches(probably_none, "None"))[true] ≈ 9/10 - @test pr(matches(probably_none, "Some"))[true] ≈ 1/10 + @test pr(matches(probably_none, :None))[true] ≈ 9/10 + @test pr(matches(probably_none, :Some))[true] ≈ 1/10 end @@ -37,21 +37,21 @@ end some_str = Opt.Some(DistString, DistString("hi")) error_none1(x) = match(x, [ - "None" => () -> error() - "Some" => (_) -> DistUInt(5) + :None => () -> error() + :Some => (_) -> DistUInt(5) ]) error_none2(x) = match(x, [ - "Some" => (_) -> DistUInt(5) - "None" => () -> error() + :Some => (_) -> DistUInt(5) + :None => () -> error() ]) error_some1(x) = match(x, [ - "Some" => (_) -> error() - "None" => () -> DistUInt(5) + :Some => (_) -> error() + :None => () -> DistUInt(5) ]) error_some2(x) = match(x, [ - "None" => () -> DistUInt(5) - "Some" => (_) -> error() + :None => () -> DistUInt(5) + :Some => (_) -> error() ]) @test_throws ErrorException error_none1(none_str) From 35966465ab861b48cdbcbf87967c58be6a9a8bf9 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 4 Apr 2024 17:36:46 -0700 Subject: [PATCH 100/231] update @inductive users --- examples/qc/benchmarks/benchmarks.jl | 30 ++--- examples/qc/benchmarks/lib/bst/dist.jl | 27 ++-- examples/qc/benchmarks/lib/bst/generator.jl | 24 ++-- examples/qc/benchmarks/lib/lruset/dist.jl | 43 +------ examples/qc/benchmarks/lib/rbt/dist.jl | 63 ++++----- examples/qc/benchmarks/lib/rbt/generator.jl | 8 +- examples/qc/benchmarks/lib/stlc/dist.jl | 127 +++++++++---------- examples/qc/benchmarks/lib/stlc/generator.jl | 30 ++--- examples/qc/benchmarks/lib/util.jl | 4 +- examples/qc/benchmarks/main.jl | 13 +- examples/qc/benchmarks/tool.jl | 4 +- examples/qc/examples/lib/dist_tree.jl | 6 +- examples/qc/examples/lib/dist_utlc.jl | 6 +- 13 files changed, 155 insertions(+), 230 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 400067ba..b41b4165 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -270,7 +270,7 @@ end ################################## abstract type LRUSetTestcase <: Benchmark end struct LRUSetTestcaseGeneration <: Generation{LRUSetTestcase} - v::DistI{LRUS.Program} + v::LRUS.Program end value(g::LRUSetTestcaseGeneration) = g.v function generation_emit_stats(rs::RunState, g::LRUSetTestcaseGeneration, s::String) @@ -307,8 +307,8 @@ end abstract type STLC <: Benchmark end struct STLCGeneration <: Generation{STLC} - e::DistI{Opt{DistI{Expr}}} - constructors_overapproximation::Vector{DistI{Opt{DistI{Expr}}}} + e::Opt.T{Expr.T} + constructors_overapproximation::Vector{Opt.T{Expr.T}} end function generation_emit_stats(rs::RunState, g::STLCGeneration, s::String) println_flush(rs.io, "Saving samples...") @@ -340,13 +340,13 @@ function to_subpath(p::BespokeSTLCGenerator) end function generate(rs::RunState, p::BespokeSTLCGenerator) constructors_overapproximation = [] - function add_ctor(v::DistI{Opt{DistI{Expr}}}) + function add_ctor(v::Opt.T{Expr.T}) push!(constructors_overapproximation, v) v end e = gen_expr( rs, - DistNil(DistI{Typ}), + DistNil(Typ), gen_type(rs, p.ty_size, p.param_vars_by_size), p.size, p.ty_size, @@ -389,7 +389,7 @@ function to_subpath(p::TypeBasedSTLCGenerator) end function generate(rs::RunState, p::TypeBasedSTLCGenerator) constructors_overapproximation = [] - function add_ctor(v::DistI{Expr}) + function add_ctor(v::Expr.T) push!(constructors_overapproximation, DistSome(v)) v end @@ -411,7 +411,7 @@ function create_loss_manager(rs::RunState, p::ApproxSTLCConstructorEntropy, gene ) println(rs.io, " $(time_build_loss) seconds") println(rs.io) - SimpleLossMgr(loss) + SimpleLossMgr(loss, nothing) end ################################## @@ -469,7 +469,7 @@ function create_loss_manager(rs::RunState, p::STLCConstructorEntropy, generation println(rs.io, " $(time_build_loss) seconds") println(rs.io) - SimpleLossMgr(loss) + SimpleLossMgr(loss, nothing) end ################################## @@ -478,8 +478,8 @@ end abstract type BST <: Benchmark end struct BSTGeneration <: Generation{BST} - t::DistI{Tree} - constructors_overapproximation::Vector{DistI{Tree}} + t::KVTree.T + constructors_overapproximation::Vector{KVTree.T} end function generation_emit_stats(rs::RunState, g::BSTGeneration, s::String) end @@ -517,7 +517,7 @@ function to_subpath(p::BespokeBSTGenerator) end function generate(rs::RunState, p::BespokeBSTGenerator) constructors_overapproximation = [] - function add_ctor(v::DistI{Tree}) + function add_ctor(v::KVTree.T) push!(constructors_overapproximation, v) v end @@ -551,7 +551,7 @@ function to_subpath(p::TypeBasedBSTGenerator) end function generate(rs::RunState, p::TypeBasedBSTGenerator) constructors_overapproximation = [] - function add_ctor(v::DistI{Tree}) + function add_ctor(v::KVTree.T) push!(constructors_overapproximation, v) v end @@ -628,7 +628,7 @@ function create_loss_manager(rs::RunState, p::MLELossConfig, generation) println(rs.io, " $(time_build_loss) seconds") println(rs.io) - SimpleLossMgr(loss) + SimpleLossMgr(loss, nothing) # TODO: fix. allow us to register_stats! to rs, or create MLELossMgr # # Also save distribution of metric being trained @@ -689,7 +689,7 @@ end abstract type RBT <: Benchmark end struct RBTGeneration <: Generation{RBT} - t::DistI{RBTree} + t::ColorKVTree.T end function generation_emit_stats(::RunState, g::RBTGeneration, s::String) end @@ -745,7 +745,7 @@ function create_loss_manager(rs::RunState, p::SatisfyPropertyLoss, generation) println(rs.io, " $(time_build_loss) seconds") println(rs.io) - SimpleLossMgr(loss) + SimpleLossMgr(loss, nothing) # TODO: fix # # Also print probability that property is met diff --git a/examples/qc/benchmarks/lib/bst/dist.jl b/examples/qc/benchmarks/lib/bst/dist.jl index dd31e9e6..f3baf488 100644 --- a/examples/qc/benchmarks/lib/bst/dist.jl +++ b/examples/qc/benchmarks/lib/bst/dist.jl @@ -1,27 +1,18 @@ # Define Tree -import Dice: param_lists - -struct Tree <: InductiveType end - -function param_lists(::Type{Tree})::Vector{Pair{String,Vector{Type}}} - [ - "E" => [], - "T" => [DistI{Tree}, DistNat, DistNat, DistI{Tree}], - ] +module KVTree + using Dice + using Main: DistNat + @inductive T Leaf() Node(T, DistNat, DistNat, T) end -DistE() = construct(Tree, "E", []) -DistT(l::DistI{Tree}, k::DistNat, v::DistNat, r::DistI{Tree}) = - construct(Tree, "T", [l, k, v, r]) - bst_ctor_to_id = Dict( - "E" => DistInt32(0), - "T" => DistInt32(1), + :Leaf => DistInt32(0), + :Node => DistInt32(1), ) -function ctor_to_id(ctor::DistI{Tree}) +function ctor_to_id(ctor::KVTree.T) match(ctor, [ - "E" => () -> bst_ctor_to_id["E"] - "T" => (_, _, _, _) -> bst_ctor_to_id["T"] + :Leaf => () -> bst_ctor_to_id[:Leaf] + :Node => (_, _, _, _) -> bst_ctor_to_id[:Node] ]) end diff --git a/examples/qc/benchmarks/lib/bst/generator.jl b/examples/qc/benchmarks/lib/bst/generator.jl index 4fad0fd8..530c09f6 100644 --- a/examples/qc/benchmarks/lib/bst/generator.jl +++ b/examples/qc/benchmarks/lib/bst/generator.jl @@ -3,11 +3,11 @@ safedec(x::DistUInt{T}) where T = @dice_ite if prob_equals(x, DistUInt{T}(0)) Di function gen_tree(rs, s::Integer, lo::DistNat, hi::DistNat, approx_unif::Bool, track_return) track_return( @dice_ite if s == 0 || hi - lo < DistNat(2) - DistE() + KVTree.Leaf() else s′ = s - 1 if flip(register_weight!(rs, "sz$(s)")) - DistE() + KVTree.Leaf() else k = if approx_unif unif_approx(lo + DistNat(1), safedec(hi)) @@ -17,7 +17,7 @@ function gen_tree(rs, s::Integer, lo::DistNat, hi::DistNat, approx_unif::Bool, t v = DistNat(0) # arbitrary l = gen_tree(rs, s′, lo, k, approx_unif, track_return) r = gen_tree(rs, s′, k, hi, approx_unif, track_return) - DistT(l, k, v, r) + KVTree.Node(l, k, v, r) end end ) @@ -26,17 +26,17 @@ end function gen_tree_dummy_vals(rs, s::Integer, track_return) track_return( @dice_ite if s == 0 - DistE() + KVTree.Leaf() else s′ = s - 1 if flip(register_weight!(rs, "sz$(s)")) - DistE() + KVTree.Leaf() else k = DistNat(0) v = DistNat(0) # arbitrary l = gen_tree_dummy_vals(rs, s′, track_return) r = gen_tree_dummy_vals(rs, s′, track_return) - DistT(l, k, v, r) + KVTree.Node(l, k, v, r) end end ) @@ -46,24 +46,24 @@ end function typebased_gen_tree(rs, s::Integer, track_return) track_return( @dice_ite if s == 0 - DistE() + KVTree.Leaf() else s′ = s - 1 if flip(register_weight!(rs, "sz$(s)")) - DistE() + KVTree.Leaf() else l = typebased_gen_tree(rs, s′, track_return) r = typebased_gen_tree(rs, s′, track_return) k = v = DistNat(0) # arbitrary - DistT(l, k, v, r) + KVTree.Node(l, k, v, r) end end ) end -function tree_size(e::DistI{Tree}) +function tree_size(e::KVTree.T) match(e, [ - "E" => () -> DistUInt32(0), - "T" => (l, k, v, r) -> DistUInt32(1) + tree_size(l) + tree_size(r), + :Leaf => () -> DistUInt32(0), + :Node => (l, k, v, r) -> DistUInt32(1) + tree_size(l) + tree_size(r), ]) end diff --git a/examples/qc/benchmarks/lib/lruset/dist.jl b/examples/qc/benchmarks/lib/lruset/dist.jl index dc489361..03f646a1 100644 --- a/examples/qc/benchmarks/lib/lruset/dist.jl +++ b/examples/qc/benchmarks/lib/lruset/dist.jl @@ -1,31 +1,7 @@ module LRUS using Dice - import Dice: param_lists - - struct Statement <: InductiveType end - function param_lists(::Type{LRUS.Statement})::Vector{Pair{String,Vector{Type}}} - [ - "Insert" => [DistInt32], - "Contains" => [DistInt32], - "PopStale" => [], - ] - end - Insert(v::DistInt32) = construct(Statement, "Insert", [v]) - Contains(v::DistInt32) = construct(Statement, "Contains", [v]) - PopStale() = construct(Statement, "PopStale", []) - - struct Program <: InductiveType end - - function param_lists(::Type{LRUS.Program})::Vector{Pair{String,Vector{Type}}} - [ - "Nil" => [], - "Cons" => [DistI{Statement}, DistI{Program}], - ] - end - - Nil() = construct(Program, "Nil",[]) - Cons(s::DistI{Statement}, p::DistI{Program}) = - construct(Program, "Cons", [s, p]) + @inductive Statement Insert(DistInt32) Contains(DistInt32) PopStale() + @inductive Program Nil() Cons(Statement, Program) function vec_to_program(v) if isempty(v) @@ -35,18 +11,3 @@ module LRUS end end end - # import Dice: param_lists - - # function param_lists(::Type{LRUS.Statement})::Vector{Pair{String,Vector{Type}}} - # [ - # "Insert" => [DistInt32], - # "Contains" => [DistInt32], - # "PopStale" => [], - # ] - # end - # function param_lists(::Type{LRUS.Program})::Vector{Pair{String,Vector{Type}}} - # [ - # "Nil" => [], - # "Cons" => [DistI{LRUS.Statement}, DistI{LRUS.Program}], - # ] - # end diff --git a/examples/qc/benchmarks/lib/rbt/dist.jl b/examples/qc/benchmarks/lib/rbt/dist.jl index 308f3118..1a49b34f 100644 --- a/examples/qc/benchmarks/lib/rbt/dist.jl +++ b/examples/qc/benchmarks/lib/rbt/dist.jl @@ -1,50 +1,33 @@ # Define RBTree -import Dice: param_lists +using Dice -struct Color <: InductiveType end -function param_lists(::Type{Color})::Vector{Pair{String,Vector{Type}}} - [ - "Red" => [], - "Black" => [] - ] +module Color + using Dice + @inductive T Red() Black() end -DistRed() = construct(Color, "Red", []) -DistBlack() = construct(Color, "Black", []) -struct RBTree <: InductiveType end - -function param_lists(::Type{RBTree})::Vector{Pair{String,Vector{Type}}} - [ - "E" => [], - "T" => [DistI{Color}, DistI{RBTree}, DistInt32, DistInt32, DistI{RBTree}], - ] +module ColorKVTree + using Dice + using Main: DistNat, Color + @inductive T Leaf() Node(Color.T, T, DistInt32, DistInt32, T) end -DistRBE() = construct(RBTree, "E", []) -DistRBT(c::DistI{Color}, l::DistI{RBTree}, k::DistInt32, v::DistInt32, r::DistI{RBTree}) = - construct(RBTree, "T", [c, l, k, v, r]) - -function tree_size(e::DistI{RBTree}) +function tree_size(e::ColorKVTree.T) match(e, [ - "E" => () -> DistUInt32(0), - "T" => (c, l, k, v, r) -> DistUInt32(1) + tree_size(l) + tree_size(r), + :E => () -> DistUInt32(0), + :T => (c, l, k, v, r) -> DistUInt32(1) + tree_size(l) + tree_size(r), ]) end -function is_red(c::DistI{Color}) - match(c, [ - "Red" => () -> true, - "Black" => () -> false - ]) -end +is_red(c::Color.T) = matches(c, :Red) # Check that all paths through the tree have the same number of black nodes -function satisfies_bookkeeping_invariant(e::DistI{RBTree}) - function black_height_and_valid(t::DistI{RBTree}) +function satisfies_bookkeeping_invariant(e::ColorKVTree.T) + function black_height_and_valid(t::ColorKVTree.T) match(t, [ - "E" => () -> (DistUInt32(1), true), - "T" => (c, l, k, v, r) -> begin + :E => () -> (DistUInt32(1), true), + :T => (c, l, k, v, r) -> begin left_black_height, left_valid = black_height_and_valid(l) right_black_height, right_valid = black_height_and_valid(r) @dice_ite if left_valid & right_valid & prob_equals(left_black_height, right_black_height) @@ -60,11 +43,11 @@ function satisfies_bookkeeping_invariant(e::DistI{RBTree}) end # Check that all red nodes have black children -function satisfies_balance_invariant(e::DistI{RBTree}) - function color_and_valid(t::DistI{RBTree}) +function satisfies_balance_invariant(e::ColorKVTree.T) + function color_and_valid(t::ColorKVTree.T) match(t, [ - "E" => () -> (DistBlack(), true), - "T" => (c, l, k, v, r) -> begin + :E => () -> (Black(), true), + :T => (c, l, k, v, r) -> begin left_color, left_valid = color_and_valid(l) right_color, right_valid = color_and_valid(r) @dice_ite if left_valid & right_valid & !(is_red(c) & (is_red(left_color) | is_red(right_color))) @@ -79,9 +62,9 @@ function satisfies_balance_invariant(e::DistI{RBTree}) valid end -function satisfies_black_root_invariant(t::DistI{RBTree}) +function satisfies_black_root_invariant(t::ColorKVTree.T) match(t, [ - "E" => () -> true, - "T" => (c, l, k, v, r) -> !is_red(c) + :E => () -> true, + :T => (c, l, k, v, r) -> !is_red(c) ]) end diff --git a/examples/qc/benchmarks/lib/rbt/generator.jl b/examples/qc/benchmarks/lib/rbt/generator.jl index 6e43fb3f..48430a82 100644 --- a/examples/qc/benchmarks/lib/rbt/generator.jl +++ b/examples/qc/benchmarks/lib/rbt/generator.jl @@ -43,7 +43,7 @@ Coq < Coq < Coq < GenSizedTree = ==# function tb_gen_rbt(rs, p, sz, parent_red) if sz == 0 - DistRBE() + ColorKVTree.Leaf() else flip_leaf = if p.learn_leaf_weights @dice_ite if parent_red | !p.use_parent_color @@ -55,19 +55,19 @@ function tb_gen_rbt(rs, p, sz, parent_red) flip(.5) end @dice_ite if flip_leaf - DistRBE() + ColorKVTree.Leaf() else flip_red = @dice_ite if parent_red | !p.use_parent_color flip(register_weight!(rs, if p.color_by_size "red_sz$(sz)_redparent" else "red_redparent" end)) else flip(register_weight!(rs, if p.color_by_size "red_sz$(sz)_blackparent" else "red_blackparent" end)) end - color = if flip_red DistRed() else DistBlack() end + color = if flip_red Color.Red() else Color.Black() end k = DistInt32(0) v = DistInt32(0) l = tb_gen_rbt(rs, p, sz - 1, flip_red) r = tb_gen_rbt(rs, p, sz - 1, flip_red) - DistRBT(color, l, k, v, r) + ColorKVTree.Node(color, l, k, v, r) end end end \ No newline at end of file diff --git a/examples/qc/benchmarks/lib/stlc/dist.jl b/examples/qc/benchmarks/lib/stlc/dist.jl index dac9d88b..b3ad1b8e 100644 --- a/examples/qc/benchmarks/lib/stlc/dist.jl +++ b/examples/qc/benchmarks/lib/stlc/dist.jl @@ -1,90 +1,77 @@ # Define DistSTLC -struct Typ <: InductiveType end -function Dice.param_lists(::Type{Typ}) - [ - "TBool" => [], - "TFun" => [DistI{Typ}, DistI{Typ}], - ] -end -DistTBool() = construct(Typ, "TBool", []) -DistTFun(f_ty, x_ty) = construct(Typ, "TFun", [f_ty, x_ty]) - -struct Expr <: InductiveType end -function Dice.param_lists(::Type{Expr}) - [ - "Var" => [DistNat], - "Boolean" => [AnyBool], - "Abs" => [DistI{Typ}, DistI{Expr}], - "App" => [DistI{Expr}, DistI{Expr}], - ] -end -DistVar(i) = construct(Expr, "Var", [i]) -DistBoolean(b) = construct(Expr, "Boolean", [b]) -DistAbs(ty, e) = construct(Expr, "Abs", [ty, e]) -DistApp(f, x) = construct(Expr, "App", [f, x]) - -function term_size(e::DistI{Expr}) +module Typ + using Dice + @inductive T TBool() TFun(T, T) +end + +module Expr + using Dice + using Main: DistNat, Typ + @inductive T Var(DistNat) Boolean(AnyBool) Abs(Typ.T, T) App(T, T) +end + +function term_size(e::Expr.T) match(e, [ - "Var" => (i) -> DistUInt32(1), - "Boolean" => (b) -> DistUInt32(1), - "App" => (f, x) -> DistUInt32(1) + term_size(f) + term_size(x), - "Abs" => (ty, e′) -> DistUInt32(1) + term_size(e′), + :Var => (i) -> DistUInt32(1), + :Boolean => (b) -> DistUInt32(1), + :App => (f, x) -> DistUInt32(1) + term_size(f) + term_size(x), + :Abs => (ty, e′) -> DistUInt32(1) + term_size(e′), ]) end -function term_size(e::DistI{Opt{DistI{Expr}}}) +function term_size(e::Opt.T{Expr.T}) match(e, [ - "Some" => e -> term_size(e), - "None" => () -> DistUInt32(1024), + :Some => e -> term_size(e), + :None => () -> DistUInt32(1024), ]) end -function num_apps(e::DistI{Opt{DistI{Expr}}}) +function num_apps(e::Opt.T{Expr.T}) match(e, [ - "Some" => x -> num_apps(x), - "None" => () -> DistUInt32(1024), + :Some => x -> num_apps(x), + :None => () -> DistUInt32(1024), ]) end -function num_apps(e::DistI{Expr}) +function num_apps(e::Expr.T) match(e, [ - "Var" => (i) -> DistUInt32(0), - "Boolean" => (b) -> DistUInt32(0), - "App" => (f, x) -> DistUInt32(1) + num_apps(f) + num_apps(x), - "Abs" => (ty, e′) -> num_apps(e′), + :Var => (i) -> DistUInt32(0), + :Boolean => (b) -> DistUInt32(0), + :App => (f, x) -> DistUInt32(1) + num_apps(f) + num_apps(x), + :Abs => (ty, e′) -> num_apps(e′), ]) end stlc_ctor_to_id = Dict( - "Var" => DistInt32(0), - "Boolean" => DistInt32(1), - "App" => DistInt32(2), - "Abs" => DistInt32(3), + :Var => DistInt32(0), + :Boolean => DistInt32(1), + :App => DistInt32(2), + :Abs => DistInt32(3), ) -function ctor_to_id(ctor::DistI{Expr}) +function ctor_to_id(ctor::Expr.T) match(ctor, [ - "Var" => _ -> stlc_ctor_to_id["Var"] - "Boolean" => _ -> stlc_ctor_to_id["Boolean"] - "App" => (_, _) -> stlc_ctor_to_id["App"] - "Abs" => (_, _) -> stlc_ctor_to_id["Abs"] + :Var => _ -> stlc_ctor_to_id[:Var] + :Boolean => _ -> stlc_ctor_to_id[:Boolean] + :App => (_, _) -> stlc_ctor_to_id[:App] + :Abs => (_, _) -> stlc_ctor_to_id[:Abs] ]) end -function opt_ctor_to_id(opt_ctor::DistI{Opt{DistI{Expr}}}) +function opt_ctor_to_id(opt_ctor::Opt.T{Expr.T}) match(opt_ctor, [ - "Some" => ctor_to_id, - "None" => () -> DistInt32(-1), + :Some => ctor_to_id, + :None => () -> DistInt32(-1), ]) end function collect_constructors(e) match(e, [ - "Var" => (i) -> DistVector([stlc_ctor_to_id["Var"]]), - "Boolean" => (b) -> DistVector([stlc_ctor_to_id["Boolean"]]), - "App" => (f, x) -> prob_append(prob_extend(collect_constructors(f), collect_constructors(x)), stlc_ctor_to_id["App"]), - "Abs" => (ty, e′) -> prob_append(collect_constructors(e′), stlc_ctor_to_id["Abs"]), + :Var => (i) -> DistVector([stlc_ctor_to_id[:Var]]), + :Boolean => (b) -> DistVector([stlc_ctor_to_id[:Boolean]]), + :App => (f, x) -> prob_append(prob_extend(collect_constructors(f), collect_constructors(x)), stlc_ctor_to_id[:App]), + :Abs => (ty, e′) -> prob_append(collect_constructors(e′), stlc_ctor_to_id[:Abs]), ]) end @@ -96,7 +83,7 @@ parens(b, s) = if b "($(s))" else s end function ty_str(ty, free=true) name, children = ty - if name == "TBool" + if name == :TBool "Bool" else t1, t2 = children @@ -121,19 +108,19 @@ end function stlc_str(ast, depth=0, p=free) name, children = ast - if name == "Var" + if name == :Var i, = children i isa Integer || (i = nat_ast_to_int(i)) # i is the number of steps from the *top* of the env, see gen_var var_depth = depth - i - 1 var_str(var_depth) - elseif name == "Boolean" + elseif name == :Boolean v, = children string(v) - elseif name == "Abs" + elseif name == :Abs ty, e = children parens(p > free, "λ$(var_str(depth)):$(ty_str(ty)). $(stlc_str(e, depth + 1, free))") - elseif name == "App" + elseif name == :App e1, e2 = children parens( p > fun, @@ -155,7 +142,7 @@ end function typecheck_opt(ast) name, children = ast - if name == "Some" + if name == :Some e, = children ty = typecheck(e) if error_ty(ty) @@ -163,7 +150,7 @@ function typecheck_opt(ast) println(get_error(ty)) println() end - elseif name == "None" + elseif name == :None # do nothing else error("Bad node $(name)") @@ -174,7 +161,7 @@ typecheck(ast) = typecheck(ast, Dict()) function typecheck(ast, gamma, depth=0) name, children = ast - if name == "Var" + if name == :Var i, = children i isa Integer || (i = nat_ast_to_int(i)) var_depth = depth - i - 1 @@ -182,20 +169,20 @@ function typecheck(ast, gamma, depth=0) return "Unknown var $(var_str(var_depth))" end gamma[var_depth] - elseif name == "Boolean" - ("TBool", []) - elseif name == "Abs" + elseif name == :Boolean + (:TBool, []) + elseif name == :Abs t_in, e = children gamma′ = copy(gamma) gamma′[depth] = t_in t_out = typecheck(e, gamma′, depth + 1) error_ty(t_out) && return t_out - ("TFun", [t_in, t_out]) - elseif name == "App" + (:TFun, [t_in, t_out]) + elseif name == :App e1, e2 = children t1 = typecheck(e1, gamma, depth) error_ty(t1) && return t1 - if t1[1] != "TFun" + if t1[1] != :TFun return "\"$(stlc_str(e1, depth))\" typechecked to $(ty_str(t1)), expected function" end t2 = typecheck(e2, gamma, depth) diff --git a/examples/qc/benchmarks/lib/stlc/generator.jl b/examples/qc/benchmarks/lib/stlc/generator.jl index ff298660..a2bc828d 100644 --- a/examples/qc/benchmarks/lib/stlc/generator.jl +++ b/examples/qc/benchmarks/lib/stlc/generator.jl @@ -2,12 +2,12 @@ # https://github.com/jwshi21/etna/blob/main/bench-suite/Coq/STLC/Methods/BespokeGenerator.v -Ctx = DistI{List{DistI{Typ}}} +Ctx = List{Typ.T} -function gen_var(ctx::Ctx, t::DistI{Typ}, p::DistNat, r::DistI{List{DistNat}})::DistI{List{DistNat}} +function gen_var(ctx::Ctx, t::Typ.T, p::DistNat, r::List{DistNat})::List{DistNat} match(ctx, [ - "Nil" => () -> r, - "Cons" => (t′, ctx′) -> @dice_ite if prob_equals(t, t′) + :Nil => () -> r, + :Cons => (t′, ctx′) -> @dice_ite if prob_equals(t, t′) gen_var(ctx′, t, p + DistNat(1), DistCons(p, r)) else gen_var(ctx′, t, p + DistNat(1), r) @@ -15,18 +15,18 @@ function gen_var(ctx::Ctx, t::DistI{Typ}, p::DistNat, r::DistI{List{DistNat}}):: ]) end -function bind_opt(f, ma::DistI{Opt{T}})::DistI{<:Opt{<:Any}} where T +function bind_opt(f, ma::Opt.T{T})::Opt.T{<:Any} where T match(ma, [ - "None" => () -> DistNone(T) # TODO: should be DistNone(return type of f) - "Some" => f + :None => () -> DistNone(T) # TODO: should be DistNone(return type of f) + :Some => f ]) end # TODO: try returning expr instead of opt extr? what does env do? -function gen_zero(env::Ctx, tau::DistI{Typ}) +function gen_zero(env::Ctx, tau::Typ.T) match(tau, [ - "TBool" => () -> DistSome(DistBoolean(flip(0.5))), # TODO: should this be constant for just learning structure? - "TFun" => (T1, T2) -> bind_opt(gen_zero(DistCons(T1, env), T2)) do e + :TBool => () -> DistSome(DistBoolean(flip(0.5))), # TODO: should this be constant for just learning structure? + :TFun => (T1, T2) -> bind_opt(gen_zero(DistCons(T1, env), T2)) do e DistSome(DistAbs(T1, e)) end ]) @@ -45,14 +45,14 @@ function gen_bool() DistBoolean(flip(0.5)) end -function gen_expr(rs::RunState, env::Ctx, tau::DistI{Typ}, sz::Integer, gen_typ_sz::Integer, by_sz, track_return)::DistI{Opt{DistI{Expr}}} +function gen_expr(rs::RunState, env::Ctx, tau::Typ.T, sz::Integer, gen_typ_sz::Integer, by_sz, track_return)::Opt.T{Expr.T} track_return( begin for_prefix = if by_sz "sz$(sz)_" else "" end if sz == 0 backtrack_for(rs, for_prefix * "zero", [ one_of( - map(DistI{Expr})( + map(Expr.T)( DistVar, gen_var(env, tau, zero(DistNat), DistNil(DistNat)) ) @@ -64,7 +64,7 @@ function gen_expr(rs::RunState, env::Ctx, tau::DistI{Typ}, sz::Integer, gen_typ_ backtrack_for(rs, for_prefix * "succ", [ # Var one_of( - map(DistI{Expr})( + map(Expr)( DistVar, gen_var(env, tau, zero(DistNat), DistNil(DistNat)) ) @@ -80,8 +80,8 @@ function gen_expr(rs::RunState, env::Ctx, tau::DistI{Typ}, sz::Integer, gen_typ_ end, # Value match(tau, [ - "TBool" => () -> DistSome(gen_bool()), - "TFun" => (T1, T2) -> + :TBool => () -> DistSome(gen_bool()), + :TFun => (T1, T2) -> bind_opt(gen_expr(rs, DistCons(T1, env), T2, sz′, gen_typ_sz, by_sz, track_return)) do e DistSome(DistAbs(T1, e)) end diff --git a/examples/qc/benchmarks/lib/util.jl b/examples/qc/benchmarks/lib/util.jl index 9737ae19..ca84c3fa 100644 --- a/examples/qc/benchmarks/lib/util.jl +++ b/examples/qc/benchmarks/lib/util.jl @@ -1,4 +1,4 @@ -function backtrack_for(rs, name, opts::Vector{DistI{Opt{T}}})::DistI{Opt{T}} where T +function backtrack_for(rs, name, opts::Vector{Opt.T{T}})::Opt.T{T} where T first_some(T, shuffle_for(rs, name, opts)) end @@ -65,7 +65,7 @@ end # Manually curry so we can have type be first arg and use "do" function map(::Type{RetT}) where RetT - function inner(f, l::DistI{List{T}}) where T + function inner(f, l::List{T}) where T match(l, [ "Nil" => () -> DistNil(RetT), "Cons" => (x, xs) -> DistCons(f(x), map(RetT)(f, xs)) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index d7915a10..7215bdec 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -5,20 +5,21 @@ GENERATION_PARAMS_LIST = [ # BespokeSTLCGenerator(param_vars_by_size=true,size=5,ty_size=2), # BespokeBSTGenerator(size=5, vals=BSTDummyVals), # TypeBasedBSTGenerator(size=5), - # TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=true, use_parent_color=false), + TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=true, use_parent_color=true), # TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=false, use_parent_color=true), - BespokeLRUSetTestcaseGenerator(5), + # BespokeLRUSetTestcaseGenerator(5), ] -LR_LIST = [0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1, 3, 10] +LR_LIST = [0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1, 3, 10, 0.15, 0.2, 0.25] LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ - SamplingEntropy{LRUSetTestcase}(resampling_frequency=2, samples_per_batch=100) => lr, + SamplingEntropy{RBT}(resampling_frequency=2, samples_per_batch=100) => 0.01, + SatisfyPropertyLoss(MultipleInvariants([BookkeepingInvariant(),BalanceInvariant()])) => lr, ] for lr in LR_LIST ), ])) -EPOCHS_LIST = [10_000] +EPOCHS_LIST = [5_000] # N = 4 # GENERATION_PARAMS_LIST = [Flips{N}()] @@ -41,7 +42,7 @@ TOOL_PATH = "examples/qc/benchmarks/tool.jl" flags = join([s for s in ARGS if startswith(s, "-")], " ") lcws_s = replace(string(lcws), " "=>"") p_s = replace(string(p), " "=>"") - s = "julia --project $(TOOL_PATH) $(flags) $(p_s) $(lcws_s) $(epochs)" + s = "julia --project $(TOOL_PATH) $(flags) \"$(p_s)\" \"$(lcws_s)\" $(epochs)" cmd = Cmd(Cmd(convert(Vector{String}, split(s))), ignorestatus=true) println(s) out = IOBuffer() diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 3c7eec6c..bf0a6357 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -42,7 +42,7 @@ generation_params, loss_config_weight_pairs, epochs = evaled_args EPOCHS = epochs SEED = 0 -TAG = "v13" +TAG = "test" out_dir = joinpath( vcat( @@ -66,6 +66,8 @@ end mkpath(out_dir) rs = RunState(Valuation(), Dict{String,ADNode}(), open(log_path, "w"), out_dir, MersenneTwister(SEED)) +println(stderr, "Logging to $(log_path)\n") + commit = strip(cmd_out(`git rev-parse --short HEAD`)) t = now() println_loud(rs, "$(t) $(commit) $(ARGS)") diff --git a/examples/qc/examples/lib/dist_tree.jl b/examples/qc/examples/lib/dist_tree.jl index 01daaab3..11f91371 100644 --- a/examples/qc/examples/lib/dist_tree.jl +++ b/examples/qc/examples/lib/dist_tree.jl @@ -6,15 +6,15 @@ struct Tree{T} <: InductiveType end function param_lists(::Type{Tree{T}})::Vector{Pair{String,Vector{Type}}} where T <: Union{Dist, AnyBool} [ "Leaf" => [], - "Branch" => [T, DistI{Tree{T}}, DistI{Tree{T}}], + "Branch" => [T, Tree{T}, Tree{T}], ] end DistLeaf(T) = construct(Tree{T}, "Leaf", []) -DistBranch(x::T, l::DistI{Tree{T}}, r::DistI{Tree{T}}) where T = +DistBranch(x::T, l::Tree{T}, r::Tree{T}) where T = construct(Tree{T}, "Branch", [x, l, r]) -function depth(l::DistI{Tree{T}}) where T +function depth(l::Tree{T}) where T match(l, [ "Leaf" => () -> DistUInt32(0), "Branch" => (x, l, r) -> begin diff --git a/examples/qc/examples/lib/dist_utlc.jl b/examples/qc/examples/lib/dist_utlc.jl index 9e6ba2fc..a388f44b 100644 --- a/examples/qc/examples/lib/dist_utlc.jl +++ b/examples/qc/examples/lib/dist_utlc.jl @@ -6,8 +6,8 @@ struct DistUTLC <: InductiveType end function param_lists(::Type{DistUTLC})::Vector{Pair{String,Vector{Type}}} [ "Var" => [DistString], - "App" => [DistI{DistUTLC}, DistI{DistUTLC}], - "Abs" => [DistString, DistI{DistUTLC}], + "App" => [DistUTLC, DistUTLC], + "Abs" => [DistString, DistUTLC], ] end @@ -15,7 +15,7 @@ DistVar(s) = construct(DistUTLC, "Var", [s,]) DistApp(e1, e2) = construct(DistUTLC, "App", [e1, e2]) DistAbs(s, e) = construct(DistUTLC, "Abs", [s, e]) -function ast_depth(l::DistI{DistUTLC}) +function ast_depth(l::DistUTLC) match(l, [ "Var" => (s) -> DistUInt32(0), "App" => (e1, e2) -> begin From f39c49e05132357dd44d3c62602b1ab4252cc6bd Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 6 Apr 2024 17:35:45 -0700 Subject: [PATCH 101/231] conditional entropy, @match --- examples/qc/benchmarks/benchmarks.jl | 11 +++++---- examples/qc/benchmarks/lib/rbt/dist.jl | 32 +++++++++++++------------- examples/qc/benchmarks/main.jl | 7 ++++-- examples/qc/benchmarks/tool.jl | 2 +- src/dist/inductive/inductive.jl | 25 +++++++++++++++++++- 5 files changed, 53 insertions(+), 24 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index b41b4165..e1c61ab8 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -182,10 +182,13 @@ function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) begin lpr_eq = LogPr(prob_equals(m.val,sample)) lpr_eq_expanded = Dice.expand_logprs(l, lpr_eq) - [ - lpr_eq_expanded * compute(a, lpr_eq_expanded), - lpr_eq_expanded - ] + meets_invs = satisfies_bookkeeping_invariant(sample) & satisfies_balance_invariant(sample) + @assert meets_invs isa Bool + if meets_invs + [lpr_eq_expanded * compute(a, lpr_eq_expanded), lpr_eq_expanded] + else + [Dice.Constant(0), Dice.Constant(0)] + end end for sample in samples if m.consider(sample) diff --git a/examples/qc/benchmarks/lib/rbt/dist.jl b/examples/qc/benchmarks/lib/rbt/dist.jl index 1a49b34f..718bcdd9 100644 --- a/examples/qc/benchmarks/lib/rbt/dist.jl +++ b/examples/qc/benchmarks/lib/rbt/dist.jl @@ -14,10 +14,10 @@ module ColorKVTree end function tree_size(e::ColorKVTree.T) - match(e, [ - :E => () -> DistUInt32(0), - :T => (c, l, k, v, r) -> DistUInt32(1) + tree_size(l) + tree_size(r), - ]) + @match e [ + Leaf() -> DistUInt32(0), + Node(c, l, k, v, r) -> DistUInt32(1) + tree_size(l) + tree_size(r), + ] end is_red(c::Color.T) = matches(c, :Red) @@ -25,9 +25,9 @@ is_red(c::Color.T) = matches(c, :Red) # Check that all paths through the tree have the same number of black nodes function satisfies_bookkeeping_invariant(e::ColorKVTree.T) function black_height_and_valid(t::ColorKVTree.T) - match(t, [ - :E => () -> (DistUInt32(1), true), - :T => (c, l, k, v, r) -> begin + @match t [ + Leaf() -> (DistUInt32(1), true), + Node(c, l, k, v, r) -> begin left_black_height, left_valid = black_height_and_valid(l) right_black_height, right_valid = black_height_and_valid(r) @dice_ite if left_valid & right_valid & prob_equals(left_black_height, right_black_height) @@ -36,7 +36,7 @@ function satisfies_bookkeeping_invariant(e::ColorKVTree.T) DistUInt32(0), false end end, - ]) + ] end _black_height, valid = black_height_and_valid(e) valid @@ -45,9 +45,9 @@ end # Check that all red nodes have black children function satisfies_balance_invariant(e::ColorKVTree.T) function color_and_valid(t::ColorKVTree.T) - match(t, [ - :E => () -> (Black(), true), - :T => (c, l, k, v, r) -> begin + @match t [ + Leaf() -> (Color.Black(), true), + Node(c, l, k, v, r) -> begin left_color, left_valid = color_and_valid(l) right_color, right_valid = color_and_valid(r) @dice_ite if left_valid & right_valid & !(is_red(c) & (is_red(left_color) | is_red(right_color))) @@ -56,15 +56,15 @@ function satisfies_balance_invariant(e::ColorKVTree.T) c, false end end, - ]) + ] end _color, valid = color_and_valid(e) valid end function satisfies_black_root_invariant(t::ColorKVTree.T) - match(t, [ - :E => () -> true, - :T => (c, l, k, v, r) -> !is_red(c) - ]) + @match t [ + Leaf() -> true, + Node(c, l, k, v, r) -> !is_red(c) + ] end diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 7215bdec..543cbf40 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -5,8 +5,11 @@ GENERATION_PARAMS_LIST = [ # BespokeSTLCGenerator(param_vars_by_size=true,size=5,ty_size=2), # BespokeBSTGenerator(size=5, vals=BSTDummyVals), # TypeBasedBSTGenerator(size=5), + # TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=true, use_parent_color=true), + TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=false, use_parent_color=false), + TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=false, use_parent_color=true), + TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=true, use_parent_color=false), TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=true, use_parent_color=true), - # TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=false, use_parent_color=true), # BespokeLRUSetTestcaseGenerator(5), ] LR_LIST = [0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1, 3, 10, 0.15, 0.2, 0.25] @@ -42,7 +45,7 @@ TOOL_PATH = "examples/qc/benchmarks/tool.jl" flags = join([s for s in ARGS if startswith(s, "-")], " ") lcws_s = replace(string(lcws), " "=>"") p_s = replace(string(p), " "=>"") - s = "julia --project $(TOOL_PATH) $(flags) \"$(p_s)\" \"$(lcws_s)\" $(epochs)" + s = "julia --project $(TOOL_PATH) $(flags) $(p_s) $(lcws_s) $(epochs)" cmd = Cmd(Cmd(convert(Vector{String}, split(s))), ignorestatus=true) println(s) out = IOBuffer() diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index bf0a6357..df855f86 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -42,7 +42,7 @@ generation_params, loss_config_weight_pairs, epochs = evaled_args EPOCHS = epochs SEED = 0 -TAG = "test" +TAG = "qc14_cond_ent_better_loss" out_dir = joinpath( vcat( diff --git a/src/dist/inductive/inductive.jl b/src/dist/inductive/inductive.jl index 593c78f9..ca24b18f 100644 --- a/src/dist/inductive/inductive.jl +++ b/src/dist/inductive/inductive.jl @@ -1,5 +1,5 @@ # Distributions over inductively-defined types -export @inductive, matches +export @inductive, @match, matches # alternative to `nothing`, so `nothing` can be used as value _UNSET = gensym("unset") @@ -89,6 +89,9 @@ function matches end # @inductive Option Some(DistInt32) None() # @inductive List{T} Nil() Cons(T, List{T}) macro inductive(type, constructors...) + if length(constructors) == 1 && constructors[1].head == :vect + constructors = constructors[1].args + end ty = esc(type) plist = [ begin @@ -170,3 +173,23 @@ macro inductive(type, constructors...) ]...) end end + +macro match(scrutinee, branches) + @assert branches.head == :vect || branches.head == :tuple + function branch_to_fn_pair(branch) + @assert branch.head == :-> + pat, body = branch.args + @assert pat.head == :call + ctor, args... = pat.args + @assert all(isa(x, Symbol) for x in [ctor, args...]) + esc(:( + $(QuoteNode(ctor)) => + ($(args...),) -> $(body) + )) + end + quote + $(esc(Base.match))($(esc(scrutinee)), [$( + map(branch_to_fn_pair, branches.args) + ...)]) + end +end From 7a9c8914efd78bac71e750a92b9a6f32ae5f7344 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 7 Apr 2024 00:00:07 -0700 Subject: [PATCH 102/231] conditional reinforce entropy loss --- examples/qc/benchmarks/benchmarks.jl | 93 ++++++++++++++++------------ examples/qc/benchmarks/main.jl | 17 +++-- examples/qc/benchmarks/tool.jl | 34 +++++----- 3 files changed, 84 insertions(+), 60 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index e1c61ab8..19fbf774 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -12,6 +12,8 @@ abstract type LossMgr end abstract type Generation{T} end +abstract type Property{T} end + function run_benchmark( rs::RunState, generation_params::GenerationParams{T}, @@ -130,18 +132,17 @@ end struct SamplingEntropy{T} <: LossConfig{T} resampling_frequency::Integer samples_per_batch::Integer + property::Property{T} end mutable struct SamplingEntropyLossMgr <: LossMgr p::SamplingEntropy val consider - ignore current_loss::Union{Nothing,ADNode} current_actual_loss::Union{Nothing,ADNode} current_samples - SamplingEntropyLossMgr(p, val, consider, ignore) = - new(p, val, consider, ignore, nothing, nothing, nothing) + SamplingEntropyLossMgr(p, val, consider) = new(p, val, consider, nothing, nothing, nothing) end function save_areaplot(path, v) @@ -167,10 +168,15 @@ end clear_file(path) = open(path, "w") do f end function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) if (epoch - 1) % m.p.resampling_frequency == 0 - # println_flush(rs.io, "Sampling...") a = ADComputer(rs.var_vals) - time_sample = @elapsed samples = with_concrete_ad_flips(rs.var_vals, m.val) do - [sample_as_dist(rs.rng, a, m.val) for _ in 1:m.p.samples_per_batch] + samples = [] + @elapsed with_concrete_ad_flips(rs.var_vals, m.val) do + while length(samples) < m.p.samples_per_batch + sample = sample_as_dist(rs.rng, a, m.val) + if m.consider(sample) + push!(samples, sample) + end + end end l = Dice.LogPrExpander(WMC(BDDCompiler([ @@ -182,21 +188,11 @@ function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) begin lpr_eq = LogPr(prob_equals(m.val,sample)) lpr_eq_expanded = Dice.expand_logprs(l, lpr_eq) - meets_invs = satisfies_bookkeeping_invariant(sample) & satisfies_balance_invariant(sample) - @assert meets_invs isa Bool - if meets_invs - [lpr_eq_expanded * compute(a, lpr_eq_expanded), lpr_eq_expanded] - else - [Dice.Constant(0), Dice.Constant(0)] - end + [lpr_eq_expanded * compute(a, lpr_eq_expanded), lpr_eq_expanded] end for sample in samples - if m.consider(sample) ) - for sample in samples - @assert m.consider(sample) ^ m.ignore(sample) - end - loss = Dice.expand_logprs(l, loss) / m.p.samples_per_batch + loss = Dice.expand_logprs(l, loss) / length(samples) m.current_loss = loss m.current_actual_loss = actual_loss m.current_samples = samples @@ -417,18 +413,6 @@ function create_loss_manager(rs::RunState, p::ApproxSTLCConstructorEntropy, gene SimpleLossMgr(loss, nothing) end -################################## -# Sampling STLC entropy loss -################################## - -function SamplingEntropy{T}(; resampling_frequency, samples_per_batch) where T - SamplingEntropy{T}(resampling_frequency, samples_per_batch) -end -to_subpath(p::SamplingEntropy) = ["reinforce_sampling_entropy", "freq=$(p.resampling_frequency)-spb=$(p.samples_per_batch)"] -function create_loss_manager(::RunState, p::SamplingEntropy{T}, g::Generation{T}) where T - SamplingEntropyLossMgr(p, value(g), _->true, _->false) -end - ################################## # Sampling STLC constructor entropy loss ################################## @@ -733,7 +717,9 @@ function generation_params_emit_stats(rs::RunState, p::TypeBasedRBTGenerator, s) println_flush(rs.io, "Saved Coq generator to $(path)") end -abstract type Property{T} end +################################## +# Property loss +################################## struct SatisfyPropertyLoss{T} <: LossConfig{T} property::Property{T} @@ -742,7 +728,7 @@ to_subpath(p::SatisfyPropertyLoss) = [name(p.property)] function create_loss_manager(rs::RunState, p::SatisfyPropertyLoss, generation) println_flush(rs.io, "Building computation graph for $(p)...") time_build_loss = @elapsed begin - meets_property = check_property(p.property, generation) + meets_property = check_property(p.property, value(generation)) loss = -LogPr(meets_property) end println(rs.io, " $(time_build_loss) seconds") @@ -765,27 +751,54 @@ function create_loss_manager(rs::RunState, p::SatisfyPropertyLoss, generation) end struct BookkeepingInvariant <: Property{RBT} end -check_property(::BookkeepingInvariant, g::RBTGeneration) = - satisfies_bookkeeping_invariant(g.t) +check_property(::BookkeepingInvariant, t::ColorKVTree.T) = + satisfies_bookkeeping_invariant(t) name(::BookkeepingInvariant) = "bookkeeping" struct BalanceInvariant <: Property{RBT} end -check_property(::BalanceInvariant, g::RBTGeneration) = - satisfies_balance_invariant(g.t) +check_property(::BalanceInvariant, t::ColorKVTree.T) = + satisfies_balance_invariant(t) name(::BalanceInvariant) = "balance" struct BlackRootInvariant <: Property{RBT} end -check_property(::BlackRootInvariant, g::RBTGeneration) = - satisfies_black_root_invariant(g.t) +check_property(::BlackRootInvariant, t::ColorKVTree.T) = + satisfies_black_root_invariant(t) name(::BlackRootInvariant) = "blackroot" struct MultipleInvariants{T} <: Property{T} properties::Vector{<:Property{T}} end -check_property(p::MultipleInvariants{T}, g::Generation{T}) where T = +check_property(p::MultipleInvariants{T}, t) where T = reduce(&, [ - check_property(property, g) + check_property(property, t) for property in p.properties ]) name(p::MultipleInvariants{T}) where T = join([name(property) for property in p.properties], "AND") + +struct TrueProperty{T} <: Property{T} +end +check_property(::TrueProperty{T}, _) where T = true +name(::TrueProperty{T}) where T = "trueproperty" + +################################## +# Sampling STLC entropy loss +################################## + +function SamplingEntropy{T}(; resampling_frequency, samples_per_batch, property) where T + SamplingEntropy{T}(resampling_frequency, samples_per_batch, property) +end + +to_subpath(p::SamplingEntropy) = [ + "reinforce_sampling_entropy", + "freq=$(p.resampling_frequency)-spb=$(p.samples_per_batch)", + name(p.property), +] +function create_loss_manager(::RunState, p::SamplingEntropy{T}, g::Generation{T}) where T + function consider(sample) + c = check_property(p.property, sample) + @assert c isa Bool + c + end + SamplingEntropyLossMgr(p, value(g), consider) +end diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 543cbf40..8838ab07 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -6,18 +6,25 @@ GENERATION_PARAMS_LIST = [ # BespokeBSTGenerator(size=5, vals=BSTDummyVals), # TypeBasedBSTGenerator(size=5), # TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=true, use_parent_color=true), - TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=false, use_parent_color=false), - TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=false, use_parent_color=true), + # TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=false, use_parent_color=false), + # TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=false, use_parent_color=true), TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=true, use_parent_color=false), TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=true, use_parent_color=true), # BespokeLRUSetTestcaseGenerator(5), ] -LR_LIST = [0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1, 3, 10, 0.15, 0.2, 0.25] +LR_LIST = [0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1, 3, 10] LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ - SamplingEntropy{RBT}(resampling_frequency=2, samples_per_batch=100) => 0.01, - SatisfyPropertyLoss(MultipleInvariants([BookkeepingInvariant(),BalanceInvariant()])) => lr, + SamplingEntropy{RBT}( + resampling_frequency=2, + samples_per_batch=100, + property=MultipleInvariants([ + BookkeepingInvariant(), + BalanceInvariant(), + ]), + ) => lr, + # SatisfyPropertyLoss(MultipleInvariants([BookkeepingInvariant(),BalanceInvariant()])) => lr, ] for lr in LR_LIST ), diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index df855f86..2f6636dc 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -1,22 +1,27 @@ include("benchmarks.jl") +TAG = "qc16_cond_ent_better_loss_rescaled" + ## PARSE ARGS if isempty(ARGS) + TAG = "test" as = ["-f"] - push!(as, replace(string( - BespokeLRUSetTestcaseGenerator(5) - ), " "=>"")) - push!(as, replace(string( - [ - SamplingEntropy{LRUSetTestcase}( - resampling_frequency=1, - samples_per_batch=1, - ) => 0.01, - ] - ), " "=>"")) - push!(as, string( - 2 - )) + g_p = TypeBasedRBTGenerator( + size=2, color_by_size=true, learn_leaf_weights=true, use_parent_color=true, + ) + l_p = [ + SamplingEntropy{RBT}( + resampling_frequency=1, + samples_per_batch=1, + property=MultipleInvariants([ + BookkeepingInvariant(), + BalanceInvariant(), + ]), + ) => 0.01, + ] + push!(as, replace(string(g_p), " "=>"")) + push!(as, replace(string(l_p), " "=>"")) + push!(as, string(2)) empty!(ARGS) append!(ARGS, as) end @@ -42,7 +47,6 @@ generation_params, loss_config_weight_pairs, epochs = evaled_args EPOCHS = epochs SEED = 0 -TAG = "qc14_cond_ent_better_loss" out_dir = joinpath( vcat( From 0695448f00d9556817ee518d7b1b0341034e1380 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 7 Apr 2024 01:58:20 -0700 Subject: [PATCH 103/231] IFC wip --- examples/qc/benchmarks/lib/ifc/dist.jl | 109 +++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 examples/qc/benchmarks/lib/ifc/dist.jl diff --git a/examples/qc/benchmarks/lib/ifc/dist.jl b/examples/qc/benchmarks/lib/ifc/dist.jl new file mode 100644 index 00000000..05c5cc92 --- /dev/null +++ b/examples/qc/benchmarks/lib/ifc/dist.jl @@ -0,0 +1,109 @@ +using Dice + +@inductive Label L() M1() M2() H() +@inductive BinOpT BAdd() BMult() BJoin() BFlowsTo() Beq() + +RegId = DistInt32 +@inductive Instr [ + # basic instructions + Put(DistInt32, RegId), + Mov(RegId, RegId), + Load(RegId, RegId), + Store(RegId, RegId), + Write(RegId, RegId), + BinOp(BinOpT, RegId, RegId, RegId), + Nop(), + Halt(), + Jump(RegId), + BNZ(DistInt32, RegId), + BCall(RegId, RegId, RegId), + BRet(), + + # public first-class labels + Lab(RegId, RegId), + PcLab(RegId), + PutLab(Label, RegId), + + # dynamic memory allocation + Alloc(RegId, RegId, RegId), + PGetOff(RegId, RegId), + PSetOff(RegId, RegId, RegId), + MSize(RegId, RegId), + MLab(RegId, RegId), +] + +@inductive OpCode [ + OpPut(), + OpMov(), + OpLoad(), + OpStore(), + OpWrite(), + OpBinOp(), + OpNop(), + OpJump(), + OpBNZ(), + OpBCall(), + OpBRet(), + # missing for Halt + OpLab(), + OpPcLab(), + OpPutLab(), + OpAlloc(), + OpPGetOff(), + OpPSetOff(), + OpMSize(), + OpMLab(), +] + +opCodes = [ + OpPut(), + OpMov(), + OpLoad(), + OpStore(), + OpWrite(), + OpBinOp(), + OpNop(), + OpJump(), + OpBNZ(), + OpBCall(), + OpBRet(), + OpLab(), + OpPcLab(), + OpPutLab(), + OpAlloc(), + OpPGetOff(), + OpPSetOff(), + OpMSize(), + OpMLab(), +] + +Mframe = Block = Tuple{DistInt32, Label} +Imem = List{Instr} + +@inductive Pointer Ptr_(Mframe, DistInt32) + +@inductive Value Vint(DistInt32) Vptr(Pointer) Vlab(Label) +@inductive Atom Atm(Value, Label) + +@inductive PtrAtom PAtm(DistInt32, Label) + +Register = Atom +RegSet = List{Register} + +@inductive StackFrame SF(PtrAtom, RegSet, RegId, Label) +@inductive Stack ST(List{StackFrame}) + +# Definition mem A := Map.t (list (memframe A)). +# Definition memory := mem Atom. +# (* Specialize the Memory frame declaration *) +# Definition frame := memframe Atom. + +# @inductive SState St(Imem, Memory, Stack, RegSet, PtrAtom) + +@inductive Variation{A} Var_(Label, A, A) + +function tb_gen_BinOpT() + frequency_for(rs, "BinOpT_weights", [ + BAdd(), BMult(), BJoin(), BFlowsTo(), Beq(), + ]) +end From 5a96a5dc24b39a3555eae51b508fdeb5c8de049b Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 15 Apr 2024 22:22:31 -0700 Subject: [PATCH 104/231] small ifc progress --- examples/qc/benchmarks/lib/ifc/dist.jl | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/examples/qc/benchmarks/lib/ifc/dist.jl b/examples/qc/benchmarks/lib/ifc/dist.jl index 05c5cc92..44ee90ea 100644 --- a/examples/qc/benchmarks/lib/ifc/dist.jl +++ b/examples/qc/benchmarks/lib/ifc/dist.jl @@ -1,6 +1,8 @@ using Dice @inductive Label L() M1() M2() H() +all_labels = [L(), M1(), M2(), H()] +bot = L() @inductive BinOpT BAdd() BMult() BJoin() BFlowsTo() Beq() RegId = DistInt32 @@ -77,6 +79,7 @@ opCodes = [ OpMLab(), ] + Mframe = Block = Tuple{DistInt32, Label} Imem = List{Instr} @@ -93,17 +96,28 @@ RegSet = List{Register} @inductive StackFrame SF(PtrAtom, RegSet, RegId, Label) @inductive Stack ST(List{StackFrame}) +@inductive Memframe{A} Fr(Label, List{A}) # Definition mem A := Map.t (list (memframe A)). # Definition memory := mem Atom. # (* Specialize the Memory frame declaration *) # Definition frame := memframe Atom. -# @inductive SState St(Imem, Memory, Stack, RegSet, PtrAtom) +@inductive SState St(Imem, Memory, Stack, RegSet, PtrAtom) @inductive Variation{A} Var_(Label, A, A) -function tb_gen_BinOpT() +@inductive Map{K,V} + +# Variation{SState} + +Info = Tuple{Mframe, DistInt32, List{Tuple{Mframe, DistInt32}}, DistInt32} + +function gen_BinOpT(rs) frequency_for(rs, "BinOpT_weights", [ BAdd(), BMult(), BJoin(), BFlowsTo(), Beq(), ]) end + +function gen_label(rs) + frequency_for(rs, "label_weights", all_labels) +end \ No newline at end of file From e72e74f2ca31b97523c6dc461125af51be68ba33 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 15 Apr 2024 22:23:19 -0700 Subject: [PATCH 105/231] entropy: add failure penalty, log pct meeting; rbt: fix to_coq --- examples/qc/benchmarks/benchmarks.jl | 31 +++++++++++++++--------- examples/qc/benchmarks/lib/rbt/to_coq.jl | 7 ++++-- examples/qc/benchmarks/main.jl | 7 ++++-- examples/qc/benchmarks/tool.jl | 24 ++++++++++-------- 4 files changed, 44 insertions(+), 25 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 19fbf774..4234e559 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -93,6 +93,7 @@ function run_benchmark( for (al_curve, loss_config, m) in zip(al_curves, loss_configs, loss_mgrs) if m isa SamplingEntropyLossMgr save_learning_curve(out_dir, al_curve, "actual_loss_" * join(to_subpath(loss_config), "_")) + save_learning_curve(out_dir, m.num_meeting, "meets_invariant_" * join(to_subpath(loss_config), "_")) end end end @@ -133,16 +134,18 @@ struct SamplingEntropy{T} <: LossConfig{T} resampling_frequency::Integer samples_per_batch::Integer property::Property{T} + failure_penalty::Real end mutable struct SamplingEntropyLossMgr <: LossMgr p::SamplingEntropy val consider + num_meeting current_loss::Union{Nothing,ADNode} current_actual_loss::Union{Nothing,ADNode} current_samples - SamplingEntropyLossMgr(p, val, consider) = new(p, val, consider, nothing, nothing, nothing) + SamplingEntropyLossMgr(p, val, consider) = new(p, val, consider, [], nothing, nothing, nothing) end function save_areaplot(path, v) @@ -184,14 +187,24 @@ function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) for sample in samples ]))) + num_meeting = 0 loss, actual_loss = sum( begin lpr_eq = LogPr(prob_equals(m.val,sample)) lpr_eq_expanded = Dice.expand_logprs(l, lpr_eq) - [lpr_eq_expanded * compute(a, lpr_eq_expanded), lpr_eq_expanded] + c = check_property(m.p.property, sample) + @assert c isa Bool + if c + num_meeting += 1 + [lpr_eq_expanded * compute(a, lpr_eq_expanded), lpr_eq_expanded] + else + [lpr_eq_expanded * compute(a, lpr_eq_expanded) * m.p.failure_penalty, lpr_eq_expanded] + end end for sample in samples ) + push!(m.num_meeting, num_meeting / length(samples)) + loss = Dice.expand_logprs(l, loss) / length(samples) m.current_loss = loss m.current_actual_loss = actual_loss @@ -785,20 +798,16 @@ name(::TrueProperty{T}) where T = "trueproperty" # Sampling STLC entropy loss ################################## -function SamplingEntropy{T}(; resampling_frequency, samples_per_batch, property) where T - SamplingEntropy{T}(resampling_frequency, samples_per_batch, property) +function SamplingEntropy{T}(; resampling_frequency, samples_per_batch, property, failure_penalty) where T + SamplingEntropy{T}(resampling_frequency, samples_per_batch, property, failure_penalty) end to_subpath(p::SamplingEntropy) = [ "reinforce_sampling_entropy", "freq=$(p.resampling_frequency)-spb=$(p.samples_per_batch)", - name(p.property), + "prop=$(name(p.property))", + "failure_penalty=$(p.failure_penalty)", ] function create_loss_manager(::RunState, p::SamplingEntropy{T}, g::Generation{T}) where T - function consider(sample) - c = check_property(p.property, sample) - @assert c isa Bool - c - end - SamplingEntropyLossMgr(p, value(g), consider) + SamplingEntropyLossMgr(p, value(g), _->true) end diff --git a/examples/qc/benchmarks/lib/rbt/to_coq.jl b/examples/qc/benchmarks/lib/rbt/to_coq.jl index b3904c6c..d915345a 100644 --- a/examples/qc/benchmarks/lib/rbt/to_coq.jl +++ b/examples/qc/benchmarks/lib/rbt/to_coq.jl @@ -31,6 +31,9 @@ Import ListNotations. From RBT Require Import Impl Spec. +Definition original_sz := 5. +Definition new_sz := 8. + (* Look up in list of backtrack weights *) Fixpoint get {a: Type} (l : list (nat * a)) (target_key : nat) (default : a): a := match l with @@ -38,7 +41,7 @@ Fixpoint get {a: Type} (l : list (nat * a)) (target_key : nat) (default : a): a (* This branch should never return *) default | (key, value) :: l' => - if Nat.eqb key target_key then + if Nat.eqb (original_sz - key) (new_sz - target_key) then value else get l' target_key default end. @@ -89,7 +92,7 @@ else "500" end) in #[global] Instance genTree : GenSized (Tree) := - {| arbitrarySized n := manual_gen_tree n B |}. + {| arbitrarySized n := manual_gen_tree new_sz B |}. (* --------------------- Tests --------------------- *) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 8838ab07..80c56844 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -12,21 +12,24 @@ GENERATION_PARAMS_LIST = [ TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=true, use_parent_color=true), # BespokeLRUSetTestcaseGenerator(5), ] -LR_LIST = [0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1, 3, 10] +LR_LIST = [0.001, 0.003, 0.01] LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ SamplingEntropy{RBT}( resampling_frequency=2, - samples_per_batch=100, + samples_per_batch=200, + # property=TrueProperty{RBT}(), property=MultipleInvariants([ BookkeepingInvariant(), BalanceInvariant(), ]), + failure_penalty=fp, ) => lr, # SatisfyPropertyLoss(MultipleInvariants([BookkeepingInvariant(),BalanceInvariant()])) => lr, ] for lr in LR_LIST + for fp in [1., 3., 10., 30., 100.] ), ])) EPOCHS_LIST = [5_000] diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 2f6636dc..f2fbcb04 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -1,6 +1,6 @@ include("benchmarks.jl") -TAG = "qc16_cond_ent_better_loss_rescaled" +TAG = "v17_failure_penalty" ## PARSE ARGS if isempty(ARGS) @@ -9,19 +9,23 @@ if isempty(ARGS) g_p = TypeBasedRBTGenerator( size=2, color_by_size=true, learn_leaf_weights=true, use_parent_color=true, ) + lr = 0.01 + fp = 2. l_p = [ - SamplingEntropy{RBT}( - resampling_frequency=1, - samples_per_batch=1, - property=MultipleInvariants([ - BookkeepingInvariant(), - BalanceInvariant(), - ]), - ) => 0.01, + SamplingEntropy{RBT}( + resampling_frequency=1, + samples_per_batch=200, + # property=TrueProperty{RBT}(), + property=MultipleInvariants([ + BookkeepingInvariant(), + BalanceInvariant(), + ]), + failure_penalty=fp, + ) => lr, ] push!(as, replace(string(g_p), " "=>"")) push!(as, replace(string(l_p), " "=>"")) - push!(as, string(2)) + push!(as, string(3)) empty!(ARGS) append!(ARGS, as) end From fdaa40fef69152032ed2ab98036567f1caa8b9c9 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 21 Apr 2024 05:34:43 -0700 Subject: [PATCH 106/231] rbt to coq size --- examples/qc/benchmarks/lib/rbt/to_coq.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/qc/benchmarks/lib/rbt/to_coq.jl b/examples/qc/benchmarks/lib/rbt/to_coq.jl index d915345a..b072e9aa 100644 --- a/examples/qc/benchmarks/lib/rbt/to_coq.jl +++ b/examples/qc/benchmarks/lib/rbt/to_coq.jl @@ -31,8 +31,8 @@ Import ListNotations. From RBT Require Import Impl Spec. -Definition original_sz := 5. -Definition new_sz := 8. +Definition original_sz := $(p.size). +Definition new_sz := $(p.size). (* Look up in list of backtrack weights *) Fixpoint get {a: Type} (l : list (nat * a)) (target_key : nat) (default : a): a := From 3de8fb9d4756c8bec1a7d80beb33b96f61d2a8d4 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 21 Apr 2024 05:45:31 -0700 Subject: [PATCH 107/231] remove failure_penalty, take more samples --- examples/qc/benchmarks/benchmarks.jl | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 4234e559..bbff506c 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -134,7 +134,6 @@ struct SamplingEntropy{T} <: LossConfig{T} resampling_frequency::Integer samples_per_batch::Integer property::Property{T} - failure_penalty::Real end mutable struct SamplingEntropyLossMgr <: LossMgr @@ -173,37 +172,31 @@ function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) if (epoch - 1) % m.p.resampling_frequency == 0 a = ADComputer(rs.var_vals) samples = [] + sample_attempts = 0 @elapsed with_concrete_ad_flips(rs.var_vals, m.val) do while length(samples) < m.p.samples_per_batch sample = sample_as_dist(rs.rng, a, m.val) + sample_attempts += 1 if m.consider(sample) push!(samples, sample) end end end + push!(m.num_meeting, length(samples) / sample_attempts) l = Dice.LogPrExpander(WMC(BDDCompiler([ prob_equals(m.val,sample) for sample in samples ]))) - num_meeting = 0 loss, actual_loss = sum( begin lpr_eq = LogPr(prob_equals(m.val,sample)) lpr_eq_expanded = Dice.expand_logprs(l, lpr_eq) - c = check_property(m.p.property, sample) - @assert c isa Bool - if c - num_meeting += 1 - [lpr_eq_expanded * compute(a, lpr_eq_expanded), lpr_eq_expanded] - else - [lpr_eq_expanded * compute(a, lpr_eq_expanded) * m.p.failure_penalty, lpr_eq_expanded] - end + [lpr_eq_expanded * compute(a, lpr_eq_expanded), lpr_eq_expanded] end for sample in samples ) - push!(m.num_meeting, num_meeting / length(samples)) loss = Dice.expand_logprs(l, loss) / length(samples) m.current_loss = loss @@ -798,16 +791,20 @@ name(::TrueProperty{T}) where T = "trueproperty" # Sampling STLC entropy loss ################################## -function SamplingEntropy{T}(; resampling_frequency, samples_per_batch, property, failure_penalty) where T - SamplingEntropy{T}(resampling_frequency, samples_per_batch, property, failure_penalty) +function SamplingEntropy{T}(; resampling_frequency, samples_per_batch, property) where T + SamplingEntropy{T}(resampling_frequency, samples_per_batch, property) end to_subpath(p::SamplingEntropy) = [ "reinforce_sampling_entropy", "freq=$(p.resampling_frequency)-spb=$(p.samples_per_batch)", "prop=$(name(p.property))", - "failure_penalty=$(p.failure_penalty)", ] function create_loss_manager(::RunState, p::SamplingEntropy{T}, g::Generation{T}) where T - SamplingEntropyLossMgr(p, value(g), _->true) + function consider(sample) + c = check_property(p.property, sample) + @assert c isa Bool + c + end + SamplingEntropyLossMgr(p, value(g), consider) end From b9d2ad6fae57c6fb26f25851c7d0a14f99441149 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 21 Apr 2024 05:47:44 -0700 Subject: [PATCH 108/231] update tag --- examples/qc/benchmarks/tool.jl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index f2fbcb04..8fbeccc0 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -1,16 +1,15 @@ include("benchmarks.jl") -TAG = "v17_failure_penalty" +TAG = "v18" ## PARSE ARGS if isempty(ARGS) TAG = "test" as = ["-f"] g_p = TypeBasedRBTGenerator( - size=2, color_by_size=true, learn_leaf_weights=true, use_parent_color=true, + size=12, color_by_size=true, learn_leaf_weights=true, use_parent_color=true, ) lr = 0.01 - fp = 2. l_p = [ SamplingEntropy{RBT}( resampling_frequency=1, @@ -20,7 +19,6 @@ if isempty(ARGS) BookkeepingInvariant(), BalanceInvariant(), ]), - failure_penalty=fp, ) => lr, ] push!(as, replace(string(g_p), " "=>"")) From 7ada1d2957081f8eb8d0895180bceb635ac4018e Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 21 Apr 2024 22:21:49 -0700 Subject: [PATCH 109/231] add stats.py --- stats.py | 121 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100755 stats.py diff --git a/stats.py b/stats.py new file mode 100755 index 00000000..da46089a --- /dev/null +++ b/stats.py @@ -0,0 +1,121 @@ +#!/usr/bin/env python +import subprocess +import sys +import os +from collections import Counter, defaultdict + +STRAT_DIR = "/space/tjoa/etna/workloads/Coq/RBT/Strategies/" +OUT_DIR = "/space/tjoa/Dice.jl/stats" +NUM_TESTS = 1000 + +METRICS = ["size", "height"] + +def eprint(*args, **kwargs): + print(*args, file=sys.stderr, **kwargs) + +def main(): + metric_to_generator_to_counts = defaultdict(lambda: defaultdict(dict)) + for filename in os.listdir(STRAT_DIR): + if filename.endswith("Generator.v"): + generator_path = os.path.join(STRAT_DIR, filename) + eprint(f"Collecting stats for {filename}") + collect_stats(generator_path, filename, metric_to_generator_to_counts) + for metric, generator_to_counts in metric_to_generator_to_counts.items(): + max_val = max( + n + for counts in generator_to_counts.values() + for n, valid in counts.keys() + ) + min_val = min( + n + for counts in generator_to_counts.values() + for n, valid in counts.keys() + ) + assert min_val >= 0 + with open(os.path.join(OUT_DIR, f"{metric}.csv"), "w") as file: + val_names, vals = zip(*[ + (f"{v}" if valid else f"{v}!", (v, valid)) + for v in range(0, max_val + 1) + for valid in (True, False) + ]) + file.write('\t' + '\t'.join(val_names) + '\n') + for generator, counts in generator_to_counts.items(): + tokens = [generator] + for val in vals: + tokens.append( + str(counts.get(val, 0)) + ) + file.write('\t'.join(tokens) + "\n") + +def readlines(path): + with open(path) as f: + return '\n'.join(f.readlines()) + +def lines_between(s, start, end): + active = False + for line in s.split('\n'): + if line.startswith(start): + active = True + elif active and line.startswith(end): + break + elif active: + yield line + else: + if active: + raise f"Did not find {end} after {start}" + else: + raise f"Did not find {start}" + +def collect_stats(path, filename, metric_to_generator_to_counts): + pgrm = readlines(path) + may_fail = filename == "BespokeGenerator.v" + if may_fail: + pgrm += """ + Definition collect {A : Type} `{_ : Show A} (f : Tree -> A) : Checker := + forAll arbitrary (fun t => + match t with + | Some t' => collect (Some (f t')) (isRBT t' -=> true) + | None => collect None (false -=> true) + end).""" + else: + pgrm += """ + Definition collect {A : Type} `{_ : Show A} (f : Tree -> A) : Checker := + forAll arbitrary (fun t => collect (f t) (isRBT t -=> true)).""" + + pgrm += f""" + Fixpoint height (t: Tree) : nat := + match t with + | E => 0 + | T c l k v r => 1 + max (height l) (height r) + end. + + Extract Constant Test.defNumTests => "{NUM_TESTS}". + + QuickChick (collect size). + QuickChick (collect height). + """ + + cmd = ["coqtop", "-Q", ".", "RBT"] + os.chdir("/space/tjoa/etna/workloads/Coq/RBT") + p = subprocess.run( + cmd, + stdout=subprocess.PIPE, + stderr=subprocess.DEVNULL, + input=pgrm, + encoding="ascii", + ) + assert p.returncode == 0 + for metric in METRICS: + cts = {} + for line in lines_between(p.stdout, f"QuickChecking (collect {metric})", "+++"): + tokens = line.split(' ') + if "None" in tokens: + cts["failure"] += 1 + raise NotImplementedError() + else: + valid = "(Discarded)" not in tokens + cts[int(tokens[-1]), valid] = int(tokens[0]) + metric_to_generator_to_counts[metric][filename] = cts + +if __name__ == "__main__": + main() \ No newline at end of file From 6b1a96f81fbbe641dcf7a9cb0ae9ccac0f995c6b Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 21 Apr 2024 22:43:04 -0700 Subject: [PATCH 110/231] update stats --- stats.py | 39 +++++++++++++++++++++++++++------------ stats/height.csv | 6 ++++++ stats/size.csv | 6 ++++++ 3 files changed, 39 insertions(+), 12 deletions(-) create mode 100644 stats/height.csv create mode 100644 stats/size.csv diff --git a/stats.py b/stats.py index da46089a..84d3ddbd 100755 --- a/stats.py +++ b/stats.py @@ -6,19 +6,16 @@ STRAT_DIR = "/space/tjoa/etna/workloads/Coq/RBT/Strategies/" OUT_DIR = "/space/tjoa/Dice.jl/stats" -NUM_TESTS = 1000 +NUM_TESTS = 100_000 METRICS = ["size", "height"] -def eprint(*args, **kwargs): - print(*args, file=sys.stderr, **kwargs) - def main(): metric_to_generator_to_counts = defaultdict(lambda: defaultdict(dict)) for filename in os.listdir(STRAT_DIR): if filename.endswith("Generator.v"): generator_path = os.path.join(STRAT_DIR, filename) - eprint(f"Collecting stats for {filename}") + print(f"Collecting stats for {filename}") collect_stats(generator_path, filename, metric_to_generator_to_counts) for metric, generator_to_counts in metric_to_generator_to_counts.items(): max_val = max( @@ -38,7 +35,7 @@ def main(): for v in range(0, max_val + 1) for valid in (True, False) ]) - file.write('\t' + '\t'.join(val_names) + '\n') + file.write(metric + '\t' + '\t'.join(val_names) + '\n') for generator, counts in generator_to_counts.items(): tokens = [generator] for val in vals: @@ -56,6 +53,7 @@ def lines_between(s, start, end): for line in s.split('\n'): if line.startswith(start): active = True + continue elif active and line.startswith(end): break elif active: @@ -74,13 +72,24 @@ def collect_stats(path, filename, metric_to_generator_to_counts): Definition collect {A : Type} `{_ : Show A} (f : Tree -> A) : Checker := forAll arbitrary (fun t => match t with - | Some t' => collect (Some (f t')) (isRBT t' -=> true) - | None => collect None (false -=> true) + | Some t => + if isRBT t then + collect (show (f t)) true + else + collect (append "invalid " (show (f t))) true + | None => + collect (append "failure" "") true end).""" else: pgrm += """ Definition collect {A : Type} `{_ : Show A} (f : Tree -> A) : Checker := - forAll arbitrary (fun t => collect (f t) (isRBT t -=> true)).""" + forAll arbitrary (fun t => + if isRBT t then + collect (show (f t)) true + else + collect (append "invalid " (show (f t))) true + ). + """ pgrm += f""" Fixpoint height (t: Tree) : nat := @@ -101,6 +110,7 @@ def collect_stats(path, filename, metric_to_generator_to_counts): cmd, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, + # stderr=sys.stderr, input=pgrm, encoding="ascii", ) @@ -113,9 +123,14 @@ def collect_stats(path, filename, metric_to_generator_to_counts): cts["failure"] += 1 raise NotImplementedError() else: - valid = "(Discarded)" not in tokens - cts[int(tokens[-1]), valid] = int(tokens[0]) + valid = "invalid" not in tokens + def stripquotes(s): + if s.startswith('"') and s.endswith('"'): + return s[1:-1] + assert s.endswith('"') + return s[:-1] + cts[int(stripquotes(tokens[-1])), valid] = int(tokens[0]) metric_to_generator_to_counts[metric][filename] = cts if __name__ == "__main__": - main() \ No newline at end of file + main() diff --git a/stats/height.csv b/stats/height.csv new file mode 100644 index 00000000..8d80243e --- /dev/null +++ b/stats/height.csv @@ -0,0 +1,6 @@ +height 0 0! 1 1! 2 2! 3 3! 4 4! 5 5! 6 6! 7 7! 8 8! +BespokeGenerator.v 14286 0 3514 0 11917 0 18818 0 51465 0 0 0 0 0 0 0 0 0 +ManualTypeBased8Generator.v 50035 0 6192 0 139 0 1834 0 1190 0 786 0 524 0 349 0 35825 0 +NoRedRed8Generator.v 50044 0 6322 0 140 0 1840 0 1175 0 806 0 513 0 368 0 35786 0 +CondEntropy8Generator.v 17239 0 1990 0 4 0 135 0 30 0 6 0 3 0 0 0 80080 0 +TypeBasedGenerator.v 57159 0 16184 0 854 0 3 0 4675 0 3622 0 2890 0 0 0 0 0 diff --git a/stats/size.csv b/stats/size.csv new file mode 100644 index 00000000..079b17dc --- /dev/null +++ b/stats/size.csv @@ -0,0 +1,6 @@ +size 0 0! 1 1! 2 2! 3 3! 4 4! 5 5! 6 6! 7 7! 8 8! 9 9! 10 10! 11 11! 12 12! 13 13! 14 14! 15 15! 16 16! 17 17! 18 18! 19 19! 20 20! 21 21! 22 22! 23 23! 24 24! 25 25! 26 26! 27 27! 28 28! 29 29! 30 30! 31 31! 32 32! 33 33! 34 34! 35 35! 36 36! 37 37! 38 38! 39 39! 40 40! 41 41! 42 42! 43 43! 44 44! 45 45! 46 46! 47 47! 48 48! 49 49! 50 50! 51 51! 52 52! 53 53! 54 54! 55 55! 56 56! 57 57! 58 58! 59 59! 60 60! 61 61! 62 62! 63 63! 64 64! 65 65! 66 66! 67 67! 68 68! 69 69! 70 70! 71 71! 72 72! 73 73! 74 74! 75 75! 76 76! 77 77! 78 78! 79 79! 80 80! 81 81! 82 82! 83 83! 84 84! 85 85! 86 86! 87 87! 88 88! 89 89! 90 90! 91 91! 92 92! 93 93! 94 94! 95 95! 96 96! 97 97! 98 98! 99 99! 100 100! 101 101! 102 102! 103 103! 104 104! 105 105! 106 106! 107 107! 108 108! 109 109! 110 110! 111 111! 112 112! 113 113! 114 114! 115 115! 116 116! 117 117! 118 118! 119 119! 120 120! 121 121! 122 122! 123 123! 124 124! 125 125! 126 126! 127 127! 128 128! 129 129! 130 130! 131 131! 132 132! 133 133! 134 134! 135 135! 136 136! 137 137! 138 138! 139 139! 140 140! 141 141! 142 142! 143 143! 144 144! 145 145! 146 146! 147 147! 148 148! 149 149! 150 150! 151 151! 152 152! 153 153! 154 154! 155 155! 156 156! 157 157! 158 158! 159 159! 160 160! 161 161! 162 162! 163 163! 164 164! 165 165! 166 166! 167 167! 168 168! 169 169! 170 170! 171 171! 172 172! 173 173! 174 174! 175 175! 176 176! 177 177! 178 178! 179 179! 180 180! 181 181! 182 182! 183 183! 184 184! 185 185! 186 186! 187 187! 188 188! 189 189! 190 190! 191 191! 192 192! 193 193! 194 194! 195 195! 196 196! 197 197! 198 198! 199 199! 200 200! 201 201! 202 202! 203 203! 204 204! 205 205! 206 206! 207 207! 208 208! 209 209! 210 210! 211 211! 212 212! 213 213! 214 214! 215 215! 216 216! 217 217! 218 218! 219 219! 220 220! 221 221! 222 222! 223 223! 224 224! 225 225! 226 226! 227 227! +BespokeGenerator.v 14286 0 3518 0 7209 0 4668 0 4501 0 7308 0 7715 0 9741 0 11712 0 10267 0 7232 0 5406 0 3831 0 1997 0 550 0 59 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +ManualTypeBased8Generator.v 50012 0 6230 0 1518 0 132 0 1306 0 737 0 595 0 466 0 347 0 338 0 459 0 666 0 870 0 852 0 910 0 928 0 926 0 987 0 955 0 967 0 959 0 1024 0 984 0 999 0 980 0 961 0 949 0 905 0 936 0 838 0 877 0 859 0 827 0 777 0 780 0 753 0 698 0 700 0 702 0 643 0 606 0 626 0 590 0 574 0 471 0 454 0 455 0 458 0 419 0 418 0 400 0 380 0 327 0 318 0 292 0 300 0 243 0 263 0 241 0 218 0 194 0 223 0 186 0 176 0 163 0 139 0 143 0 136 0 123 0 111 0 108 0 100 0 93 0 97 0 69 0 64 0 72 0 57 0 65 0 46 0 34 0 36 0 34 0 34 0 22 0 21 0 14 0 15 0 18 0 17 0 15 0 18 0 6 0 16 0 9 0 8 0 3 0 4 0 7 0 7 0 5 0 2 0 6 0 6 0 0 0 3 0 1 0 0 0 1 0 1 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +NoRedRed8Generator.v 49820 0 6328 0 1567 0 148 0 1361 0 715 0 598 0 487 0 329 0 313 0 437 0 703 0 854 0 849 0 899 0 899 0 951 0 1069 0 925 0 971 0 969 0 951 0 960 0 949 0 939 0 983 0 966 0 935 0 886 0 860 0 913 0 844 0 805 0 776 0 798 0 767 0 730 0 668 0 649 0 618 0 644 0 566 0 570 0 538 0 533 0 523 0 490 0 460 0 448 0 415 0 383 0 357 0 338 0 299 0 298 0 319 0 273 0 230 0 238 0 209 0 201 0 199 0 192 0 171 0 184 0 153 0 124 0 124 0 115 0 115 0 95 0 96 0 95 0 87 0 60 0 71 0 75 0 43 0 47 0 49 0 42 0 38 0 31 0 28 0 41 0 24 0 20 0 23 0 19 0 11 0 12 0 9 0 14 0 7 0 9 0 5 0 5 0 3 0 5 0 2 0 6 0 5 0 3 0 1 0 5 0 3 0 1 0 2 0 0 0 1 0 4 0 2 0 2 0 2 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +CondEntropy8Generator.v 17273 0 1964 0 484 0 4 0 48 0 15 0 7 0 7 0 8 0 9 0 6 0 27 0 37 0 32 0 30 0 40 0 59 0 76 0 79 0 99 0 81 0 78 0 85 0 90 0 113 0 137 0 150 0 160 0 162 0 173 0 184 0 188 0 192 0 217 0 201 0 199 0 201 0 201 0 215 0 253 0 282 0 275 0 277 0 323 0 327 0 316 0 365 0 344 0 355 0 371 0 383 0 405 0 405 0 390 0 402 0 404 0 424 0 383 0 409 0 429 0 447 0 438 0 435 0 453 0 451 0 479 0 508 0 510 0 552 0 562 0 535 0 618 0 605 0 585 0 657 0 623 0 620 0 569 0 610 0 679 0 622 0 602 0 610 0 633 0 661 0 667 0 658 0 672 0 647 0 656 0 650 0 657 0 682 0 685 0 692 0 639 0 676 0 723 0 656 0 644 0 690 0 701 0 668 0 651 0 624 0 650 0 661 0 640 0 648 0 683 0 691 0 681 0 692 0 640 0 675 0 739 0 715 0 654 0 657 0 687 0 684 0 725 0 738 0 620 0 739 0 669 0 715 0 701 0 672 0 688 0 675 0 680 0 667 0 708 0 640 0 652 0 715 0 659 0 695 0 570 0 628 0 548 0 620 0 570 0 606 0 578 0 532 0 563 0 531 0 537 0 506 0 547 0 502 0 478 0 452 0 481 0 454 0 425 0 419 0 401 0 388 0 395 0 355 0 403 0 336 0 350 0 323 0 305 0 293 0 287 0 265 0 251 0 253 0 218 0 201 0 246 0 207 0 187 0 168 0 174 0 169 0 175 0 123 0 109 0 130 0 120 0 109 0 95 0 97 0 84 0 64 0 82 0 52 0 46 0 56 0 41 0 42 0 43 0 25 0 26 0 37 0 20 0 19 0 21 0 18 0 17 0 10 0 6 0 6 0 5 0 11 0 7 0 3 0 7 0 4 0 1 0 2 0 1 0 3 0 1 0 2 0 0 0 3 0 0 0 0 0 0 0 0 0 1 0 +TypeBasedGenerator.v 57150 0 15975 0 799 0 84 0 2 0 2516 0 2016 0 1612 0 1128 0 927 0 667 0 536 0 380 0 306 0 252 0 167 0 123 0 101 0 71 0 41 0 50 0 36 0 17 0 24 0 8 0 9 0 11 0 3 0 4 0 6 0 4 0 1 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 From 4838fe9b229e812284f92187aab629444993a734 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 22 Apr 2024 00:35:07 -0700 Subject: [PATCH 111/231] add additive failure penalty --- examples/qc/benchmarks/benchmarks.jl | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index bbff506c..80945d48 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -134,6 +134,7 @@ struct SamplingEntropy{T} <: LossConfig{T} resampling_frequency::Integer samples_per_batch::Integer property::Property{T} + failure_penalty::Real end mutable struct SamplingEntropyLossMgr <: LossMgr @@ -171,32 +172,30 @@ clear_file(path) = open(path, "w") do f end function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) if (epoch - 1) % m.p.resampling_frequency == 0 a = ADComputer(rs.var_vals) - samples = [] - sample_attempts = 0 - @elapsed with_concrete_ad_flips(rs.var_vals, m.val) do - while length(samples) < m.p.samples_per_batch - sample = sample_as_dist(rs.rng, a, m.val) - sample_attempts += 1 - if m.consider(sample) - push!(samples, sample) - end - end + samples = with_concrete_ad_flips(rs.var_vals, m.val) do + [sample_as_dist(rs.rng, a, m.val) for _ in 1:m.p.samples_per_batch] end - push!(m.num_meeting, length(samples) / sample_attempts) l = Dice.LogPrExpander(WMC(BDDCompiler([ prob_equals(m.val,sample) for sample in samples ]))) + num_meeting = 0 loss, actual_loss = sum( begin lpr_eq = LogPr(prob_equals(m.val,sample)) lpr_eq_expanded = Dice.expand_logprs(l, lpr_eq) - [lpr_eq_expanded * compute(a, lpr_eq_expanded), lpr_eq_expanded] + if m.consider(sample) + num_meeting += 1 + [lpr_eq_expanded * compute(a, lpr_eq_expanded), lpr_eq_expanded] + else + [Dice.Constant(m.p.failure_penalty), Dice.Constant(0)] + end end for sample in samples ) + push!(m.num_meeting, num_meeting / length(samples)) loss = Dice.expand_logprs(l, loss) / length(samples) m.current_loss = loss @@ -791,14 +790,15 @@ name(::TrueProperty{T}) where T = "trueproperty" # Sampling STLC entropy loss ################################## -function SamplingEntropy{T}(; resampling_frequency, samples_per_batch, property) where T - SamplingEntropy{T}(resampling_frequency, samples_per_batch, property) +function SamplingEntropy{T}(; resampling_frequency, samples_per_batch, property, failure_penalty) where T + SamplingEntropy{T}(resampling_frequency, samples_per_batch, property, failure_penalty) end to_subpath(p::SamplingEntropy) = [ "reinforce_sampling_entropy", "freq=$(p.resampling_frequency)-spb=$(p.samples_per_batch)", "prop=$(name(p.property))", + "failure_penalty=$(p.failure_penalty)", ] function create_loss_manager(::RunState, p::SamplingEntropy{T}, g::Generation{T}) where T function consider(sample) From 42bb898e3a60b3ea055a98366a0a532d5fe1df9b Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 22 Apr 2024 00:50:52 -0700 Subject: [PATCH 112/231] add order inv, less dummy nums in generator, and entropy ignore nums --- examples/qc/benchmarks/benchmarks.jl | 17 ++++++++++--- examples/qc/benchmarks/lib/rbt/dist.jl | 28 +++++++++++++++++++++ examples/qc/benchmarks/lib/rbt/generator.jl | 2 +- examples/qc/benchmarks/main.jl | 16 ++++++++---- examples/qc/benchmarks/tool.jl | 8 ++++-- 5 files changed, 60 insertions(+), 11 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 80945d48..595307ea 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -135,6 +135,7 @@ struct SamplingEntropy{T} <: LossConfig{T} samples_per_batch::Integer property::Property{T} failure_penalty::Real + ignore_nums::Bool end mutable struct SamplingEntropyLossMgr <: LossMgr @@ -184,7 +185,11 @@ function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) num_meeting = 0 loss, actual_loss = sum( begin - lpr_eq = LogPr(prob_equals(m.val,sample)) + lpr_eq = if m.p.ignore_nums + LogPr(prob_equals(m.val,sample)) + else + LogPr(eq_except_numbers(m.val, sample)) + end lpr_eq_expanded = Dice.expand_logprs(l, lpr_eq) if m.consider(sample) num_meeting += 1 @@ -770,6 +775,11 @@ check_property(::BlackRootInvariant, t::ColorKVTree.T) = satisfies_black_root_invariant(t) name(::BlackRootInvariant) = "blackroot" +struct OrderInvariant <: Property{RBT} end +check_property(::OrderInvariant, t::ColorKVTree.T) = + satisfies_order_invariant(t) +name(::OrderInvariant) = "order" + struct MultipleInvariants{T} <: Property{T} properties::Vector{<:Property{T}} end @@ -790,8 +800,8 @@ name(::TrueProperty{T}) where T = "trueproperty" # Sampling STLC entropy loss ################################## -function SamplingEntropy{T}(; resampling_frequency, samples_per_batch, property, failure_penalty) where T - SamplingEntropy{T}(resampling_frequency, samples_per_batch, property, failure_penalty) +function SamplingEntropy{T}(; resampling_frequency, samples_per_batch, property, failure_penalty, ignore_nums) where T + SamplingEntropy{T}(resampling_frequency, samples_per_batch, property, failure_penalty, ignore_nums) end to_subpath(p::SamplingEntropy) = [ @@ -799,6 +809,7 @@ to_subpath(p::SamplingEntropy) = [ "freq=$(p.resampling_frequency)-spb=$(p.samples_per_batch)", "prop=$(name(p.property))", "failure_penalty=$(p.failure_penalty)", + "ignore_nums=$(p.ignore_nums)", ] function create_loss_manager(::RunState, p::SamplingEntropy{T}, g::Generation{T}) where T function consider(sample) diff --git a/examples/qc/benchmarks/lib/rbt/dist.jl b/examples/qc/benchmarks/lib/rbt/dist.jl index 718bcdd9..56128cb3 100644 --- a/examples/qc/benchmarks/lib/rbt/dist.jl +++ b/examples/qc/benchmarks/lib/rbt/dist.jl @@ -68,3 +68,31 @@ function satisfies_black_root_invariant(t::ColorKVTree.T) Node(c, l, k, v, r) -> !is_red(c) ] end + +function satisfies_order_invariant(t::ColorKVTree.T) + function helper(t, lo, hi) + @match t [ + Leaf() -> true, + Node(c, l, k, v, r) -> begin + (if isnothing(lo) true else lo < k end) & + (if isnothing(hi) true else k < hi end) & + helper(l, lo, k) & + helper(r, k, hi) + end + ] + end + helper(t, nothing, nothing) +end + +function eq_except_numbers(x::ColorKVTree.T, y::ColorKVTree.T) + @match x [ + Leaf() -> (@match y [ + Leaf() -> true, + Node(yc, yl, yk, yv, yr) -> false, + ]), + Node(xc, xl, xk, xv, xr) -> (@match y [ + Leaf() -> false, + Node(yc, yl, yk, yv, yr) -> prob_eq(xc, yc) & eq_except_numbers(xl, yl) & eq_except_numbers(xr, yr), + ]), + ] +end diff --git a/examples/qc/benchmarks/lib/rbt/generator.jl b/examples/qc/benchmarks/lib/rbt/generator.jl index 48430a82..0a919417 100644 --- a/examples/qc/benchmarks/lib/rbt/generator.jl +++ b/examples/qc/benchmarks/lib/rbt/generator.jl @@ -63,7 +63,7 @@ function tb_gen_rbt(rs, p, sz, parent_red) flip(register_weight!(rs, if p.color_by_size "red_sz$(sz)_blackparent" else "red_blackparent" end)) end color = if flip_red Color.Red() else Color.Black() end - k = DistInt32(0) + k = uniform(DistInt32, 0, 100) v = DistInt32(0) l = tb_gen_rbt(rs, p, sz - 1, flip_red) r = tb_gen_rbt(rs, p, sz - 1, flip_red) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 80c56844..ef52ca3f 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -8,32 +8,38 @@ GENERATION_PARAMS_LIST = [ # TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=true, use_parent_color=true), # TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=false, use_parent_color=false), # TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=false, use_parent_color=true), - TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=true, use_parent_color=false), + # TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=true, use_parent_color=false), TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=true, use_parent_color=true), # BespokeLRUSetTestcaseGenerator(5), ] -LR_LIST = [0.001, 0.003, 0.01] +LR_LIST = [0.001, 0.003, 0.01, 0.03, 0.1] +FP_LIST = [0.] LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ SamplingEntropy{RBT}( resampling_frequency=2, - samples_per_batch=200, + samples_per_batch=50, # property=TrueProperty{RBT}(), property=MultipleInvariants([ BookkeepingInvariant(), BalanceInvariant(), ]), failure_penalty=fp, + ignore_nums=ignore_nums, ) => lr, # SatisfyPropertyLoss(MultipleInvariants([BookkeepingInvariant(),BalanceInvariant()])) => lr, ] for lr in LR_LIST - for fp in [1., 3., 10., 30., 100.] + for fp in FP_LIST + for ignore_nums in [false, true] ), ])) -EPOCHS_LIST = [5_000] +EPOCHS_LIST = [2_000] +@show GENERATION_PARAMS_LIST +@show LOSS_CONFIG_WEIGHT_PAIRS_LIST +@show EPOCHS_LIST # N = 4 # GENERATION_PARAMS_LIST = [Flips{N}()] # # LR_LIST = [0.0001, 0.0003, 0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1, 3, 10, 30, 100, 300] diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 8fbeccc0..f1bfc574 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -1,15 +1,16 @@ include("benchmarks.jl") -TAG = "v18" +TAG = "v20_the_nums" ## PARSE ARGS if isempty(ARGS) TAG = "test" as = ["-f"] g_p = TypeBasedRBTGenerator( - size=12, color_by_size=true, learn_leaf_weights=true, use_parent_color=true, + size=3, color_by_size=true, learn_leaf_weights=true, use_parent_color=true, ) lr = 0.01 + fp = 0.01 l_p = [ SamplingEntropy{RBT}( resampling_frequency=1, @@ -18,7 +19,10 @@ if isempty(ARGS) property=MultipleInvariants([ BookkeepingInvariant(), BalanceInvariant(), + OrderInvariant(), ]), + failure_penalty=fp, + ignore_nums=true ) => lr, ] push!(as, replace(string(g_p), " "=>"")) From f0d0fbeaa445e53219f657a12bc08ad42c9258c1 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 22 Apr 2024 00:52:55 -0700 Subject: [PATCH 113/231] oops unswap ignore_nums --- examples/qc/benchmarks/benchmarks.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 595307ea..705fd7ae 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -186,9 +186,9 @@ function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) loss, actual_loss = sum( begin lpr_eq = if m.p.ignore_nums - LogPr(prob_equals(m.val,sample)) - else LogPr(eq_except_numbers(m.val, sample)) + else + LogPr(prob_equals(m.val,sample)) end lpr_eq_expanded = Dice.expand_logprs(l, lpr_eq) if m.consider(sample) From 74ab57f84f496fb1d01ef82dfea3c60f66eba491 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 22 Apr 2024 01:52:10 -0700 Subject: [PATCH 114/231] move and update stats.py --- stats.py => stats/stats.py | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) rename stats.py => stats/stats.py (81%) diff --git a/stats.py b/stats/stats.py similarity index 81% rename from stats.py rename to stats/stats.py index 84d3ddbd..88a9687a 100755 --- a/stats.py +++ b/stats/stats.py @@ -6,12 +6,27 @@ STRAT_DIR = "/space/tjoa/etna/workloads/Coq/RBT/Strategies/" OUT_DIR = "/space/tjoa/Dice.jl/stats" -NUM_TESTS = 100_000 +NUM_TESTS = 10_000 METRICS = ["size", "height"] +# Put rows in this order and also assert that all these generators exist +ORDER = [ + "BespokeGenerator.v", + "TypeBasedGenerator.v", + "ManualTypeBased5Generator.v", + "CondEntropy5Generator.v", + "OrderGenerator.v", + "OrderIgnoreGenerator.v", + "NoRedRed5Generator.v", + "ManualTypeBased8Generator.v", + "CondEntropy8Generator.v", + "NoRedRed8Generator.v", +] def main(): metric_to_generator_to_counts = defaultdict(lambda: defaultdict(dict)) + for filename in ORDER: + assert filename in os.listdir(STRAT_DIR) for filename in os.listdir(STRAT_DIR): if filename.endswith("Generator.v"): generator_path = os.path.join(STRAT_DIR, filename) @@ -36,11 +51,12 @@ def main(): for valid in (True, False) ]) file.write(metric + '\t' + '\t'.join(val_names) + '\n') - for generator, counts in generator_to_counts.items(): + for generator in [*ORDER, *[x for x in generator_to_counts if x not in ORDER]]: + counts = generator_to_counts[generator] tokens = [generator] for val in vals: tokens.append( - str(counts.get(val, 0)) + str(counts.get(val, 0) / NUM_TESTS) ) file.write('\t'.join(tokens) + "\n") @@ -74,7 +90,7 @@ def collect_stats(path, filename, metric_to_generator_to_counts): match t with | Some t => if isRBT t then - collect (show (f t)) true + collect (append "valid " (show (f t))) true else collect (append "invalid " (show (f t))) true | None => @@ -85,7 +101,7 @@ def collect_stats(path, filename, metric_to_generator_to_counts): Definition collect {A : Type} `{_ : Show A} (f : Tree -> A) : Checker := forAll arbitrary (fun t => if isRBT t then - collect (show (f t)) true + collect (append "valid " (show (f t))) true else collect (append "invalid " (show (f t))) true ). @@ -123,7 +139,9 @@ def collect_stats(path, filename, metric_to_generator_to_counts): cts["failure"] += 1 raise NotImplementedError() else: - valid = "invalid" not in tokens + valid = '"valid' in tokens + invalid = '"invalid' in tokens + assert valid ^ invalid, line def stripquotes(s): if s.startswith('"') and s.endswith('"'): return s[1:-1] From ca26eadf35fac3a02d12ef96f855aa0e2b2550d2 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 23 Apr 2024 22:35:50 -0700 Subject: [PATCH 115/231] improvements --- examples/qc/benchmarks/lib/rbt/dist.jl | 2 +- examples/qc/benchmarks/main.jl | 34 +++++++++++++++----------- examples/qc/benchmarks/tool.jl | 2 +- 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/examples/qc/benchmarks/lib/rbt/dist.jl b/examples/qc/benchmarks/lib/rbt/dist.jl index 56128cb3..ddd3ba5b 100644 --- a/examples/qc/benchmarks/lib/rbt/dist.jl +++ b/examples/qc/benchmarks/lib/rbt/dist.jl @@ -92,7 +92,7 @@ function eq_except_numbers(x::ColorKVTree.T, y::ColorKVTree.T) ]), Node(xc, xl, xk, xv, xr) -> (@match y [ Leaf() -> false, - Node(yc, yl, yk, yv, yr) -> prob_eq(xc, yc) & eq_except_numbers(xl, yl) & eq_except_numbers(xr, yr), + Node(yc, yl, yk, yv, yr) -> prob_equals(xc, yc) & eq_except_numbers(xl, yl) & eq_except_numbers(xr, yr), ]), ] end diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index ef52ca3f..874bb112 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -1,6 +1,5 @@ include("benchmarks.jl") - GENERATION_PARAMS_LIST = [ # BespokeSTLCGenerator(param_vars_by_size=true,size=5,ty_size=2), # BespokeBSTGenerator(size=5, vals=BSTDummyVals), @@ -14,16 +13,29 @@ GENERATION_PARAMS_LIST = [ ] LR_LIST = [0.001, 0.003, 0.01, 0.03, 0.1] FP_LIST = [0.] +RESAMPLING_FREQUENCY_LIST = [2] +SAMPLES_PER_BATCH_LIST = [200] +EPOCHS_LIST = [5_000] + +@show GENERATION_PARAMS_LIST +@show LR_LIST +@show FP_LIST +@show RESAMPLING_FREQUENCY_LIST +@show SAMPLES_PER_BATCH_LIST +@show EPOCHS_LIST +println() + LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ SamplingEntropy{RBT}( - resampling_frequency=2, - samples_per_batch=50, + resampling_frequency=resampling_frequency, + samples_per_batch=samples_per_batch, # property=TrueProperty{RBT}(), property=MultipleInvariants([ BookkeepingInvariant(), BalanceInvariant(), + OrderInvariant(), ]), failure_penalty=fp, ignore_nums=ignore_nums, @@ -32,14 +44,13 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ] for lr in LR_LIST for fp in FP_LIST + for resampling_frequency in RESAMPLING_FREQUENCY_LIST + for samples_per_batch in SAMPLES_PER_BATCH_LIST for ignore_nums in [false, true] ), ])) -EPOCHS_LIST = [2_000] -@show GENERATION_PARAMS_LIST -@show LOSS_CONFIG_WEIGHT_PAIRS_LIST -@show EPOCHS_LIST + # N = 4 # GENERATION_PARAMS_LIST = [Flips{N}()] # # LR_LIST = [0.0001, 0.0003, 0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1, 3, 10, 30, 100, 300] @@ -65,17 +76,12 @@ TOOL_PATH = "examples/qc/benchmarks/tool.jl" cmd = Cmd(Cmd(convert(Vector{String}, split(s))), ignorestatus=true) println(s) out = IOBuffer() - err = IOBuffer() @async begin - proc = run(pipeline(cmd; stdout=out, stderr=err),) + proc = run(pipeline(cmd; stdout=out, stderr=stdout),) if proc.exitcode != 0 println() so = String(take!(out)) - se = String(take!(err)) - println("FAILED: $(s)\nSTDOUT ===\n$(so)\nSTDERR ===\n$(se)\n") - else - se = String(take!(err)) - println(se) + println("FAILED: $(s)\nSTDOUT ===\n$(so)\n\n") end end end diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index f1bfc574..a83044ff 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -1,6 +1,6 @@ include("benchmarks.jl") -TAG = "v20_the_nums" +TAG = "v21_the_nums" ## PARSE ARGS if isempty(ARGS) From 6875342fbf33c7b7abf514a3cce77562946192f4 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 25 Apr 2024 12:15:58 -0700 Subject: [PATCH 116/231] add support_as_dst --- src/autodiff_pr/train.jl | 2 +- src/inference/sample.jl | 83 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 83 insertions(+), 2 deletions(-) diff --git a/src/autodiff_pr/train.jl b/src/autodiff_pr/train.jl index 05f47451..0a4c6ad5 100644 --- a/src/autodiff_pr/train.jl +++ b/src/autodiff_pr/train.jl @@ -179,4 +179,4 @@ function support_mixed(dist) x.prob = prob end res -end +end \ No newline at end of file diff --git a/src/inference/sample.jl b/src/inference/sample.jl index 12ca8732..a0fe2714 100644 --- a/src/inference/sample.jl +++ b/src/inference/sample.jl @@ -1,4 +1,4 @@ -export sample, sample_as_dist +export sample, sample_as_dist, support_as_dist using DirectedAcyclicGraphs: foldup """Run vanilla rejection sampling without any compilation""" @@ -98,3 +98,84 @@ function sample_as_dist(rng, a, x; evidence=true) return frombits_as_dist(x, vcache) end end + +tobits(::Integer) = [] +frombits_as_dist(i::Integer, _) = i +prob_equals(x::Integer, y::Integer) = x == y + +function support_as_dist(x; evidence=true) + vcache = Dict() + function call_with(f, key, val) + vcache[key] = val + f(val) + pop!(vcache, key) + end + + # Call f with every value that x can take given existing assignments in + # vcache. When f(x_val) is called, frombits_as_dist(x, vcache) == x_val + function helper(f, n::Bool) + f(n) + end + function helper(f, n::Flip) + if haskey(vcache, n) + f(vcache[n]) + else + call_with(f, n, false) + call_with(f, n, true) + end + end + function helper(f, n::DistAnd) + if haskey(vcache, n) + f(vcache[n]) + else + helper(n.x) do x + helper(n.y) do y + call_with(f, n, x && y) + end + end + end + end + function helper(f, n::DistOr) + if haskey(vcache, n) + f(vcache[n]) + else + helper(n.x) do x + helper(n.y) do y + call_with(f, n, x || y) + end + end + end + end + function helper(f, n::DistNot) + if haskey(vcache, n) + f(vcache[n]) + else + helper(n.x) do x + call_with(f, n, !x) + end + end + end + function hv(f, v::Vector) + function hv_helper(i) + if i > length(v) + f() + else + helper(v[i]) do x + hv_helper(i+1) + end + end + end + hv_helper(1) + end + + res = [] + helper(evidence) do evidence + if evidence + bits = tobits(x) + hv(tobits(x)) do + push!(res, frombits_as_dist(x, vcache)) + end + end + end + res +end From 28c44da5063fe09fcfc9ac0379d40f9f58436453 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 25 Apr 2024 12:17:02 -0700 Subject: [PATCH 117/231] qc: flip_for with arbitrary dependents --- examples/qc/benchmarks/benchmarks.jl | 2 +- examples/qc/benchmarks/lib/rbt/dist.jl | 7 ++ examples/qc/benchmarks/lib/rbt/generator.jl | 24 +++--- examples/qc/benchmarks/lib/rbt/to_coq.jl | 96 ++++++++++----------- examples/qc/benchmarks/lib/util.jl | 23 +++++ 5 files changed, 87 insertions(+), 65 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 705fd7ae..39028103 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -715,7 +715,7 @@ function to_subpath(p::TypeBasedRBTGenerator) ] end function generate(rs::RunState, p::TypeBasedRBTGenerator) - RBTGeneration(tb_gen_rbt(rs, p, p.size, false)) + RBTGeneration(tb_gen_rbt(rs, p, p.size, Color.Black())) end function generation_params_emit_stats(rs::RunState, p::TypeBasedRBTGenerator, s) path = joinpath(rs.out_dir, "$(s)_Generator.v") diff --git a/examples/qc/benchmarks/lib/rbt/dist.jl b/examples/qc/benchmarks/lib/rbt/dist.jl index ddd3ba5b..18ee5b8e 100644 --- a/examples/qc/benchmarks/lib/rbt/dist.jl +++ b/examples/qc/benchmarks/lib/rbt/dist.jl @@ -6,6 +6,13 @@ module Color using Dice @inductive T Red() Black() end +function Base.string(c::Color.T) + @assert isdeterministic(c) + @match c [ + Red() -> "Color.Red()", + Black() -> "Color.Black()", + ] +end module ColorKVTree using Dice diff --git a/examples/qc/benchmarks/lib/rbt/generator.jl b/examples/qc/benchmarks/lib/rbt/generator.jl index 0a919417..647c2ade 100644 --- a/examples/qc/benchmarks/lib/rbt/generator.jl +++ b/examples/qc/benchmarks/lib/rbt/generator.jl @@ -41,32 +41,32 @@ Coq < Coq < Coq < GenSizedTree = |} : GenSized Tree ==# -function tb_gen_rbt(rs, p, sz, parent_red) +function tb_gen_rbt(rs, p, sz, parent_color) if sz == 0 ColorKVTree.Leaf() else flip_leaf = if p.learn_leaf_weights - @dice_ite if parent_red | !p.use_parent_color - flip(register_weight!(rs, "leaf_sz$(sz)_redparent")) + leaf_group = if p.use_parent_color + [sz, parent_color] else - flip(register_weight!(rs, "leaf_sz$(sz)_blackparent")) + [sz] end + flip_for(rs, "leaf", leaf_group) else flip(.5) end + @dice_ite if flip_leaf ColorKVTree.Leaf() else - flip_red = @dice_ite if parent_red | !p.use_parent_color - flip(register_weight!(rs, if p.color_by_size "red_sz$(sz)_redparent" else "red_redparent" end)) - else - flip(register_weight!(rs, if p.color_by_size "red_sz$(sz)_blackparent" else "red_blackparent" end)) - end - color = if flip_red Color.Red() else Color.Black() end + red_group = [] + p.color_by_size && push!(red_group, sz) + p.use_parent_color && push!(red_group, parent_color) + color = @dice_ite if flip_for(rs, "red", red_group) Color.Red() else Color.Black() end k = uniform(DistInt32, 0, 100) v = DistInt32(0) - l = tb_gen_rbt(rs, p, sz - 1, flip_red) - r = tb_gen_rbt(rs, p, sz - 1, flip_red) + l = tb_gen_rbt(rs, p, sz - 1, color) + r = tb_gen_rbt(rs, p, sz - 1, color) ColorKVTree.Node(color, l, k, v, r) end end diff --git a/examples/qc/benchmarks/lib/rbt/to_coq.jl b/examples/qc/benchmarks/lib/rbt/to_coq.jl index b072e9aa..43ddd59c 100644 --- a/examples/qc/benchmarks/lib/rbt/to_coq.jl +++ b/examples/qc/benchmarks/lib/rbt/to_coq.jl @@ -1,24 +1,43 @@ flatten = Iterators.flatten +function tocoq(i::Integer) + "$(i)" +end + +function tocoq(c::Color.T) + @match c [ + Red() -> "R", + Black() -> "B", + ] +end + function typebased_rbt_to_coq(p, adnodes_vals, io) - w(s) = thousandths(adnodes_vals[s]) - ap(s, rp) = if rp || !p.use_parent_color "$(s)_redparent" else "$(s)_blackparent" end - red_wt_key(sz, rp) = ap(if p.color_by_size "red_sz$(sz)" else "red" end, rp) - red_wt(sz, rp) = w(red_wt_key(sz, rp)) - leaf_wt_key(sz, rp) = ap("leaf_sz$(sz)", rp) - leaf_wt(sz, rp) = w(leaf_wt_key(sz, rp)) - - expected_keys = Set( - flatten( - if p.learn_leaf_weights - ([red_wt_key(sz, rp),leaf_wt_key(sz, rp)]) - else - ([red_wt_key(sz, rp)]) - end - for (sz, rp) in Base.product(1:p.size, [false, true]) - if (sz, rp) != (p.size, true) - )) - @soft_assert io issetequal(keys(adnodes_vals), expected_keys) "$(adnodes_vals) $(expected_keys)" + leaf_cases = [] + red_cases = [] + for (name, val) in adnodes_vals + codeloc, case = split(name, "%%") + case = "(" * join([tocoq(eval(Meta.parse(x))) for x in split(case, "%")], ", ") * ")" + val = thousandths(val) + if codeloc == "leaf" + push!(leaf_cases, (case, val)) + elseif codeloc == "red" + push!(red_cases, (case, val)) + else + error() + end + end + sort!(leaf_cases) + sort!(red_cases) + + leaf_scrutinees = if p.use_parent_color + ["size", "parent_color"] + else + ["size"] + end + + red_scrutinees = [] + p.color_by_size && push!(red_scrutinees, "size") + p.use_parent_color && push!(red_scrutinees, "parent_color") """ Require Import ZArith. From QuickChick Require Import QuickChick. @@ -31,45 +50,18 @@ Import ListNotations. From RBT Require Import Impl Spec. -Definition original_sz := $(p.size). -Definition new_sz := $(p.size). - -(* Look up in list of backtrack weights *) -Fixpoint get {a: Type} (l : list (nat * a)) (target_key : nat) (default : a): a := - match l with - | [] => - (* This branch should never return *) - default - | (key, value) :: l' => - if Nat.eqb (original_sz - key) (new_sz - target_key) then - value - else get l' target_key default - end. - Definition manual_gen_tree := fun s : nat => (let fix arb_aux (size : nat) (parent_color : Color) : G Tree := - let weight_red := match parent_color with - | R => - get [ - $(join(["($(sz), $(red_wt(sz, true)))" for sz in 1:p.size - 1], "; ")) - ] s 0 - | B => - get [ - $(join(["($(sz), $(red_wt(sz, false)))" for sz in 1:p.size], "; ")) - ] s 0 + let weight_red := match ($(join(red_scrutinees, ","))) with +$(join([" " ^ 9 * "| $(name) => $(w)" for (name, w) in red_cases], "\n")) + | _ => 500 end in let weight_leaf := $( -if p.learn_leaf_weights "match parent_color with - | R => - get [ - $(join(["($(sz), $(leaf_wt(sz, true)))" for sz in 1:p.size - 1], "; ")) - ] s 0 - | B => - get [ - $(join(["($(sz), $(leaf_wt(sz, false)))" for sz in 1:p.size], "; ")) - ] s 0 +if p.learn_leaf_weights "match ($(join(leaf_scrutinees, ","))) with +$(join([" " ^ 9 * "| $(name) => $(w)" for (name, w) in leaf_cases], "\n")) + | _ => 500 end" else "500" end) in match size with @@ -92,7 +84,7 @@ else "500" end) in #[global] Instance genTree : GenSized (Tree) := - {| arbitrarySized n := manual_gen_tree new_sz B |}. + {| arbitrarySized n := manual_gen_tree $(p.size) B |}. (* --------------------- Tests --------------------- *) diff --git a/examples/qc/benchmarks/lib/util.jl b/examples/qc/benchmarks/lib/util.jl index ca84c3fa..81927d80 100644 --- a/examples/qc/benchmarks/lib/util.jl +++ b/examples/qc/benchmarks/lib/util.jl @@ -230,3 +230,26 @@ function println_loud(rs::RunState, x) end println_loud(rs) = println_loud(rs, "") + +function flip_for(rs, name, dependents) + res = nothing + support = support_as_dist(dependents) + if isempty(support) + println(support) + end + @assert !isempty(support) + for dependents_vals in support + t = join([string(x) for x in dependents_vals], "%") + v = flip(register_weight!(rs, "$(name)%%$(t)")) + if isnothing(res) + res = v + else + res = @dice_ite if prob_equals(dependents, dependents_vals) + v + else + res + end + end + end + res +end From 40f3eb22fddfa1edafc36cfff640589813003a91 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 25 Apr 2024 14:52:55 -0700 Subject: [PATCH 118/231] rbt intwidth, dependents --- examples/qc/benchmarks/benchmarks.jl | 20 +++-- examples/qc/benchmarks/lib/rbt/generator.jl | 96 ++++++++------------- examples/qc/benchmarks/lib/rbt/to_coq.jl | 70 +++++++++------ examples/qc/benchmarks/lib/util.jl | 4 +- examples/qc/benchmarks/main.jl | 19 +++- examples/qc/benchmarks/tool.jl | 6 +- 6 files changed, 114 insertions(+), 101 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 39028103..daad1002 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -698,24 +698,26 @@ value(g::RBTGeneration) = g.t struct TypeBasedRBTGenerator <: GenerationParams{RBT} size::Integer - color_by_size::Bool - learn_leaf_weights::Bool - use_parent_color::Bool + leaf_dependents::Vector{Symbol} + red_dependents::Vector{Symbol} + num_dependents::Vector{Symbol} + intwidth::Integer end -TypeBasedRBTGenerator(; size, color_by_size, learn_leaf_weights, use_parent_color) = - TypeBasedRBTGenerator(size, color_by_size, learn_leaf_weights, use_parent_color) +TypeBasedRBTGenerator(; size, leaf_dependents, red_dependents, num_dependents, intwidth) = + TypeBasedRBTGenerator(size, leaf_dependents, red_dependents, num_dependents, intwidth) function to_subpath(p::TypeBasedRBTGenerator) [ "rbt", "typebased", "sz=$(p.size)", - "color_by_size=$(p.color_by_size)", - "learn_leaf_weights=$(p.learn_leaf_weights)", - "use_parent_color=$(p.use_parent_color)", + "leaf_dependents=$(join(Base.map(string, p.leaf_dependents),"-"))", + "red_dependents=$(join(Base.map(string, p.red_dependents),"-"))", + "num_dependents=$(join(Base.map(string, p.num_dependents),"-"))", + "intwidth=$(p.intwidth)", ] end function generate(rs::RunState, p::TypeBasedRBTGenerator) - RBTGeneration(tb_gen_rbt(rs, p, p.size, Color.Black())) + RBTGeneration(tb_gen_rbt(rs, p, p.size, Color.Black(), 10)) end function generation_params_emit_stats(rs::RunState, p::TypeBasedRBTGenerator, s) path = joinpath(rs.out_dir, "$(s)_Generator.v") diff --git a/examples/qc/benchmarks/lib/rbt/generator.jl b/examples/qc/benchmarks/lib/rbt/generator.jl index 647c2ade..beda4753 100644 --- a/examples/qc/benchmarks/lib/rbt/generator.jl +++ b/examples/qc/benchmarks/lib/rbt/generator.jl @@ -1,72 +1,48 @@ -#== -Coq < Coq < Coq < GenSizedColor = -{| - arbitrarySized := - fun s : nat => - (let - fix arb_aux (size : nat) : G Color := - match size with - | 0 => oneOf [returnGen R; returnGen B] - | S _ => freq [ (1, returnGen R); (1, returnGen B)] - end in - arb_aux) s -|} - : GenSized Color -==# +function twopowers(n) + [2^(i-1) for i in 1:n] +end -#== -Coq < Coq < Coq < GenSizedTree = -{| - arbitrarySized := - fun s : nat => - (let - fix arb_aux (size : nat) : G Tree := - match size with - | 0 => returnGen E - | S size' => - freq [ (1, returnGen E); - (1, - bindGen arbitrary - (fun p0 : Color => - bindGen (arb_aux size') - (fun p1 : Tree => - bindGen arbitrary - (fun p2 : Z => - bindGen arbitrary - (fun p3 : Z => - bindGen (arb_aux size') - (fun p4 : Tree => returnGen (T p0 p1 p2 p3 p4)))))))] - end in - arb_aux) s -|} - : GenSized Tree -==# -function tb_gen_rbt(rs, p, sz, parent_color) - if sz == 0 - ColorKVTree.Leaf() - else - flip_leaf = if p.learn_leaf_weights - leaf_group = if p.use_parent_color - [sz, parent_color] - else - [sz] - end - flip_for(rs, "leaf", leaf_group) +function tb_gen_rbt(rs, p, sz, parent_color, last_callsite) + function dependent_to_val(dependent) + if dependent == :size + sz + elseif dependent == :parent_color + parent_color + elseif dependent == :last_callsite + last_callsite else + error() + end + end + function dependents_to_flip(name, dependents) + if isnothing(dependents) flip(.5) + else + group = collect(Base.map(dependent_to_val, dependents)) + flip_for(rs, name, group) end + end + if sz == 0 + ColorKVTree.Leaf() + else + flip_leaf = dependents_to_flip("leaf", p.leaf_dependents) @dice_ite if flip_leaf ColorKVTree.Leaf() else - red_group = [] - p.color_by_size && push!(red_group, sz) - p.use_parent_color && push!(red_group, parent_color) - color = @dice_ite if flip_for(rs, "red", red_group) Color.Red() else Color.Black() end - k = uniform(DistInt32, 0, 100) + flip_red = dependents_to_flip("red", p.red_dependents) + color = @dice_ite if flip_red Color.Red() else Color.Black() end + k = sum( + @dice_ite if dependents_to_flip("num$(n)", p.num_dependents) + DistInt32(n) + else + DistInt32(0) + end + for n in twopowers(p.intwidth) + ) v = DistInt32(0) - l = tb_gen_rbt(rs, p, sz - 1, color) - r = tb_gen_rbt(rs, p, sz - 1, color) + l = tb_gen_rbt(rs, p, sz - 1, color, 20) + r = tb_gen_rbt(rs, p, sz - 1, color, 30) ColorKVTree.Node(color, l, k, v, r) end end diff --git a/examples/qc/benchmarks/lib/rbt/to_coq.jl b/examples/qc/benchmarks/lib/rbt/to_coq.jl index 43ddd59c..adf8d0ba 100644 --- a/examples/qc/benchmarks/lib/rbt/to_coq.jl +++ b/examples/qc/benchmarks/lib/rbt/to_coq.jl @@ -14,6 +14,7 @@ end function typebased_rbt_to_coq(p, adnodes_vals, io) leaf_cases = [] red_cases = [] + num_cases = Dict() for (name, val) in adnodes_vals codeloc, case = split(name, "%%") case = "(" * join([tocoq(eval(Meta.parse(x))) for x in split(case, "%")], ", ") * ")" @@ -22,22 +23,29 @@ function typebased_rbt_to_coq(p, adnodes_vals, io) push!(leaf_cases, (case, val)) elseif codeloc == "red" push!(red_cases, (case, val)) + elseif startswith(codeloc, "num") + n = parse(Int, codeloc[4:end]) + push!(get!(num_cases, n, []), (case, val)) else error() end end - sort!(leaf_cases) - sort!(red_cases) - leaf_scrutinees = if p.use_parent_color - ["size", "parent_color"] - else - ["size"] + function mk_match(dependents, cases) + cases = sort(cases) + if isnothing(dependents) + "500" + else + "match ($(join(map(string, dependents), ","))) with +$(join([" " ^ 9 * "| $(name) => $(w)" for (name, w) in cases], "\n")) + | _ => 500 + end" + end end + + red_match = mk_match(p.red_dependents, red_cases) + leaf_match = mk_match(p.leaf_dependents, leaf_cases) - red_scrutinees = [] - p.color_by_size && push!(red_scrutinees, "size") - p.use_parent_color && push!(red_scrutinees, "parent_color") """ Require Import ZArith. From QuickChick Require Import QuickChick. @@ -53,17 +61,16 @@ From RBT Require Import Impl Spec. Definition manual_gen_tree := fun s : nat => (let - fix arb_aux (size : nat) (parent_color : Color) : G Tree := - let weight_red := match ($(join(red_scrutinees, ","))) with -$(join([" " ^ 9 * "| $(name) => $(w)" for (name, w) in red_cases], "\n")) - | _ => 500 - end in - let weight_leaf := $( -if p.learn_leaf_weights "match ($(join(leaf_scrutinees, ","))) with -$(join([" " ^ 9 * "| $(name) => $(w)" for (name, w) in leaf_cases], "\n")) - | _ => 500 - end" -else "500" end) in + fix arb_aux (size : nat) (parent_color : Color) (last_callsite : nat) : G Tree := + let weight_red := $(red_match) in + let weight_leaf := $(leaf_match) in +$( + join( + [" let weight_$(n) := $(mk_match(p.num_dependents, num_cases[n])) in" + for n in twopowers(p.intwidth)], + "\n" + ) +) match size with | 0 => returnGen E | S size' => @@ -71,20 +78,31 @@ else "500" end) in (1000 - weight_leaf, bindGen (freq [ (weight_red, returnGen R); (1000-weight_red, returnGen B)]) (fun p0 : Color => - bindGen (arb_aux size' p0) + bindGen (arb_aux size' p0 20) (fun p1 : Tree => - bindGen arbitrary - (fun p2 : Z => + +$( + join( + [ +"bindGen (freq [ (weight_$(n), returnGen ($(n)%Z)); (1000-weight_$(n), returnGen 0%Z)]) +(fun n$(n) : Z => " + for n in twopowers(p.intwidth)], + "\n" + ) +) bindGen arbitrary (fun p3 : Z => - bindGen (arb_aux size' p0) - (fun p4 : Tree => returnGen (T p0 p1 p2 p3 p4)))))))] +let p2 := ($(join(["n$(n)" for n in twopowers(p.intwidth)], "+")))%Z in + bindGen (arb_aux size' p0 30) + (fun p4 : Tree => returnGen (T p0 p1 p2 p3 p4)) + $(")" ^ p.intwidth) + ))))] end in arb_aux) s. #[global] Instance genTree : GenSized (Tree) := - {| arbitrarySized n := manual_gen_tree $(p.size) B |}. + {| arbitrarySized n := manual_gen_tree $(p.size) B 10 |}. (* --------------------- Tests --------------------- *) diff --git a/examples/qc/benchmarks/lib/util.jl b/examples/qc/benchmarks/lib/util.jl index 81927d80..4fd59aa8 100644 --- a/examples/qc/benchmarks/lib/util.jl +++ b/examples/qc/benchmarks/lib/util.jl @@ -64,11 +64,11 @@ function first_some(::Type{T}, xs) where T end # Manually curry so we can have type be first arg and use "do" -function map(::Type{RetT}) where RetT +function map_(::Type{RetT}) where RetT function inner(f, l::List{T}) where T match(l, [ "Nil" => () -> DistNil(RetT), - "Cons" => (x, xs) -> DistCons(f(x), map(RetT)(f, xs)) + "Cons" => (x, xs) -> DistCons(f(x), map_(RetT)(f, xs)) ]) end end diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 874bb112..c4173a51 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -8,14 +8,27 @@ GENERATION_PARAMS_LIST = [ # TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=false, use_parent_color=false), # TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=false, use_parent_color=true), # TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=true, use_parent_color=false), - TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=true, use_parent_color=true), + TypeBasedRBTGenerator( + size=5, + leaf_dependents=[:size,:parent_color], + red_dependents=[:size,:parent_color], + num_dependents=[:last_callsite], + intwidth=6, + ), + TypeBasedRBTGenerator( + size=5, + leaf_dependents=[:size,:parent_color,:last_callsite], + red_dependents=[:size,:parent_color,:last_callsite], + num_dependents=[:size,:parent_color,:last_callsite], + intwidth=6, + ), # BespokeLRUSetTestcaseGenerator(5), ] LR_LIST = [0.001, 0.003, 0.01, 0.03, 0.1] FP_LIST = [0.] RESAMPLING_FREQUENCY_LIST = [2] -SAMPLES_PER_BATCH_LIST = [200] -EPOCHS_LIST = [5_000] +SAMPLES_PER_BATCH_LIST = [50, 200] +EPOCHS_LIST = [2_000] @show GENERATION_PARAMS_LIST @show LR_LIST diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index a83044ff..c3ed625c 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -7,7 +7,11 @@ if isempty(ARGS) TAG = "test" as = ["-f"] g_p = TypeBasedRBTGenerator( - size=3, color_by_size=true, learn_leaf_weights=true, use_parent_color=true, + size=3, + leaf_dependents=[:size,:parent_color], + red_dependents=[:size,:parent_color], + num_dependents=[:size,:parent_color,:last_callsite], + intwidth=6, ) lr = 0.01 fp = 0.01 From 8a8e9dfe3a0b39e1084bc189c10779cf9c154cc3 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 25 Apr 2024 20:50:26 -0700 Subject: [PATCH 119/231] add as_dist to pr, use pr for support --- Project.toml | 1 + examples/qc/benchmarks/lib/util.jl | 2 +- examples/qc/benchmarks/tool.jl | 4 +- src/autodiff_pr/train.jl | 6 +-- src/inference/inference.jl | 17 +++++-- src/inference/sample.jl | 79 +----------------------------- 6 files changed, 21 insertions(+), 88 deletions(-) diff --git a/Project.toml b/Project.toml index 01e1661f..20744ba0 100644 --- a/Project.toml +++ b/Project.toml @@ -15,6 +15,7 @@ Jive = "ba5e3d4b-8524-549f-bc71-e76ad9e9deed" MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a" +Revise = "295af30f-e4ad-537b-8983-00126c2a3abe" [compat] CUDD = "0.3" diff --git a/examples/qc/benchmarks/lib/util.jl b/examples/qc/benchmarks/lib/util.jl index 4fd59aa8..803282ce 100644 --- a/examples/qc/benchmarks/lib/util.jl +++ b/examples/qc/benchmarks/lib/util.jl @@ -233,7 +233,7 @@ println_loud(rs) = println_loud(rs, "") function flip_for(rs, name, dependents) res = nothing - support = support_as_dist(dependents) + support = support_mixed(dependents; as_dist=true) if isempty(support) println(support) end diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index c3ed625c..64649814 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -1,6 +1,6 @@ include("benchmarks.jl") -TAG = "v21_the_nums" +TAG = "v22_learn_keys" ## PARSE ARGS if isempty(ARGS) @@ -60,7 +60,7 @@ SEED = 0 out_dir = joinpath( vcat( - ["examples/qc/benchmarks/output"], + ["/space/tjoa/tuning-output"], [TAG], to_subpath(generation_params), vcat([ diff --git a/src/autodiff_pr/train.jl b/src/autodiff_pr/train.jl index 0a4c6ad5..42369045 100644 --- a/src/autodiff_pr/train.jl +++ b/src/autodiff_pr/train.jl @@ -166,15 +166,15 @@ function pr_mixed(var_vals) end end -function support_mixed(dist) +function support_mixed(args...; kwargs...) flip_to_original_prob = Dict() - for x in collect_flips(tobits(dist)) + for x in collect_flips(tobits(args...)) if x.prob isa ADNode flip_to_original_prob[x] = x.prob x.prob = 0.5 end end - res = keys(pr(dist)) + res = keys(pr(args...; kwargs...)) for (x, prob) in flip_to_original_prob x.prob = prob end diff --git a/src/inference/inference.jl b/src/inference/inference.jl index 78c41599..099fe95b 100644 --- a/src/inference/inference.jl +++ b/src/inference/inference.jl @@ -36,7 +36,7 @@ function pr(queries::JointQuery...; kwargs...) length(queries) == 1 ? ans[1] : ans end -function pr(queries...; kwargs...) +function pr(queries...; as_dist::Bool=false, kwargs...) joint_queries = map(queries) do query JointQuery(tobits(query)) end @@ -44,10 +44,19 @@ function pr(queries...; kwargs...) ans = map(queries, queryworlds) do query, worlds dist = DefaultDict(0.0) for (world, p) in worlds - dist[frombits(query, world)] += p + key = if as_dist + frombits_as_dist(query, world) + else + frombits(query, world) + end + dist[key] += p end - DefaultOrderedDict(0., OrderedDict(sort(collect(dist); - by= t -> (-t[2], t[1])))) # by decreasing probability + by = if as_dist + t -> -t[2] + else + t -> (-t[2], t[1]) + end + DefaultOrderedDict(0., OrderedDict(sort(collect(dist); by))) # by decreasing probability end length(queries) == 1 ? ans[1] : ans end diff --git a/src/inference/sample.jl b/src/inference/sample.jl index a0fe2714..72ae2270 100644 --- a/src/inference/sample.jl +++ b/src/inference/sample.jl @@ -1,4 +1,4 @@ -export sample, sample_as_dist, support_as_dist +export sample, sample_as_dist using DirectedAcyclicGraphs: foldup """Run vanilla rejection sampling without any compilation""" @@ -102,80 +102,3 @@ end tobits(::Integer) = [] frombits_as_dist(i::Integer, _) = i prob_equals(x::Integer, y::Integer) = x == y - -function support_as_dist(x; evidence=true) - vcache = Dict() - function call_with(f, key, val) - vcache[key] = val - f(val) - pop!(vcache, key) - end - - # Call f with every value that x can take given existing assignments in - # vcache. When f(x_val) is called, frombits_as_dist(x, vcache) == x_val - function helper(f, n::Bool) - f(n) - end - function helper(f, n::Flip) - if haskey(vcache, n) - f(vcache[n]) - else - call_with(f, n, false) - call_with(f, n, true) - end - end - function helper(f, n::DistAnd) - if haskey(vcache, n) - f(vcache[n]) - else - helper(n.x) do x - helper(n.y) do y - call_with(f, n, x && y) - end - end - end - end - function helper(f, n::DistOr) - if haskey(vcache, n) - f(vcache[n]) - else - helper(n.x) do x - helper(n.y) do y - call_with(f, n, x || y) - end - end - end - end - function helper(f, n::DistNot) - if haskey(vcache, n) - f(vcache[n]) - else - helper(n.x) do x - call_with(f, n, !x) - end - end - end - function hv(f, v::Vector) - function hv_helper(i) - if i > length(v) - f() - else - helper(v[i]) do x - hv_helper(i+1) - end - end - end - hv_helper(1) - end - - res = [] - helper(evidence) do evidence - if evidence - bits = tobits(x) - hv(tobits(x)) do - push!(res, frombits_as_dist(x, vcache)) - end - end - end - res -end From de2941a313cf52840bc338a7f5dd4f3e7895298c Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Fri, 26 Apr 2024 12:00:24 -0700 Subject: [PATCH 120/231] rbt longer training --- examples/qc/benchmarks/main.jl | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index c4173a51..c4e5a63b 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -1,20 +1,6 @@ include("benchmarks.jl") GENERATION_PARAMS_LIST = [ - # BespokeSTLCGenerator(param_vars_by_size=true,size=5,ty_size=2), - # BespokeBSTGenerator(size=5, vals=BSTDummyVals), - # TypeBasedBSTGenerator(size=5), - # TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=true, use_parent_color=true), - # TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=false, use_parent_color=false), - # TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=false, use_parent_color=true), - # TypeBasedRBTGenerator(size=5, color_by_size=true, learn_leaf_weights=true, use_parent_color=false), - TypeBasedRBTGenerator( - size=5, - leaf_dependents=[:size,:parent_color], - red_dependents=[:size,:parent_color], - num_dependents=[:last_callsite], - intwidth=6, - ), TypeBasedRBTGenerator( size=5, leaf_dependents=[:size,:parent_color,:last_callsite], @@ -22,13 +8,12 @@ GENERATION_PARAMS_LIST = [ num_dependents=[:size,:parent_color,:last_callsite], intwidth=6, ), - # BespokeLRUSetTestcaseGenerator(5), ] -LR_LIST = [0.001, 0.003, 0.01, 0.03, 0.1] +LR_LIST = [0.001, 0.003, 0.01, 0.03, 0.1, 0.3] FP_LIST = [0.] RESAMPLING_FREQUENCY_LIST = [2] -SAMPLES_PER_BATCH_LIST = [50, 200] -EPOCHS_LIST = [2_000] +SAMPLES_PER_BATCH_LIST = [50, 1_000] +EPOCHS_LIST = [10_000] @show GENERATION_PARAMS_LIST @show LR_LIST From 3a2f507edaa9b3ef2db8c685f4fa05d0692cfde7 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Fri, 26 Apr 2024 12:09:20 -0700 Subject: [PATCH 121/231] rbt unif depth --- examples/qc/benchmarks/benchmarks.jl | 159 +++++++++++++------------ examples/qc/benchmarks/lib/rbt/dist.jl | 11 ++ examples/qc/benchmarks/main.jl | 9 +- examples/qc/benchmarks/tool.jl | 3 +- 4 files changed, 100 insertions(+), 82 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index daad1002..bbdcbab4 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -603,83 +603,6 @@ end # LossMgrImpl(_ -> nothing, train!) # end -################################## -# MLE loss -################################## - -abstract type Metric{T} end -abstract type TargetDist end - -struct MLELossConfig{T} <: LossConfig{T} - metric::Metric{T} - target_dist::TargetDist - MLELossConfig(; metric::Metric{T}, target_dist) where T = new{T}(metric, target_dist) -end -to_subpath(p::MLELossConfig) = [name(p.metric), name(p.target_dist)] -function create_loss_manager(rs::RunState, p::MLELossConfig, generation) - println_flush(rs.io, "Building computation graph for $(p)...") - time_build_loss = @elapsed begin - metric = compute_metric(p.metric, generation) - loss = metric_loss(metric, p.target_dist) - end - println(rs.io, " $(time_build_loss) seconds") - println(rs.io) - - SimpleLossMgr(loss, nothing) - - # TODO: fix. allow us to register_stats! to rs, or create MLELossMgr - # # Also save distribution of metric being trained - # function f_emit′(tag) - # println_flush(rs.io, "Saving $(tag) distribution...") - # time_infer = @elapsed metric_dist = pr_mixed(rs.var_vals)(metric) - # println(rs.io, " $(time_infer) seconds") - # save_metric_dist(joinpath(rs.out_dir, "dist_$(name(p.metric))_$(tag).csv"), metric_dist; rs.io) - # println(rs.io) - - # emit_stats(mgr, tag) - # end -end - -struct TreeSize <: Metric{BST} end -compute_metric(::TreeSize, gen::BSTGeneration) = tree_size(gen.t) -name(::TreeSize) = "tree_size" - -struct NumApps <: Metric{STLC} end -compute_metric(::NumApps, gen::STLCGeneration) = num_apps(gen.e) -name(::NumApps) = "num_apps" - -struct TermSize <: Metric{STLC} end -compute_metric(::TermSize, gen::STLCGeneration) = term_size(gen.e) -name(::TermSize) = "term_size" - -struct Uniform <: TargetDist end -name(::Uniform) = "uniform" -function metric_loss(metric::Dist, ::Uniform) - mle_loss([ - BoolToMax(prob_equals(metric, DistUInt32(i))) - for i in support_mixed(metric) - ]) -end - -struct Linear <: TargetDist end -name(::Linear) = "linear" -function metric_loss(metric::Dist, ::Linear) - mle_loss([ - BoolToMax(prob_equals(metric, DistUInt32(i)), weight=i) - for i in support_mixed(metric) - ]) -end - -struct Target4321 <: TargetDist end -name(::Target4321) = "target4321" -function metric_loss(metric::Dist, ::Target4321) - mle_loss([ - BoolToMax(prob_equals(metric, DistUInt32(0)), weight=.4), - BoolToMax(prob_equals(metric, DistUInt32(1)), weight=.3), - BoolToMax(prob_equals(metric, DistUInt32(2)), weight=.2), - BoolToMax(prob_equals(metric, DistUInt32(3)), weight=.1), - ]) -end ################################## # RBT generation ################################## @@ -821,3 +744,85 @@ function create_loss_manager(::RunState, p::SamplingEntropy{T}, g::Generation{T} end SamplingEntropyLossMgr(p, value(g), consider) end + +################################## +# MLE loss +################################## + +abstract type Metric{T} end +abstract type TargetDist end + +struct MLELossConfig{T} <: LossConfig{T} + metric::Metric{T} + target_dist::TargetDist +end +MLELossConfig(; metric::Metric{T}, target_dist) where T = MLELossConfig{T}(metric, target_dist) +to_subpath(p::MLELossConfig) = [name(p.metric), name(p.target_dist)] +function create_loss_manager(rs::RunState, p::MLELossConfig, generation) + println_flush(rs.io, "Building computation graph for $(p)...") + time_build_loss = @elapsed begin + metric = compute_metric(p.metric, generation) + loss = metric_loss(metric, p.target_dist) + end + println(rs.io, " $(time_build_loss) seconds") + println(rs.io) + + SimpleLossMgr(loss, nothing) + + # TODO: fix. allow us to register_stats! to rs, or create MLELossMgr + # # Also save distribution of metric being trained + # function f_emit′(tag) + # println_flush(rs.io, "Saving $(tag) distribution...") + # time_infer = @elapsed metric_dist = pr_mixed(rs.var_vals)(metric) + # println(rs.io, " $(time_infer) seconds") + # save_metric_dist(joinpath(rs.out_dir, "dist_$(name(p.metric))_$(tag).csv"), metric_dist; rs.io) + # println(rs.io) + + # emit_stats(mgr, tag) + # end +end + +struct RBTDepth <: Metric{RBT} end +compute_metric(::RBTDepth, gen::RBTGeneration) = rbt_depth(gen.t) +name(::RBTDepth) = "rbt_depth" + +struct TreeSize <: Metric{BST} end +compute_metric(::TreeSize, gen::BSTGeneration) = tree_size(gen.t) +name(::TreeSize) = "tree_size" + +struct NumApps <: Metric{STLC} end +compute_metric(::NumApps, gen::STLCGeneration) = num_apps(gen.e) +name(::NumApps) = "num_apps" + +struct TermSize <: Metric{STLC} end +compute_metric(::TermSize, gen::STLCGeneration) = term_size(gen.e) +name(::TermSize) = "term_size" + +struct Uniform <: TargetDist end +name(::Uniform) = "uniform" +function metric_loss(metric::Dist, ::Uniform) + mle_loss([ + BoolToMax(prob_equals(metric, DistUInt32(i))) + for i in support_mixed(metric) + ]) +end + +struct Linear <: TargetDist end +name(::Linear) = "linear" +function metric_loss(metric::Dist, ::Linear) + mle_loss([ + BoolToMax(prob_equals(metric, DistUInt32(i)), weight=i) + for i in support_mixed(metric) + ]) +end + +struct Target4321 <: TargetDist end +name(::Target4321) = "target4321" +function metric_loss(metric::Dist, ::Target4321) + mle_loss([ + BoolToMax(prob_equals(metric, DistUInt32(0)), weight=.4), + BoolToMax(prob_equals(metric, DistUInt32(1)), weight=.3), + BoolToMax(prob_equals(metric, DistUInt32(2)), weight=.2), + BoolToMax(prob_equals(metric, DistUInt32(3)), weight=.1), + ]) +end \ No newline at end of file diff --git a/examples/qc/benchmarks/lib/rbt/dist.jl b/examples/qc/benchmarks/lib/rbt/dist.jl index 18ee5b8e..82e5f9fa 100644 --- a/examples/qc/benchmarks/lib/rbt/dist.jl +++ b/examples/qc/benchmarks/lib/rbt/dist.jl @@ -27,6 +27,17 @@ function tree_size(e::ColorKVTree.T) ] end +function rbt_depth(e::ColorKVTree.T) + @match e [ + Leaf() -> DistUInt32(0), + Node(c, l, k, v, r) -> begin + ldepth = rbt_depth(l) + rdepth = rbt_depth(r) + DistUInt32(1) + @dice_ite if ldepth > rdepth ldepth else rdepth end + end + ] +end + is_red(c::Color.T) = matches(c, :Red) # Check that all paths through the tree have the same number of black nodes diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index c4e5a63b..563282b0 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -9,11 +9,11 @@ GENERATION_PARAMS_LIST = [ intwidth=6, ), ] -LR_LIST = [0.001, 0.003, 0.01, 0.03, 0.1, 0.3] +LR_LIST = [0.0001, 0.0003, 0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1., 3., 10.] FP_LIST = [0.] RESAMPLING_FREQUENCY_LIST = [2] -SAMPLES_PER_BATCH_LIST = [50, 1_000] -EPOCHS_LIST = [10_000] +SAMPLES_PER_BATCH_LIST = [50, 200] +EPOCHS_LIST = [4_000] @show GENERATION_PARAMS_LIST @show LR_LIST @@ -37,7 +37,8 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ]), failure_penalty=fp, ignore_nums=ignore_nums, - ) => lr, + ) => 0.01, + MLELossConfig(RBTDepth(), Uniform()) => lr, # SatisfyPropertyLoss(MultipleInvariants([BookkeepingInvariant(),BalanceInvariant()])) => lr, ] for lr in LR_LIST diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 64649814..abc0091a 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -1,6 +1,6 @@ include("benchmarks.jl") -TAG = "v22_learn_keys" +TAG = "v24_uniform" ## PARSE ARGS if isempty(ARGS) @@ -28,6 +28,7 @@ if isempty(ARGS) failure_penalty=fp, ignore_nums=true ) => lr, + MLELossConfig(RBTDepth(), Uniform()) => lr, ] push!(as, replace(string(g_p), " "=>"")) push!(as, replace(string(l_p), " "=>"")) From 585a125ef00a397e9af6dd690ef74024d636977a Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 1 May 2024 12:16:51 -0700 Subject: [PATCH 122/231] add Opt.bind, Opt.map --- src/dist/inductive/option.jl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/dist/inductive/option.jl b/src/dist/inductive/option.jl index 74f88719..7ca8c407 100644 --- a/src/dist/inductive/option.jl +++ b/src/dist/inductive/option.jl @@ -4,4 +4,20 @@ export Opt module Opt using Dice @inductive T{A} None() Some(A) + + Some(x) = Some(typeof(x), x) + + function bind(f, T, x::Opt.T) + @match x [ + None() -> None(T), + Some(x) -> f(x) + ] + end + + function map(f, T, x::Opt.T) + @match x [ + None() -> None(T), + Some(x) -> Some(T, f(x)) + ] + end end From 2c411c718bb8d05bf2bf8293ba00169a9ff05bdc Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 1 May 2024 12:17:48 -0700 Subject: [PATCH 123/231] typebased stlc, tocoq, dependents --- examples/qc/benchmarks/benchmarks.jl | 56 +++++--- examples/qc/benchmarks/lib/lib.jl | 1 + examples/qc/benchmarks/lib/rbt/to_coq.jl | 4 - examples/qc/benchmarks/lib/stlc/dist.jl | 131 ++++++++++++++++++- examples/qc/benchmarks/lib/stlc/generator.jl | 65 +++++---- examples/qc/benchmarks/lib/stlc/to_coq.jl | 2 +- examples/qc/benchmarks/lib/stlc/to_coq_tb.jl | 91 +++++++++++++ examples/qc/benchmarks/lib/util.jl | 78 ++++++++--- examples/qc/benchmarks/tool.jl | 24 ++-- 9 files changed, 373 insertions(+), 79 deletions(-) create mode 100644 examples/qc/benchmarks/lib/stlc/to_coq_tb.jl diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index bbdcbab4..81f3c599 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -191,6 +191,7 @@ function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) LogPr(prob_equals(m.val,sample)) end lpr_eq_expanded = Dice.expand_logprs(l, lpr_eq) + diff_test_typecheck(sample, Dice.frombits(sample, Dict())) if m.consider(sample) num_meeting += 1 [lpr_eq_expanded * compute(a, lpr_eq_expanded), lpr_eq_expanded] @@ -365,15 +366,20 @@ function generate(rs::RunState, p::BespokeSTLCGenerator) STLCGeneration(e, constructors_overapproximation) end +function save_coq_generator(rs, p, s, f) + path = joinpath(rs.out_dir, "$(s)_Generator.v") + open(path, "w") do file + vals = compute(rs.var_vals, values(rs.adnodes_of_interest)) + adnodes_vals = Dict(s => vals[adnode] for (s, adnode) in rs.adnodes_of_interest) + println(file, f(p, adnodes_vals, rs.io)) + end + println_flush(rs.io, "Saved Coq generator to $(path)") +end + function generation_params_emit_stats(rs::RunState, p::BespokeSTLCGenerator, s) + path = joinpath(rs.out_dir, "$(s)_Generator.v") if p == BespokeSTLCGenerator(param_vars_by_size=true,size=5,ty_size=2) - path = joinpath(rs.out_dir, "$(s)_Generator.v") - open(path, "w") do file - vals = compute(rs.var_vals, values(rs.adnodes_of_interest)) - adnodes_vals = Dict(s => vals[adnode] for (s, adnode) in rs.adnodes_of_interest) - println(file, bespoke_stlc_to_coq(adnodes_vals)) - end - println_flush(rs.io, "Saved Coq generator to $(path)") + save_coq_generator(rs, p, s, bespoke_stlc_to_coq) else println_flush(rs.io, "Translation back to Coq not defined") end @@ -387,23 +393,30 @@ end struct TypeBasedSTLCGenerator <: GenerationParams{STLC} size::Integer ty_size::Integer + dependents::Vector{Symbol} + ty_dependents::Vector{Symbol} end -TypeBasedSTLCGenerator(; size, ty_size) = TypeBasedSTLCGenerator(size, ty_size) +TypeBasedSTLCGenerator(; size, ty_size, dependents, ty_dependents) = TypeBasedSTLCGenerator(size, ty_size, dependents, ty_dependents) function to_subpath(p::TypeBasedSTLCGenerator) [ "stlc", "typebased", "sz=$(p.size)-tysz=$(p.ty_size)", + "dependents=$(join(Base.map(string, p.dependents),"-"))", + "ty_dependents=$(join(Base.map(string, p.ty_dependents),"-"))", ] end function generate(rs::RunState, p::TypeBasedSTLCGenerator) constructors_overapproximation = [] function add_ctor(v::Expr.T) - push!(constructors_overapproximation, DistSome(v)) + push!(constructors_overapproximation, Opt.Some(Expr.T, v)) v end - e = tb_gen_expr(rs, p.size, p.ty_size, add_ctor) - STLCGeneration(DistSome(e), constructors_overapproximation) + e = tb_gen_expr(rs, p, p.size, 20, add_ctor) + STLCGeneration(Opt.Some(Expr.T, e), constructors_overapproximation) +end +function generation_params_emit_stats(rs::RunState, p::TypeBasedSTLCGenerator, s) + save_coq_generator(rs, p, s, typebased_stlc_to_coq) end ################################## @@ -643,13 +656,7 @@ function generate(rs::RunState, p::TypeBasedRBTGenerator) RBTGeneration(tb_gen_rbt(rs, p, p.size, Color.Black(), 10)) end function generation_params_emit_stats(rs::RunState, p::TypeBasedRBTGenerator, s) - path = joinpath(rs.out_dir, "$(s)_Generator.v") - open(path, "w") do file - vals = compute(rs.var_vals, values(rs.adnodes_of_interest)) - adnodes_vals = Dict(s => vals[adnode] for (s, adnode) in rs.adnodes_of_interest) - println(file, typebased_rbt_to_coq(p, adnodes_vals, rs.io)) - end - println_flush(rs.io, "Saved Coq generator to $(path)") + save_coq_generator(rs, p, s, typebased_rbt_to_coq) end ################################## @@ -685,6 +692,19 @@ function create_loss_manager(rs::RunState, p::SatisfyPropertyLoss, generation) # end end +struct STLCWellTyped <: Property{STLC} end +function check_property(::STLCWellTyped, e::Opt.T{Expr.T}) + @assert isdeterministic(e) + @match e [ + Some(e) -> (@match typecheck(e) [ + Some(_) -> true, + None() -> false, + ]), + None() -> false, + ] +end +name(::STLCWellTyped) = "stlcwelltyped" + struct BookkeepingInvariant <: Property{RBT} end check_property(::BookkeepingInvariant, t::ColorKVTree.T) = satisfies_bookkeeping_invariant(t) diff --git a/examples/qc/benchmarks/lib/lib.jl b/examples/qc/benchmarks/lib/lib.jl index 5af9ae63..76cb4bc1 100644 --- a/examples/qc/benchmarks/lib/lib.jl +++ b/examples/qc/benchmarks/lib/lib.jl @@ -18,6 +18,7 @@ include("lruset/generator.jl") include("stlc/dist.jl") include("stlc/generator.jl") include("stlc/to_coq.jl") +include("stlc/to_coq_tb.jl") include("bst/dist.jl") include("bst/generator.jl") include("rbt/dist.jl") diff --git a/examples/qc/benchmarks/lib/rbt/to_coq.jl b/examples/qc/benchmarks/lib/rbt/to_coq.jl index adf8d0ba..1d46d0b3 100644 --- a/examples/qc/benchmarks/lib/rbt/to_coq.jl +++ b/examples/qc/benchmarks/lib/rbt/to_coq.jl @@ -1,9 +1,5 @@ flatten = Iterators.flatten -function tocoq(i::Integer) - "$(i)" -end - function tocoq(c::Color.T) @match c [ Red() -> "R", diff --git a/examples/qc/benchmarks/lib/stlc/dist.jl b/examples/qc/benchmarks/lib/stlc/dist.jl index b3ad1b8e..e8476b3a 100644 --- a/examples/qc/benchmarks/lib/stlc/dist.jl +++ b/examples/qc/benchmarks/lib/stlc/dist.jl @@ -140,6 +140,80 @@ function get_error(ty) ty end +function opt_map(f, x::Tuple) + name, children = x + if name == :Some + e, = children + f(e) + elseif name == :None + nothing + else + error() + end +end + +function opt_map(f, x::Opt.T) + @match x [ + None() -> nothing, + Some(x) -> f(x), + ] +end + +function diff_test_typecheck(expr_dist, expr) + @assert isdeterministic(expr_dist) + opt_map(expr_dist) do expr_dist + opt_map(expr) do expr + ty1 = typecheck(expr) + ty2_dist = pr(typecheck(expr_dist)) + @assert length(ty2_dist) == 1 + ty2 = first(keys(ty2_dist)) + if error_ty(ty1) + @assert ty2 == (:None, []) + else + @assert ty2 == (:Some, [ty1]) "$ty1 $ty2" + end + end + end +end + +function to_int(x::DistUInt32) + dist = pr(x) + @assert length(dist) == 1 + first(keys(dist)) +end + +function typecheck(ast::Expr.T, gamma, depth=0)::Opt.T{Typ.T} + @match ast [ + Var(i) -> begin + var_depth = depth - to_int(i) - 1 + haskey(gamma, var_depth) || return Opt.None(Typ.T) + Opt.Some(gamma[var_depth]) + end, + Boolean(_) -> Opt.Some(Typ.TBool()), + Abs(t_in, e) -> begin + gamma′ = copy(gamma) + gamma′[depth] = t_in + Opt.map(Typ.T, typecheck(e, gamma′, depth + 1)) do t_out + Typ.TFun(t_in, t_out) + end + end, + App(e1, e2) -> begin + Opt.bind(Typ.T, typecheck(e1, gamma, depth)) do t1 + @match t1 [ + TBool() -> Opt.None(Typ.T), + TFun(t1_in, t1_out) -> Opt.bind(Typ.T, typecheck(e2, gamma, depth)) do t2 + if prob_equals(t1_in, t2) + Opt.Some(t1_out) + else + Opt.None(Typ.T) + end + end, + ] + end + end, + ] +end + function typecheck_opt(ast) name, children = ast if name == :Some @@ -159,7 +233,7 @@ end typecheck(ast) = typecheck(ast, Dict()) -function typecheck(ast, gamma, depth=0) +function typecheck(ast::Tuple, gamma, depth=0) name, children = ast if name == :Var i, = children @@ -196,3 +270,58 @@ function typecheck(ast, gamma, depth=0) error("Bad node $(name)") end end + +function eq_except_numbers(x::Typ.T, y::Typ.T) + @match x [ + TBool() -> (@match y [ + TBool() -> true, + TFun(_, _) -> false, + ]), + TFun(a1, b1) -> (@match y [ + TBool() -> false, + TFun(a2, b2) -> eq_except_numbers(a1, a2) & eq_except_numbers(b1, b2), + ]), + ] +end + +function eq_except_numbers(x::Expr.T, y::Expr.T) + @match x [ + Var(_) -> (@match y [ + Var(_) -> true, + Boolean(_) -> false, + App(_, _) -> false, + Abs(_, _) -> false, + ]), + Boolean(_) -> (@match y [ + Var(_) -> false, + Boolean(_) -> true, + App(_, _) -> false, + Abs(_, _) -> false, + ]), + App(f1, x1) -> (@match y [ + Var(_) -> false, + Boolean(_) -> false, + App(f2, x2) -> eq_except_numbers(f1, f2) & eq_except_numbers(x1, x2), + Abs(_, _) -> false, + ]), + Abs(ty1, e1) -> (@match y [ + Var(_) -> false, + Boolean(_) -> false, + App(_, _) -> false, + Abs(ty2, e2) -> eq_except_numbers(ty1, ty2) & eq_except_numbers(e1, e2), + ]), + ] +end + +function eq_except_numbers(x::Opt.T{T}, y::Opt.T{T}) where T + @match x [ + Some(xv) -> (@match y [ + Some(yv) -> eq_except_numbers(xv, yv), + None() -> false, + ]), + None() -> (@match y [ + Some(_) -> false, + None() -> true, + ]) + ] +end \ No newline at end of file diff --git a/examples/qc/benchmarks/lib/stlc/generator.jl b/examples/qc/benchmarks/lib/stlc/generator.jl index a2bc828d..68b3cfaa 100644 --- a/examples/qc/benchmarks/lib/stlc/generator.jl +++ b/examples/qc/benchmarks/lib/stlc/generator.jl @@ -92,45 +92,58 @@ function gen_expr(rs::RunState, env::Ctx, tau::Typ.T, sz::Integer, gen_typ_sz::I ) end -function tb_gen_expr(rs::RunState, sz::Integer, ty_sz, track_return) + +function tb_gen_expr(rs::RunState, p, size::Integer, last_callsite, track_return) + function get_dependent_dist(dependent) + if dependent == :size size + elseif dependent == :last_callsite last_callsite + else error() end + end + dependent_dists = [get_dependent_dist(d) for d in p.dependents] track_return( - if sz == 0 - @dice_ite if flip(register_weight!(rs, "sz$(sz)_pvar")) - DistVar(DistNat(0)) # really, this is arbitrary + if size == 0 + @dice_ite if flip_for(rs, "pvar", dependent_dists) + Expr.Var(DistNat(0)) # really, this is arbitrary else - DistBoolean(true) # really, this is arbitrary + Expr.Boolean(true) # really, this is arbitrary end else - sz′ = sz - 1 - frequency_for(rs, "sz$(sz)_freq", [ - DistVar(DistNat(0)), # really, this is arbitrary - DistBoolean(true), # really, this is arbitrary - begin - typ = tb_gen_type(rs, ty_sz) # TODO - e = tb_gen_expr(rs, sz′, ty_sz, track_return) - DistAbs(typ, e) + sz′ = size - 1 + frequency_for(rs, "freq", dependent_dists, [ + "var" => Expr.Var(DistNat(0)), # really, this is arbitrary + "boolean" => Expr.Boolean(true), # really, this is arbitrary + "abs" => begin + typ = tb_gen_type(rs, p, p.ty_size, 10) # TODO + e = tb_gen_expr(rs, p, sz′, 11, track_return) + Expr.Abs(typ, e) end, - begin - e1 = tb_gen_expr(rs, sz′, ty_sz, track_return) - e2 = tb_gen_expr(rs, sz′, ty_sz, track_return) - DistApp(e1, e2) + "app" => begin + e1 = tb_gen_expr(rs, p, sz′, 12, track_return) + e2 = tb_gen_expr(rs, p, sz′, 13, track_return) + Expr.App(e1, e2) end, ]) end ) end -function tb_gen_type(rs::RunState, sz::Integer) - if sz == 0 - DistTBool() +function tb_gen_type(rs::RunState, p, size::Integer, last_callsite) + function get_dependent_dist(dependent) + if dependent == :size size + elseif dependent == :last_callsite last_callsite + else error() end + end + dependent_dists = [get_dependent_dist(d) for d in p.ty_dependents] + if size == 0 + Typ.TBool() else - sz′ = sz - 1 - @dice_ite if flip(register_weight!(rs, "tysz$(sz)_ptbool")) - DistTBool() + sz′ = size - 1 + @dice_ite if flip_for(rs, "ptbool", dependent_dists) + Typ.TBool() else - ty1 = tb_gen_type(rs, sz′) - ty2 = tb_gen_type(rs, sz′) - DistTFun(ty1, ty2) + ty1 = tb_gen_type(rs, p, sz′, 14) + ty2 = tb_gen_type(rs, p, sz′, 15) + Typ.TFun(ty1, ty2) end end end \ No newline at end of file diff --git a/examples/qc/benchmarks/lib/stlc/to_coq.jl b/examples/qc/benchmarks/lib/stlc/to_coq.jl index 363974f6..5375fdb6 100644 --- a/examples/qc/benchmarks/lib/stlc/to_coq.jl +++ b/examples/qc/benchmarks/lib/stlc/to_coq.jl @@ -1,4 +1,4 @@ -function bespoke_stlc_to_coq(adnodes_of_interest) +function bespoke_stlc_to_coq(_p, adnodes_of_interest, _io) @assert issetequal(keys(adnodes_of_interest), ["sz1_succ_abs", "tysz2_gen_type_tbool", "sz3_succ_abs", "sz4_succ_var", "sz3_succ_app", "sz5_succ_app", "tysz1_gen_type_tbool", "sz0_zero_pr_var2", "sz2_succ_app", "sz4_succ_abs", "sz5_succ_var", "sz4_succ_app", "sz2_succ_abs", "sz5_succ_abs", "sz3_succ_var", "sz2_succ_var", "sz1_succ_var", "sz1_succ_app"]) w(s) = thousandths(adnodes_of_interest[s]) """ diff --git a/examples/qc/benchmarks/lib/stlc/to_coq_tb.jl b/examples/qc/benchmarks/lib/stlc/to_coq_tb.jl new file mode 100644 index 00000000..98e0a1de --- /dev/null +++ b/examples/qc/benchmarks/lib/stlc/to_coq_tb.jl @@ -0,0 +1,91 @@ +function typebased_stlc_to_coq(p, adnodes_vals, io) + expected_matchid(s) = s in ["pvar", "ptbool", "freq_var", "freq_boolean", "freq_abs", "freq_app"] + + matchid_to_cases = Dict() + for (name, val) in adnodes_vals + matchid, case = split(name, "%%") + @assert expected_matchid(matchid) + case = "(" * join([tocoq(eval(Meta.parse(x))) for x in split(case, "%")], ", ") * ")" + val = thousandths(val) + push!(get!(matchid_to_cases, matchid, []), (case, val)) + end + + function mk_match(dependents, matchid) + cases = matchid_to_cases[matchid] + cases = sort(cases) + if isnothing(dependents) + "500" + else + "match ($(join(map(string, dependents), ","))) with +$(join([" " ^ 9 * "| $(name) => $(w)" for (name, w) in cases], "\n")) + | _ => 500 + end" + end + end + + """ +From QuickChick Require Import QuickChick. Import QcNotation. +From Coq Require Import Bool ZArith List. Import ListNotations. +From ExtLib Require Import Monad. +From ExtLib.Data.Monads Require Import OptionMonad. +Import MonadNotation. + +From STLC Require Import Impl Spec. + +Fixpoint manual_gen_typ (size : nat) (last_callsite : nat) : G Typ := + match size with + | 0 => returnGen TBool + | S size' => + let weight_tbool := $(mk_match(p.ty_dependents, "ptbool")) in + freq [ (weight_tbool, returnGen TBool); + (1000 - weight_tbool, + bindGen (manual_gen_typ size' 14) + (fun p0 : Typ => + bindGen (manual_gen_typ size' 15) + (fun p1 : Typ => returnGen (TFun p0 p1))))] + end. + +Fixpoint manual_gen_expr (size : nat) (last_callsite : nat) : G Expr := + match size with + | 0 => + let weight_var := $(mk_match(p.dependents, "pvar")) in + freq [ (weight_var, bindGen arbitrary (fun p0 : nat => returnGen (Var p0))); + (1000 - weight_var, bindGen arbitrary (fun p0 : bool => returnGen (Bool p0)))] + | S size' => + let weight_var := $(mk_match(p.dependents, "freq_var")) in + let weight_boolean := $(mk_match(p.dependents, "freq_boolean")) in + let weight_abs := $(mk_match(p.dependents, "freq_abs")) in + let weight_app := $(mk_match(p.dependents, "freq_app")) in + freq [ (weight_var, + bindGen arbitrary (fun p0 : nat => returnGen (Var p0))); + (weight_boolean, bindGen arbitrary (fun p0 : bool => returnGen (Bool p0))); + (weight_abs, + bindGen (manual_gen_typ $(p.ty_size) 10) + (fun p0 : Typ => + bindGen (manual_gen_expr size' 11) + (fun p1 : Expr => returnGen (Abs p0 p1)))); + (weight_app, + bindGen (manual_gen_expr size' 12) + (fun p0 : Expr => + bindGen (manual_gen_expr size' 13) + (fun p1 : Expr => returnGen (App p0 p1))))] + end. + +#[global] +Instance genExpr : GenSized (Expr) := + {| arbitrarySized n := manual_gen_expr n 20 |}. + +Definition test_prop_SinglePreserve := + forAll arbitrary (fun (e: Expr) => + prop_SinglePreserve e). + +(*! QuickChick test_prop_SinglePreserve. *) + +Definition test_prop_MultiPreserve := + forAll arbitrary (fun (e: Expr) => + prop_MultiPreserve e). + +(*! QuickChick test_prop_MultiPreserve. *) + +""" +end diff --git a/examples/qc/benchmarks/lib/util.jl b/examples/qc/benchmarks/lib/util.jl index 803282ce..307614cf 100644 --- a/examples/qc/benchmarks/lib/util.jl +++ b/examples/qc/benchmarks/lib/util.jl @@ -73,18 +73,20 @@ function map_(::Type{RetT}) where RetT end end -function frequency(weights_xs) - weights, xs = [], [] - for (weight, x) in weights_xs - push!(weights, weight) - push!(xs,x) +function freq_flips(weights) + weight_sum = last(weights) + flips = Vector(undef, length(weights)) + for i in length(weights) - 1 : -1 : 1 + weight_sum += weights[i] + flips[i] = flip(weights[i] / weight_sum) end + flips +end +function freq_choose(xs, flips) res = last(xs) - weight_sum = last(weights) for i in length(xs) - 1 : -1 : 1 - weight_sum += weights[i] - res = @dice_ite if flip(weights[i] / weight_sum) + res = @dice_ite if flips[i] xs[i] else res @@ -93,16 +95,25 @@ function frequency(weights_xs) res end +function frequency(weights_xs) + weights, xs = [], [] + for (weight, x) in weights_xs + push!(weights, weight) + push!(xs,x) + end + freq_choose(xs, freq_flips(weights)) +end + function frequency_for(rs, name, xs) weights = [register_weight!(rs, "$(name)_$(i)") for i in 1:length(xs)] - frequency(collect(zip(xs, weights))) + frequency(collect(zip(weights, xs))) end function opt_stlc_str(ast) name, children = ast - if name == "None" + if name == :None "None" - elseif name == "Some" + elseif name == :Some ast′, = children stlc_str(ast′) else @@ -142,10 +153,13 @@ end function save_samples(rs, filename, e; n_samples=200) open(filename, "w") do file + a = ADComputer(rs.var_vals) for _ in 1:n_samples - expr = sample(rs.rng, e) + expr_dist = sample_as_dist(rs.rng, a, e) + expr = Dice.frombits(expr_dist, Dict()) + diff_test_typecheck(expr_dist, expr) println(file, opt_stlc_str(expr)) - typecheck_opt(expr) + # typecheck_opt(expr) end end println(rs.io, "Saved samples to $(filename).") @@ -234,9 +248,6 @@ println_loud(rs) = println_loud(rs, "") function flip_for(rs, name, dependents) res = nothing support = support_mixed(dependents; as_dist=true) - if isempty(support) - println(support) - end @assert !isempty(support) for dependents_vals in support t = join([string(x) for x in dependents_vals], "%") @@ -253,3 +264,38 @@ function flip_for(rs, name, dependents) end res end + +function frequency_for(rs, name, dependents, casenames_xs) + casenames = [] + xs = [] + for (casename, x) in casenames_xs + push!(casenames, casename) + push!(xs, x) + end + + res = nothing + support = support_mixed(dependents; as_dist=true) + @assert !isempty(support) + for dependents_vals in support + t = join([string(x) for x in dependents_vals], "%") + weights = [ + register_weight!(rs, "$(name)_$(casename)%%$(t)") + for casename in casenames + ] + v = frequency(collect(zip(weights, xs))) + if isnothing(res) + res = v + else + res = @dice_ite if prob_equals(dependents, dependents_vals) + v + else + res + end + end + end + res +end + +function tocoq(i::Integer) + "$(i)" +end diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index abc0091a..c72d5918 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -6,29 +6,27 @@ TAG = "v24_uniform" if isempty(ARGS) TAG = "test" as = ["-f"] - g_p = TypeBasedRBTGenerator( + g_p = TypeBasedSTLCGenerator( size=3, - leaf_dependents=[:size,:parent_color], - red_dependents=[:size,:parent_color], - num_dependents=[:size,:parent_color,:last_callsite], - intwidth=6, + ty_size=2, + dependents=[:size,:last_callsite], + ty_dependents=[:size,:last_callsite], ) lr = 0.01 fp = 0.01 l_p = [ - SamplingEntropy{RBT}( + SamplingEntropy{STLC}( resampling_frequency=1, samples_per_batch=200, - # property=TrueProperty{RBT}(), - property=MultipleInvariants([ - BookkeepingInvariant(), - BalanceInvariant(), - OrderInvariant(), - ]), + property=STLCWellTyped(), + # property=MultipleInvariants([ + # BookkeepingInvariant(), + # BalanceInvariant(), + # OrderInvariant(), + # ]), failure_penalty=fp, ignore_nums=true ) => lr, - MLELossConfig(RBTDepth(), Uniform()) => lr, ] push!(as, replace(string(g_p), " "=>"")) push!(as, replace(string(l_p), " "=>"")) From 64d2c3392588e21fb2a5a50110056adfc79f22cf Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 1 May 2024 13:46:33 -0700 Subject: [PATCH 124/231] main: tb stlc --- examples/qc/benchmarks/main.jl | 56 ++++++++++++++++++++++------------ examples/qc/benchmarks/tool.jl | 2 +- 2 files changed, 38 insertions(+), 20 deletions(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 563282b0..fee3e64e 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -1,19 +1,30 @@ include("benchmarks.jl") GENERATION_PARAMS_LIST = [ - TypeBasedRBTGenerator( + TypeBasedSTLCGenerator( size=5, - leaf_dependents=[:size,:parent_color,:last_callsite], - red_dependents=[:size,:parent_color,:last_callsite], - num_dependents=[:size,:parent_color,:last_callsite], - intwidth=6, - ), + ty_size=2, + dependents=[:size,:last_callsite], + ty_dependents=[:size,:last_callsite], + ) + # TypeBasedRBTGenerator( + # size=5, + # leaf_dependents=[:size,:parent_color,:last_callsite], + # red_dependents=[:size,:parent_color,:last_callsite], + # num_dependents=[:size,:parent_color,:last_callsite], + # intwidth=6, + # ), ] -LR_LIST = [0.0001, 0.0003, 0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1., 3., 10.] +LR_LIST = [0.0003, 0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1., 3.] FP_LIST = [0.] RESAMPLING_FREQUENCY_LIST = [2] -SAMPLES_PER_BATCH_LIST = [50, 200] -EPOCHS_LIST = [4_000] +SAMPLES_PER_BATCH_LIST = [50] +EPOCHS_LIST = [500] +IGNORE_NUMS_LIST = [true] + +n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST, IGNORE_NUMS_LIST])) +println(n_runs) +@assert n_runs <= 36 @show GENERATION_PARAMS_LIST @show LR_LIST @@ -21,31 +32,38 @@ EPOCHS_LIST = [4_000] @show RESAMPLING_FREQUENCY_LIST @show SAMPLES_PER_BATCH_LIST @show EPOCHS_LIST +@show IGNORE_NUMS_LIST println() LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ - SamplingEntropy{RBT}( + SamplingEntropy{STLC}( resampling_frequency=resampling_frequency, samples_per_batch=samples_per_batch, - # property=TrueProperty{RBT}(), - property=MultipleInvariants([ - BookkeepingInvariant(), - BalanceInvariant(), - OrderInvariant(), - ]), + property=STLCWellTyped(), failure_penalty=fp, ignore_nums=ignore_nums, - ) => 0.01, - MLELossConfig(RBTDepth(), Uniform()) => lr, + ) => lr, + # SamplingEntropy{RBT}( + # resampling_frequency=resampling_frequency, + # samples_per_batch=samples_per_batch, + # property=MultipleInvariants([ + # BookkeepingInvariant(), + # BalanceInvariant(), + # OrderInvariant(), + # ]), + # failure_penalty=fp, + # ignore_nums=ignore_nums, + # ) => 0.01, + # MLELossConfig(RBTDepth(), Uniform()) => lr, # SatisfyPropertyLoss(MultipleInvariants([BookkeepingInvariant(),BalanceInvariant()])) => lr, ] for lr in LR_LIST for fp in FP_LIST for resampling_frequency in RESAMPLING_FREQUENCY_LIST for samples_per_batch in SAMPLES_PER_BATCH_LIST - for ignore_nums in [false, true] + for ignore_nums in IGNORE_NUMS_LIST ), ])) diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index c72d5918..a7ef6702 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -1,6 +1,6 @@ include("benchmarks.jl") -TAG = "v24_uniform" +TAG = "v25_stlctb" ## PARSE ARGS if isempty(ARGS) From 339fd2537e7a1fdf07764512ea42a555da4d1466 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 1 May 2024 14:37:22 -0700 Subject: [PATCH 125/231] tb bst, tocoq, dependents --- examples/qc/benchmarks/benchmarks.jl | 25 +- examples/qc/benchmarks/lib/bst/dist.jl | 28 +++ examples/qc/benchmarks/lib/bst/generator.jl | 36 ++- examples/qc/benchmarks/lib/bst/to_coq.jl | 265 ++++++++++++++++++++ examples/qc/benchmarks/lib/lib.jl | 1 + examples/qc/benchmarks/tool.jl | 15 +- 6 files changed, 353 insertions(+), 17 deletions(-) create mode 100644 examples/qc/benchmarks/lib/bst/to_coq.jl diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 81f3c599..f8d77b45 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -191,7 +191,7 @@ function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) LogPr(prob_equals(m.val,sample)) end lpr_eq_expanded = Dice.expand_logprs(l, lpr_eq) - diff_test_typecheck(sample, Dice.frombits(sample, Dict())) + # diff_test_typecheck(sample, Dice.frombits(sample, Dict())) if m.consider(sample) num_meeting += 1 [lpr_eq_expanded * compute(a, lpr_eq_expanded), lpr_eq_expanded] @@ -550,13 +550,20 @@ end struct TypeBasedBSTGenerator <: GenerationParams{BST} size::Integer + leaf_dependents::Vector{Symbol} + num_dependents::Vector{Symbol} + intwidth::Integer end -TypeBasedBSTGenerator(; size) = TypeBasedBSTGenerator(size) +TypeBasedBSTGenerator(; size, leaf_dependents, num_dependents, intwidth) = + TypeBasedBSTGenerator(size, leaf_dependents, num_dependents, intwidth) function to_subpath(p::TypeBasedBSTGenerator) [ "bst", "typebased", "sz=$(p.size)", + "leaf_dependents=$(join(Base.map(string, p.leaf_dependents),"-"))", + "num_dependents=$(join(Base.map(string, p.num_dependents),"-"))", + "intwidth=$(p.intwidth)", ] end function generate(rs::RunState, p::TypeBasedBSTGenerator) @@ -565,9 +572,12 @@ function generate(rs::RunState, p::TypeBasedBSTGenerator) push!(constructors_overapproximation, v) v end - t = typebased_gen_tree(rs, p.size, add_ctor) + t = typebased_gen_tree(rs, p, p.size, 20, add_ctor) BSTGeneration(t, constructors_overapproximation) end +function generation_params_emit_stats(rs::RunState, p::TypeBasedBSTGenerator, s) + save_coq_generator(rs, p, s, typebased_bst_to_coq) +end ################################## # Approx BST constructor entropy loss @@ -705,6 +715,15 @@ function check_property(::STLCWellTyped, e::Opt.T{Expr.T}) end name(::STLCWellTyped) = "stlcwelltyped" + + +struct BSTOrderInvariant <: Property{BST} end +check_property(::BSTOrderInvariant, t::KVTree.T) = + satisfies_order_invariant(t) +name(::BSTOrderInvariant) = "order" + + + struct BookkeepingInvariant <: Property{RBT} end check_property(::BookkeepingInvariant, t::ColorKVTree.T) = satisfies_bookkeeping_invariant(t) diff --git a/examples/qc/benchmarks/lib/bst/dist.jl b/examples/qc/benchmarks/lib/bst/dist.jl index f3baf488..82658392 100644 --- a/examples/qc/benchmarks/lib/bst/dist.jl +++ b/examples/qc/benchmarks/lib/bst/dist.jl @@ -16,3 +16,31 @@ function ctor_to_id(ctor::KVTree.T) :Node => (_, _, _, _) -> bst_ctor_to_id[:Node] ]) end + +function satisfies_order_invariant(t::KVTree.T) + function helper(t, lo, hi) + @match t [ + Leaf() -> true, + Node(l, k, v, r) -> begin + (if isnothing(lo) true else lo < k end) & + (if isnothing(hi) true else k < hi end) & + helper(l, lo, k) & + helper(r, k, hi) + end + ] + end + helper(t, nothing, nothing) +end + +function eq_except_numbers(x::KVTree.T, y::KVTree.T) + @match x [ + Leaf() -> (@match y [ + Leaf() -> true, + Node(yl, yk, yv, yr) -> false, + ]), + Node(xl, xk, xv, xr) -> (@match y [ + Leaf() -> false, + Node(yl, yk, yv, yr) -> eq_except_numbers(xl, yl) & eq_except_numbers(xr, yr), + ]), + ] +end diff --git a/examples/qc/benchmarks/lib/bst/generator.jl b/examples/qc/benchmarks/lib/bst/generator.jl index 530c09f6..f5c885d2 100644 --- a/examples/qc/benchmarks/lib/bst/generator.jl +++ b/examples/qc/benchmarks/lib/bst/generator.jl @@ -43,18 +43,40 @@ function gen_tree_dummy_vals(rs, s::Integer, track_return) end -function typebased_gen_tree(rs, s::Integer, track_return) +function typebased_gen_tree(rs, p, size::Integer, last_callsite, track_return) + function dependent_to_val(dependent) + if dependent == :size size + elseif dependent == :last_callsite last_callsite + else error() end + end + function dependents_to_flip(name, dependents) + if isnothing(dependents) + flip(.5) + else + group = collect(Base.map(dependent_to_val, dependents)) + flip_for(rs, name, group) + end + end + track_return( - @dice_ite if s == 0 + @dice_ite if size == 0 KVTree.Leaf() else - s′ = s - 1 - if flip(register_weight!(rs, "sz$(s)")) + s′ = size - 1 + if dependents_to_flip("leaf", p.leaf_dependents) KVTree.Leaf() else - l = typebased_gen_tree(rs, s′, track_return) - r = typebased_gen_tree(rs, s′, track_return) - k = v = DistNat(0) # arbitrary + l = typebased_gen_tree(rs, p, s′, 10, track_return) + r = typebased_gen_tree(rs, p, s′, 11, track_return) + k = sum( + @dice_ite if dependents_to_flip("num$(n)", p.num_dependents) + DistUInt32(n) + else + DistUInt32(0) + end + for n in twopowers(p.intwidth) + ) + v = DistNat(0) # arbitrary KVTree.Node(l, k, v, r) end end diff --git a/examples/qc/benchmarks/lib/bst/to_coq.jl b/examples/qc/benchmarks/lib/bst/to_coq.jl new file mode 100644 index 00000000..e6e1a145 --- /dev/null +++ b/examples/qc/benchmarks/lib/bst/to_coq.jl @@ -0,0 +1,265 @@ +function typebased_bst_to_coq(p, adnodes_vals, io) + expected_matchid(s) = s in ["leaf", ["num$(n)" for n in twopowers(p.intwidth)]...] + + matchid_to_cases = Dict() + for (name, val) in adnodes_vals + matchid, case = split(name, "%%") + @assert expected_matchid(matchid) matchid + case = "(" * join([tocoq(eval(Meta.parse(x))) for x in split(case, "%")], ", ") * ")" + val = thousandths(val) + push!(get!(matchid_to_cases, matchid, []), (case, val)) + end + + function mk_match(dependents, matchid) + cases = matchid_to_cases[matchid] + cases = sort(cases) + if isnothing(dependents) + "500" + else + "match ($(join(map(string, dependents), ","))) with +$(join([" " ^ 9 * "| $(name) => $(w)" for (name, w) in cases], "\n")) + | _ => 500 + end" + end + end + + """ +From QuickChick Require Import QuickChick. Import QcNotation. +From Coq Require Import List. Import ListNotations. +From Coq Require Import ZArith. +From ExtLib Require Import Monad. +Import MonadNotation. + +From BST Require Import Impl. +From BST Require Import Spec. + +Fixpoint manual_gen_tree (size : nat) (last_callsite : nat) : G Tree := + match size with + | 0 => returnGen E + | S size' => + let weight_leaf := $(mk_match(p.leaf_dependents, "leaf")) in + freq [ + (1, + returnGen E); + (1, + bindGen (manual_gen_tree size' 10) + (fun p0 : Tree => +$( + join( + [" let weight_$(n) := $(mk_match(p.num_dependents, "num$(n)")) in" + for n in twopowers(p.intwidth)], + "\n" + ) +) +$( + join( + [ +"bindGen (freq [ (weight_$(n), returnGen $(n)); (1000-weight_$(n), returnGen 0)]) +(fun n$(n) : nat => " + for n in twopowers(p.intwidth)], + "\n" + ) +) +let p1 := $(join(["n$(n)" for n in twopowers(p.intwidth)], "+")) in + bindGen arbitrary + (fun p2 : nat => + bindGen (manual_gen_tree size' 11) + (fun p3 : Tree => returnGen (T p0 p1 p2 p3))) + $(")" ^ p.intwidth) + ))] + end. + +#[global] +Instance genTree : GenSized (Tree) := + {| arbitrarySized n := manual_gen_tree $(p.size) 20 |}. + +Definition manual_shrink_tree := + fun x : Tree => + let + fix aux_shrink (x' : Tree) : list Tree := + match x' with + | E => [] + | T p0 p1 p2 p3 => + ([p0] ++ + map (fun shrunk : Tree => T shrunk p1 p2 p3) (aux_shrink p0) ++ + []) ++ + (map (fun shrunk : nat => T p0 shrunk p2 p3) (shrink p1) ++ []) ++ + (map (fun shrunk : nat => T p0 p1 shrunk p3) (shrink p2) ++ []) ++ + ([p3] ++ + map (fun shrunk : Tree => T p0 p1 p2 shrunk) (aux_shrink p3) ++ + []) ++ [] + end in + aux_shrink x. + + +#[global] +Instance shrTree : Shrink (Tree) := + {| shrink x := manual_shrink_tree x |}. + +Definition test_prop_InsertValid := + forAll arbitrary (fun (t: Tree) => + forAll arbitrary (fun (k: nat) => + forAll arbitrary (fun (v: nat) => + prop_InsertValid t k v))) +. + +(*! QuickChick test_prop_InsertValid. *) + +Definition test_prop_DeleteValid := + forAll arbitrary (fun (t: Tree) => + forAll arbitrary (fun (k: nat) => + prop_DeleteValid t k)) +. + +(*! QuickChick test_prop_DeleteValid. *) + + +Definition test_prop_UnionValid := + forAll arbitrary (fun (t1: Tree) => + forAll arbitrary (fun (t2: Tree) => + prop_UnionValid t1 t2)) +. + +(*! QuickChick test_prop_UnionValid. *) + +Definition test_prop_InsertPost := + forAll arbitrary (fun (t: Tree) => + forAll arbitrary (fun (k: nat) => + forAll arbitrary (fun (k': nat) => + forAll arbitrary (fun (v: nat) => + prop_InsertPost t k k' v)))) +. + +(*! QuickChick test_prop_InsertPost. *) + +Definition test_prop_DeletePost := + forAll arbitrary (fun (t: Tree) => + forAll arbitrary (fun (k: nat) => + forAll arbitrary (fun (k': nat) => + prop_DeletePost t k k'))) +. + +(*! QuickChick test_prop_DeletePost. *) + +Definition test_prop_UnionPost := + forAll arbitrary (fun (t: Tree) => + forAll arbitrary (fun (t': Tree) => + forAll arbitrary (fun (k: nat) => + prop_UnionPost t t' k))) +. + +(*! QuickChick test_prop_UnionPost. *) + +Definition test_prop_InsertModel := + forAll arbitrary (fun (t: Tree) => + forAll arbitrary (fun (k: nat) => + forAll arbitrary (fun (v: nat) => + prop_InsertModel t k v))) +. + +(*! QuickChick test_prop_InsertModel. *) + +Definition test_prop_DeleteModel := + forAll arbitrary (fun (t: Tree) => + forAll arbitrary (fun (k: nat) => + prop_DeleteModel t k)) +. + +(*! QuickChick test_prop_DeleteModel. *) + +Definition test_prop_UnionModel := + forAll arbitrary (fun (t: Tree) => + forAll arbitrary (fun (t': Tree) => + prop_UnionModel t t')) +. + +(*! QuickChick test_prop_UnionModel. *) + +Definition test_prop_InsertInsert := + forAll arbitrary (fun (t: Tree) => + forAll arbitrary (fun (k: nat) => + forAll arbitrary (fun (k': nat) => + forAll arbitrary (fun (v: nat) => + forAll arbitrary (fun (v': nat) => + prop_InsertInsert t k k' v v'))))) +. + +(*! QuickChick test_prop_InsertInsert. *) + +Definition test_prop_InsertDelete := + forAll arbitrary (fun (t: Tree) => + forAll arbitrary (fun (k: nat) => + forAll arbitrary (fun (k': nat) => + forAll arbitrary (fun (v: nat) => + prop_InsertDelete t k k' v)))) +. + +(*! QuickChick test_prop_InsertDelete. *) + +Definition test_prop_InsertUnion := + forAll arbitrary (fun (t: Tree) => + forAll arbitrary (fun (t': Tree) => + forAll arbitrary (fun (k: nat) => + forAll arbitrary (fun (v: nat) => + prop_InsertUnion t t' k v)))) +. + +(*! QuickChick test_prop_InsertUnion. *) + +Definition test_prop_DeleteInsert := + forAll arbitrary (fun (t: Tree) => + forAll arbitrary (fun (k: nat) => + forAll arbitrary (fun (k': nat) => + forAll arbitrary (fun (v': nat) => + prop_DeleteInsert t k k' v')))) +. + +(*! QuickChick test_prop_DeleteInsert. *) + +Definition test_prop_DeleteDelete := + forAllShrink arbitrary shrink (fun (t: Tree) => + forAllShrink arbitrary shrink (fun (k: nat) => + forAllShrink arbitrary shrink (fun (k': nat) => + whenFail' (fun tt => show (t, k, k', delete k t, delete k' t, delete k (delete k' t), delete k' (delete k t))) + (prop_DeleteDelete t k k')))) +. + +(*! QuickChick test_prop_DeleteDelete. *) + +Definition test_prop_DeleteUnion := + forAll arbitrary (fun (t: Tree) => + forAll arbitrary (fun (t': Tree) => + forAll arbitrary (fun (k: nat) => + prop_DeleteUnion t t' k))) +. + +(*! QuickChick test_prop_DeleteUnion. *) + +Definition test_prop_UnionDeleteInsert := + forAll arbitrary (fun (t :Tree) => + forAll arbitrary (fun (t': Tree) => + forAll arbitrary (fun (k: nat) => + forAll arbitrary (fun (v: nat) => + prop_UnionDeleteInsert t t' k v)))) +. + +(*! QuickChick test_prop_UnionDeleteInsert. *) + +Definition test_prop_UnionUnionIdem := + forAll arbitrary (fun (t: Tree) => + prop_UnionUnionIdem t) +. + +(*! QuickChick test_prop_UnionUnionIdem. *) + +Definition test_prop_UnionUnionAssoc := + forAll arbitrary (fun (t1: Tree) => + forAll arbitrary (fun (t2: Tree) => + forAll arbitrary (fun (t3: Tree) => + prop_UnionUnionAssoc t1 t2 t3))) +. + +(*! QuickChick test_prop_UnionUnionAssoc. *) + +""" +end diff --git a/examples/qc/benchmarks/lib/lib.jl b/examples/qc/benchmarks/lib/lib.jl index 76cb4bc1..682e61f7 100644 --- a/examples/qc/benchmarks/lib/lib.jl +++ b/examples/qc/benchmarks/lib/lib.jl @@ -21,6 +21,7 @@ include("stlc/to_coq.jl") include("stlc/to_coq_tb.jl") include("bst/dist.jl") include("bst/generator.jl") +include("bst/to_coq.jl") include("rbt/dist.jl") include("rbt/generator.jl") include("rbt/to_coq.jl") diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index a7ef6702..7a1b9c47 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -1,24 +1,25 @@ include("benchmarks.jl") -TAG = "v25_stlctb" +TAG = "v26_bsttb" ## PARSE ARGS if isempty(ARGS) TAG = "test" as = ["-f"] - g_p = TypeBasedSTLCGenerator( + g_p = TypeBasedBSTGenerator( size=3, - ty_size=2, - dependents=[:size,:last_callsite], - ty_dependents=[:size,:last_callsite], + leaf_dependents=[:size,:last_callsite], + num_dependents=[:size,:last_callsite], + intwidth=6, ) lr = 0.01 fp = 0.01 l_p = [ - SamplingEntropy{STLC}( + SamplingEntropy{BST}( resampling_frequency=1, samples_per_batch=200, - property=STLCWellTyped(), + property=BSTOrderInvariant(), + # property=STLCWellTyped(), # property=MultipleInvariants([ # BookkeepingInvariant(), # BalanceInvariant(), From 01ab19e0a8754f994242d0806a6bbeb8ee417218 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 1 May 2024 23:15:56 -0700 Subject: [PATCH 126/231] stlc and bst: define gSized in to_coq --- examples/qc/benchmarks/lib/bst/to_coq.jl | 57 ++++++++++---------- examples/qc/benchmarks/lib/stlc/to_coq_tb.jl | 9 ++-- examples/qc/benchmarks/main.jl | 4 +- examples/qc/benchmarks/tool.jl | 11 +++- 4 files changed, 43 insertions(+), 38 deletions(-) diff --git a/examples/qc/benchmarks/lib/bst/to_coq.jl b/examples/qc/benchmarks/lib/bst/to_coq.jl index e6e1a145..c4b8a913 100644 --- a/examples/qc/benchmarks/lib/bst/to_coq.jl +++ b/examples/qc/benchmarks/lib/bst/to_coq.jl @@ -69,9 +69,8 @@ let p1 := $(join(["n$(n)" for n in twopowers(p.intwidth)], "+")) in ))] end. -#[global] -Instance genTree : GenSized (Tree) := - {| arbitrarySized n := manual_gen_tree $(p.size) 20 |}. +Definition gSized : G Tree := + manual_gen_tree $(p.size) 20. Definition manual_shrink_tree := fun x : Tree => @@ -97,7 +96,7 @@ Instance shrTree : Shrink (Tree) := {| shrink x := manual_shrink_tree x |}. Definition test_prop_InsertValid := - forAll arbitrary (fun (t: Tree) => + forAll gSized (fun (t: Tree) => forAll arbitrary (fun (k: nat) => forAll arbitrary (fun (v: nat) => prop_InsertValid t k v))) @@ -106,7 +105,7 @@ Definition test_prop_InsertValid := (*! QuickChick test_prop_InsertValid. *) Definition test_prop_DeleteValid := - forAll arbitrary (fun (t: Tree) => + forAll gSized (fun (t: Tree) => forAll arbitrary (fun (k: nat) => prop_DeleteValid t k)) . @@ -115,15 +114,15 @@ Definition test_prop_DeleteValid := Definition test_prop_UnionValid := - forAll arbitrary (fun (t1: Tree) => - forAll arbitrary (fun (t2: Tree) => + forAll gSized (fun (t1: Tree) => + forAll gSized (fun (t2: Tree) => prop_UnionValid t1 t2)) . (*! QuickChick test_prop_UnionValid. *) Definition test_prop_InsertPost := - forAll arbitrary (fun (t: Tree) => + forAll gSized (fun (t: Tree) => forAll arbitrary (fun (k: nat) => forAll arbitrary (fun (k': nat) => forAll arbitrary (fun (v: nat) => @@ -133,7 +132,7 @@ Definition test_prop_InsertPost := (*! QuickChick test_prop_InsertPost. *) Definition test_prop_DeletePost := - forAll arbitrary (fun (t: Tree) => + forAll gSized (fun (t: Tree) => forAll arbitrary (fun (k: nat) => forAll arbitrary (fun (k': nat) => prop_DeletePost t k k'))) @@ -142,8 +141,8 @@ Definition test_prop_DeletePost := (*! QuickChick test_prop_DeletePost. *) Definition test_prop_UnionPost := - forAll arbitrary (fun (t: Tree) => - forAll arbitrary (fun (t': Tree) => + forAll gSized (fun (t: Tree) => + forAll gSized (fun (t': Tree) => forAll arbitrary (fun (k: nat) => prop_UnionPost t t' k))) . @@ -151,7 +150,7 @@ Definition test_prop_UnionPost := (*! QuickChick test_prop_UnionPost. *) Definition test_prop_InsertModel := - forAll arbitrary (fun (t: Tree) => + forAll gSized (fun (t: Tree) => forAll arbitrary (fun (k: nat) => forAll arbitrary (fun (v: nat) => prop_InsertModel t k v))) @@ -160,7 +159,7 @@ Definition test_prop_InsertModel := (*! QuickChick test_prop_InsertModel. *) Definition test_prop_DeleteModel := - forAll arbitrary (fun (t: Tree) => + forAll gSized (fun (t: Tree) => forAll arbitrary (fun (k: nat) => prop_DeleteModel t k)) . @@ -168,15 +167,15 @@ Definition test_prop_DeleteModel := (*! QuickChick test_prop_DeleteModel. *) Definition test_prop_UnionModel := - forAll arbitrary (fun (t: Tree) => - forAll arbitrary (fun (t': Tree) => + forAll gSized (fun (t: Tree) => + forAll gSized (fun (t': Tree) => prop_UnionModel t t')) . (*! QuickChick test_prop_UnionModel. *) Definition test_prop_InsertInsert := - forAll arbitrary (fun (t: Tree) => + forAll gSized (fun (t: Tree) => forAll arbitrary (fun (k: nat) => forAll arbitrary (fun (k': nat) => forAll arbitrary (fun (v: nat) => @@ -187,7 +186,7 @@ Definition test_prop_InsertInsert := (*! QuickChick test_prop_InsertInsert. *) Definition test_prop_InsertDelete := - forAll arbitrary (fun (t: Tree) => + forAll gSized (fun (t: Tree) => forAll arbitrary (fun (k: nat) => forAll arbitrary (fun (k': nat) => forAll arbitrary (fun (v: nat) => @@ -197,8 +196,8 @@ Definition test_prop_InsertDelete := (*! QuickChick test_prop_InsertDelete. *) Definition test_prop_InsertUnion := - forAll arbitrary (fun (t: Tree) => - forAll arbitrary (fun (t': Tree) => + forAll gSized (fun (t: Tree) => + forAll gSized (fun (t': Tree) => forAll arbitrary (fun (k: nat) => forAll arbitrary (fun (v: nat) => prop_InsertUnion t t' k v)))) @@ -207,7 +206,7 @@ Definition test_prop_InsertUnion := (*! QuickChick test_prop_InsertUnion. *) Definition test_prop_DeleteInsert := - forAll arbitrary (fun (t: Tree) => + forAll gSized (fun (t: Tree) => forAll arbitrary (fun (k: nat) => forAll arbitrary (fun (k': nat) => forAll arbitrary (fun (v': nat) => @@ -217,7 +216,7 @@ Definition test_prop_DeleteInsert := (*! QuickChick test_prop_DeleteInsert. *) Definition test_prop_DeleteDelete := - forAllShrink arbitrary shrink (fun (t: Tree) => + forAllShrink gSized shrink (fun (t: Tree) => forAllShrink arbitrary shrink (fun (k: nat) => forAllShrink arbitrary shrink (fun (k': nat) => whenFail' (fun tt => show (t, k, k', delete k t, delete k' t, delete k (delete k' t), delete k' (delete k t))) @@ -227,8 +226,8 @@ Definition test_prop_DeleteDelete := (*! QuickChick test_prop_DeleteDelete. *) Definition test_prop_DeleteUnion := - forAll arbitrary (fun (t: Tree) => - forAll arbitrary (fun (t': Tree) => + forAll gSized (fun (t: Tree) => + forAll gSized (fun (t': Tree) => forAll arbitrary (fun (k: nat) => prop_DeleteUnion t t' k))) . @@ -236,8 +235,8 @@ Definition test_prop_DeleteUnion := (*! QuickChick test_prop_DeleteUnion. *) Definition test_prop_UnionDeleteInsert := - forAll arbitrary (fun (t :Tree) => - forAll arbitrary (fun (t': Tree) => + forAll gSized (fun (t :Tree) => + forAll gSized (fun (t': Tree) => forAll arbitrary (fun (k: nat) => forAll arbitrary (fun (v: nat) => prop_UnionDeleteInsert t t' k v)))) @@ -246,16 +245,16 @@ Definition test_prop_UnionDeleteInsert := (*! QuickChick test_prop_UnionDeleteInsert. *) Definition test_prop_UnionUnionIdem := - forAll arbitrary (fun (t: Tree) => + forAll gSized (fun (t: Tree) => prop_UnionUnionIdem t) . (*! QuickChick test_prop_UnionUnionIdem. *) Definition test_prop_UnionUnionAssoc := - forAll arbitrary (fun (t1: Tree) => - forAll arbitrary (fun (t2: Tree) => - forAll arbitrary (fun (t3: Tree) => + forAll gSized (fun (t1: Tree) => + forAll gSized (fun (t2: Tree) => + forAll gSized (fun (t3: Tree) => prop_UnionUnionAssoc t1 t2 t3))) . diff --git a/examples/qc/benchmarks/lib/stlc/to_coq_tb.jl b/examples/qc/benchmarks/lib/stlc/to_coq_tb.jl index 98e0a1de..a40d0560 100644 --- a/examples/qc/benchmarks/lib/stlc/to_coq_tb.jl +++ b/examples/qc/benchmarks/lib/stlc/to_coq_tb.jl @@ -71,18 +71,17 @@ Fixpoint manual_gen_expr (size : nat) (last_callsite : nat) : G Expr := (fun p1 : Expr => returnGen (App p0 p1))))] end. -#[global] -Instance genExpr : GenSized (Expr) := - {| arbitrarySized n := manual_gen_expr n 20 |}. +Definition gSized := + manual_gen_expr $(p.size) 20. Definition test_prop_SinglePreserve := - forAll arbitrary (fun (e: Expr) => + forAll gSized (fun (e: Expr) => prop_SinglePreserve e). (*! QuickChick test_prop_SinglePreserve. *) Definition test_prop_MultiPreserve := - forAll arbitrary (fun (e: Expr) => + forAll gSized (fun (e: Expr) => prop_MultiPreserve e). (*! QuickChick test_prop_MultiPreserve. *) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index fee3e64e..b763b776 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -18,8 +18,8 @@ GENERATION_PARAMS_LIST = [ LR_LIST = [0.0003, 0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1., 3.] FP_LIST = [0.] RESAMPLING_FREQUENCY_LIST = [2] -SAMPLES_PER_BATCH_LIST = [50] -EPOCHS_LIST = [500] +SAMPLES_PER_BATCH_LIST = [200] +EPOCHS_LIST = [2000] IGNORE_NUMS_LIST = [true] n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST, IGNORE_NUMS_LIST])) diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 7a1b9c47..db8717ae 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -1,17 +1,24 @@ include("benchmarks.jl") TAG = "v26_bsttb" +OUT_TOP_DIR = "/space/tjoa/tuning-output" ## PARSE ARGS if isempty(ARGS) TAG = "test" as = ["-f"] g_p = TypeBasedBSTGenerator( - size=3, + size=5, leaf_dependents=[:size,:last_callsite], num_dependents=[:size,:last_callsite], intwidth=6, ) + # g_p = TypeBasedSTLCGenerator( + # size=5, + # ty_size=2, + # dependents=[:size,:last_callsite], + # ty_dependents=[:size,:last_callsite], + # ) lr = 0.01 fp = 0.01 l_p = [ @@ -60,7 +67,7 @@ SEED = 0 out_dir = joinpath( vcat( - ["/space/tjoa/tuning-output"], + [OUT_TOP_DIR], [TAG], to_subpath(generation_params), vcat([ From a820d28f92a815c8738a4cbe3449f7e026066495 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 1 May 2024 23:16:02 -0700 Subject: [PATCH 127/231] bst and stlc stats --- stats/BST/height.csv | 4 + stats/BST/size.csv | 4 + stats/STLC/num_apps.csv | 6 ++ stats/STLC/sizeSTLC.csv | 6 ++ stats/height.csv | 6 -- stats/size.csv | 6 -- stats/stats.py | 186 +++++++++++++++++++++++++++++----------- 7 files changed, 157 insertions(+), 61 deletions(-) create mode 100644 stats/BST/height.csv create mode 100644 stats/BST/size.csv create mode 100644 stats/STLC/num_apps.csv create mode 100644 stats/STLC/sizeSTLC.csv delete mode 100644 stats/height.csv delete mode 100644 stats/size.csv diff --git a/stats/BST/height.csv b/stats/BST/height.csv new file mode 100644 index 00000000..52cf5f16 --- /dev/null +++ b/stats/BST/height.csv @@ -0,0 +1,4 @@ +height 0 0! 1 1! 2 2! 3 3! 4 4! 5 5! 6 6! +ManualTypeBasedGenerator.v 0.4926 0.0 0.132 0.0 0.031 0.0397 0.0063 0.0391 0.0004 0.032 0.0001 0.2268 0.0 0.0 +BespokeGenerator.v 0.1659 0.0 0.0398 0.0 0.0435 0.0 0.0588 0.0 0.1487 0.0 0.5433 0.0 0.0 0.0 +TypeBasedGenerator.v 0.5741 0.0 0.1645 0.0 0.0276 0.0653 0.0029 0.0611 0.0003 0.0461 0.0 0.0331 0.0 0.025 diff --git a/stats/BST/size.csv b/stats/BST/size.csv new file mode 100644 index 00000000..e11549d1 --- /dev/null +++ b/stats/BST/size.csv @@ -0,0 +1,4 @@ +size 0 0! 1 1! 2 2! 3 3! 4 4! 5 5! 6 6! 7 7! 8 8! 9 9! 10 10! 11 11! 12 12! 13 13! 14 14! 15 15! 16 16! 17 17! 18 18! 19 19! 20 20! 21 21! 22 22! 23 23! 24 24! 25 25! 26 26! 27 27! 28 28! +ManualTypeBasedGenerator.v 0.4958 0.0 0.1284 0.0 0.0302 0.031 0.0075 0.031 0.0008 0.0249 0.0006 0.045 0.0 0.0496 0.0 0.0332 0.0 0.0301 0.0 0.0258 0.0 0.0174 0.0 0.0158 0.0 0.0103 0.0 0.0065 0.0 0.005 0.0 0.0039 0.0 0.003 0.0 0.0018 0.0 0.0007 0.0 0.0007 0.0 0.0005 0.0 0.0002 0.0 0.0 0.0 0.0002 0.0 0.0001 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 +BespokeGenerator.v 0.1697 0.0 0.0408 0.0 0.0363 0.0 0.0384 0.0 0.0498 0.0 0.0618 0.0 0.0789 0.0 0.0757 0.0 0.0744 0.0 0.075 0.0 0.0752 0.0 0.0613 0.0 0.0504 0.0 0.0395 0.0 0.0307 0.0 0.0197 0.0 0.011 0.0 0.0056 0.0 0.0036 0.0 0.0015 0.0 0.0006 0.0 0.0001 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 +TypeBasedGenerator.v 0.5727 0.0 0.1571 0.0 0.0264 0.0461 0.0035 0.0526 0.0004 0.0297 0.0 0.0264 0.0 0.0202 0.0 0.0153 0.0 0.0112 0.0 0.0098 0.0 0.0055 0.0 0.0055 0.0 0.0044 0.0 0.0038 0.0 0.002 0.0 0.0015 0.0 0.0012 0.0 0.0013 0.0 0.0009 0.0 0.0005 0.0 0.0006 0.0 0.0004 0.0 0.0003 0.0 0.0002 0.0 0.0002 0.0 0.0001 0.0 0.0001 0.0 0.0 0.0 0.0001 diff --git a/stats/STLC/num_apps.csv b/stats/STLC/num_apps.csv new file mode 100644 index 00000000..69acc400 --- /dev/null +++ b/stats/STLC/num_apps.csv @@ -0,0 +1,6 @@ +num_apps 0 0! 1 1! 2 2! 3 3! 4 4! 5 5! 6 6! 7 7! 8 8! 9 9! 10 10! 11 11! 12 12! 13 13! 14 14! 15 15! 16 16! 17 17! 18 18! 19 19! 20 20! 21 21! 22 22! +BespokeGenerator.v 0.3921 0.0 0.0602 0.0 0.0379 0.0 0.0542 0.0 0.0593 0.0 0.056 0.0 0.0601 0.0 0.0516 0.0 0.0474 0.0 0.0397 0.0 0.0347 0.0 0.0305 0.0 0.0188 0.0 0.0177 0.0 0.0125 0.0 0.0088 0.0 0.0068 0.0 0.0043 0.0 0.0031 0.0 0.0025 0.0 0.0012 0.0 0.0004 0.0 0.0002 0.0 +ManualTypeBasedGenerator.v 0.3711 0.2926 0.0073 0.1462 0.0003 0.0709 0.0 0.0442 0.0 0.0303 0.0 0.0181 0.0 0.0094 0.0 0.0047 0.0 0.0027 0.0 0.0011 0.0 0.0006 0.0 0.0003 0.0 0.0001 0.0 0.0001 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 +TypeBasedGenerator.v 0.3994 0.3351 0.0044 0.1435 0.0 0.0568 0.0 0.0313 0.0 0.014 0.0 0.0079 0.0 0.0044 0.0 0.0014 0.0 0.0011 0.0 0.0004 0.0 0.0002 0.0 0.0001 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 +EntropyApproxBespokeGenerator.v 0.5472 0.0 0.0929 0.0 0.0572 0.0 0.0628 0.0 0.0538 0.0 0.0464 0.0 0.0374 0.0 0.0292 0.0 0.0256 0.0 0.0168 0.0 0.0112 0.0 0.0078 0.0 0.005 0.0 0.0031 0.0 0.0012 0.0 0.0009 0.0 0.0006 0.0 0.0002 0.0 0.0005 0.0 0.0001 0.0 0.0001 0.0 0.0 0.0 0.0 0.0 +Apps4321BespokeGenerator.v 0.3793 0.0 0.3336 0.0 0.1703 0.0 0.0715 0.0 0.0291 0.0 0.0118 0.0 0.0035 0.0 0.0008 0.0 0.0001 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 diff --git a/stats/STLC/sizeSTLC.csv b/stats/STLC/sizeSTLC.csv new file mode 100644 index 00000000..b46b63ba --- /dev/null +++ b/stats/STLC/sizeSTLC.csv @@ -0,0 +1,6 @@ +sizeSTLC 0 0! 1 1! 2 2! 3 3! 4 4! 5 5! 6 6! 7 7! 8 8! 9 9! 10 10! 11 11! 12 12! 13 13! 14 14! 15 15! 16 16! 17 17! 18 18! 19 19! 20 20! 21 21! 22 22! 23 23! 24 24! 25 25! 26 26! 27 27! 28 28! 29 29! 30 30! 31 31! 32 32! 33 33! 34 34! 35 35! 36 36! 37 37! 38 38! 39 39! 40 40! 41 41! 42 42! 43 43! 44 44! 45 45! 46 46! 47 47! 48 48! 49 49! 50 50! 51 51! 52 52! 53 53! 54 54! 55 55! 56 56! 57 57! 58 58! 59 59! 60 60! 61 61! 62 62! 63 63! 64 64! 65 65! 66 66! 67 67! 68 68! 69 69! 70 70! 71 71! 72 72! 73 73! 74 74! 75 75! 76 76! 77 77! 78 78! 79 79! 80 80! 81 81! 82 82! 83 83! 84 84! 85 85! 86 86! 87 87! 88 88! 89 89! 90 90! 91 91! 92 92! 93 93! +BespokeGenerator.v 0.0 0.0 0.2818 0.0 0.0875 0.0 0.0165 0.0 0.0368 0.0 0.0186 0.0 0.0069 0.0 0.0132 0.0 0.0091 0.0 0.0068 0.0 0.0141 0.0 0.0098 0.0 0.0102 0.0 0.0182 0.0 0.0118 0.0 0.0133 0.0 0.0207 0.0 0.014 0.0 0.0108 0.0 0.0177 0.0 0.0138 0.0 0.0145 0.0 0.0189 0.0 0.0137 0.0 0.0137 0.0 0.0176 0.0 0.013 0.0 0.0133 0.0 0.0159 0.0 0.0125 0.0 0.0119 0.0 0.0152 0.0 0.0111 0.0 0.0118 0.0 0.0126 0.0 0.0088 0.0 0.0095 0.0 0.0119 0.0 0.0088 0.0 0.0074 0.0 0.0123 0.0 0.0076 0.0 0.0076 0.0 0.0092 0.0 0.0068 0.0 0.0066 0.0 0.0064 0.0 0.0041 0.0 0.0045 0.0 0.0054 0.0 0.0038 0.0 0.0052 0.0 0.0045 0.0 0.0038 0.0 0.0036 0.0 0.0021 0.0 0.0027 0.0 0.0027 0.0 0.0029 0.0 0.0017 0.0 0.0021 0.0 0.0023 0.0 0.0023 0.0 0.002 0.0 0.0019 0.0 0.001 0.0 0.0012 0.0 0.0016 0.0 0.0012 0.0 0.0007 0.0 0.0007 0.0 0.0005 0.0 0.0008 0.0 0.0006 0.0 0.0003 0.0 0.0006 0.0 0.0003 0.0 0.0003 0.0 0.0002 0.0 0.0006 0.0 0.0003 0.0 0.0003 0.0 0.0003 0.0 0.0 0.0 0.0 0.0 0.0002 0.0 0.0002 0.0 0.0001 0.0 0.0001 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0001 0.0 +ManualTypeBasedGenerator.v 0.0 0.0 0.2527 0.2404 0.087 0.0462 0.0236 0.0679 0.0096 0.0429 0.0032 0.0422 0.002 0.0278 0.0009 0.0263 0.0005 0.0231 0.0 0.0199 0.0 0.0186 0.0 0.0162 0.0 0.0117 0.0 0.0091 0.0 0.0078 0.0 0.0063 0.0 0.003 0.0 0.0027 0.0 0.0023 0.0 0.0017 0.0 0.0016 0.0 0.001 0.0 0.0005 0.0 0.0003 0.0 0.0002 0.0 0.0003 0.0 0.0002 0.0 0.0001 0.0 0.0001 0.0 0.0001 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 +TypeBasedGenerator.v 0.0 0.0 0.2891 0.2824 0.0817 0.0407 0.0216 0.0867 0.0072 0.0469 0.0028 0.0335 0.0003 0.0249 0.0002 0.0213 0.0001 0.014 0.0 0.0103 0.0 0.0103 0.0 0.0068 0.0 0.0048 0.0 0.0039 0.0 0.0017 0.0 0.0019 0.0 0.0016 0.0 0.0012 0.0 0.0016 0.0 0.0009 0.0 0.0005 0.0 0.0003 0.0 0.0004 0.0 0.0001 0.0 0.0001 0.0 0.0001 0.0 0.0 0.0 0.0001 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 +EntropyApproxBespokeGenerator.v 0.0 0.0 0.3745 0.0 0.1292 0.0 0.0319 0.0 0.0443 0.0 0.0303 0.0 0.0189 0.0 0.0173 0.0 0.016 0.0 0.0164 0.0 0.0167 0.0 0.0181 0.0 0.0178 0.0 0.0154 0.0 0.0176 0.0 0.0165 0.0 0.0172 0.0 0.0152 0.0 0.0106 0.0 0.0149 0.0 0.0128 0.0 0.0136 0.0 0.0106 0.0 0.0106 0.0 0.0107 0.0 0.0092 0.0 0.0098 0.0 0.008 0.0 0.007 0.0 0.0066 0.0 0.005 0.0 0.0058 0.0 0.0051 0.0 0.0046 0.0 0.0053 0.0 0.0032 0.0 0.0042 0.0 0.0044 0.0 0.0027 0.0 0.0035 0.0 0.0023 0.0 0.0022 0.0 0.0013 0.0 0.0014 0.0 0.0018 0.0 0.0011 0.0 0.001 0.0 0.001 0.0 0.001 0.0 0.0012 0.0 0.0006 0.0 0.0003 0.0 0.0002 0.0 0.0006 0.0 0.0002 0.0 0.0004 0.0 0.0005 0.0 0.0002 0.0 0.0002 0.0 0.0001 0.0 0.0 0.0 0.0001 0.0 0.0002 0.0 0.0002 0.0 0.0001 0.0 0.0001 0.0 0.0001 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0001 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 +Apps4321BespokeGenerator.v 0.0 0.0 0.2418 0.0 0.0951 0.0 0.0293 0.0 0.1527 0.0 0.1017 0.0 0.0601 0.0 0.0692 0.0 0.0511 0.0 0.041 0.0 0.0345 0.0 0.0283 0.0 0.0241 0.0 0.0186 0.0 0.0123 0.0 0.0116 0.0 0.0079 0.0 0.0048 0.0 0.005 0.0 0.0029 0.0 0.0022 0.0 0.0016 0.0 0.0017 0.0 0.0006 0.0 0.0003 0.0 0.0008 0.0 0.0001 0.0 0.0002 0.0 0.0001 0.0 0.0002 0.0 0.0002 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 diff --git a/stats/height.csv b/stats/height.csv deleted file mode 100644 index 8d80243e..00000000 --- a/stats/height.csv +++ /dev/null @@ -1,6 +0,0 @@ -height 0 0! 1 1! 2 2! 3 3! 4 4! 5 5! 6 6! 7 7! 8 8! -BespokeGenerator.v 14286 0 3514 0 11917 0 18818 0 51465 0 0 0 0 0 0 0 0 0 -ManualTypeBased8Generator.v 50035 0 6192 0 139 0 1834 0 1190 0 786 0 524 0 349 0 35825 0 -NoRedRed8Generator.v 50044 0 6322 0 140 0 1840 0 1175 0 806 0 513 0 368 0 35786 0 -CondEntropy8Generator.v 17239 0 1990 0 4 0 135 0 30 0 6 0 3 0 0 0 80080 0 -TypeBasedGenerator.v 57159 0 16184 0 854 0 3 0 4675 0 3622 0 2890 0 0 0 0 0 diff --git a/stats/size.csv b/stats/size.csv deleted file mode 100644 index 079b17dc..00000000 --- a/stats/size.csv +++ /dev/null @@ -1,6 +0,0 @@ -size 0 0! 1 1! 2 2! 3 3! 4 4! 5 5! 6 6! 7 7! 8 8! 9 9! 10 10! 11 11! 12 12! 13 13! 14 14! 15 15! 16 16! 17 17! 18 18! 19 19! 20 20! 21 21! 22 22! 23 23! 24 24! 25 25! 26 26! 27 27! 28 28! 29 29! 30 30! 31 31! 32 32! 33 33! 34 34! 35 35! 36 36! 37 37! 38 38! 39 39! 40 40! 41 41! 42 42! 43 43! 44 44! 45 45! 46 46! 47 47! 48 48! 49 49! 50 50! 51 51! 52 52! 53 53! 54 54! 55 55! 56 56! 57 57! 58 58! 59 59! 60 60! 61 61! 62 62! 63 63! 64 64! 65 65! 66 66! 67 67! 68 68! 69 69! 70 70! 71 71! 72 72! 73 73! 74 74! 75 75! 76 76! 77 77! 78 78! 79 79! 80 80! 81 81! 82 82! 83 83! 84 84! 85 85! 86 86! 87 87! 88 88! 89 89! 90 90! 91 91! 92 92! 93 93! 94 94! 95 95! 96 96! 97 97! 98 98! 99 99! 100 100! 101 101! 102 102! 103 103! 104 104! 105 105! 106 106! 107 107! 108 108! 109 109! 110 110! 111 111! 112 112! 113 113! 114 114! 115 115! 116 116! 117 117! 118 118! 119 119! 120 120! 121 121! 122 122! 123 123! 124 124! 125 125! 126 126! 127 127! 128 128! 129 129! 130 130! 131 131! 132 132! 133 133! 134 134! 135 135! 136 136! 137 137! 138 138! 139 139! 140 140! 141 141! 142 142! 143 143! 144 144! 145 145! 146 146! 147 147! 148 148! 149 149! 150 150! 151 151! 152 152! 153 153! 154 154! 155 155! 156 156! 157 157! 158 158! 159 159! 160 160! 161 161! 162 162! 163 163! 164 164! 165 165! 166 166! 167 167! 168 168! 169 169! 170 170! 171 171! 172 172! 173 173! 174 174! 175 175! 176 176! 177 177! 178 178! 179 179! 180 180! 181 181! 182 182! 183 183! 184 184! 185 185! 186 186! 187 187! 188 188! 189 189! 190 190! 191 191! 192 192! 193 193! 194 194! 195 195! 196 196! 197 197! 198 198! 199 199! 200 200! 201 201! 202 202! 203 203! 204 204! 205 205! 206 206! 207 207! 208 208! 209 209! 210 210! 211 211! 212 212! 213 213! 214 214! 215 215! 216 216! 217 217! 218 218! 219 219! 220 220! 221 221! 222 222! 223 223! 224 224! 225 225! 226 226! 227 227! -BespokeGenerator.v 14286 0 3518 0 7209 0 4668 0 4501 0 7308 0 7715 0 9741 0 11712 0 10267 0 7232 0 5406 0 3831 0 1997 0 550 0 59 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -ManualTypeBased8Generator.v 50012 0 6230 0 1518 0 132 0 1306 0 737 0 595 0 466 0 347 0 338 0 459 0 666 0 870 0 852 0 910 0 928 0 926 0 987 0 955 0 967 0 959 0 1024 0 984 0 999 0 980 0 961 0 949 0 905 0 936 0 838 0 877 0 859 0 827 0 777 0 780 0 753 0 698 0 700 0 702 0 643 0 606 0 626 0 590 0 574 0 471 0 454 0 455 0 458 0 419 0 418 0 400 0 380 0 327 0 318 0 292 0 300 0 243 0 263 0 241 0 218 0 194 0 223 0 186 0 176 0 163 0 139 0 143 0 136 0 123 0 111 0 108 0 100 0 93 0 97 0 69 0 64 0 72 0 57 0 65 0 46 0 34 0 36 0 34 0 34 0 22 0 21 0 14 0 15 0 18 0 17 0 15 0 18 0 6 0 16 0 9 0 8 0 3 0 4 0 7 0 7 0 5 0 2 0 6 0 6 0 0 0 3 0 1 0 0 0 1 0 1 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -NoRedRed8Generator.v 49820 0 6328 0 1567 0 148 0 1361 0 715 0 598 0 487 0 329 0 313 0 437 0 703 0 854 0 849 0 899 0 899 0 951 0 1069 0 925 0 971 0 969 0 951 0 960 0 949 0 939 0 983 0 966 0 935 0 886 0 860 0 913 0 844 0 805 0 776 0 798 0 767 0 730 0 668 0 649 0 618 0 644 0 566 0 570 0 538 0 533 0 523 0 490 0 460 0 448 0 415 0 383 0 357 0 338 0 299 0 298 0 319 0 273 0 230 0 238 0 209 0 201 0 199 0 192 0 171 0 184 0 153 0 124 0 124 0 115 0 115 0 95 0 96 0 95 0 87 0 60 0 71 0 75 0 43 0 47 0 49 0 42 0 38 0 31 0 28 0 41 0 24 0 20 0 23 0 19 0 11 0 12 0 9 0 14 0 7 0 9 0 5 0 5 0 3 0 5 0 2 0 6 0 5 0 3 0 1 0 5 0 3 0 1 0 2 0 0 0 1 0 4 0 2 0 2 0 2 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -CondEntropy8Generator.v 17273 0 1964 0 484 0 4 0 48 0 15 0 7 0 7 0 8 0 9 0 6 0 27 0 37 0 32 0 30 0 40 0 59 0 76 0 79 0 99 0 81 0 78 0 85 0 90 0 113 0 137 0 150 0 160 0 162 0 173 0 184 0 188 0 192 0 217 0 201 0 199 0 201 0 201 0 215 0 253 0 282 0 275 0 277 0 323 0 327 0 316 0 365 0 344 0 355 0 371 0 383 0 405 0 405 0 390 0 402 0 404 0 424 0 383 0 409 0 429 0 447 0 438 0 435 0 453 0 451 0 479 0 508 0 510 0 552 0 562 0 535 0 618 0 605 0 585 0 657 0 623 0 620 0 569 0 610 0 679 0 622 0 602 0 610 0 633 0 661 0 667 0 658 0 672 0 647 0 656 0 650 0 657 0 682 0 685 0 692 0 639 0 676 0 723 0 656 0 644 0 690 0 701 0 668 0 651 0 624 0 650 0 661 0 640 0 648 0 683 0 691 0 681 0 692 0 640 0 675 0 739 0 715 0 654 0 657 0 687 0 684 0 725 0 738 0 620 0 739 0 669 0 715 0 701 0 672 0 688 0 675 0 680 0 667 0 708 0 640 0 652 0 715 0 659 0 695 0 570 0 628 0 548 0 620 0 570 0 606 0 578 0 532 0 563 0 531 0 537 0 506 0 547 0 502 0 478 0 452 0 481 0 454 0 425 0 419 0 401 0 388 0 395 0 355 0 403 0 336 0 350 0 323 0 305 0 293 0 287 0 265 0 251 0 253 0 218 0 201 0 246 0 207 0 187 0 168 0 174 0 169 0 175 0 123 0 109 0 130 0 120 0 109 0 95 0 97 0 84 0 64 0 82 0 52 0 46 0 56 0 41 0 42 0 43 0 25 0 26 0 37 0 20 0 19 0 21 0 18 0 17 0 10 0 6 0 6 0 5 0 11 0 7 0 3 0 7 0 4 0 1 0 2 0 1 0 3 0 1 0 2 0 0 0 3 0 0 0 0 0 0 0 0 0 1 0 -TypeBasedGenerator.v 57150 0 15975 0 799 0 84 0 2 0 2516 0 2016 0 1612 0 1128 0 927 0 667 0 536 0 380 0 306 0 252 0 167 0 123 0 101 0 71 0 41 0 50 0 36 0 17 0 24 0 8 0 9 0 11 0 3 0 4 0 6 0 4 0 1 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff --git a/stats/stats.py b/stats/stats.py index 88a9687a..d1a526f4 100755 --- a/stats/stats.py +++ b/stats/stats.py @@ -1,37 +1,107 @@ #!/usr/bin/env python import subprocess +import math import sys import os +from datetime import datetime from collections import Counter, defaultdict +from dataclasses import dataclass, field +from typing import List, Callable -STRAT_DIR = "/space/tjoa/etna/workloads/Coq/RBT/Strategies/" -OUT_DIR = "/space/tjoa/Dice.jl/stats" +WORKLOAD = "BST" +STRAT_DIR = f"/space/tjoa/etna/workloads/Coq/{WORKLOAD}/Strategies/" +OUT_DIR = f"/space/tjoa/Dice.jl/stats/{WORKLOAD}" +COQ_PROJECT_DIR = f"/space/tjoa/etna/workloads/Coq/{WORKLOAD}" NUM_TESTS = 10_000 -METRICS = ["size", "height"] - -# Put rows in this order and also assert that all these generators exist -ORDER = [ +ORDER_ONLY = False +ORDER = [ # Put rows in this order and also assert that these generators exist + "ManualTypeBasedGenerator.v", "BespokeGenerator.v", "TypeBasedGenerator.v", - "ManualTypeBased5Generator.v", - "CondEntropy5Generator.v", - "OrderGenerator.v", - "OrderIgnoreGenerator.v", - "NoRedRed5Generator.v", - "ManualTypeBased8Generator.v", - "CondEntropy8Generator.v", - "NoRedRed8Generator.v", ] + +@dataclass +class Workload: + type: str + generator: str + invariant_check: str + metrics: List[str] + extra_definitions: str + is_failing_generator: Callable[[str],bool] + +WORKLOADS = { + "STLC": Workload( + type="Expr", + generator="gSized", + invariant_check="isJust (mt %s)", + metrics=["sizeSTLC", "num_apps"], + extra_definitions=""" + Fixpoint num_apps (e: Expr) : nat := + match e with + | (Abs _ e) => num_apps e + | (App e1 e2) => 1 + num_apps e1 + num_apps e2 + | _ => 0 + end.""", + is_failing_generator=lambda filename: "Bespoke" in filename, + ), + "BST": Workload( + type="Tree", + generator="gSized", + invariant_check="isBST %s", + metrics=["size", "height"], + extra_definitions=""" + Fixpoint height (t: Tree) : nat := + match t with + | E => 0 + | T l k v r => 1 + max (height l) (height r) + end.""", + is_failing_generator=lambda filename: False, + ), + "RBT": Workload( + type="Tree", + generator="arbitrary", + invariant_check="isRBT %s", + metrics=["size", "height"], + extra_definitions=""" + Fixpoint height (t: Tree) : nat := + match t with + | E => 0 + | T c l k v r => 1 + max (height l) (height r) + end.""", + is_failing_generator=lambda filename: filename == "BespokeGenerator.v", + ), +} + + +workload = WORKLOADS[WORKLOAD] + def main(): + # List generators + generators = [ + filename + for filename in os.listdir(STRAT_DIR) + if filename.endswith("Generator.v") + and not (ORDER_ONLY and filename not in ORDER) + ] + for generator in ORDER: + assert generator in generators, generator + def key(generator): + if generator in ORDER: + return ORDER.index(generator) + else: + return math.inf + generators.sort(key=key) + + # Collect stats metric_to_generator_to_counts = defaultdict(lambda: defaultdict(dict)) - for filename in ORDER: - assert filename in os.listdir(STRAT_DIR) - for filename in os.listdir(STRAT_DIR): - if filename.endswith("Generator.v"): - generator_path = os.path.join(STRAT_DIR, filename) - print(f"Collecting stats for {filename}") - collect_stats(generator_path, filename, metric_to_generator_to_counts) + for generator in generators: + path = os.path.join(STRAT_DIR, generator) + print(f"Collecting stats for {generator}") + collect_stats(path, generator, metric_to_generator_to_counts) + + # Output stats + os.makedirs(OUT_DIR, exist_ok=True) for metric, generator_to_counts in metric_to_generator_to_counts.items(): max_val = max( n @@ -51,7 +121,7 @@ def main(): for valid in (True, False) ]) file.write(metric + '\t' + '\t'.join(val_names) + '\n') - for generator in [*ORDER, *[x for x in generator_to_counts if x not in ORDER]]: + for generator in generators: counts = generator_to_counts[generator] tokens = [generator] for val in vals: @@ -60,9 +130,9 @@ def main(): ) file.write('\t'.join(tokens) + "\n") -def readlines(path): +def read(path): with open(path) as f: - return '\n'.join(f.readlines()) + return f.read() def lines_between(s, start, end): active = False @@ -81,15 +151,16 @@ def lines_between(s, start, end): raise f"Did not find {start}" def collect_stats(path, filename, metric_to_generator_to_counts): - pgrm = readlines(path) - may_fail = filename == "BespokeGenerator.v" + pgrm = read(path) + pgrm += workload.extra_definitions + may_fail = workload.is_failing_generator(filename) if may_fail: pgrm += """ - Definition collect {A : Type} `{_ : Show A} (f : Tree -> A) : Checker := - forAll arbitrary (fun t => + Definition collect {A : Type} `{_ : Show A} (f : """ + workload.type + """ -> A) : Checker := + forAll """ + workload.generator + """ (fun (t : option """ + workload.type + """) => match t with | Some t => - if isRBT t then + if """ + (workload.invariant_check % "t") + """ then collect (append "valid " (show (f t))) true else collect (append "invalid " (show (f t))) true @@ -98,40 +169,57 @@ def collect_stats(path, filename, metric_to_generator_to_counts): end).""" else: pgrm += """ - Definition collect {A : Type} `{_ : Show A} (f : Tree -> A) : Checker := - forAll arbitrary (fun t => - if isRBT t then + Definition collect {A : Type} `{_ : Show A} (f : """ + workload.type + """ -> A) : Checker := + forAll """ + workload.generator + """ (fun (t : """ + workload.type + """) => + if """ + (workload.invariant_check % "t") + """ then collect (append "valid " (show (f t))) true else collect (append "invalid " (show (f t))) true ). """ - pgrm += f""" - Fixpoint height (t: Tree) : nat := - match t with - | E => 0 - | T c l k v r => 1 + max (height l) (height r) - end. - - Extract Constant Test.defNumTests => "{NUM_TESTS}". + pgrm += f"""\nExtract Constant Test.defNumTests => "{NUM_TESTS}".\n""" + for metric in workload.metrics: + pgrm += f"QuickChick (collect {metric}).\n" - QuickChick (collect size). - QuickChick (collect height). - """ - - cmd = ["coqtop", "-Q", ".", "RBT"] - os.chdir("/space/tjoa/etna/workloads/Coq/RBT") + os.chdir(COQ_PROJECT_DIR) + cmd = ["coqtop", "-Q", ".", WORKLOAD] p = subprocess.run( cmd, stdout=subprocess.PIPE, - stderr=subprocess.DEVNULL, - # stderr=sys.stderr, + stderr=subprocess.PIPE, input=pgrm, encoding="ascii", ) + + # Check for errors + def remove_junk(s): + return s.replace("Coq < ","").replace("dec_type < ","") + if any( + remove_junk(s).strip() + for s in p.stderr.split('\n') + ): + now = datetime.now().strftime("%Y_%m_%d__%H_%M_%S") + pgrm_dump = f"/tmp/program{now}.v" + with open(pgrm_dump, "w") as file: + file.write(pgrm) + print(f"Wrote program to {pgrm_dump}") + + print("STDERR =====") + last_line_blank = False + for s in p.stderr.split('\n'): + s = remove_junk(s) + # no double newlines + line_blank = len(s.strip()) == 0 + if not (line_blank and last_line_blank): + print(s) + last_line_blank = line_blank + + exit(1) + + assert p.returncode == 0 - for metric in METRICS: + for metric in workload.metrics: cts = {} for line in lines_between(p.stdout, f"QuickChecking (collect {metric})", "+++"): tokens = line.split(' ') From 48d7f906fc8f332fbe0b09271fb4b5123abf65ff Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 6 May 2024 13:37:13 -0700 Subject: [PATCH 128/231] cond ent takes eq, fix tbbst tocoq --- examples/qc/benchmarks/benchmarks.jl | 18 +++++----- examples/qc/benchmarks/lib/bst/to_coq.jl | 4 +-- examples/qc/benchmarks/lib/stlc/dist.jl | 15 ++++++++- examples/qc/benchmarks/main.jl | 27 +++++++++++---- examples/qc/benchmarks/tool.jl | 43 +++++++++++------------- 5 files changed, 65 insertions(+), 42 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index f8d77b45..7672204d 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -134,8 +134,8 @@ struct SamplingEntropy{T} <: LossConfig{T} resampling_frequency::Integer samples_per_batch::Integer property::Property{T} + eq::Symbol failure_penalty::Real - ignore_nums::Bool end mutable struct SamplingEntropyLossMgr <: LossMgr @@ -183,13 +183,13 @@ function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) ]))) num_meeting = 0 + f_eq = if m.p.eq == :eq_num_apps eq_num_apps + elseif m.p.eq == :eq_except_numbers eq_except_numbers + elseif m.p.eq == :prob_equals prob_equals + else error() end loss, actual_loss = sum( begin - lpr_eq = if m.p.ignore_nums - LogPr(eq_except_numbers(m.val, sample)) - else - LogPr(prob_equals(m.val,sample)) - end + lpr_eq = LogPr(f_eq(m.val, sample)) lpr_eq_expanded = Dice.expand_logprs(l, lpr_eq) # diff_test_typecheck(sample, Dice.frombits(sample, Dict())) if m.consider(sample) @@ -764,16 +764,16 @@ name(::TrueProperty{T}) where T = "trueproperty" # Sampling STLC entropy loss ################################## -function SamplingEntropy{T}(; resampling_frequency, samples_per_batch, property, failure_penalty, ignore_nums) where T - SamplingEntropy{T}(resampling_frequency, samples_per_batch, property, failure_penalty, ignore_nums) +function SamplingEntropy{T}(; resampling_frequency, samples_per_batch, property, eq, failure_penalty) where T + SamplingEntropy{T}(resampling_frequency, samples_per_batch, property, eq, failure_penalty) end to_subpath(p::SamplingEntropy) = [ "reinforce_sampling_entropy", "freq=$(p.resampling_frequency)-spb=$(p.samples_per_batch)", + "eq=$(string(p.eq))", "prop=$(name(p.property))", "failure_penalty=$(p.failure_penalty)", - "ignore_nums=$(p.ignore_nums)", ] function create_loss_manager(::RunState, p::SamplingEntropy{T}, g::Generation{T}) where T function consider(sample) diff --git a/examples/qc/benchmarks/lib/bst/to_coq.jl b/examples/qc/benchmarks/lib/bst/to_coq.jl index c4b8a913..df816d11 100644 --- a/examples/qc/benchmarks/lib/bst/to_coq.jl +++ b/examples/qc/benchmarks/lib/bst/to_coq.jl @@ -39,9 +39,9 @@ Fixpoint manual_gen_tree (size : nat) (last_callsite : nat) : G Tree := | S size' => let weight_leaf := $(mk_match(p.leaf_dependents, "leaf")) in freq [ - (1, + (weight_leaf, returnGen E); - (1, + (1000-weight_leaf, bindGen (manual_gen_tree size' 10) (fun p0 : Tree => $( diff --git a/examples/qc/benchmarks/lib/stlc/dist.jl b/examples/qc/benchmarks/lib/stlc/dist.jl index e8476b3a..5eabe4d0 100644 --- a/examples/qc/benchmarks/lib/stlc/dist.jl +++ b/examples/qc/benchmarks/lib/stlc/dist.jl @@ -324,4 +324,17 @@ function eq_except_numbers(x::Opt.T{T}, y::Opt.T{T}) where T None() -> true, ]) ] -end \ No newline at end of file +end + +function eq_num_apps(x::Opt.T{T}, y::Opt.T{T}) where T + @match x [ + Some(xv) -> (@match y [ + Some(yv) -> prob_equals(num_apps(xv), num_apps(yv)), + None() -> false, + ]), + None() -> (@match y [ + Some(_) -> false, + None() -> true, + ]) + ] +end diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index b763b776..f4155ae6 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -7,6 +7,12 @@ GENERATION_PARAMS_LIST = [ dependents=[:size,:last_callsite], ty_dependents=[:size,:last_callsite], ) + # TypeBasedBSTGenerator( + # size=5, + # leaf_dependents=[:size,:last_callsite], + # num_dependents=[:size,:last_callsite], + # intwidth=6, + # ) # TypeBasedRBTGenerator( # size=5, # leaf_dependents=[:size,:parent_color,:last_callsite], @@ -20,9 +26,9 @@ FP_LIST = [0.] RESAMPLING_FREQUENCY_LIST = [2] SAMPLES_PER_BATCH_LIST = [200] EPOCHS_LIST = [2000] -IGNORE_NUMS_LIST = [true] +EQ_LIST = [:prob_equals] -n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST, IGNORE_NUMS_LIST])) +n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST])) println(n_runs) @assert n_runs <= 36 @@ -32,19 +38,28 @@ println(n_runs) @show RESAMPLING_FREQUENCY_LIST @show SAMPLES_PER_BATCH_LIST @show EPOCHS_LIST -@show IGNORE_NUMS_LIST +@show EQ_LIST println() LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ + # MLELossConfig{STLC}(NumApps(), Linear()), SamplingEntropy{STLC}( resampling_frequency=resampling_frequency, samples_per_batch=samples_per_batch, - property=STLCWellTyped(), + property=TrueProperty{STLC}(), + # property=STLCWellTyped(), + eq=eq, failure_penalty=fp, - ignore_nums=ignore_nums, ) => lr, + # SamplingEntropy{BST}( + # resampling_frequency=resampling_frequency, + # samples_per_batch=samples_per_batch, + # property=BSTOrderInvariant(), + # eq=eq, + # failure_penalty=fp, + # ) => lr, # SamplingEntropy{RBT}( # resampling_frequency=resampling_frequency, # samples_per_batch=samples_per_batch, @@ -63,7 +78,7 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ for fp in FP_LIST for resampling_frequency in RESAMPLING_FREQUENCY_LIST for samples_per_batch in SAMPLES_PER_BATCH_LIST - for ignore_nums in IGNORE_NUMS_LIST + for eq in EQ_LIST ), ])) diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index db8717ae..b931c686 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -1,40 +1,35 @@ include("benchmarks.jl") -TAG = "v26_bsttb" +TAG = "v27_unifapps" OUT_TOP_DIR = "/space/tjoa/tuning-output" ## PARSE ARGS if isempty(ARGS) TAG = "test" as = ["-f"] - g_p = TypeBasedBSTGenerator( - size=5, - leaf_dependents=[:size,:last_callsite], - num_dependents=[:size,:last_callsite], - intwidth=6, - ) - # g_p = TypeBasedSTLCGenerator( + # g_p = TypeBasedBSTGenerator( # size=5, - # ty_size=2, - # dependents=[:size,:last_callsite], - # ty_dependents=[:size,:last_callsite], + # leaf_dependents=[:size,:last_callsite], + # num_dependents=[:size,:last_callsite], + # intwidth=6, # ) + g_p = TypeBasedSTLCGenerator( + size=5, + ty_size=2, + dependents=[:size,:last_callsite], + ty_dependents=[:size,:last_callsite], + ) lr = 0.01 fp = 0.01 l_p = [ - SamplingEntropy{BST}( - resampling_frequency=1, - samples_per_batch=200, - property=BSTOrderInvariant(), - # property=STLCWellTyped(), - # property=MultipleInvariants([ - # BookkeepingInvariant(), - # BalanceInvariant(), - # OrderInvariant(), - # ]), - failure_penalty=fp, - ignore_nums=true - ) => lr, + SamplingEntropy{STLC}( + resampling_frequency=1, + samples_per_batch=50, + property=STLCWellTyped(), + eq=:eq_num_apps, + failure_penalty=fp, + ) => lr, + # MLELossConfig{STLC}(NumApps(), Linear()) => lr, ] push!(as, replace(string(g_p), " "=>"")) push!(as, replace(string(l_p), " "=>"")) From 0df1b38794a73ec74ad5bb43f0d84269b2fff936 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 6 May 2024 22:15:49 -0700 Subject: [PATCH 129/231] learn stlc var nums --- examples/qc/benchmarks/benchmarks.jl | 4 +++- examples/qc/benchmarks/lib/stlc/generator.jl | 16 ++++++++++--- examples/qc/benchmarks/lib/stlc/to_coq_tb.jl | 24 ++++++++++++++++---- examples/qc/benchmarks/main.jl | 4 ++-- examples/qc/benchmarks/tool.jl | 7 +++--- 5 files changed, 42 insertions(+), 13 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 7672204d..724934ac 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -395,8 +395,9 @@ struct TypeBasedSTLCGenerator <: GenerationParams{STLC} ty_size::Integer dependents::Vector{Symbol} ty_dependents::Vector{Symbol} + intwidth::Integer end -TypeBasedSTLCGenerator(; size, ty_size, dependents, ty_dependents) = TypeBasedSTLCGenerator(size, ty_size, dependents, ty_dependents) +TypeBasedSTLCGenerator(; size, ty_size, dependents, ty_dependents, intwidth) = TypeBasedSTLCGenerator(size, ty_size, dependents, ty_dependents, intwidth) function to_subpath(p::TypeBasedSTLCGenerator) [ "stlc", @@ -404,6 +405,7 @@ function to_subpath(p::TypeBasedSTLCGenerator) "sz=$(p.size)-tysz=$(p.ty_size)", "dependents=$(join(Base.map(string, p.dependents),"-"))", "ty_dependents=$(join(Base.map(string, p.ty_dependents),"-"))", + "intwidth=$(p.intwidth)", ] end function generate(rs::RunState, p::TypeBasedSTLCGenerator) diff --git a/examples/qc/benchmarks/lib/stlc/generator.jl b/examples/qc/benchmarks/lib/stlc/generator.jl index 68b3cfaa..a261afbf 100644 --- a/examples/qc/benchmarks/lib/stlc/generator.jl +++ b/examples/qc/benchmarks/lib/stlc/generator.jl @@ -110,10 +110,20 @@ function tb_gen_expr(rs::RunState, p, size::Integer, last_callsite, track_return else sz′ = size - 1 frequency_for(rs, "freq", dependent_dists, [ - "var" => Expr.Var(DistNat(0)), # really, this is arbitrary - "boolean" => Expr.Boolean(true), # really, this is arbitrary + "var" => begin + n = sum( + @dice_ite if flip_for(rs, "num$(n)", dependent_dists) + DistUInt32(n) + else + DistUInt32(0) + end + for n in twopowers(p.intwidth) + ) + Expr.Var(n) + end, + "boolean" => Expr.Boolean(flip_for(rs, "ptrue", dependent_dists)), "abs" => begin - typ = tb_gen_type(rs, p, p.ty_size, 10) # TODO + typ = tb_gen_type(rs, p, p.ty_size, 10) e = tb_gen_expr(rs, p, sz′, 11, track_return) Expr.Abs(typ, e) end, diff --git a/examples/qc/benchmarks/lib/stlc/to_coq_tb.jl b/examples/qc/benchmarks/lib/stlc/to_coq_tb.jl index a40d0560..082bff31 100644 --- a/examples/qc/benchmarks/lib/stlc/to_coq_tb.jl +++ b/examples/qc/benchmarks/lib/stlc/to_coq_tb.jl @@ -1,5 +1,5 @@ function typebased_stlc_to_coq(p, adnodes_vals, io) - expected_matchid(s) = s in ["pvar", "ptbool", "freq_var", "freq_boolean", "freq_abs", "freq_app"] + expected_matchid(s) = s in ["pvar", "ptbool", "freq_var", "freq_boolean", "freq_abs", "freq_app", "ptrue", ["num$(n)" for n in twopowers(p.intwidth)]...] matchid_to_cases = Dict() for (name, val) in adnodes_vals @@ -56,9 +56,25 @@ Fixpoint manual_gen_expr (size : nat) (last_callsite : nat) : G Expr := let weight_boolean := $(mk_match(p.dependents, "freq_boolean")) in let weight_abs := $(mk_match(p.dependents, "freq_abs")) in let weight_app := $(mk_match(p.dependents, "freq_app")) in - freq [ (weight_var, - bindGen arbitrary (fun p0 : nat => returnGen (Var p0))); - (weight_boolean, bindGen arbitrary (fun p0 : bool => returnGen (Bool p0))); + freq [ + (weight_var, + +$( + join( + [" let weight_$(n) := $(mk_match(p.dependents, "num$(n)")) in + bindGen (freq [ (weight_$(n), returnGen $(n)); (1000-weight_$(n), returnGen 0)]) + (fun n$(n) : nat => " + for n in twopowers(p.intwidth)], + "\n" + ) +) + let p1 := $(join(["n$(n)" for n in twopowers(p.intwidth)], "+")) in + returnGen (Var p1)) + $(")" ^ p.intwidth); + (weight_boolean, + let weight_true := $(mk_match(p.dependents, "ptrue")) in + freq [ (weight_true, returnGen (Bool true)); (1000 - weight_true, returnGen (Bool false))] + ); (weight_abs, bindGen (manual_gen_typ $(p.ty_size) 10) (fun p0 : Typ => diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index f4155ae6..2c7404a0 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -6,6 +6,7 @@ GENERATION_PARAMS_LIST = [ ty_size=2, dependents=[:size,:last_callsite], ty_dependents=[:size,:last_callsite], + intwidth=6, ) # TypeBasedBSTGenerator( # size=5, @@ -48,8 +49,7 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ SamplingEntropy{STLC}( resampling_frequency=resampling_frequency, samples_per_batch=samples_per_batch, - property=TrueProperty{STLC}(), - # property=STLCWellTyped(), + property=STLCWellTyped(), eq=eq, failure_penalty=fp, ) => lr, diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index b931c686..15cb120f 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -1,6 +1,6 @@ include("benchmarks.jl") -TAG = "v27_unifapps" +TAG = "v28_stlc" OUT_TOP_DIR = "/space/tjoa/tuning-output" ## PARSE ARGS @@ -14,10 +14,11 @@ if isempty(ARGS) # intwidth=6, # ) g_p = TypeBasedSTLCGenerator( - size=5, + size=3, ty_size=2, dependents=[:size,:last_callsite], ty_dependents=[:size,:last_callsite], + intwidth=6, ) lr = 0.01 fp = 0.01 @@ -26,7 +27,7 @@ if isempty(ARGS) resampling_frequency=1, samples_per_batch=50, property=STLCWellTyped(), - eq=:eq_num_apps, + eq=:prob_equals, failure_penalty=fp, ) => lr, # MLELossConfig{STLC}(NumApps(), Linear()) => lr, From c5933889826aca75e5e82ad6065896ce07157550 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 8 May 2024 23:02:21 -0700 Subject: [PATCH 130/231] stacktail stlc --- examples/qc/benchmarks/benchmarks.jl | 7 +++-- examples/qc/benchmarks/lib/stlc/generator.jl | 21 ++++++------- examples/qc/benchmarks/lib/stlc/to_coq_tb.jl | 32 +++++++++++++------- examples/qc/benchmarks/lib/util.jl | 20 ++++++++++++ examples/qc/benchmarks/main.jl | 16 +++++++--- examples/qc/benchmarks/tool.jl | 7 +++-- 6 files changed, 72 insertions(+), 31 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 724934ac..4f17c0a6 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -395,9 +395,11 @@ struct TypeBasedSTLCGenerator <: GenerationParams{STLC} ty_size::Integer dependents::Vector{Symbol} ty_dependents::Vector{Symbol} + stack_size::Integer intwidth::Integer end -TypeBasedSTLCGenerator(; size, ty_size, dependents, ty_dependents, intwidth) = TypeBasedSTLCGenerator(size, ty_size, dependents, ty_dependents, intwidth) +TypeBasedSTLCGenerator(; size, ty_size, dependents, ty_dependents, stack_size, intwidth) = + TypeBasedSTLCGenerator(size, ty_size, dependents, ty_dependents, stack_size, intwidth) function to_subpath(p::TypeBasedSTLCGenerator) [ "stlc", @@ -405,6 +407,7 @@ function to_subpath(p::TypeBasedSTLCGenerator) "sz=$(p.size)-tysz=$(p.ty_size)", "dependents=$(join(Base.map(string, p.dependents),"-"))", "ty_dependents=$(join(Base.map(string, p.ty_dependents),"-"))", + "stack_size=$(p.stack_size)", "intwidth=$(p.intwidth)", ] end @@ -414,7 +417,7 @@ function generate(rs::RunState, p::TypeBasedSTLCGenerator) push!(constructors_overapproximation, Opt.Some(Expr.T, v)) v end - e = tb_gen_expr(rs, p, p.size, 20, add_ctor) + e = tb_gen_expr(rs, p, p.size, empty_stack(p), add_ctor) STLCGeneration(Opt.Some(Expr.T, e), constructors_overapproximation) end function generation_params_emit_stats(rs::RunState, p::TypeBasedSTLCGenerator, s) diff --git a/examples/qc/benchmarks/lib/stlc/generator.jl b/examples/qc/benchmarks/lib/stlc/generator.jl index a261afbf..d8ea7cd6 100644 --- a/examples/qc/benchmarks/lib/stlc/generator.jl +++ b/examples/qc/benchmarks/lib/stlc/generator.jl @@ -92,11 +92,10 @@ function gen_expr(rs::RunState, env::Ctx, tau::Typ.T, sz::Integer, gen_typ_sz::I ) end - -function tb_gen_expr(rs::RunState, p, size::Integer, last_callsite, track_return) +function tb_gen_expr(rs::RunState, p, size::Integer, stack_tail, track_return) function get_dependent_dist(dependent) if dependent == :size size - elseif dependent == :last_callsite last_callsite + elseif dependent == :stack_tail stack_tail else error() end end dependent_dists = [get_dependent_dist(d) for d in p.dependents] @@ -123,13 +122,13 @@ function tb_gen_expr(rs::RunState, p, size::Integer, last_callsite, track_return end, "boolean" => Expr.Boolean(flip_for(rs, "ptrue", dependent_dists)), "abs" => begin - typ = tb_gen_type(rs, p, p.ty_size, 10) - e = tb_gen_expr(rs, p, sz′, 11, track_return) + typ = tb_gen_type(rs, p, p.ty_size, update_stack_tail(p, stack_tail, 10)) + e = tb_gen_expr(rs, p, sz′, update_stack_tail(p, stack_tail, 11), track_return) Expr.Abs(typ, e) end, "app" => begin - e1 = tb_gen_expr(rs, p, sz′, 12, track_return) - e2 = tb_gen_expr(rs, p, sz′, 13, track_return) + e1 = tb_gen_expr(rs, p, sz′, update_stack_tail(p, stack_tail, 12), track_return) + e2 = tb_gen_expr(rs, p, sz′, update_stack_tail(p, stack_tail, 13), track_return) Expr.App(e1, e2) end, ]) @@ -137,10 +136,10 @@ function tb_gen_expr(rs::RunState, p, size::Integer, last_callsite, track_return ) end -function tb_gen_type(rs::RunState, p, size::Integer, last_callsite) +function tb_gen_type(rs::RunState, p, size::Integer, stack_tail) function get_dependent_dist(dependent) if dependent == :size size - elseif dependent == :last_callsite last_callsite + elseif dependent == :stack_tail stack_tail else error() end end dependent_dists = [get_dependent_dist(d) for d in p.ty_dependents] @@ -151,8 +150,8 @@ function tb_gen_type(rs::RunState, p, size::Integer, last_callsite) @dice_ite if flip_for(rs, "ptbool", dependent_dists) Typ.TBool() else - ty1 = tb_gen_type(rs, p, sz′, 14) - ty2 = tb_gen_type(rs, p, sz′, 15) + ty1 = tb_gen_type(rs, p, sz′, update_stack_tail(p, stack_tail, 14)) + ty2 = tb_gen_type(rs, p, sz′, update_stack_tail(p, stack_tail, 15)) Typ.TFun(ty1, ty2) end end diff --git a/examples/qc/benchmarks/lib/stlc/to_coq_tb.jl b/examples/qc/benchmarks/lib/stlc/to_coq_tb.jl index 082bff31..42fd1522 100644 --- a/examples/qc/benchmarks/lib/stlc/to_coq_tb.jl +++ b/examples/qc/benchmarks/lib/stlc/to_coq_tb.jl @@ -10,19 +10,29 @@ function typebased_stlc_to_coq(p, adnodes_vals, io) push!(get!(matchid_to_cases, matchid, []), (case, val)) end + function dependent_to_code(sym) + if sym == :stack_tail + "($(join(["stack$(i)" for i in 1:p.stack_size], ", ")))" + else + string(sym) + end + end + function mk_match(dependents, matchid) cases = matchid_to_cases[matchid] cases = sort(cases) if isnothing(dependents) "500" else - "match ($(join(map(string, dependents), ","))) with + "match ($(join(map(dependent_to_code, dependents), ","))) with $(join([" " ^ 9 * "| $(name) => $(w)" for (name, w) in cases], "\n")) | _ => 500 end" end end - + + stack_vars = ["(stack$(i) : nat)" for i in 1:p.stack_size] + update_stack_vars(loc) = join(stack_vars[2:end], " ") * " $(loc)" """ From QuickChick Require Import QuickChick. Import QcNotation. From Coq Require Import Bool ZArith List. Import ListNotations. @@ -32,20 +42,20 @@ Import MonadNotation. From STLC Require Import Impl Spec. -Fixpoint manual_gen_typ (size : nat) (last_callsite : nat) : G Typ := +Fixpoint manual_gen_typ (size : nat) $(join(stack_vars, " ")) : G Typ := match size with | 0 => returnGen TBool | S size' => let weight_tbool := $(mk_match(p.ty_dependents, "ptbool")) in freq [ (weight_tbool, returnGen TBool); (1000 - weight_tbool, - bindGen (manual_gen_typ size' 14) + bindGen (manual_gen_typ size' $(update_stack_vars(14))) (fun p0 : Typ => - bindGen (manual_gen_typ size' 15) + bindGen (manual_gen_typ size' $(update_stack_vars(15))) (fun p1 : Typ => returnGen (TFun p0 p1))))] end. -Fixpoint manual_gen_expr (size : nat) (last_callsite : nat) : G Expr := +Fixpoint manual_gen_expr (size : nat) $(join(stack_vars, " ")) : G Expr := match size with | 0 => let weight_var := $(mk_match(p.dependents, "pvar")) in @@ -76,19 +86,19 @@ $( freq [ (weight_true, returnGen (Bool true)); (1000 - weight_true, returnGen (Bool false))] ); (weight_abs, - bindGen (manual_gen_typ $(p.ty_size) 10) + bindGen (manual_gen_typ $(p.ty_size) $(update_stack_vars(10))) (fun p0 : Typ => - bindGen (manual_gen_expr size' 11) + bindGen (manual_gen_expr size' $(update_stack_vars(11))) (fun p1 : Expr => returnGen (Abs p0 p1)))); (weight_app, - bindGen (manual_gen_expr size' 12) + bindGen (manual_gen_expr size' $(update_stack_vars(12))) (fun p0 : Expr => - bindGen (manual_gen_expr size' 13) + bindGen (manual_gen_expr size' $(update_stack_vars(13))) (fun p1 : Expr => returnGen (App p0 p1))))] end. Definition gSized := - manual_gen_expr $(p.size) 20. + manual_gen_expr $(p.size)$(" 0" ^ p.stack_size). Definition test_prop_SinglePreserve := forAll gSized (fun (e: Expr) => diff --git a/examples/qc/benchmarks/lib/util.jl b/examples/qc/benchmarks/lib/util.jl index 307614cf..78335d60 100644 --- a/examples/qc/benchmarks/lib/util.jl +++ b/examples/qc/benchmarks/lib/util.jl @@ -1,3 +1,19 @@ +function empty_stack(p) + Tuple(0 for _ in 1:p.stack_size) +end + +function update_stack_tail(p, stack_tail, loc) + @assert loc != 0 + Tuple( + if i == p.stack_size + loc + else + stack_tail[i + 1] + end + for i in 1:p.stack_size + ) +end + function backtrack_for(rs, name, opts::Vector{Opt.T{T}})::Opt.T{T} where T first_some(T, shuffle_for(rs, name, opts)) end @@ -299,3 +315,7 @@ end function tocoq(i::Integer) "$(i)" end + +function tocoq(v::Tuple) + "($(join([tocoq(x) for x in v], ", ")))" +end diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 2c7404a0..873ea06b 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -1,13 +1,21 @@ include("benchmarks.jl") GENERATION_PARAMS_LIST = [ + # TypeBasedSTLCGenerator( + # size=5, + # ty_size=2, + # dependents=[:size,:last_callsite], + # ty_dependents=[:size,:last_callsite], + # intwidth=4, + # ), TypeBasedSTLCGenerator( size=5, ty_size=2, - dependents=[:size,:last_callsite], - ty_dependents=[:size,:last_callsite], + dependents=[:size,:stack_tail], + ty_dependents=[:size,:stack_tail], + stack_size=2, intwidth=6, - ) + ), # TypeBasedBSTGenerator( # size=5, # leaf_dependents=[:size,:last_callsite], @@ -22,7 +30,7 @@ GENERATION_PARAMS_LIST = [ # intwidth=6, # ), ] -LR_LIST = [0.0003, 0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1., 3.] +LR_LIST = [0.03, 0.1, 0.3] FP_LIST = [0.] RESAMPLING_FREQUENCY_LIST = [2] SAMPLES_PER_BATCH_LIST = [200] diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 15cb120f..1342d66f 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -1,6 +1,6 @@ include("benchmarks.jl") -TAG = "v28_stlc" +TAG = "v28_stlc_stack" OUT_TOP_DIR = "/space/tjoa/tuning-output" ## PARSE ARGS @@ -16,8 +16,9 @@ if isempty(ARGS) g_p = TypeBasedSTLCGenerator( size=3, ty_size=2, - dependents=[:size,:last_callsite], - ty_dependents=[:size,:last_callsite], + dependents=[:size,:stack_tail], + ty_dependents=[:size,:stack_tail], + stack_size=2, intwidth=6, ) lr = 0.01 From 96f4f02a8c7c12112e29513cf6cbefdc4fba0a53 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 8 May 2024 23:26:48 -0700 Subject: [PATCH 131/231] rbt stack --- examples/qc/benchmarks/benchmarks.jl | 8 +- examples/qc/benchmarks/lib/rbt/generator.jl | 23 ++--- examples/qc/benchmarks/lib/rbt/to_coq.jl | 93 +++++++++------------ examples/qc/benchmarks/main.jl | 65 +++++++------- examples/qc/benchmarks/tool.jl | 27 ++++-- 5 files changed, 108 insertions(+), 108 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 4f17c0a6..45c75cf4 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -652,10 +652,11 @@ struct TypeBasedRBTGenerator <: GenerationParams{RBT} leaf_dependents::Vector{Symbol} red_dependents::Vector{Symbol} num_dependents::Vector{Symbol} + stack_size::Integer intwidth::Integer end -TypeBasedRBTGenerator(; size, leaf_dependents, red_dependents, num_dependents, intwidth) = - TypeBasedRBTGenerator(size, leaf_dependents, red_dependents, num_dependents, intwidth) +TypeBasedRBTGenerator(; size, leaf_dependents, red_dependents, num_dependents, stack_size, intwidth) = + TypeBasedRBTGenerator(size, leaf_dependents, red_dependents, num_dependents, stack_size, intwidth) function to_subpath(p::TypeBasedRBTGenerator) [ "rbt", @@ -664,11 +665,12 @@ function to_subpath(p::TypeBasedRBTGenerator) "leaf_dependents=$(join(Base.map(string, p.leaf_dependents),"-"))", "red_dependents=$(join(Base.map(string, p.red_dependents),"-"))", "num_dependents=$(join(Base.map(string, p.num_dependents),"-"))", + "stack_size=$(p.stack_size)", "intwidth=$(p.intwidth)", ] end function generate(rs::RunState, p::TypeBasedRBTGenerator) - RBTGeneration(tb_gen_rbt(rs, p, p.size, Color.Black(), 10)) + RBTGeneration(tb_gen_rbt(rs, p, p.size, Color.Black(), empty_stack(p))) end function generation_params_emit_stats(rs::RunState, p::TypeBasedRBTGenerator, s) save_coq_generator(rs, p, s, typebased_rbt_to_coq) diff --git a/examples/qc/benchmarks/lib/rbt/generator.jl b/examples/qc/benchmarks/lib/rbt/generator.jl index beda4753..b2a0af1c 100644 --- a/examples/qc/benchmarks/lib/rbt/generator.jl +++ b/examples/qc/benchmarks/lib/rbt/generator.jl @@ -2,23 +2,18 @@ function twopowers(n) [2^(i-1) for i in 1:n] end -function tb_gen_rbt(rs, p, sz, parent_color, last_callsite) - function dependent_to_val(dependent) - if dependent == :size - sz - elseif dependent == :parent_color - parent_color - elseif dependent == :last_callsite - last_callsite - else - error() - end +function tb_gen_rbt(rs, p, sz, parent_color, stack_tail) + function get_dependent_dist(dependent) + if dependent == :size sz + elseif dependent == :parent_color parent_color + elseif dependent == :stack_tail stack_tail + else error() end end function dependents_to_flip(name, dependents) if isnothing(dependents) flip(.5) else - group = collect(Base.map(dependent_to_val, dependents)) + group = collect(Base.map(get_dependent_dist, dependents)) flip_for(rs, name, group) end end @@ -41,8 +36,8 @@ function tb_gen_rbt(rs, p, sz, parent_color, last_callsite) for n in twopowers(p.intwidth) ) v = DistInt32(0) - l = tb_gen_rbt(rs, p, sz - 1, color, 20) - r = tb_gen_rbt(rs, p, sz - 1, color, 30) + l = tb_gen_rbt(rs, p, sz - 1, color, update_stack_tail(p, stack_tail, 10)) + r = tb_gen_rbt(rs, p, sz - 1, color, update_stack_tail(p, stack_tail, 11)) ColorKVTree.Node(color, l, k, v, r) end end diff --git a/examples/qc/benchmarks/lib/rbt/to_coq.jl b/examples/qc/benchmarks/lib/rbt/to_coq.jl index 1d46d0b3..2243f7d2 100644 --- a/examples/qc/benchmarks/lib/rbt/to_coq.jl +++ b/examples/qc/benchmarks/lib/rbt/to_coq.jl @@ -8,39 +8,40 @@ function tocoq(c::Color.T) end function typebased_rbt_to_coq(p, adnodes_vals, io) - leaf_cases = [] - red_cases = [] - num_cases = Dict() + expected_matchid(s) = s in ["leaf", "red", ["num$(n)" for n in twopowers(p.intwidth)]...] + + matchid_to_cases = Dict() for (name, val) in adnodes_vals - codeloc, case = split(name, "%%") + matchid, case = split(name, "%%") + @assert expected_matchid(matchid) case = "(" * join([tocoq(eval(Meta.parse(x))) for x in split(case, "%")], ", ") * ")" val = thousandths(val) - if codeloc == "leaf" - push!(leaf_cases, (case, val)) - elseif codeloc == "red" - push!(red_cases, (case, val)) - elseif startswith(codeloc, "num") - n = parse(Int, codeloc[4:end]) - push!(get!(num_cases, n, []), (case, val)) + push!(get!(matchid_to_cases, matchid, []), (case, val)) + end + + function dependent_to_code(sym) + if sym == :stack_tail + "($(join(["stack$(i)" for i in 1:p.stack_size], ", ")))" else - error() + string(sym) end end - function mk_match(dependents, cases) + function mk_match(dependents, matchid) + cases = matchid_to_cases[matchid] cases = sort(cases) if isnothing(dependents) "500" else - "match ($(join(map(string, dependents), ","))) with + "match ($(join(map(dependent_to_code, dependents), ","))) with $(join([" " ^ 9 * "| $(name) => $(w)" for (name, w) in cases], "\n")) | _ => 500 end" end end - - red_match = mk_match(p.red_dependents, red_cases) - leaf_match = mk_match(p.leaf_dependents, leaf_cases) + + stack_vars = ["(stack$(i) : nat)" for i in 1:p.stack_size] + update_stack_vars(loc) = join(stack_vars[2:end], " ") * " $(loc)" """ Require Import ZArith. @@ -54,51 +55,39 @@ Import ListNotations. From RBT Require Import Impl Spec. -Definition manual_gen_tree := - fun s : nat => - (let - fix arb_aux (size : nat) (parent_color : Color) (last_callsite : nat) : G Tree := - let weight_red := $(red_match) in - let weight_leaf := $(leaf_match) in -$( - join( - [" let weight_$(n) := $(mk_match(p.num_dependents, num_cases[n])) in" - for n in twopowers(p.intwidth)], - "\n" - ) -) - match size with - | 0 => returnGen E - | S size' => - freq [ (weight_leaf, returnGen E); - (1000 - weight_leaf, - bindGen (freq [ (weight_red, returnGen R); (1000-weight_red, returnGen B)]) - (fun p0 : Color => - bindGen (arb_aux size' p0 20) - (fun p1 : Tree => - +Fixpoint manual_gen_tree (size : nat) (parent_color : Color) $(join(stack_vars, " ")) := + let weight_red := $(mk_match(p.red_dependents, "red")) in + let weight_leaf := $(mk_match(p.leaf_dependents, "leaf")) in + match size with + | 0 => returnGen E + | S size' => + freq [ (weight_leaf, returnGen E); + (1000 - weight_leaf, + bindGen (freq [ (weight_red, returnGen R); (1000-weight_red, returnGen B)]) + (fun p0 : Color => + bindGen (manual_gen_tree size' p0 $(update_stack_vars(10))) + (fun p1 : Tree => $( join( - [ -"bindGen (freq [ (weight_$(n), returnGen ($(n)%Z)); (1000-weight_$(n), returnGen 0%Z)]) -(fun n$(n) : Z => " + [" let weight_$(n) := $(mk_match(p.num_dependents, "num$(n)")) in + bindGen (freq [ (weight_$(n), returnGen ($(n)%Z)); (1000-weight_$(n), returnGen 0%Z)]) + (fun n$(n) : Z => " for n in twopowers(p.intwidth)], "\n" ) ) - bindGen arbitrary - (fun p3 : Z => let p2 := ($(join(["n$(n)" for n in twopowers(p.intwidth)], "+")))%Z in - bindGen (arb_aux size' p0 30) - (fun p4 : Tree => returnGen (T p0 p1 p2 p3 p4)) - $(")" ^ p.intwidth) - ))))] - end in - arb_aux) s. + bindGen arbitrary + (fun p3 : Z => + bindGen (manual_gen_tree size' p0 $(update_stack_vars(11))) + (fun p4 : Tree => returnGen (T p0 p1 p2 p3 p4)) + $(")" ^ p.intwidth) + ))))] + end. #[global] Instance genTree : GenSized (Tree) := - {| arbitrarySized n := manual_gen_tree $(p.size) B 10 |}. + {| arbitrarySized n := manual_gen_tree $(p.size) B$(" 0" ^ p.stack_size) |}. (* --------------------- Tests --------------------- *) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 873ea06b..08ceb6d3 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -8,27 +8,28 @@ GENERATION_PARAMS_LIST = [ # ty_dependents=[:size,:last_callsite], # intwidth=4, # ), - TypeBasedSTLCGenerator( - size=5, - ty_size=2, - dependents=[:size,:stack_tail], - ty_dependents=[:size,:stack_tail], - stack_size=2, - intwidth=6, - ), + # TypeBasedSTLCGenerator( + # size=5, + # ty_size=2, + # dependents=[:size,:stack_tail], + # ty_dependents=[:size,:stack_tail], + # stack_size=2, + # intwidth=6, + # ), # TypeBasedBSTGenerator( # size=5, # leaf_dependents=[:size,:last_callsite], # num_dependents=[:size,:last_callsite], # intwidth=6, # ) - # TypeBasedRBTGenerator( - # size=5, - # leaf_dependents=[:size,:parent_color,:last_callsite], - # red_dependents=[:size,:parent_color,:last_callsite], - # num_dependents=[:size,:parent_color,:last_callsite], - # intwidth=6, - # ), + TypeBasedRBTGenerator( + size=5, + leaf_dependents=[:size,:parent_color,:stack_tail], + red_dependents=[:size,:parent_color,:stack_tail], + num_dependents=[:size,:parent_color,:stack_tail], + stack_size=2, + intwidth=6, + ), ] LR_LIST = [0.03, 0.1, 0.3] FP_LIST = [0.] @@ -54,31 +55,31 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ # MLELossConfig{STLC}(NumApps(), Linear()), - SamplingEntropy{STLC}( - resampling_frequency=resampling_frequency, - samples_per_batch=samples_per_batch, - property=STLCWellTyped(), - eq=eq, - failure_penalty=fp, - ) => lr, - # SamplingEntropy{BST}( + # SamplingEntropy{STLC}( # resampling_frequency=resampling_frequency, # samples_per_batch=samples_per_batch, - # property=BSTOrderInvariant(), + # property=STLCWellTyped(), # eq=eq, # failure_penalty=fp, # ) => lr, - # SamplingEntropy{RBT}( + # SamplingEntropy{BST}( # resampling_frequency=resampling_frequency, # samples_per_batch=samples_per_batch, - # property=MultipleInvariants([ - # BookkeepingInvariant(), - # BalanceInvariant(), - # OrderInvariant(), - # ]), + # property=BSTOrderInvariant(), + # eq=eq, # failure_penalty=fp, - # ignore_nums=ignore_nums, - # ) => 0.01, + # ) => lr, + SamplingEntropy{RBT}( + resampling_frequency=resampling_frequency, + samples_per_batch=samples_per_batch, + property=MultipleInvariants([ + BookkeepingInvariant(), + BalanceInvariant(), + OrderInvariant(), + ]), + failure_penalty=fp, + eq=:prob_equals, + ) => 0.01, # MLELossConfig(RBTDepth(), Uniform()) => lr, # SatisfyPropertyLoss(MultipleInvariants([BookkeepingInvariant(),BalanceInvariant()])) => lr, ] diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 1342d66f..b874ebdb 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -1,6 +1,6 @@ include("benchmarks.jl") -TAG = "v28_stlc_stack" +TAG = "v29_rbt_stack" OUT_TOP_DIR = "/space/tjoa/tuning-output" ## PARSE ARGS @@ -13,21 +13,34 @@ if isempty(ARGS) # num_dependents=[:size,:last_callsite], # intwidth=6, # ) - g_p = TypeBasedSTLCGenerator( + # g_p = TypeBasedSTLCGenerator( + # size=3, + # ty_size=2, + # dependents=[:size,:stack_tail], + # ty_dependents=[:size,:stack_tail], + # stack_size=2, + # intwidth=6, + # ) + g_p = TypeBasedRBTGenerator( size=3, - ty_size=2, - dependents=[:size,:stack_tail], - ty_dependents=[:size,:stack_tail], + leaf_dependents=[:size,:parent_color,:stack_tail], + red_dependents=[:size,:parent_color,:stack_tail], + num_dependents=[:size,:parent_color,:stack_tail], stack_size=2, intwidth=6, ) lr = 0.01 fp = 0.01 l_p = [ - SamplingEntropy{STLC}( + SamplingEntropy{RBT}( resampling_frequency=1, samples_per_batch=50, - property=STLCWellTyped(), + # property=STLCWellTyped(), + property=MultipleInvariants([ + BookkeepingInvariant(), + BalanceInvariant(), + OrderInvariant(), + ]), eq=:prob_equals, failure_penalty=fp, ) => lr, From 7746953a1625c471bc78d619d31bddd656781b3c Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Fri, 10 May 2024 11:36:04 -0700 Subject: [PATCH 132/231] stats: cformat, print path --- stats/cformat.py | 19 +++++++++++++++++++ stats/stats.py | 19 ++++++++++--------- 2 files changed, 29 insertions(+), 9 deletions(-) create mode 100644 stats/cformat.py diff --git a/stats/cformat.py b/stats/cformat.py new file mode 100644 index 00000000..deaf1b8f --- /dev/null +++ b/stats/cformat.py @@ -0,0 +1,19 @@ +def num_to_col(i): + l, r = divmod(i, 26) + l = '' if l == 0 else chr(ord('A') + l - 1) + r = chr(ord('A') + r) + return l + r + +i = 1 +green_cols = [] +red_cols = [] +while True: + col = num_to_col(i) + cols = green_cols if i % 2 == 1 else red_cols + cols.append(f"{col}2:{col}1000") + if col == "GU": + break + i += 1 + +print(','.join(green_cols)) +print(','.join(red_cols)) diff --git a/stats/stats.py b/stats/stats.py index d1a526f4..5e7bd396 100755 --- a/stats/stats.py +++ b/stats/stats.py @@ -8,19 +8,18 @@ from dataclasses import dataclass, field from typing import List, Callable -WORKLOAD = "BST" +WORKLOAD = "RBT" +ORDER_ONLY = True +ORDER = [ # Put rows in this order and also assert that these generators exist + # "EntropyGenerator.v", + "ConsiderStack3Generator.v", +] + STRAT_DIR = f"/space/tjoa/etna/workloads/Coq/{WORKLOAD}/Strategies/" OUT_DIR = f"/space/tjoa/Dice.jl/stats/{WORKLOAD}" COQ_PROJECT_DIR = f"/space/tjoa/etna/workloads/Coq/{WORKLOAD}" NUM_TESTS = 10_000 -ORDER_ONLY = False -ORDER = [ # Put rows in this order and also assert that these generators exist - "ManualTypeBasedGenerator.v", - "BespokeGenerator.v", - "TypeBasedGenerator.v", -] - @dataclass class Workload: type: str @@ -114,7 +113,8 @@ def key(generator): for n, valid in counts.keys() ) assert min_val >= 0 - with open(os.path.join(OUT_DIR, f"{metric}.csv"), "w") as file: + file_path = os.path.join(OUT_DIR, f"{metric}.csv") + with open(file_path, "w") as file: val_names, vals = zip(*[ (f"{v}" if valid else f"{v}!", (v, valid)) for v in range(0, max_val + 1) @@ -129,6 +129,7 @@ def key(generator): str(counts.get(val, 0) / NUM_TESTS) ) file.write('\t'.join(tokens) + "\n") + print(f"Write to {file_path}") def read(path): with open(path) as f: From 7613dc0d4def742a6970842354cd9f23d2d88795 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Fri, 10 May 2024 11:39:21 -0700 Subject: [PATCH 133/231] gitignore stats --- stats/.gitignore | 3 +++ stats/BST/height.csv | 4 ---- stats/BST/size.csv | 4 ---- stats/STLC/num_apps.csv | 6 ------ stats/STLC/sizeSTLC.csv | 6 ------ 5 files changed, 3 insertions(+), 20 deletions(-) create mode 100644 stats/.gitignore delete mode 100644 stats/BST/height.csv delete mode 100644 stats/BST/size.csv delete mode 100644 stats/STLC/num_apps.csv delete mode 100644 stats/STLC/sizeSTLC.csv diff --git a/stats/.gitignore b/stats/.gitignore new file mode 100644 index 00000000..f5b2ea2a --- /dev/null +++ b/stats/.gitignore @@ -0,0 +1,3 @@ +STLC/ +BST/ +RBT/ \ No newline at end of file diff --git a/stats/BST/height.csv b/stats/BST/height.csv deleted file mode 100644 index 52cf5f16..00000000 --- a/stats/BST/height.csv +++ /dev/null @@ -1,4 +0,0 @@ -height 0 0! 1 1! 2 2! 3 3! 4 4! 5 5! 6 6! -ManualTypeBasedGenerator.v 0.4926 0.0 0.132 0.0 0.031 0.0397 0.0063 0.0391 0.0004 0.032 0.0001 0.2268 0.0 0.0 -BespokeGenerator.v 0.1659 0.0 0.0398 0.0 0.0435 0.0 0.0588 0.0 0.1487 0.0 0.5433 0.0 0.0 0.0 -TypeBasedGenerator.v 0.5741 0.0 0.1645 0.0 0.0276 0.0653 0.0029 0.0611 0.0003 0.0461 0.0 0.0331 0.0 0.025 diff --git a/stats/BST/size.csv b/stats/BST/size.csv deleted file mode 100644 index e11549d1..00000000 --- a/stats/BST/size.csv +++ /dev/null @@ -1,4 +0,0 @@ -size 0 0! 1 1! 2 2! 3 3! 4 4! 5 5! 6 6! 7 7! 8 8! 9 9! 10 10! 11 11! 12 12! 13 13! 14 14! 15 15! 16 16! 17 17! 18 18! 19 19! 20 20! 21 21! 22 22! 23 23! 24 24! 25 25! 26 26! 27 27! 28 28! -ManualTypeBasedGenerator.v 0.4958 0.0 0.1284 0.0 0.0302 0.031 0.0075 0.031 0.0008 0.0249 0.0006 0.045 0.0 0.0496 0.0 0.0332 0.0 0.0301 0.0 0.0258 0.0 0.0174 0.0 0.0158 0.0 0.0103 0.0 0.0065 0.0 0.005 0.0 0.0039 0.0 0.003 0.0 0.0018 0.0 0.0007 0.0 0.0007 0.0 0.0005 0.0 0.0002 0.0 0.0 0.0 0.0002 0.0 0.0001 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -BespokeGenerator.v 0.1697 0.0 0.0408 0.0 0.0363 0.0 0.0384 0.0 0.0498 0.0 0.0618 0.0 0.0789 0.0 0.0757 0.0 0.0744 0.0 0.075 0.0 0.0752 0.0 0.0613 0.0 0.0504 0.0 0.0395 0.0 0.0307 0.0 0.0197 0.0 0.011 0.0 0.0056 0.0 0.0036 0.0 0.0015 0.0 0.0006 0.0 0.0001 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -TypeBasedGenerator.v 0.5727 0.0 0.1571 0.0 0.0264 0.0461 0.0035 0.0526 0.0004 0.0297 0.0 0.0264 0.0 0.0202 0.0 0.0153 0.0 0.0112 0.0 0.0098 0.0 0.0055 0.0 0.0055 0.0 0.0044 0.0 0.0038 0.0 0.002 0.0 0.0015 0.0 0.0012 0.0 0.0013 0.0 0.0009 0.0 0.0005 0.0 0.0006 0.0 0.0004 0.0 0.0003 0.0 0.0002 0.0 0.0002 0.0 0.0001 0.0 0.0001 0.0 0.0 0.0 0.0001 diff --git a/stats/STLC/num_apps.csv b/stats/STLC/num_apps.csv deleted file mode 100644 index 69acc400..00000000 --- a/stats/STLC/num_apps.csv +++ /dev/null @@ -1,6 +0,0 @@ -num_apps 0 0! 1 1! 2 2! 3 3! 4 4! 5 5! 6 6! 7 7! 8 8! 9 9! 10 10! 11 11! 12 12! 13 13! 14 14! 15 15! 16 16! 17 17! 18 18! 19 19! 20 20! 21 21! 22 22! -BespokeGenerator.v 0.3921 0.0 0.0602 0.0 0.0379 0.0 0.0542 0.0 0.0593 0.0 0.056 0.0 0.0601 0.0 0.0516 0.0 0.0474 0.0 0.0397 0.0 0.0347 0.0 0.0305 0.0 0.0188 0.0 0.0177 0.0 0.0125 0.0 0.0088 0.0 0.0068 0.0 0.0043 0.0 0.0031 0.0 0.0025 0.0 0.0012 0.0 0.0004 0.0 0.0002 0.0 -ManualTypeBasedGenerator.v 0.3711 0.2926 0.0073 0.1462 0.0003 0.0709 0.0 0.0442 0.0 0.0303 0.0 0.0181 0.0 0.0094 0.0 0.0047 0.0 0.0027 0.0 0.0011 0.0 0.0006 0.0 0.0003 0.0 0.0001 0.0 0.0001 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -TypeBasedGenerator.v 0.3994 0.3351 0.0044 0.1435 0.0 0.0568 0.0 0.0313 0.0 0.014 0.0 0.0079 0.0 0.0044 0.0 0.0014 0.0 0.0011 0.0 0.0004 0.0 0.0002 0.0 0.0001 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -EntropyApproxBespokeGenerator.v 0.5472 0.0 0.0929 0.0 0.0572 0.0 0.0628 0.0 0.0538 0.0 0.0464 0.0 0.0374 0.0 0.0292 0.0 0.0256 0.0 0.0168 0.0 0.0112 0.0 0.0078 0.0 0.005 0.0 0.0031 0.0 0.0012 0.0 0.0009 0.0 0.0006 0.0 0.0002 0.0 0.0005 0.0 0.0001 0.0 0.0001 0.0 0.0 0.0 0.0 0.0 -Apps4321BespokeGenerator.v 0.3793 0.0 0.3336 0.0 0.1703 0.0 0.0715 0.0 0.0291 0.0 0.0118 0.0 0.0035 0.0 0.0008 0.0 0.0001 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 diff --git a/stats/STLC/sizeSTLC.csv b/stats/STLC/sizeSTLC.csv deleted file mode 100644 index b46b63ba..00000000 --- a/stats/STLC/sizeSTLC.csv +++ /dev/null @@ -1,6 +0,0 @@ -sizeSTLC 0 0! 1 1! 2 2! 3 3! 4 4! 5 5! 6 6! 7 7! 8 8! 9 9! 10 10! 11 11! 12 12! 13 13! 14 14! 15 15! 16 16! 17 17! 18 18! 19 19! 20 20! 21 21! 22 22! 23 23! 24 24! 25 25! 26 26! 27 27! 28 28! 29 29! 30 30! 31 31! 32 32! 33 33! 34 34! 35 35! 36 36! 37 37! 38 38! 39 39! 40 40! 41 41! 42 42! 43 43! 44 44! 45 45! 46 46! 47 47! 48 48! 49 49! 50 50! 51 51! 52 52! 53 53! 54 54! 55 55! 56 56! 57 57! 58 58! 59 59! 60 60! 61 61! 62 62! 63 63! 64 64! 65 65! 66 66! 67 67! 68 68! 69 69! 70 70! 71 71! 72 72! 73 73! 74 74! 75 75! 76 76! 77 77! 78 78! 79 79! 80 80! 81 81! 82 82! 83 83! 84 84! 85 85! 86 86! 87 87! 88 88! 89 89! 90 90! 91 91! 92 92! 93 93! -BespokeGenerator.v 0.0 0.0 0.2818 0.0 0.0875 0.0 0.0165 0.0 0.0368 0.0 0.0186 0.0 0.0069 0.0 0.0132 0.0 0.0091 0.0 0.0068 0.0 0.0141 0.0 0.0098 0.0 0.0102 0.0 0.0182 0.0 0.0118 0.0 0.0133 0.0 0.0207 0.0 0.014 0.0 0.0108 0.0 0.0177 0.0 0.0138 0.0 0.0145 0.0 0.0189 0.0 0.0137 0.0 0.0137 0.0 0.0176 0.0 0.013 0.0 0.0133 0.0 0.0159 0.0 0.0125 0.0 0.0119 0.0 0.0152 0.0 0.0111 0.0 0.0118 0.0 0.0126 0.0 0.0088 0.0 0.0095 0.0 0.0119 0.0 0.0088 0.0 0.0074 0.0 0.0123 0.0 0.0076 0.0 0.0076 0.0 0.0092 0.0 0.0068 0.0 0.0066 0.0 0.0064 0.0 0.0041 0.0 0.0045 0.0 0.0054 0.0 0.0038 0.0 0.0052 0.0 0.0045 0.0 0.0038 0.0 0.0036 0.0 0.0021 0.0 0.0027 0.0 0.0027 0.0 0.0029 0.0 0.0017 0.0 0.0021 0.0 0.0023 0.0 0.0023 0.0 0.002 0.0 0.0019 0.0 0.001 0.0 0.0012 0.0 0.0016 0.0 0.0012 0.0 0.0007 0.0 0.0007 0.0 0.0005 0.0 0.0008 0.0 0.0006 0.0 0.0003 0.0 0.0006 0.0 0.0003 0.0 0.0003 0.0 0.0002 0.0 0.0006 0.0 0.0003 0.0 0.0003 0.0 0.0003 0.0 0.0 0.0 0.0 0.0 0.0002 0.0 0.0002 0.0 0.0001 0.0 0.0001 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0001 0.0 -ManualTypeBasedGenerator.v 0.0 0.0 0.2527 0.2404 0.087 0.0462 0.0236 0.0679 0.0096 0.0429 0.0032 0.0422 0.002 0.0278 0.0009 0.0263 0.0005 0.0231 0.0 0.0199 0.0 0.0186 0.0 0.0162 0.0 0.0117 0.0 0.0091 0.0 0.0078 0.0 0.0063 0.0 0.003 0.0 0.0027 0.0 0.0023 0.0 0.0017 0.0 0.0016 0.0 0.001 0.0 0.0005 0.0 0.0003 0.0 0.0002 0.0 0.0003 0.0 0.0002 0.0 0.0001 0.0 0.0001 0.0 0.0001 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -TypeBasedGenerator.v 0.0 0.0 0.2891 0.2824 0.0817 0.0407 0.0216 0.0867 0.0072 0.0469 0.0028 0.0335 0.0003 0.0249 0.0002 0.0213 0.0001 0.014 0.0 0.0103 0.0 0.0103 0.0 0.0068 0.0 0.0048 0.0 0.0039 0.0 0.0017 0.0 0.0019 0.0 0.0016 0.0 0.0012 0.0 0.0016 0.0 0.0009 0.0 0.0005 0.0 0.0003 0.0 0.0004 0.0 0.0001 0.0 0.0001 0.0 0.0001 0.0 0.0 0.0 0.0001 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -EntropyApproxBespokeGenerator.v 0.0 0.0 0.3745 0.0 0.1292 0.0 0.0319 0.0 0.0443 0.0 0.0303 0.0 0.0189 0.0 0.0173 0.0 0.016 0.0 0.0164 0.0 0.0167 0.0 0.0181 0.0 0.0178 0.0 0.0154 0.0 0.0176 0.0 0.0165 0.0 0.0172 0.0 0.0152 0.0 0.0106 0.0 0.0149 0.0 0.0128 0.0 0.0136 0.0 0.0106 0.0 0.0106 0.0 0.0107 0.0 0.0092 0.0 0.0098 0.0 0.008 0.0 0.007 0.0 0.0066 0.0 0.005 0.0 0.0058 0.0 0.0051 0.0 0.0046 0.0 0.0053 0.0 0.0032 0.0 0.0042 0.0 0.0044 0.0 0.0027 0.0 0.0035 0.0 0.0023 0.0 0.0022 0.0 0.0013 0.0 0.0014 0.0 0.0018 0.0 0.0011 0.0 0.001 0.0 0.001 0.0 0.001 0.0 0.0012 0.0 0.0006 0.0 0.0003 0.0 0.0002 0.0 0.0006 0.0 0.0002 0.0 0.0004 0.0 0.0005 0.0 0.0002 0.0 0.0002 0.0 0.0001 0.0 0.0 0.0 0.0001 0.0 0.0002 0.0 0.0002 0.0 0.0001 0.0 0.0001 0.0 0.0001 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0001 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -Apps4321BespokeGenerator.v 0.0 0.0 0.2418 0.0 0.0951 0.0 0.0293 0.0 0.1527 0.0 0.1017 0.0 0.0601 0.0 0.0692 0.0 0.0511 0.0 0.041 0.0 0.0345 0.0 0.0283 0.0 0.0241 0.0 0.0186 0.0 0.0123 0.0 0.0116 0.0 0.0079 0.0 0.0048 0.0 0.005 0.0 0.0029 0.0 0.0022 0.0 0.0016 0.0 0.0017 0.0 0.0006 0.0 0.0003 0.0 0.0008 0.0 0.0001 0.0 0.0002 0.0 0.0001 0.0 0.0002 0.0 0.0002 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 From 43eb5357e02034eb1ce59c7ce70f03a14674ab90 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Fri, 10 May 2024 11:43:44 -0700 Subject: [PATCH 134/231] stlc eq structure --- examples/qc/benchmarks/benchmarks.jl | 1 + examples/qc/benchmarks/lib/stlc/dist.jl | 43 +++++++++++++++ examples/qc/benchmarks/main.jl | 73 ++++++++++--------------- examples/qc/benchmarks/tool.jl | 42 +++++++------- 4 files changed, 94 insertions(+), 65 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 45c75cf4..db698412 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -185,6 +185,7 @@ function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) num_meeting = 0 f_eq = if m.p.eq == :eq_num_apps eq_num_apps elseif m.p.eq == :eq_except_numbers eq_except_numbers + elseif m.p.eq == :eq_structure eq_structure elseif m.p.eq == :prob_equals prob_equals else error() end loss, actual_loss = sum( diff --git a/examples/qc/benchmarks/lib/stlc/dist.jl b/examples/qc/benchmarks/lib/stlc/dist.jl index 5eabe4d0..09a598c8 100644 --- a/examples/qc/benchmarks/lib/stlc/dist.jl +++ b/examples/qc/benchmarks/lib/stlc/dist.jl @@ -313,6 +313,35 @@ function eq_except_numbers(x::Expr.T, y::Expr.T) ] end +function eq_structure(x::Expr.T, y::Expr.T) + @match x [ + Var(_) -> (@match y [ + Var(_) -> true, + Boolean(_) -> false, + App(_, _) -> false, + Abs(_, _) -> false, + ]), + Boolean(_) -> (@match y [ + Var(_) -> false, + Boolean(_) -> true, + App(_, _) -> false, + Abs(_, _) -> false, + ]), + App(f1, x1) -> (@match y [ + Var(_) -> false, + Boolean(_) -> false, + App(f2, x2) -> eq_structure(f1, f2) & eq_structure(x1, x2), + Abs(_, _) -> false, + ]), + Abs(_, e1) -> (@match y [ + Var(_) -> false, + Boolean(_) -> false, + App(_, _) -> false, + Abs(_, e2) -> eq_structure(e1, e2), + ]), + ] +end + function eq_except_numbers(x::Opt.T{T}, y::Opt.T{T}) where T @match x [ Some(xv) -> (@match y [ @@ -326,6 +355,19 @@ function eq_except_numbers(x::Opt.T{T}, y::Opt.T{T}) where T ] end +function eq_structure(x::Opt.T{T}, y::Opt.T{T}) where T + @match x [ + Some(xv) -> (@match y [ + Some(yv) -> eq_structure(xv, yv), + None() -> false, + ]), + None() -> (@match y [ + Some(_) -> false, + None() -> true, + ]) + ] +end + function eq_num_apps(x::Opt.T{T}, y::Opt.T{T}) where T @match x [ Some(xv) -> (@match y [ @@ -338,3 +380,4 @@ function eq_num_apps(x::Opt.T{T}, y::Opt.T{T}) where T ]) ] end + diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 08ceb6d3..62bf8168 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -1,42 +1,29 @@ include("benchmarks.jl") GENERATION_PARAMS_LIST = [ - # TypeBasedSTLCGenerator( - # size=5, - # ty_size=2, - # dependents=[:size,:last_callsite], - # ty_dependents=[:size,:last_callsite], - # intwidth=4, - # ), - # TypeBasedSTLCGenerator( - # size=5, - # ty_size=2, - # dependents=[:size,:stack_tail], - # ty_dependents=[:size,:stack_tail], - # stack_size=2, - # intwidth=6, - # ), - # TypeBasedBSTGenerator( - # size=5, - # leaf_dependents=[:size,:last_callsite], - # num_dependents=[:size,:last_callsite], - # intwidth=6, - # ) - TypeBasedRBTGenerator( + TypeBasedSTLCGenerator( size=5, - leaf_dependents=[:size,:parent_color,:stack_tail], - red_dependents=[:size,:parent_color,:stack_tail], - num_dependents=[:size,:parent_color,:stack_tail], + ty_size=2, + dependents=[:size,:stack_tail], + ty_dependents=[:size,:stack_tail], stack_size=2, intwidth=6, ), + # TypeBasedRBTGenerator( + # size=5, + # leaf_dependents=[:size,:parent_color,:stack_tail], + # red_dependents=[:size,:parent_color,:stack_tail], + # num_dependents=[:size,:parent_color,:stack_tail], + # stack_size=3, + # intwidth=6, + # ), ] LR_LIST = [0.03, 0.1, 0.3] FP_LIST = [0.] RESAMPLING_FREQUENCY_LIST = [2] SAMPLES_PER_BATCH_LIST = [200] EPOCHS_LIST = [2000] -EQ_LIST = [:prob_equals] +EQ_LIST = [:eq_structure] n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST])) println(n_runs) @@ -55,33 +42,31 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ # MLELossConfig{STLC}(NumApps(), Linear()), - # SamplingEntropy{STLC}( + SamplingEntropy{STLC}( + resampling_frequency=resampling_frequency, + samples_per_batch=samples_per_batch, + property=STLCWellTyped(), + eq=eq, + failure_penalty=fp, + ) => lr, + # SamplingEntropy{BST}( # resampling_frequency=resampling_frequency, # samples_per_batch=samples_per_batch, - # property=STLCWellTyped(), + # property=BSTOrderInvariant(), # eq=eq, # failure_penalty=fp, # ) => lr, - # SamplingEntropy{BST}( + # SamplingEntropy{RBT}( # resampling_frequency=resampling_frequency, # samples_per_batch=samples_per_batch, - # property=BSTOrderInvariant(), - # eq=eq, + # property=MultipleInvariants([ + # BookkeepingInvariant(), + # BalanceInvariant(), + # OrderInvariant(), + # ]), # failure_penalty=fp, + # eq=eq, # ) => lr, - SamplingEntropy{RBT}( - resampling_frequency=resampling_frequency, - samples_per_batch=samples_per_batch, - property=MultipleInvariants([ - BookkeepingInvariant(), - BalanceInvariant(), - OrderInvariant(), - ]), - failure_penalty=fp, - eq=:prob_equals, - ) => 0.01, - # MLELossConfig(RBTDepth(), Uniform()) => lr, - # SatisfyPropertyLoss(MultipleInvariants([BookkeepingInvariant(),BalanceInvariant()])) => lr, ] for lr in LR_LIST for fp in FP_LIST diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index b874ebdb..61066f92 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -1,6 +1,6 @@ include("benchmarks.jl") -TAG = "v29_rbt_stack" +TAG = "v30_stlc_structure" OUT_TOP_DIR = "/space/tjoa/tuning-output" ## PARSE ARGS @@ -13,35 +13,35 @@ if isempty(ARGS) # num_dependents=[:size,:last_callsite], # intwidth=6, # ) - # g_p = TypeBasedSTLCGenerator( - # size=3, - # ty_size=2, - # dependents=[:size,:stack_tail], - # ty_dependents=[:size,:stack_tail], - # stack_size=2, - # intwidth=6, - # ) - g_p = TypeBasedRBTGenerator( + g_p = TypeBasedSTLCGenerator( size=3, - leaf_dependents=[:size,:parent_color,:stack_tail], - red_dependents=[:size,:parent_color,:stack_tail], - num_dependents=[:size,:parent_color,:stack_tail], + ty_size=2, + dependents=[:size,:stack_tail], + ty_dependents=[:size,:stack_tail], stack_size=2, intwidth=6, ) + # g_p = TypeBasedRBTGenerator( + # size=3, + # leaf_dependents=[:size,:parent_color,:stack_tail], + # red_dependents=[:size,:parent_color,:stack_tail], + # num_dependents=[:size,:parent_color,:stack_tail], + # stack_size=2, + # intwidth=6, + # ) lr = 0.01 fp = 0.01 l_p = [ - SamplingEntropy{RBT}( + SamplingEntropy{STLC}( resampling_frequency=1, samples_per_batch=50, - # property=STLCWellTyped(), - property=MultipleInvariants([ - BookkeepingInvariant(), - BalanceInvariant(), - OrderInvariant(), - ]), - eq=:prob_equals, + property=STLCWellTyped(), + # property=MultipleInvariants([ + # BookkeepingInvariant(), + # BalanceInvariant(), + # OrderInvariant(), + # ]), + eq=:eq_structure, failure_penalty=fp, ) => lr, # MLELossConfig{STLC}(NumApps(), Linear()) => lr, From d0083ba11c77b82870f9827583537a6eeb3c7223 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 12 May 2024 22:04:46 -0700 Subject: [PATCH 135/231] add uint max/min --- src/dist/number/uint.jl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/dist/number/uint.jl b/src/dist/number/uint.jl index 1c6795cb..609c0566 100644 --- a/src/dist/number/uint.jl +++ b/src/dist/number/uint.jl @@ -312,6 +312,20 @@ function overflow_sum(x::DistUInt{W}, y::DistUInt{W}) where W drop_bits(DistUInt{W}, z) end +function Base.min(x::DistUInt{W}, y::DistUInt{W}) where W + DistUInt{W}([ + a & b + for (a, b) in zip(x.bits, y.bits) + ]) +end + +function Base.max(x::DistUInt{W}, y::DistUInt{W}) where W + DistUInt{W}([ + a | b + for (a, b) in zip(x.bits, y.bits) + ]) +end + function Base.:(-)(x::DistUInt{W}, y::DistUInt{W}) where W z = Vector{AnyBool}(undef, W) borrow = false From 43530079ccf65e042db986b97fe9f8146988022c Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 12 May 2024 22:06:34 -0700 Subject: [PATCH 136/231] inductive: add variants --- src/dist/inductive/inductive.jl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/dist/inductive/inductive.jl b/src/dist/inductive/inductive.jl index ca24b18f..27d28749 100644 --- a/src/dist/inductive/inductive.jl +++ b/src/dist/inductive/inductive.jl @@ -1,5 +1,5 @@ # Distributions over inductively-defined types -export @inductive, @match, matches +export @inductive, @match, matches, variants # alternative to `nothing`, so `nothing` can be used as value _UNSET = gensym("unset") @@ -85,6 +85,8 @@ end function matches end +function variants end + # Usage: # @inductive Option Some(DistInt32) None() # @inductive List{T} Nil() Cons(T, List{T}) @@ -133,6 +135,13 @@ macro inductive(type, constructors...) prob_equals(x.union.which, DistUInt32(dict[ctor])) end + function $(esc(:(Dice.variants)))(::$(esc(:(Base.Type))){$(ty)}) where {$(tvs...)} + [$([ + :($(QuoteNode(ctor)) => [$(map(esc, args)...)]) + for (ctor, args) in plist + ]...)] + end + function $(esc(:(Dice.ifelse)))(c::$(esc(Dist{Bool})), x::$(ty), y::$(ty)) where {$(tvs...)} $(ty)($(esc(:(Base.ifelse)))(c, x.union, y.union)) end From 5d00e27b384560c898b4cbc52e08544f8756b46b Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 12 May 2024 22:13:25 -0700 Subject: [PATCH 137/231] sat_num_apps has app and wip derive --- examples/qc/benchmarks/benchmarks.jl | 53 +++++++++++++++ examples/qc/benchmarks/lib/stlc/dist.jl | 43 ++++++++++++ examples/qc/benchmarks/lib/util.jl | 90 +++++++++++++++++++++++++ examples/qc/benchmarks/main.jl | 3 +- examples/qc/benchmarks/tool.jl | 12 +++- 5 files changed, 197 insertions(+), 4 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index db698412..ae100bf0 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -184,6 +184,9 @@ function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) num_meeting = 0 f_eq = if m.p.eq == :eq_num_apps eq_num_apps + elseif m.p.eq == :eq_has_app eq_has_app + elseif m.p.eq == :sat1_eq_num_apps begin (x, y) -> sat_eq_num_apps(x, y, 1) end + elseif m.p.eq == :sat2_eq_num_apps begin (x, y) -> sat_eq_num_apps(x, y, 2) end elseif m.p.eq == :eq_except_numbers eq_except_numbers elseif m.p.eq == :eq_structure eq_structure elseif m.p.eq == :prob_equals prob_equals @@ -331,6 +334,56 @@ function generation_emit_stats(rs::RunState, g::STLCGeneration, s::String) end value(g::STLCGeneration) = g.e +################################## +# DerivedGenerator +################################## + +struct DerivedGenerator{T} <: GenerationParams{T} + root_ty::Type + init_size::Integer + stack_size::Integer + intwidth::Integer +end +DerivedGenerator{T}(; root_ty, init_size, stack_size, intwidth) where T = + DerivedGenerator{T}(root_ty, init_size, stack_size, intwidth) +function to_subpath(p::DerivedGenerator{T}) where T + [ + lowercase(string(T)), + "derived", + "root_ty=$(p.root_ty)", + "init_size=$(p.init_size)", + "stack_size=$(p.stack_size)", + "intwidth=$(p.intwidth)", + ] +end +function generate(rs::RunState, p::DerivedGenerator{T}) where T + constructors_overapproximation = [] + function add_ctor(v::Opt.T{Expr.T}) + push!(constructors_overapproximation, v) + v + end + e = generate(rs, p, add_ctor) + if T == STLC + STLCGeneration(e, constructors_overapproximation) + elseif T == BST + BSTGeneration(e, constructors_overapproximation) + elseif T == RBT + RBTGeneration(e) + else + error() + end +end + +function save_coq_generator(rs, p, s, f) + path = joinpath(rs.out_dir, "$(s)_Generator.v") + open(path, "w") do file + vals = compute(rs.var_vals, values(rs.adnodes_of_interest)) + adnodes_vals = Dict(s => vals[adnode] for (s, adnode) in rs.adnodes_of_interest) + println(file, f(p, adnodes_vals, rs.io)) + end + println_flush(rs.io, "Saved Coq generator to $(path)") +end + ################################## # Bespoke STLC generator ################################## diff --git a/examples/qc/benchmarks/lib/stlc/dist.jl b/examples/qc/benchmarks/lib/stlc/dist.jl index 09a598c8..492fb248 100644 --- a/examples/qc/benchmarks/lib/stlc/dist.jl +++ b/examples/qc/benchmarks/lib/stlc/dist.jl @@ -313,6 +313,15 @@ function eq_except_numbers(x::Expr.T, y::Expr.T) ] end +function has_app(x::Expr.T) + @match x [ + Var(_) -> false, + Boolean(_) -> false, + App(_, _) -> true, + Abs(_, e) -> has_app(e), + ] +end + function eq_structure(x::Expr.T, y::Expr.T) @match x [ Var(_) -> (@match y [ @@ -381,3 +390,37 @@ function eq_num_apps(x::Opt.T{T}, y::Opt.T{T}) where T ] end +function sat_num_apps(e::Expr.T, k::DistUInt32) + @match e [ + Var(_) -> DistUInt32(0), + Boolean(_) -> DistUInt32(0), + App(f, x) -> min(min(DistUInt32(1), k) + sat_num_apps(f, k) + sat_num_apps(x, k), k), + Abs(_, e′) -> sat_num_apps(e′, k), + ] +end + +function sat_eq_num_apps(x::Opt.T{T}, y::Opt.T{T}, k::Integer) where T + @match x [ + Some(xv) -> (@match y [ + Some(yv) -> prob_equals(sat_num_apps(xv, DistUInt32(k)), sat_num_apps(yv, DistUInt32(k))), + None() -> false, + ]), + None() -> (@match y [ + Some(_) -> false, + None() -> true, + ]) + ] +end + +function eq_has_app(x::Opt.T{T}, y::Opt.T{T}) where T + @match x [ + Some(xv) -> (@match y [ + Some(yv) -> prob_equals(has_app(xv), has_app(yv)), + None() -> false, + ]), + None() -> (@match y [ + Some(_) -> false, + None() -> true, + ]) + ] +end diff --git a/examples/qc/benchmarks/lib/util.jl b/examples/qc/benchmarks/lib/util.jl index 78335d60..cf9c5475 100644 --- a/examples/qc/benchmarks/lib/util.jl +++ b/examples/qc/benchmarks/lib/util.jl @@ -319,3 +319,93 @@ end function tocoq(v::Tuple) "($(join([tocoq(x) for x in v], ", ")))" end + + + + +function generate(rs::RunState, p, track_return) + to_visit = [p.root_ty] + seen = Set([p.root_ty]) + while !isempty(to_visit) + ty = pop!(to_visit) + for (ctor, params) in variants(ty) + for param in params + if param ∉ seen && hasmethod(variants, (Type{param},)) + push!(seen, param) + push!(to_visit, param) + end + end + end + end + + type_ctor_to_id = Dict() + for ty in seen + for (ctor, _) in variants(ty) + type_ctor_to_id[(ty, ctor)] = length(type_ctor_to_id) + end + end + + type_to_gen = Dict() + for ty in seen + type_to_gen[ty] = (size, stack_tail) -> begin + dependents = (size, stack_tail) + if size == 0 + frequency_for(rs, "0_$(ty)_variant", dependents, [ + "$(ctor)" => Dice.construct(ty, ctor, [ + if param ∈ seen + type_to_gen[param]( + size - 1, + update_stack_tail(p, stack_tail, type_ctor_to_id[(ty, ctor)]) + ) + elseif param == AnyBool + flip_for(rs, "0_$(ty)_$(ctor)_$(i)", dependents) + elseif param == DistUInt32 + sum( + @dice_ite if flip_for(rs, "0_$(ty)_$(ctor)_$(i)_num$(n)", dependents) + DistUInt32(n) + else + DistUInt32(0) + end + for n in twopowers(p.intwidth) + ) + else + error() + end + for (i, param) in enumerate(params) + ]) + for (ctor, params) in variants(ty) + if all(param != ty for param in params) + ]) + else + # TODO: if recursing, pass values of sibling *enumlikes* + frequency_for(rs, "$(ty)_variant", dependents, [ + "$(ctor)" => Dice.construct(ty, ctor, [ + if param ∈ seen + type_to_gen[param]( + size - 1, + update_stack_tail(p, stack_tail, type_ctor_to_id[(ty, ctor)]) + ) + elseif param == AnyBool + flip_for(rs, "$(ty)_$(ctor)_$(i)", dependents) + elseif param == DistUInt32 + sum( + @dice_ite if flip_for(rs, "$(ty)_$(ctor)_$(i)_num$(n)", dependents) + DistUInt32(n) + else + DistUInt32(0) + end + for n in twopowers(p.intwidth) + ) + else + error() + end + for (i, param) in enumerate(params) + ]) + for (ctor, params) in variants(ty) + ]) + end + end + end + + type_to_gen[p.root_ty](p.init_size, empty_stack(p)) +end \ No newline at end of file diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 62bf8168..a72830c5 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -23,7 +23,7 @@ FP_LIST = [0.] RESAMPLING_FREQUENCY_LIST = [2] SAMPLES_PER_BATCH_LIST = [200] EPOCHS_LIST = [2000] -EQ_LIST = [:eq_structure] +EQ_LIST = [:eq_has_app] n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST])) println(n_runs) @@ -106,6 +106,7 @@ TOOL_PATH = "examples/qc/benchmarks/tool.jl" proc = run(pipeline(cmd; stdout=out, stderr=stdout),) if proc.exitcode != 0 println() + println(proc.exitcode) so = String(take!(out)) println("FAILED: $(s)\nSTDOUT ===\n$(so)\n\n") end diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 61066f92..edf9e5fc 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -1,6 +1,6 @@ include("benchmarks.jl") -TAG = "v30_stlc_structure" +TAG = "v31_stlc_sat" OUT_TOP_DIR = "/space/tjoa/tuning-output" ## PARSE ARGS @@ -13,8 +13,14 @@ if isempty(ARGS) # num_dependents=[:size,:last_callsite], # intwidth=6, # ) + # g_p = DerivedGenerator{STLC}( + # root_ty=Expr.T, + # init_size=3, + # stack_size=2, + # intwidth=6, + # ) g_p = TypeBasedSTLCGenerator( - size=3, + size=5, ty_size=2, dependents=[:size,:stack_tail], ty_dependents=[:size,:stack_tail], @@ -41,7 +47,7 @@ if isempty(ARGS) # BalanceInvariant(), # OrderInvariant(), # ]), - eq=:eq_structure, + eq=:eq_has_app, failure_penalty=fp, ) => lr, # MLELossConfig{STLC}(NumApps(), Linear()) => lr, From e5d3d494fefaeccb92708e217b6554e7a89952a8 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 13 May 2024 12:31:04 -0700 Subject: [PATCH 138/231] add forgiveness --- examples/qc/benchmarks/benchmarks.jl | 32 +++++++++++++++++++++++----- examples/qc/benchmarks/main.jl | 12 +++++++++-- examples/qc/benchmarks/tool.jl | 4 +++- 3 files changed, 40 insertions(+), 8 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index ae100bf0..16ebb835 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -136,6 +136,8 @@ struct SamplingEntropy{T} <: LossConfig{T} property::Property{T} eq::Symbol failure_penalty::Real + forgiveness::Real + rand_forgiveness::Bool end mutable struct SamplingEntropyLossMgr <: LossMgr @@ -196,12 +198,30 @@ function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) lpr_eq = LogPr(f_eq(m.val, sample)) lpr_eq_expanded = Dice.expand_logprs(l, lpr_eq) # diff_test_typecheck(sample, Dice.frombits(sample, Dict())) - if m.consider(sample) + meets = m.consider(sample) + if meets num_meeting += 1 - [lpr_eq_expanded * compute(a, lpr_eq_expanded), lpr_eq_expanded] + end + + loss_here = Dice.Constant(0) + if meets || (m.p.rand_forgiveness && rand(rs.rng) < m.p.forgiveness) + loss_here += lpr_eq_expanded * compute(a, lpr_eq_expanded) + elseif !meets && !m.p.rand_forgiveness + loss_here += Dice.Constant(m.p.forgiveness) * lpr_eq_expanded * compute(a, lpr_eq_expanded) + end + + actual_loss_here = if meets + lpr_eq_expanded else - [Dice.Constant(m.p.failure_penalty), Dice.Constant(0)] + Dice.Constant(m.p.forgiveness) * lpr_eq_expanded end + + if !meets + loss_here += Dice.Constant(m.p.failure_penalty) + actual_loss_here += Dice.Constant(m.p.failure_penalty) + end + + [loss_here, actual_loss_here] end for sample in samples ) @@ -825,8 +845,8 @@ name(::TrueProperty{T}) where T = "trueproperty" # Sampling STLC entropy loss ################################## -function SamplingEntropy{T}(; resampling_frequency, samples_per_batch, property, eq, failure_penalty) where T - SamplingEntropy{T}(resampling_frequency, samples_per_batch, property, eq, failure_penalty) +function SamplingEntropy{T}(; resampling_frequency, samples_per_batch, property, eq, failure_penalty, forgiveness, rand_forgiveness) where T + SamplingEntropy{T}(resampling_frequency, samples_per_batch, property, eq, failure_penalty, forgiveness, rand_forgiveness) end to_subpath(p::SamplingEntropy) = [ @@ -835,6 +855,8 @@ to_subpath(p::SamplingEntropy) = [ "eq=$(string(p.eq))", "prop=$(name(p.property))", "failure_penalty=$(p.failure_penalty)", + "forgiveness=$(p.forgiveness)", + "rand_forgiveness=$(p.rand_forgiveness)" ] function create_loss_manager(::RunState, p::SamplingEntropy{T}, g::Generation{T}) where T function consider(sample) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index a72830c5..351cfc04 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -18,20 +18,24 @@ GENERATION_PARAMS_LIST = [ # intwidth=6, # ), ] -LR_LIST = [0.03, 0.1, 0.3] +LR_LIST = [0.3] FP_LIST = [0.] +FORIGIVENESS_LIST = [0.01, 0.05, 0.1, 0.2, 0.5] +RAND_FORIGIVENESS_LIST = [false, true] RESAMPLING_FREQUENCY_LIST = [2] SAMPLES_PER_BATCH_LIST = [200] EPOCHS_LIST = [2000] EQ_LIST = [:eq_has_app] -n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST])) +n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, FORIGIVENESS_LIST, RAND_FORIGIVENESS_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST])) println(n_runs) @assert n_runs <= 36 @show GENERATION_PARAMS_LIST @show LR_LIST @show FP_LIST +@show FORIGIVENESS_LIST +@show RAND_FORIGIVENESS_LIST @show RESAMPLING_FREQUENCY_LIST @show SAMPLES_PER_BATCH_LIST @show EPOCHS_LIST @@ -48,6 +52,8 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ property=STLCWellTyped(), eq=eq, failure_penalty=fp, + forgiveness=forgiveness, + rand_forgiveness=rand_forgiveness, ) => lr, # SamplingEntropy{BST}( # resampling_frequency=resampling_frequency, @@ -70,6 +76,8 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ] for lr in LR_LIST for fp in FP_LIST + for forgiveness in FORIGIVENESS_LIST + for rand_forgiveness in RAND_FORIGIVENESS_LIST for resampling_frequency in RESAMPLING_FREQUENCY_LIST for samples_per_batch in SAMPLES_PER_BATCH_LIST for eq in EQ_LIST diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index edf9e5fc..cc92a070 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -1,6 +1,6 @@ include("benchmarks.jl") -TAG = "v31_stlc_sat" +TAG = "v32_stlc_forgiveness" OUT_TOP_DIR = "/space/tjoa/tuning-output" ## PARSE ARGS @@ -49,6 +49,8 @@ if isempty(ARGS) # ]), eq=:eq_has_app, failure_penalty=fp, + forgiveness=0.1, + rand_forgiveness=false, ) => lr, # MLELossConfig{STLC}(NumApps(), Linear()) => lr, ] From 21e59b5b119052a016a7ec9e4a5e3f155fb13d99 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 13 May 2024 12:54:05 -0700 Subject: [PATCH 139/231] actual loss here only consider some samples when rand_forgiveness for perf --- examples/qc/benchmarks/benchmarks.jl | 17 +++++------------ examples/qc/benchmarks/main.jl | 6 +++--- examples/qc/benchmarks/tool.jl | 2 +- 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 16ebb835..08c2b8d7 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -199,21 +199,14 @@ function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) lpr_eq_expanded = Dice.expand_logprs(l, lpr_eq) # diff_test_typecheck(sample, Dice.frombits(sample, Dict())) meets = m.consider(sample) - if meets - num_meeting += 1 - end + meets && num_meeting += 1 - loss_here = Dice.Constant(0) if meets || (m.p.rand_forgiveness && rand(rs.rng) < m.p.forgiveness) - loss_here += lpr_eq_expanded * compute(a, lpr_eq_expanded) + loss_here = lpr_eq_expanded * compute(a, lpr_eq_expanded) + actual_loss_here = lpr_eq_expanded elseif !meets && !m.p.rand_forgiveness - loss_here += Dice.Constant(m.p.forgiveness) * lpr_eq_expanded * compute(a, lpr_eq_expanded) - end - - actual_loss_here = if meets - lpr_eq_expanded - else - Dice.Constant(m.p.forgiveness) * lpr_eq_expanded + loss_here = Dice.Constant(m.p.forgiveness) * lpr_eq_expanded * compute(a, lpr_eq_expanded) + actual_loss_here = Dice.Constant(m.p.forgiveness) * lpr_eq_expanded end if !meets diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 351cfc04..20aa8a99 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -20,16 +20,16 @@ GENERATION_PARAMS_LIST = [ ] LR_LIST = [0.3] FP_LIST = [0.] -FORIGIVENESS_LIST = [0.01, 0.05, 0.1, 0.2, 0.5] +FORIGIVENESS_LIST = [0.02, 0.1, 0.5] RAND_FORIGIVENESS_LIST = [false, true] RESAMPLING_FREQUENCY_LIST = [2] SAMPLES_PER_BATCH_LIST = [200] EPOCHS_LIST = [2000] -EQ_LIST = [:eq_has_app] +EQ_LIST = [:prob_equals] n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, FORIGIVENESS_LIST, RAND_FORIGIVENESS_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST])) println(n_runs) -@assert n_runs <= 36 +@assert n_runs <= 10 @show GENERATION_PARAMS_LIST @show LR_LIST diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index cc92a070..d6e5ad6b 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -47,7 +47,7 @@ if isempty(ARGS) # BalanceInvariant(), # OrderInvariant(), # ]), - eq=:eq_has_app, + eq=:prob_equals, failure_penalty=fp, forgiveness=0.1, rand_forgiveness=false, From 100c19b8db9c2653d5e7bd79c2790565c6f57374 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 13 May 2024 12:54:51 -0700 Subject: [PATCH 140/231] fix typo --- examples/qc/benchmarks/benchmarks.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 08c2b8d7..ba76721f 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -199,7 +199,7 @@ function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) lpr_eq_expanded = Dice.expand_logprs(l, lpr_eq) # diff_test_typecheck(sample, Dice.frombits(sample, Dict())) meets = m.consider(sample) - meets && num_meeting += 1 + meets && (num_meeting += 1) if meets || (m.p.rand_forgiveness && rand(rs.rng) < m.p.forgiveness) loss_here = lpr_eq_expanded * compute(a, lpr_eq_expanded) From 7e4b0b57e3e0c2ffd994276c030f919e4f47297e Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 14 May 2024 14:46:21 -0700 Subject: [PATCH 141/231] variant keys actual function --- src/dist/inductive/inductive.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dist/inductive/inductive.jl b/src/dist/inductive/inductive.jl index 27d28749..6839393e 100644 --- a/src/dist/inductive/inductive.jl +++ b/src/dist/inductive/inductive.jl @@ -137,7 +137,7 @@ macro inductive(type, constructors...) function $(esc(:(Dice.variants)))(::$(esc(:(Base.Type))){$(ty)}) where {$(tvs...)} [$([ - :($(QuoteNode(ctor)) => [$(map(esc, args)...)]) + :($(esc(ctor)) => [$(map(esc, args)...)]) for (ctor, args) in plist ]...)] end From a5fe094524fdd610a03cf9d3b0fa12d0a341db14 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 14 May 2024 14:47:39 -0700 Subject: [PATCH 142/231] derived to_coq progress, refactor forgiveness --- examples/qc/benchmarks/benchmarks.jl | 71 ++++-- examples/qc/benchmarks/lib/stlc/dist.jl | 46 ++-- examples/qc/benchmarks/lib/stlc/generator.jl | 4 +- examples/qc/benchmarks/lib/stlc/to_coq_tb.jl | 6 +- examples/qc/benchmarks/lib/util.jl | 235 ++++++++++++++----- examples/qc/benchmarks/main.jl | 2 +- examples/qc/benchmarks/tool.jl | 25 +- 7 files changed, 271 insertions(+), 118 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index ba76721f..b6fcf52d 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -14,6 +14,10 @@ abstract type Generation{T} end abstract type Property{T} end +function workload_of(::Type{<:GenerationParams{T}}) where T + T +end + function run_benchmark( rs::RunState, generation_params::GenerationParams{T}, @@ -201,12 +205,18 @@ function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) meets = m.consider(sample) meets && (num_meeting += 1) - if meets || (m.p.rand_forgiveness && rand(rs.rng) < m.p.forgiveness) - loss_here = lpr_eq_expanded * compute(a, lpr_eq_expanded) - actual_loss_here = lpr_eq_expanded + loss_here, actual_loss_here = if meets || (m.p.rand_forgiveness && rand(rs.rng) < m.p.forgiveness) + ( + lpr_eq_expanded * compute(a, lpr_eq_expanded), + lpr_eq_expanded + ) elseif !meets && !m.p.rand_forgiveness - loss_here = Dice.Constant(m.p.forgiveness) * lpr_eq_expanded * compute(a, lpr_eq_expanded) - actual_loss_here = Dice.Constant(m.p.forgiveness) * lpr_eq_expanded + ( + Dice.Constant(m.p.forgiveness) * lpr_eq_expanded * compute(a, lpr_eq_expanded), + Dice.Constant(m.p.forgiveness) * lpr_eq_expanded + ) + else + Dice.Constant(0), Dice.Constant(0) end if !meets @@ -333,17 +343,43 @@ end ################################## abstract type STLC <: Benchmark end +function sandwich(::Type{STLC}) + ( + "From QuickChick Require Import QuickChick. Import QcNotation. +From Coq Require Import Bool ZArith List. Import ListNotations. +From ExtLib Require Import Monad. +From ExtLib.Data.Monads Require Import OptionMonad. +Import MonadNotation. + +From STLC Require Import Impl Spec.", +"Definition test_prop_SinglePreserve := +forAll gSized (fun (e: Expr) => + prop_SinglePreserve e). + +(*! QuickChick test_prop_SinglePreserve. *) + +Definition test_prop_MultiPreserve := +forAll gSized (fun (e: Expr) => + prop_MultiPreserve e). + +(*! QuickChick test_prop_MultiPreserve. *) + " + ) +end + + struct STLCGeneration <: Generation{STLC} e::Opt.T{Expr.T} constructors_overapproximation::Vector{Opt.T{Expr.T}} end function generation_emit_stats(rs::RunState, g::STLCGeneration, s::String) - println_flush(rs.io, "Saving samples...") - time_sample = @elapsed with_concrete_ad_flips(rs.var_vals, g.e) do - save_samples(rs, joinpath(rs.out_dir, "terms_$(s).txt"), g.e) - end - println(rs.io, " $(time_sample) seconds") - println(rs.io) + # TODO: uncomment + # println_flush(rs.io, "Saving samples...") + # time_sample = @elapsed with_concrete_ad_flips(rs.var_vals, g.e) do + # save_samples(rs, joinpath(rs.out_dir, "terms_$(s).txt"), g.e) + # end + # println(rs.io, " $(time_sample) seconds") + # println(rs.io) end value(g::STLCGeneration) = g.e @@ -353,18 +389,18 @@ value(g::STLCGeneration) = g.e struct DerivedGenerator{T} <: GenerationParams{T} root_ty::Type - init_size::Integer + ty_sizes::Dict{Type, Integer} stack_size::Integer intwidth::Integer end -DerivedGenerator{T}(; root_ty, init_size, stack_size, intwidth) where T = - DerivedGenerator{T}(root_ty, init_size, stack_size, intwidth) +DerivedGenerator{T}(; root_ty, ty_sizes, stack_size, intwidth) where T = + DerivedGenerator{T}(root_ty, ty_sizes, stack_size, intwidth) function to_subpath(p::DerivedGenerator{T}) where T [ lowercase(string(T)), "derived", "root_ty=$(p.root_ty)", - "init_size=$(p.init_size)", + "ty-sizes=$(join(["$(ty)-$(size)" for (ty, size) in p.ty_sizes],"-"))", "stack_size=$(p.stack_size)", "intwidth=$(p.intwidth)", ] @@ -377,7 +413,7 @@ function generate(rs::RunState, p::DerivedGenerator{T}) where T end e = generate(rs, p, add_ctor) if T == STLC - STLCGeneration(e, constructors_overapproximation) + STLCGeneration(Opt.Some(e), constructors_overapproximation) elseif T == BST BSTGeneration(e, constructors_overapproximation) elseif T == RBT @@ -386,6 +422,9 @@ function generate(rs::RunState, p::DerivedGenerator{T}) where T error() end end +function generation_params_emit_stats(rs::RunState, p::DerivedGenerator, s) + save_coq_generator(rs, p, s, derived_to_coq) +end function save_coq_generator(rs, p, s, f) path = joinpath(rs.out_dir, "$(s)_Generator.v") diff --git a/examples/qc/benchmarks/lib/stlc/dist.jl b/examples/qc/benchmarks/lib/stlc/dist.jl index 492fb248..0f738c0e 100644 --- a/examples/qc/benchmarks/lib/stlc/dist.jl +++ b/examples/qc/benchmarks/lib/stlc/dist.jl @@ -8,13 +8,16 @@ end module Expr using Dice using Main: DistNat, Typ - @inductive T Var(DistNat) Boolean(AnyBool) Abs(Typ.T, T) App(T, T) + @inductive T Var(DistNat) Bool(AnyBool) Abs(Typ.T, T) App(T, T) end +to_coq(::Type{Expr.T}) = "Expr" +to_coq(::Type{Typ.T}) = "Typ" + function term_size(e::Expr.T) match(e, [ :Var => (i) -> DistUInt32(1), - :Boolean => (b) -> DistUInt32(1), + :Bool => (b) -> DistUInt32(1), :App => (f, x) -> DistUInt32(1) + term_size(f) + term_size(x), :Abs => (ty, e′) -> DistUInt32(1) + term_size(e′), ]) @@ -37,7 +40,7 @@ end function num_apps(e::Expr.T) match(e, [ :Var => (i) -> DistUInt32(0), - :Boolean => (b) -> DistUInt32(0), + :Bool => (b) -> DistUInt32(0), :App => (f, x) -> DistUInt32(1) + num_apps(f) + num_apps(x), :Abs => (ty, e′) -> num_apps(e′), ]) @@ -45,7 +48,7 @@ end stlc_ctor_to_id = Dict( :Var => DistInt32(0), - :Boolean => DistInt32(1), + :Bool => DistInt32(1), :App => DistInt32(2), :Abs => DistInt32(3), ) @@ -53,7 +56,7 @@ stlc_ctor_to_id = Dict( function ctor_to_id(ctor::Expr.T) match(ctor, [ :Var => _ -> stlc_ctor_to_id[:Var] - :Boolean => _ -> stlc_ctor_to_id[:Boolean] + :Bool => _ -> stlc_ctor_to_id[:Bool] :App => (_, _) -> stlc_ctor_to_id[:App] :Abs => (_, _) -> stlc_ctor_to_id[:Abs] ]) @@ -69,7 +72,7 @@ end function collect_constructors(e) match(e, [ :Var => (i) -> DistVector([stlc_ctor_to_id[:Var]]), - :Boolean => (b) -> DistVector([stlc_ctor_to_id[:Boolean]]), + :Bool => (b) -> DistVector([stlc_ctor_to_id[:Bool]]), :App => (f, x) -> prob_append(prob_extend(collect_constructors(f), collect_constructors(x)), stlc_ctor_to_id[:App]), :Abs => (ty, e′) -> prob_append(collect_constructors(e′), stlc_ctor_to_id[:Abs]), ]) @@ -114,7 +117,7 @@ function stlc_str(ast, depth=0, p=free) # i is the number of steps from the *top* of the env, see gen_var var_depth = depth - i - 1 var_str(var_depth) - elseif name == :Boolean + elseif name == :Bool v, = children string(v) elseif name == :Abs @@ -189,7 +192,7 @@ function typecheck(ast::Expr.T, gamma, depth=0)::Opt.T{Typ.T} haskey(gamma, var_depth) || return Opt.None(Typ.T) Opt.Some(gamma[var_depth]) end, - Boolean(_) -> Opt.Some(Typ.TBool()), + Bool(_) -> Opt.Some(Typ.TBool()), Abs(t_in, e) -> begin gamma′ = copy(gamma) gamma′[depth] = t_in @@ -243,7 +246,7 @@ function typecheck(ast::Tuple, gamma, depth=0) return "Unknown var $(var_str(var_depth))" end gamma[var_depth] - elseif name == :Boolean + elseif name == :Bool (:TBool, []) elseif name == :Abs t_in, e = children @@ -288,25 +291,25 @@ function eq_except_numbers(x::Expr.T, y::Expr.T) @match x [ Var(_) -> (@match y [ Var(_) -> true, - Boolean(_) -> false, + Bool(_) -> false, App(_, _) -> false, Abs(_, _) -> false, ]), - Boolean(_) -> (@match y [ + Bool(_) -> (@match y [ Var(_) -> false, - Boolean(_) -> true, + Bool(_) -> true, App(_, _) -> false, Abs(_, _) -> false, ]), App(f1, x1) -> (@match y [ Var(_) -> false, - Boolean(_) -> false, + Bool(_) -> false, App(f2, x2) -> eq_except_numbers(f1, f2) & eq_except_numbers(x1, x2), Abs(_, _) -> false, ]), Abs(ty1, e1) -> (@match y [ Var(_) -> false, - Boolean(_) -> false, + Bool(_) -> false, App(_, _) -> false, Abs(ty2, e2) -> eq_except_numbers(ty1, ty2) & eq_except_numbers(e1, e2), ]), @@ -316,7 +319,7 @@ end function has_app(x::Expr.T) @match x [ Var(_) -> false, - Boolean(_) -> false, + Bool(_) -> false, App(_, _) -> true, Abs(_, e) -> has_app(e), ] @@ -326,25 +329,25 @@ function eq_structure(x::Expr.T, y::Expr.T) @match x [ Var(_) -> (@match y [ Var(_) -> true, - Boolean(_) -> false, + Bool(_) -> false, App(_, _) -> false, Abs(_, _) -> false, ]), - Boolean(_) -> (@match y [ + Bool(_) -> (@match y [ Var(_) -> false, - Boolean(_) -> true, + Bool(_) -> true, App(_, _) -> false, Abs(_, _) -> false, ]), App(f1, x1) -> (@match y [ Var(_) -> false, - Boolean(_) -> false, + Bool(_) -> false, App(f2, x2) -> eq_structure(f1, f2) & eq_structure(x1, x2), Abs(_, _) -> false, ]), Abs(_, e1) -> (@match y [ Var(_) -> false, - Boolean(_) -> false, + Bool(_) -> false, App(_, _) -> false, Abs(_, e2) -> eq_structure(e1, e2), ]), @@ -393,12 +396,13 @@ end function sat_num_apps(e::Expr.T, k::DistUInt32) @match e [ Var(_) -> DistUInt32(0), - Boolean(_) -> DistUInt32(0), + Bool(_) -> DistUInt32(0), App(f, x) -> min(min(DistUInt32(1), k) + sat_num_apps(f, k) + sat_num_apps(x, k), k), Abs(_, e′) -> sat_num_apps(e′, k), ] end +# TODO: why is saturating at 1 different than eq_has_app? function sat_eq_num_apps(x::Opt.T{T}, y::Opt.T{T}, k::Integer) where T @match x [ Some(xv) -> (@match y [ diff --git a/examples/qc/benchmarks/lib/stlc/generator.jl b/examples/qc/benchmarks/lib/stlc/generator.jl index d8ea7cd6..4191f496 100644 --- a/examples/qc/benchmarks/lib/stlc/generator.jl +++ b/examples/qc/benchmarks/lib/stlc/generator.jl @@ -104,7 +104,7 @@ function tb_gen_expr(rs::RunState, p, size::Integer, stack_tail, track_return) @dice_ite if flip_for(rs, "pvar", dependent_dists) Expr.Var(DistNat(0)) # really, this is arbitrary else - Expr.Boolean(true) # really, this is arbitrary + Expr.Bool(true) # really, this is arbitrary end else sz′ = size - 1 @@ -120,7 +120,7 @@ function tb_gen_expr(rs::RunState, p, size::Integer, stack_tail, track_return) ) Expr.Var(n) end, - "boolean" => Expr.Boolean(flip_for(rs, "ptrue", dependent_dists)), + "bool" => Expr.Bool(flip_for(rs, "ptrue", dependent_dists)), "abs" => begin typ = tb_gen_type(rs, p, p.ty_size, update_stack_tail(p, stack_tail, 10)) e = tb_gen_expr(rs, p, sz′, update_stack_tail(p, stack_tail, 11), track_return) diff --git a/examples/qc/benchmarks/lib/stlc/to_coq_tb.jl b/examples/qc/benchmarks/lib/stlc/to_coq_tb.jl index 42fd1522..5e56f846 100644 --- a/examples/qc/benchmarks/lib/stlc/to_coq_tb.jl +++ b/examples/qc/benchmarks/lib/stlc/to_coq_tb.jl @@ -1,5 +1,5 @@ function typebased_stlc_to_coq(p, adnodes_vals, io) - expected_matchid(s) = s in ["pvar", "ptbool", "freq_var", "freq_boolean", "freq_abs", "freq_app", "ptrue", ["num$(n)" for n in twopowers(p.intwidth)]...] + expected_matchid(s) = s in ["pvar", "ptbool", "freq_var", "freq_bool", "freq_abs", "freq_app", "ptrue", ["num$(n)" for n in twopowers(p.intwidth)]...] matchid_to_cases = Dict() for (name, val) in adnodes_vals @@ -63,7 +63,7 @@ Fixpoint manual_gen_expr (size : nat) $(join(stack_vars, " ")) : G Expr := (1000 - weight_var, bindGen arbitrary (fun p0 : bool => returnGen (Bool p0)))] | S size' => let weight_var := $(mk_match(p.dependents, "freq_var")) in - let weight_boolean := $(mk_match(p.dependents, "freq_boolean")) in + let weight_bool := $(mk_match(p.dependents, "freq_bool")) in let weight_abs := $(mk_match(p.dependents, "freq_abs")) in let weight_app := $(mk_match(p.dependents, "freq_app")) in freq [ @@ -81,7 +81,7 @@ $( let p1 := $(join(["n$(n)" for n in twopowers(p.intwidth)], "+")) in returnGen (Var p1)) $(")" ^ p.intwidth); - (weight_boolean, + (weight_bool, let weight_true := $(mk_match(p.dependents, "ptrue")) in freq [ (weight_true, returnGen (Bool true)); (1000 - weight_true, returnGen (Bool false))] ); diff --git a/examples/qc/benchmarks/lib/util.jl b/examples/qc/benchmarks/lib/util.jl index cf9c5475..0b251aa1 100644 --- a/examples/qc/benchmarks/lib/util.jl +++ b/examples/qc/benchmarks/lib/util.jl @@ -321,11 +321,10 @@ function tocoq(v::Tuple) end - - -function generate(rs::RunState, p, track_return) - to_visit = [p.root_ty] - seen = Set([p.root_ty]) +function collect_types(root_ty) + to_visit = [root_ty] + seen = Set([root_ty]) + tys = [root_ty] while !isempty(to_visit) ty = pop!(to_visit) for (ctor, params) in variants(ty) @@ -333,79 +332,189 @@ function generate(rs::RunState, p, track_return) if param ∉ seen && hasmethod(variants, (Type{param},)) push!(seen, param) push!(to_visit, param) + push!(tys, param) end end end end + reverse!(tys) # top order type_ctor_to_id = Dict() - for ty in seen + for ty in tys for (ctor, _) in variants(ty) type_ctor_to_id[(ty, ctor)] = length(type_ctor_to_id) end end + tys, type_ctor_to_id +end + +function generate(rs::RunState, p, track_return) + tys, type_ctor_to_id = collect_types(p.root_ty) type_to_gen = Dict() - for ty in seen + for ty in tys type_to_gen[ty] = (size, stack_tail) -> begin + zero_prefix = if size == 0 "0_" else "" end dependents = (size, stack_tail) - if size == 0 - frequency_for(rs, "0_$(ty)_variant", dependents, [ - "$(ctor)" => Dice.construct(ty, ctor, [ - if param ∈ seen - type_to_gen[param]( - size - 1, - update_stack_tail(p, stack_tail, type_ctor_to_id[(ty, ctor)]) - ) - elseif param == AnyBool - flip_for(rs, "0_$(ty)_$(ctor)_$(i)", dependents) - elseif param == DistUInt32 - sum( - @dice_ite if flip_for(rs, "0_$(ty)_$(ctor)_$(i)_num$(n)", dependents) - DistUInt32(n) - else - DistUInt32(0) - end - for n in twopowers(p.intwidth) - ) - else - error() - end - for (i, param) in enumerate(params) - ]) - for (ctor, params) in variants(ty) - if all(param != ty for param in params) - ]) - else - # TODO: if recursing, pass values of sibling *enumlikes* - frequency_for(rs, "$(ty)_variant", dependents, [ - "$(ctor)" => Dice.construct(ty, ctor, [ - if param ∈ seen - type_to_gen[param]( - size - 1, - update_stack_tail(p, stack_tail, type_ctor_to_id[(ty, ctor)]) - ) - elseif param == AnyBool - flip_for(rs, "$(ty)_$(ctor)_$(i)", dependents) - elseif param == DistUInt32 - sum( - @dice_ite if flip_for(rs, "$(ty)_$(ctor)_$(i)_num$(n)", dependents) - DistUInt32(n) - else - DistUInt32(0) - end - for n in twopowers(p.intwidth) - ) - else - error() - end - for (i, param) in enumerate(params) - ]) - for (ctor, params) in variants(ty) - ]) - end + frequency_for(rs, "$(zero_prefix)$(ty)_variant", dependents, [ + "$(ctor)" => ctor([ + if param == ty + # TODO: special-case enum like types + # TODO: if recursing, pass values of sibling *enumlikes* + type_to_gen[param]( + size - 1, + update_stack_tail(p, stack_tail, type_ctor_to_id[(ty, ctor)]) + ) + elseif param ∈ tys + # TODO: special-case enum like types + type_to_gen[param]( + p.ty_sizes[param], + update_stack_tail(p, stack_tail, type_ctor_to_id[(ty, ctor)]) + ) + elseif param == AnyBool + flip_for(rs, "$(zero_prefix)$(ty)_$(ctor)_$(i)", dependents) + elseif param == DistUInt32 + sum( + @dice_ite if flip_for(rs, "$(zero_prefix)$(ty)_$(ctor)_$(i)_num$(n)", dependents) + DistUInt32(n) + else + DistUInt32(0) + end + for n in twopowers(p.intwidth) + ) + else + error() + end + for (i, param) in enumerate(params) + ]...) + for (ctor, params) in variants(ty) + if size != 0 || all(param != ty for param in params) + ]) end end + type_to_gen[p.root_ty](p.ty_sizes[p.root_ty], empty_stack(p)) +end + +to_coq(::Type{DistUInt32}) = "nat" +to_coq(::Type{DistInt32}) = "Z" +to_coq(::Type{AnyBool}) = "bool" + +function sandwichjoin(pairs; middle, sep) + ls = [] + rs = [] + for (l, r) in pairs + push!(ls, l) + push!(rs, r) + end + reverse!(rs) + join( + Iterators.flatten([ + ls, [middle], rs + ]), sep + ) +end + +function derived_to_coq(p, adnodes_vals, io) + matchid_to_cases = Dict() + for (name, val) in adnodes_vals + matchid, case = split(name, "%%") + case = "(" * join([tocoq(eval(Meta.parse(x))) for x in split(case, "%")], ", ") * ")" + val = thousandths(val) + push!(get!(matchid_to_cases, matchid, []), (case, val)) + end + + tys, type_ctor_to_id = collect_types(p.root_ty) + + workload = workload_of(typeof(p)) + generators = [] + + stack_vars = ["(stack$(i) : nat)" for i in 1:p.stack_size] + function mk_match(matchid) + cases = matchid_to_cases[matchid] + cases = sort(cases) + "match (size, ($(join(stack_vars, ", ")))) with +$(join([" " ^ 9 * "| $(name) => $(w)" for (name, w) in cases], "\n")) + | _ => 500 + end" + end + + update_stack_vars(loc) = join(stack_vars[2:end], " ") * " $(loc)" + variants2(ty, zero_case) = if zero_case + [ + (ctor, params) + for (ctor, params) in variants(ty) + if all(param != ty for param in params) + ] + else + variants(ty) + end + + + for ty in tys + push!(generators, " +Fixpoint gen_$(to_coq(ty)) (size : nat) $(join(stack_vars, " ")) : G $(to_coq(ty)) := + match size with +$(join([ +" | $(if zero_case 0 else "S size'" end) => + $(if length(variants2(ty, zero_case)) > 1 "freq [" else "" end) + $(join([ +" (* $(ctor) *) + + $(if length(variants2(ty, zero_case)) > 1 + "( + $(mk_match("$(if zero_case "0_" else "" end)$(ty)_variant_$(ctor)")), + " else "" end) + $(sandwichjoin( + Iterators.flatten([ + if param == ty + ["bindGen (gen_$(to_coq(param)) size' $( + update_stack_vars(type_ctor_to_id[(ty, ctor)]) + )) (fun p$(i) : $(to_coq(param)) =>" => ")"] + elseif param ∈ tys + ["bindGen (gen_$(to_coq(param)) $(p.ty_sizes[param]) $( + update_stack_vars(type_ctor_to_id[(ty, ctor)]) + )) (fun p$(i) : $(to_coq(param)) =>" => ")"] + elseif param == AnyBool + ["let weight_true := $(mk_match("$(if zero_case "0_" else "" end)$(ty)_$(ctor)_$(i)")) in + bindGen (freq [ + (weight_true, true); + (1000-weight_true, false) + ]) (fun p$(i) : $(to_coq(param)) =>" => ")"] + elseif param == DistUInt32 + [ + "let weight_$(n) := $(mk_match("$(if zero_case "0_" else "" end)$(ty)_$(ctor)_$(i)_num$(n)")) in + bindGen (freq [ + (weight_$(n), returnGen $(n)); + (1000-weight_$(n), returnGen 0) + ]) + (fun n$(n) : nat => $(if j == p.intwidth " + let p$(i) := $(join(["n$(n)" for n in twopowers(p.intwidth)], "+ ")) in " else "" end) + " => ")" + for (j, n) in enumerate(twopowers(p.intwidth)) + ] + else + error() + end + for (i, param) in enumerate(params) + ]), + middle="returnGen ($(ctor) $(join(["p$(i)" for i in 1:length(params)], " ")))", + sep="\n")) + $(if length(variants2(ty, zero_case)) > 1 ")" else "" end) + " + for (ctor, params) in variants2(ty, zero_case) + ], ";\n")) + $(if length(variants2(ty, zero_case)) > 1 "]" else "" end)" + for zero_case in [true, false] + ], "\n" )) + end.") + end + + before, after = sandwich(workload) + "$(before) + $(join(generators, "\n")) + +Definition gSized := + gen_$(to_coq(p.root_ty)) $(p.ty_sizes[p.root_ty])$(" 0" ^ p.stack_size). - type_to_gen[p.root_ty](p.init_size, empty_stack(p)) + $(after)" end \ No newline at end of file diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 20aa8a99..508746fb 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -21,7 +21,7 @@ GENERATION_PARAMS_LIST = [ LR_LIST = [0.3] FP_LIST = [0.] FORIGIVENESS_LIST = [0.02, 0.1, 0.5] -RAND_FORIGIVENESS_LIST = [false, true] +RAND_FORIGIVENESS_LIST = [true] RESAMPLING_FREQUENCY_LIST = [2] SAMPLES_PER_BATCH_LIST = [200] EPOCHS_LIST = [2000] diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index d6e5ad6b..a80f1c50 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -1,6 +1,7 @@ include("benchmarks.jl") -TAG = "v32_stlc_forgiveness" +# TAG = "v32_stlc_forgiveness" +TAG = "test" OUT_TOP_DIR = "/space/tjoa/tuning-output" ## PARSE ARGS @@ -13,20 +14,20 @@ if isempty(ARGS) # num_dependents=[:size,:last_callsite], # intwidth=6, # ) - # g_p = DerivedGenerator{STLC}( - # root_ty=Expr.T, - # init_size=3, - # stack_size=2, - # intwidth=6, - # ) - g_p = TypeBasedSTLCGenerator( - size=5, - ty_size=2, - dependents=[:size,:stack_tail], - ty_dependents=[:size,:stack_tail], + g_p = DerivedGenerator{STLC}( + root_ty=Expr.T, + ty_sizes=Dict(Expr.T=>3, Typ.T=>2), stack_size=2, intwidth=6, ) + # g_p = TypeBasedSTLCGenerator( + # size=5, + # ty_size=2, + # dependents=[:size,:stack_tail], + # ty_dependents=[:size,:stack_tail], + # stack_size=2, + # intwidth=6, + # ) # g_p = TypeBasedRBTGenerator( # size=3, # leaf_dependents=[:size,:parent_color,:stack_tail], From 40faa9a336dfd90cba8949e978731372a453d69e Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 14 May 2024 14:52:08 -0700 Subject: [PATCH 143/231] uncomment --- examples/qc/benchmarks/benchmarks.jl | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index b6fcf52d..ca8498d7 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -373,13 +373,12 @@ struct STLCGeneration <: Generation{STLC} constructors_overapproximation::Vector{Opt.T{Expr.T}} end function generation_emit_stats(rs::RunState, g::STLCGeneration, s::String) - # TODO: uncomment - # println_flush(rs.io, "Saving samples...") - # time_sample = @elapsed with_concrete_ad_flips(rs.var_vals, g.e) do - # save_samples(rs, joinpath(rs.out_dir, "terms_$(s).txt"), g.e) - # end - # println(rs.io, " $(time_sample) seconds") - # println(rs.io) + println_flush(rs.io, "Saving samples...") + time_sample = @elapsed with_concrete_ad_flips(rs.var_vals, g.e) do + save_samples(rs, joinpath(rs.out_dir, "terms_$(s).txt"), g.e) + end + println(rs.io, " $(time_sample) seconds") + println(rs.io) end value(g::STLCGeneration) = g.e From e0d8beefaa5ae72d540ee884ea8c9946b402c173 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 14 May 2024 15:39:44 -0700 Subject: [PATCH 144/231] derived stlc seems to work --- examples/qc/benchmarks/lib/util.jl | 74 +++++++++++++++--------------- examples/qc/benchmarks/tool.jl | 44 +++++++++--------- 2 files changed, 59 insertions(+), 59 deletions(-) diff --git a/examples/qc/benchmarks/lib/util.jl b/examples/qc/benchmarks/lib/util.jl index 0b251aa1..40717771 100644 --- a/examples/qc/benchmarks/lib/util.jl +++ b/examples/qc/benchmarks/lib/util.jl @@ -339,18 +339,22 @@ function collect_types(root_ty) end reverse!(tys) # top order - type_ctor_to_id = Dict() + type_ctor_parami_to_id = Dict() for ty in tys - for (ctor, _) in variants(ty) - type_ctor_to_id[(ty, ctor)] = length(type_ctor_to_id) + for (ctor, params) in variants(ty) + for (parami, param) in enumerate(params) + if param in tys + type_ctor_parami_to_id[(ty, ctor, parami)] = length(type_ctor_parami_to_id) + 1 + end + end end end - tys, type_ctor_to_id + tys, type_ctor_parami_to_id end function generate(rs::RunState, p, track_return) - tys, type_ctor_to_id = collect_types(p.root_ty) + tys, type_ctor_parami_to_id = collect_types(p.root_ty) type_to_gen = Dict() for ty in tys type_to_gen[ty] = (size, stack_tail) -> begin @@ -363,19 +367,19 @@ function generate(rs::RunState, p, track_return) # TODO: if recursing, pass values of sibling *enumlikes* type_to_gen[param]( size - 1, - update_stack_tail(p, stack_tail, type_ctor_to_id[(ty, ctor)]) + update_stack_tail(p, stack_tail, type_ctor_parami_to_id[(ty, ctor, parami)]) ) elseif param ∈ tys # TODO: special-case enum like types type_to_gen[param]( p.ty_sizes[param], - update_stack_tail(p, stack_tail, type_ctor_to_id[(ty, ctor)]) + update_stack_tail(p, stack_tail, type_ctor_parami_to_id[(ty, ctor, parami)]) ) elseif param == AnyBool - flip_for(rs, "$(zero_prefix)$(ty)_$(ctor)_$(i)", dependents) + flip_for(rs, "$(zero_prefix)$(ty)_$(ctor)_$(parami)", dependents) elseif param == DistUInt32 sum( - @dice_ite if flip_for(rs, "$(zero_prefix)$(ty)_$(ctor)_$(i)_num$(n)", dependents) + @dice_ite if flip_for(rs, "$(zero_prefix)$(ty)_$(ctor)_$(parami)_num$(n)", dependents) DistUInt32(n) else DistUInt32(0) @@ -385,7 +389,7 @@ function generate(rs::RunState, p, track_return) else error() end - for (i, param) in enumerate(params) + for (parami, param) in enumerate(params) ]...) for (ctor, params) in variants(ty) if size != 0 || all(param != ty for param in params) @@ -423,7 +427,7 @@ function derived_to_coq(p, adnodes_vals, io) push!(get!(matchid_to_cases, matchid, []), (case, val)) end - tys, type_ctor_to_id = collect_types(p.root_ty) + tys, type_ctor_parami_to_id = collect_types(p.root_ty) workload = workload_of(typeof(p)) generators = [] @@ -455,50 +459,46 @@ $(join([" " ^ 9 * "| $(name) => $(w)" for (name, w) in cases], "\n")) Fixpoint gen_$(to_coq(ty)) (size : nat) $(join(stack_vars, " ")) : G $(to_coq(ty)) := match size with $(join([ -" | $(if zero_case 0 else "S size'" end) => - $(if length(variants2(ty, zero_case)) > 1 "freq [" else "" end) +" | $(if zero_case 0 else "S size'" end) => $(if length(variants2(ty, zero_case)) > 1 " + freq [" else "" end) $(join([ -" (* $(ctor) *) - - $(if length(variants2(ty, zero_case)) > 1 - "( +" (* $(ctor) *) $(if length(variants2(ty, zero_case)) > 1 " ( $(mk_match("$(if zero_case "0_" else "" end)$(ty)_variant_$(ctor)")), " else "" end) $(sandwichjoin( Iterators.flatten([ if param == ty ["bindGen (gen_$(to_coq(param)) size' $( - update_stack_vars(type_ctor_to_id[(ty, ctor)]) - )) (fun p$(i) : $(to_coq(param)) =>" => ")"] + update_stack_vars(type_ctor_parami_to_id[(ty, ctor, parami)]) + )) (fun p$(parami) : $(to_coq(param)) =>" => ")"] elseif param ∈ tys ["bindGen (gen_$(to_coq(param)) $(p.ty_sizes[param]) $( - update_stack_vars(type_ctor_to_id[(ty, ctor)]) - )) (fun p$(i) : $(to_coq(param)) =>" => ")"] + update_stack_vars(type_ctor_parami_to_id[(ty, ctor, parami)]) + )) (fun p$(parami) : $(to_coq(param)) =>" => ")"] elseif param == AnyBool - ["let weight_true := $(mk_match("$(if zero_case "0_" else "" end)$(ty)_$(ctor)_$(i)")) in - bindGen (freq [ - (weight_true, true); - (1000-weight_true, false) - ]) (fun p$(i) : $(to_coq(param)) =>" => ")"] + ["let weight_true := $(mk_match("$(if zero_case "0_" else "" end)$(ty)_$(ctor)_$(parami)")) in + bindGen (freq [ + (weight_true, returnGen true); + (1000-weight_true, returnGen false) + ]) (fun p$(parami) : $(to_coq(param)) =>" => ")"] elseif param == DistUInt32 [ - "let weight_$(n) := $(mk_match("$(if zero_case "0_" else "" end)$(ty)_$(ctor)_$(i)_num$(n)")) in - bindGen (freq [ - (weight_$(n), returnGen $(n)); - (1000-weight_$(n), returnGen 0) - ]) - (fun n$(n) : nat => $(if j == p.intwidth " - let p$(i) := $(join(["n$(n)" for n in twopowers(p.intwidth)], "+ ")) in " else "" end) - " => ")" + " let weight_$(n) := $(mk_match("$(if zero_case "0_" else "" end)$(ty)_$(ctor)_$(parami)_num$(n)")) in + bindGen (freq [ + (weight_$(n), returnGen $(n)); + (1000-weight_$(n), returnGen 0) + ]) + (fun n$(n) : nat => $(if j == p.intwidth " + let p$(parami) := $(join(["n$(n)" for n in twopowers(p.intwidth)], " + ")) in " else "" end)" => ")" for (j, n) in enumerate(twopowers(p.intwidth)) ] else error() end - for (i, param) in enumerate(params) + for (parami, param) in enumerate(params) ]), - middle="returnGen ($(ctor) $(join(["p$(i)" for i in 1:length(params)], " ")))", - sep="\n")) + middle="returnGen ($(ctor) $(join(["p$(parami)" for parami in 1:length(params)], " ")))", + sep="")) $(if length(variants2(ty, zero_case)) > 1 ")" else "" end) " for (ctor, params) in variants2(ty, zero_case) diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index a80f1c50..ea4e932c 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -1,7 +1,7 @@ include("benchmarks.jl") -# TAG = "v32_stlc_forgiveness" -TAG = "test" +TAG = "v33_stlc_forgiveness_rand" +# TAG = "test" OUT_TOP_DIR = "/space/tjoa/tuning-output" ## PARSE ARGS @@ -16,13 +16,13 @@ if isempty(ARGS) # ) g_p = DerivedGenerator{STLC}( root_ty=Expr.T, - ty_sizes=Dict(Expr.T=>3, Typ.T=>2), + ty_sizes=Dict(Expr.T=>2, Typ.T=>1), stack_size=2, intwidth=6, ) # g_p = TypeBasedSTLCGenerator( - # size=5, - # ty_size=2, + # size=2, + # ty_size=1, # dependents=[:size,:stack_tail], # ty_dependents=[:size,:stack_tail], # stack_size=2, @@ -36,28 +36,28 @@ if isempty(ARGS) # stack_size=2, # intwidth=6, # ) - lr = 0.01 + lr = 0.5 fp = 0.01 l_p = [ - SamplingEntropy{STLC}( - resampling_frequency=1, - samples_per_batch=50, - property=STLCWellTyped(), - # property=MultipleInvariants([ - # BookkeepingInvariant(), - # BalanceInvariant(), - # OrderInvariant(), - # ]), - eq=:prob_equals, - failure_penalty=fp, - forgiveness=0.1, - rand_forgiveness=false, - ) => lr, - # MLELossConfig{STLC}(NumApps(), Linear()) => lr, + # SamplingEntropy{STLC}( + # resampling_frequency=1, + # samples_per_batch=50, + # property=STLCWellTyped(), + # # property=MultipleInvariants([ + # # BookkeepingInvariant(), + # # BalanceInvariant(), + # # OrderInvariant(), + # # ]), + # eq=:prob_equals, + # failure_penalty=fp, + # forgiveness=0.1, + # rand_forgiveness=false, + # ) => lr, + MLELossConfig{STLC}(NumApps(), Linear()) => lr, ] push!(as, replace(string(g_p), " "=>"")) push!(as, replace(string(l_p), " "=>"")) - push!(as, string(3)) + push!(as, string(10)) empty!(ARGS) append!(ARGS, as) end From c927f70370ea7ded5e2651ae503f2227e4691107 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 14 May 2024 16:02:10 -0700 Subject: [PATCH 145/231] mess with spacing --- examples/qc/benchmarks/lib/util.jl | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/examples/qc/benchmarks/lib/util.jl b/examples/qc/benchmarks/lib/util.jl index 40717771..76b49ab2 100644 --- a/examples/qc/benchmarks/lib/util.jl +++ b/examples/qc/benchmarks/lib/util.jl @@ -461,29 +461,28 @@ Fixpoint gen_$(to_coq(ty)) (size : nat) $(join(stack_vars, " ")) : G $(to_coq(ty $(join([ " | $(if zero_case 0 else "S size'" end) => $(if length(variants2(ty, zero_case)) > 1 " freq [" else "" end) - $(join([ -" (* $(ctor) *) $(if length(variants2(ty, zero_case)) > 1 " ( - $(mk_match("$(if zero_case "0_" else "" end)$(ty)_variant_$(ctor)")), - " else "" end) - $(sandwichjoin( +$(join([ +" (* $(ctor) *) $(if length(variants2(ty, zero_case)) > 1 " + ( + $(mk_match("$(if zero_case "0_" else "" end)$(ty)_variant_$(ctor)"))," else "" end) +$(sandwichjoin( Iterators.flatten([ if param == ty - ["bindGen (gen_$(to_coq(param)) size' $( + ["\n bindGen (gen_$(to_coq(param)) size' $( update_stack_vars(type_ctor_parami_to_id[(ty, ctor, parami)]) )) (fun p$(parami) : $(to_coq(param)) =>" => ")"] elseif param ∈ tys - ["bindGen (gen_$(to_coq(param)) $(p.ty_sizes[param]) $( + ["\n bindGen (gen_$(to_coq(param)) $(p.ty_sizes[param]) $( update_stack_vars(type_ctor_parami_to_id[(ty, ctor, parami)]) )) (fun p$(parami) : $(to_coq(param)) =>" => ")"] elseif param == AnyBool - ["let weight_true := $(mk_match("$(if zero_case "0_" else "" end)$(ty)_$(ctor)_$(parami)")) in + ["\n let weight_true := $(mk_match("$(if zero_case "0_" else "" end)$(ty)_$(ctor)_$(parami)")) in bindGen (freq [ (weight_true, returnGen true); (1000-weight_true, returnGen false) ]) (fun p$(parami) : $(to_coq(param)) =>" => ")"] elseif param == DistUInt32 - [ - " let weight_$(n) := $(mk_match("$(if zero_case "0_" else "" end)$(ty)_$(ctor)_$(parami)_num$(n)")) in + ["\n let weight_$(n) := $(mk_match("$(if zero_case "0_" else "" end)$(ty)_$(ctor)_$(parami)_num$(n)")) in bindGen (freq [ (weight_$(n), returnGen $(n)); (1000-weight_$(n), returnGen 0) @@ -497,10 +496,8 @@ $(join([ end for (parami, param) in enumerate(params) ]), - middle="returnGen ($(ctor) $(join(["p$(parami)" for parami in 1:length(params)], " ")))", - sep="")) - $(if length(variants2(ty, zero_case)) > 1 ")" else "" end) - " + middle="\n returnGen ($(ctor) $(join(["p$(parami)" for parami in 1:length(params)], " ")))", + sep=""))$(if length(variants2(ty, zero_case)) > 1 ")\n" else "" end)" for (ctor, params) in variants2(ty, zero_case) ], ";\n")) $(if length(variants2(ty, zero_case)) > 1 "]" else "" end)" From 66d2428370952e158071a67f764c4c879a7f32b3 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 14 May 2024 16:21:14 -0700 Subject: [PATCH 146/231] a bit more messing with spacing --- examples/qc/benchmarks/lib/util.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/qc/benchmarks/lib/util.jl b/examples/qc/benchmarks/lib/util.jl index 76b49ab2..edd54c60 100644 --- a/examples/qc/benchmarks/lib/util.jl +++ b/examples/qc/benchmarks/lib/util.jl @@ -464,8 +464,8 @@ $(join([ $(join([ " (* $(ctor) *) $(if length(variants2(ty, zero_case)) > 1 " ( - $(mk_match("$(if zero_case "0_" else "" end)$(ty)_variant_$(ctor)"))," else "" end) -$(sandwichjoin( + $(mk_match("$(if zero_case "0_" else "" end)$(ty)_variant_$(ctor)")),\n" else "" end)" * +"$(sandwichjoin( Iterators.flatten([ if param == ty ["\n bindGen (gen_$(to_coq(param)) size' $( @@ -497,7 +497,7 @@ $(sandwichjoin( for (parami, param) in enumerate(params) ]), middle="\n returnGen ($(ctor) $(join(["p$(parami)" for parami in 1:length(params)], " ")))", - sep=""))$(if length(variants2(ty, zero_case)) > 1 ")\n" else "" end)" + sep=""))$(if length(variants2(ty, zero_case)) > 1 ")" else "" end)" for (ctor, params) in variants2(ty, zero_case) ], ";\n")) $(if length(variants2(ty, zero_case)) > 1 "]" else "" end)" From 9ff99983382defb4945f7b06f5274348ec189f60 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 16 May 2024 17:51:34 -0700 Subject: [PATCH 147/231] derive progress --- examples/qc/benchmarks/benchmarks.jl | 22 +- examples/qc/benchmarks/lib/rbt/dist.jl | 64 ++-- examples/qc/benchmarks/lib/util.jl | 410 +++++++++++++++++++------ examples/qc/benchmarks/tool.jl | 16 +- 4 files changed, 372 insertions(+), 140 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index ca8498d7..d4878bda 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -28,6 +28,8 @@ function run_benchmark( time_build_generation = @elapsed generation = generate(rs, generation_params) println_flush(rs.io, " $(time_build_generation) seconds") println_flush(rs.io) + + generation_emit_stats(rs, generation, "test") loss_configs, loss_weights = zip(loss_config_weight_pairs...) loss_mgrs = [ @@ -374,11 +376,11 @@ struct STLCGeneration <: Generation{STLC} end function generation_emit_stats(rs::RunState, g::STLCGeneration, s::String) println_flush(rs.io, "Saving samples...") - time_sample = @elapsed with_concrete_ad_flips(rs.var_vals, g.e) do - save_samples(rs, joinpath(rs.out_dir, "terms_$(s).txt"), g.e) - end - println(rs.io, " $(time_sample) seconds") - println(rs.io) + # time_sample = @elapsed with_concrete_ad_flips(rs.var_vals, g.e) do + # save_samples(rs, joinpath(rs.out_dir, "terms_$(s).txt"), g.e) + # end + # println(rs.io, " $(time_sample) seconds") + # println(rs.io) end value(g::STLCGeneration) = g.e @@ -742,7 +744,7 @@ end abstract type RBT <: Benchmark end struct RBTGeneration <: Generation{RBT} - t::ColorKVTree.T + t::ColorKVTree.t end function generation_emit_stats(::RunState, g::RBTGeneration, s::String) end @@ -837,22 +839,22 @@ name(::BSTOrderInvariant) = "order" struct BookkeepingInvariant <: Property{RBT} end -check_property(::BookkeepingInvariant, t::ColorKVTree.T) = +check_property(::BookkeepingInvariant, t::ColorKVTree.t) = satisfies_bookkeeping_invariant(t) name(::BookkeepingInvariant) = "bookkeeping" struct BalanceInvariant <: Property{RBT} end -check_property(::BalanceInvariant, t::ColorKVTree.T) = +check_property(::BalanceInvariant, t::ColorKVTree.t) = satisfies_balance_invariant(t) name(::BalanceInvariant) = "balance" struct BlackRootInvariant <: Property{RBT} end -check_property(::BlackRootInvariant, t::ColorKVTree.T) = +check_property(::BlackRootInvariant, t::ColorKVTree.t) = satisfies_black_root_invariant(t) name(::BlackRootInvariant) = "blackroot" struct OrderInvariant <: Property{RBT} end -check_property(::OrderInvariant, t::ColorKVTree.T) = +check_property(::OrderInvariant, t::ColorKVTree.t) = satisfies_order_invariant(t) name(::OrderInvariant) = "order" diff --git a/examples/qc/benchmarks/lib/rbt/dist.jl b/examples/qc/benchmarks/lib/rbt/dist.jl index 82e5f9fa..9475cab6 100644 --- a/examples/qc/benchmarks/lib/rbt/dist.jl +++ b/examples/qc/benchmarks/lib/rbt/dist.jl @@ -4,33 +4,33 @@ using Dice module Color using Dice - @inductive T Red() Black() + @inductive T R() B() end function Base.string(c::Color.T) @assert isdeterministic(c) @match c [ - Red() -> "Color.Red()", - Black() -> "Color.Black()", + R() -> "Color.R()", + B() -> "Color.B()", ] end module ColorKVTree using Dice using Main: DistNat, Color - @inductive T Leaf() Node(Color.T, T, DistInt32, DistInt32, T) + @inductive t E() T(Color.T, t, DistInt32, DistInt32, t) end -function tree_size(e::ColorKVTree.T) +function tree_size(e::ColorKVTree.t) @match e [ - Leaf() -> DistUInt32(0), - Node(c, l, k, v, r) -> DistUInt32(1) + tree_size(l) + tree_size(r), + E() -> DistUInt32(0), + T(c, l, k, v, r) -> DistUInt32(1) + tree_size(l) + tree_size(r), ] end -function rbt_depth(e::ColorKVTree.T) +function rbt_depth(e::ColorKVTree.t) @match e [ - Leaf() -> DistUInt32(0), - Node(c, l, k, v, r) -> begin + E() -> DistUInt32(0), + T(c, l, k, v, r) -> begin ldepth = rbt_depth(l) rdepth = rbt_depth(r) DistUInt32(1) + @dice_ite if ldepth > rdepth ldepth else rdepth end @@ -38,14 +38,14 @@ function rbt_depth(e::ColorKVTree.T) ] end -is_red(c::Color.T) = matches(c, :Red) +is_red(c::Color.T) = matches(c, :R) # Check that all paths through the tree have the same number of black nodes -function satisfies_bookkeeping_invariant(e::ColorKVTree.T) - function black_height_and_valid(t::ColorKVTree.T) +function satisfies_bookkeeping_invariant(e::ColorKVTree.t) + function black_height_and_valid(t::ColorKVTree.t) @match t [ - Leaf() -> (DistUInt32(1), true), - Node(c, l, k, v, r) -> begin + E() -> (DistUInt32(1), true), + T(c, l, k, v, r) -> begin left_black_height, left_valid = black_height_and_valid(l) right_black_height, right_valid = black_height_and_valid(r) @dice_ite if left_valid & right_valid & prob_equals(left_black_height, right_black_height) @@ -61,11 +61,11 @@ function satisfies_bookkeeping_invariant(e::ColorKVTree.T) end # Check that all red nodes have black children -function satisfies_balance_invariant(e::ColorKVTree.T) - function color_and_valid(t::ColorKVTree.T) +function satisfies_balance_invariant(e::ColorKVTree.t) + function color_and_valid(t::ColorKVTree.t) @match t [ - Leaf() -> (Color.Black(), true), - Node(c, l, k, v, r) -> begin + E() -> (Color.B(), true), + T(c, l, k, v, r) -> begin left_color, left_valid = color_and_valid(l) right_color, right_valid = color_and_valid(r) @dice_ite if left_valid & right_valid & !(is_red(c) & (is_red(left_color) | is_red(right_color))) @@ -80,18 +80,18 @@ function satisfies_balance_invariant(e::ColorKVTree.T) valid end -function satisfies_black_root_invariant(t::ColorKVTree.T) +function satisfies_black_root_invariant(t::ColorKVTree.t) @match t [ - Leaf() -> true, - Node(c, l, k, v, r) -> !is_red(c) + E() -> true, + T(c, l, k, v, r) -> !is_red(c) ] end -function satisfies_order_invariant(t::ColorKVTree.T) +function satisfies_order_invariant(t::ColorKVTree.t) function helper(t, lo, hi) @match t [ - Leaf() -> true, - Node(c, l, k, v, r) -> begin + E() -> true, + T(c, l, k, v, r) -> begin (if isnothing(lo) true else lo < k end) & (if isnothing(hi) true else k < hi end) & helper(l, lo, k) & @@ -102,15 +102,15 @@ function satisfies_order_invariant(t::ColorKVTree.T) helper(t, nothing, nothing) end -function eq_except_numbers(x::ColorKVTree.T, y::ColorKVTree.T) +function eq_except_numbers(x::ColorKVTree.t, y::ColorKVTree.t) @match x [ - Leaf() -> (@match y [ - Leaf() -> true, - Node(yc, yl, yk, yv, yr) -> false, + E() -> (@match y [ + E() -> true, + T(yc, yl, yk, yv, yr) -> false, ]), - Node(xc, xl, xk, xv, xr) -> (@match y [ - Leaf() -> false, - Node(yc, yl, yk, yv, yr) -> prob_equals(xc, yc) & eq_except_numbers(xl, yl) & eq_except_numbers(xr, yr), + T(xc, xl, xk, xv, xr) -> (@match y [ + E() -> false, + T(yc, yl, yk, yv, yr) -> prob_equals(xc, yc) & eq_except_numbers(xl, yl) & eq_except_numbers(xr, yr), ]), ] end diff --git a/examples/qc/benchmarks/lib/util.jl b/examples/qc/benchmarks/lib/util.jl index edd54c60..6431008a 100644 --- a/examples/qc/benchmarks/lib/util.jl +++ b/examples/qc/benchmarks/lib/util.jl @@ -317,7 +317,11 @@ function tocoq(i::Integer) end function tocoq(v::Tuple) - "($(join([tocoq(x) for x in v], ", ")))" + if v == () + "tt" + else + "($(join([tocoq(x) for x in v], ", ")))" + end end @@ -353,33 +357,74 @@ function collect_types(root_ty) tys, type_ctor_parami_to_id end +variants2(ty, exclude_recursive) = if exclude_recursive + [ + (ctor, params) + for (ctor, params) in variants(ty) + if !(ty in params) + ] +else + variants(ty) +end + function generate(rs::RunState, p, track_return) tys, type_ctor_parami_to_id = collect_types(p.root_ty) type_to_gen = Dict() for ty in tys - type_to_gen[ty] = (size, stack_tail) -> begin - zero_prefix = if size == 0 "0_" else "" end - dependents = (size, stack_tail) - frequency_for(rs, "$(zero_prefix)$(ty)_variant", dependents, [ - "$(ctor)" => ctor([ - if param == ty - # TODO: special-case enum like types - # TODO: if recursing, pass values of sibling *enumlikes* - type_to_gen[param]( - size - 1, - update_stack_tail(p, stack_tail, type_ctor_parami_to_id[(ty, ctor, parami)]) - ) - elseif param ∈ tys - # TODO: special-case enum like types + type_to_gen[ty] = (leaf::Bool, chosen_varianti::DistUInt32, size, stack_tail) -> begin + @assert !leaf || size == -1 + prefix = if leaf "leaf_" elseif size == 0 "0_" else "" end + dependents = if leaf stack_tail else (size, stack_tail) end + zero_case()::Bool = if leaf + error("don't check zero_case() if leaf") + else + size == 0 + end + + res = nothing + for (varianti, (ctor, params)) in enumerate(variants(ty)) + if leaf && ty in params + continue + end + param_variantis = frequency_for(rs, "$(prefix)_$(ty)_$(ctor)_variantis", dependents, [ + "$(x)" => [DistUInt32(j) for j in x] + for x in Iterators.product([ + [ + j + for (j, (_, param_params)) in enumerate(variants(param)) + if !(param == ty && zero_case() && ty in param_params) + ] + for param in params + if param ∈ tys + ]...) + ]) + param_variantis_idx = 0 + alt = ctor([ + if param ∈ tys + param_variantis_idx += 1 type_to_gen[param]( - p.ty_sizes[param], + # leaf + param == ty && zero_case(), + # chosen variant + param_variantis[param_variantis_idx], + # size + if param == ty + if zero_case() + (-1) + else + size - 1 + end + else + p.ty_sizes[param] + end, + # todo: include leaf/zero_case in call location update_stack_tail(p, stack_tail, type_ctor_parami_to_id[(ty, ctor, parami)]) ) elseif param == AnyBool - flip_for(rs, "$(zero_prefix)$(ty)_$(ctor)_$(parami)", dependents) + flip_for(rs, "$(prefix)$(ty)_$(ctor)_$(parami)_true", dependents) elseif param == DistUInt32 sum( - @dice_ite if flip_for(rs, "$(zero_prefix)$(ty)_$(ctor)_$(parami)_num$(n)", dependents) + @dice_ite if flip_for(rs, "$(prefix)$(ty)_$(ctor)_$(parami)_num$(n)", dependents) DistUInt32(n) else DistUInt32(0) @@ -391,12 +436,24 @@ function generate(rs::RunState, p, track_return) end for (parami, param) in enumerate(params) ]...) - for (ctor, params) in variants(ty) - if size != 0 || all(param != ty for param in params) - ]) + if isnothing(res) + res = alt + else + res = @dice_ite if prob_equals(DistUInt32(varianti), chosen_varianti) + alt + else + res + end + end + end + res end end - type_to_gen[p.root_ty](p.ty_sizes[p.root_ty], empty_stack(p)) + init_varianti = frequency_for(rs, "init_$(p.root_ty)_varianti", ((),), [ + "$(i)" => DistUInt32(i) + for i in 1:length(variants(p.root_ty)) + ]) + type_to_gen[p.root_ty](false, init_varianti, p.ty_sizes[p.root_ty], empty_stack(p)) end to_coq(::Type{DistUInt32}) = "nat" @@ -430,88 +487,255 @@ function derived_to_coq(p, adnodes_vals, io) tys, type_ctor_parami_to_id = collect_types(p.root_ty) workload = workload_of(typeof(p)) - generators = [] stack_vars = ["(stack$(i) : nat)" for i in 1:p.stack_size] - function mk_match(matchid) + + update_stack_vars(loc) = join(stack_vars[2:end], " ") * " $(loc)" + + segments = [] + # Emit line + indent = 0 + function e!(s=""; indent_=nothing) + if isnothing(indent_) + indent_ = indent + end + segment = if s == "" + # don't indent empty line + "" + else + " " ^ indent_ * s + end + isempty(segments) || println(last(segments)) + push!(segments, segment) + end + # Emit with outer indent + o!(s) = e!(s, indent_=indent-1) + # Append to last line + function a!(s) + @assert !isempty(segments) + segments[end] = segments[end] * s + end + + before, after = sandwich(workload) + e!(before) + e!() + + function for_indent(f, iter) + indent += 1 + map(f, iter) + indent -= 1 + end + + function ematch!(matchid, leaf) cases = matchid_to_cases[matchid] cases = sort(cases) - "match (size, ($(join(stack_vars, ", ")))) with -$(join([" " ^ 9 * "| $(name) => $(w)" for (name, w) in cases], "\n")) - | _ => 500 - end" + if leaf + e!("match ($(join(stack_vars, ", "))) with ") + else + e!("match (size, ($(join(stack_vars, ", ")))) with ") + end + for (name, w) in cases + e!("| $(name) => $(w)") + end + e!("| _ => 500") + e!("end") end - update_stack_vars(loc) = join(stack_vars[2:end], " ") * " $(loc)" - variants2(ty, zero_case) = if zero_case - [ - (ctor, params) - for (ctor, params) in variants(ty) - if all(param != ty for param in params) - ] - else - variants(ty) + for_indent(tys) do ty + o!("Inductive $(to_coq(ty))_leaf_ctor : Type :=") + for (ctor, params) in variants(ty) + if !(ty in params) + e!("| Ctor_leaf_$(ctor) : $(to_coq(ty))_leaf_ctor") + end + end + a!(".") + e!() + end + sif(c, s) = if c s else "" end + + for_indent(tys) do ty + o!("Inductive $(to_coq(ty))_ctor : Type :=") + for (ctor, _) in variants(ty) + e!("| Ctor_$(ctor) : $(to_coq(ty))_ctor") + end + a!(".") + e!() end + join2(it, sep) = join(it, sep) * sep - for ty in tys - push!(generators, " -Fixpoint gen_$(to_coq(ty)) (size : nat) $(join(stack_vars, " ")) : G $(to_coq(ty)) := - match size with -$(join([ -" | $(if zero_case 0 else "S size'" end) => $(if length(variants2(ty, zero_case)) > 1 " - freq [" else "" end) -$(join([ -" (* $(ctor) *) $(if length(variants2(ty, zero_case)) > 1 " - ( - $(mk_match("$(if zero_case "0_" else "" end)$(ty)_variant_$(ctor)")),\n" else "" end)" * -"$(sandwichjoin( - Iterators.flatten([ - if param == ty - ["\n bindGen (gen_$(to_coq(param)) size' $( - update_stack_vars(type_ctor_parami_to_id[(ty, ctor, parami)]) - )) (fun p$(parami) : $(to_coq(param)) =>" => ")"] - elseif param ∈ tys - ["\n bindGen (gen_$(to_coq(param)) $(p.ty_sizes[param]) $( - update_stack_vars(type_ctor_parami_to_id[(ty, ctor, parami)]) - )) (fun p$(parami) : $(to_coq(param)) =>" => ")"] - elseif param == AnyBool - ["\n let weight_true := $(mk_match("$(if zero_case "0_" else "" end)$(ty)_$(ctor)_$(parami)")) in - bindGen (freq [ - (weight_true, returnGen true); - (1000-weight_true, returnGen false) - ]) (fun p$(parami) : $(to_coq(param)) =>" => ")"] - elseif param == DistUInt32 - ["\n let weight_$(n) := $(mk_match("$(if zero_case "0_" else "" end)$(ty)_$(ctor)_$(parami)_num$(n)")) in - bindGen (freq [ - (weight_$(n), returnGen $(n)); - (1000-weight_$(n), returnGen 0) - ]) - (fun n$(n) : nat => $(if j == p.intwidth " - let p$(parami) := $(join(["n$(n)" for n in twopowers(p.intwidth)], " + ")) in " else "" end)" => ")" - for (j, n) in enumerate(twopowers(p.intwidth)) - ] + for leaf in [true, false] + leaf_prefix = if leaf "leaf_" else "" end + for_indent(tys) do ty + if leaf + o!("Definition") + else + o!("Fixpoint") + end + a!(" gen_$(leaf_prefix)$(to_coq(ty)) ") + a!("(chosen_ctor : $(to_coq(ty))_$(leaf_prefix)ctor) ") + leaf || a!("(size : nat) ") + a!(join2(stack_vars, " ")) + a!(": G $(to_coq(ty)) :=") + + ty_variants = [ + (ctor, params) + for (ctor, params) in variants(ty) + if !(leaf && ty in params) + ] + need_freq = length(ty_variants) > 1 + + leaf || e!("match size with") + zero_cases = if leaf begin [true] end else [true, false] end + for _zero_case in zero_cases + zero_case() = if leaf + error("don't check zero_case() if leaf") else - error() + _zero_case end - for (parami, param) in enumerate(params) - ]), - middle="\n returnGen ($(ctor) $(join(["p$(parami)" for parami in 1:length(params)], " ")))", - sep=""))$(if length(variants2(ty, zero_case)) > 1 ")" else "" end)" - for (ctor, params) in variants2(ty, zero_case) - ], ";\n")) - $(if length(variants2(ty, zero_case)) > 1 "]" else "" end)" - for zero_case in [true, false] - ], "\n" )) - end.") - end - before, after = sandwich(workload) - "$(before) - $(join(generators, "\n")) + prefix = if leaf "leaf_" elseif zero_case() "0_" else "" end + if !leaf + indent += 1 + if zero_case() + o!("| 0 =>") + else + o!("| S size' =>") + end + end + + e!("match chosen_ctor with") + for_indent(variants2(ty, leaf)) do (ctor, params) + o!("| Ctor_$(leaf_prefix)$(ctor) =>") + rparens_needed = 0 + need_variantis = any( + (param in tys && param != ty) + || (param == ty && !zero_case()) + for param in params + ) + variantis_options = Iterators.product([ + [ + # If were generating ourself, and we have zero fuel, then don't choose another recursive constructor + (j, "Ctor_$(if param == ty && zero_case() "leaf_" else "" end)$(param_ctor)") + for (j, (param_ctor, param_params)) in enumerate(variants(param)) + if !(param == ty && zero_case() && ty in param_params) + ] + for param in params + if param in tys + ]...) + if need_variantis + e!("bindGen (freq [") + for_indent(enumerate(variantis_options)) do (j, param_ctor_is_and_param_ctors) + param_ctor_is = [] + param_ctors = [] + for (a, b) in param_ctor_is_and_param_ctors + push!(param_ctor_is, a) + push!(param_ctors, b) + end + -Definition gSized := - gen_$(to_coq(p.root_ty)) $(p.ty_sizes[p.root_ty])$(" 0" ^ p.stack_size). + if length(variantis_options) == 1 + e!("(* no alternatives, so lets just put this again *)") + e!("(") + indent += 1 + ematch!("$(prefix)_$(ty)_$(ctor)_variantis_$(Tuple(param_ctor_is))", leaf) + a!(",") + e!("($(join(param_ctors, ", ")))") + indent -= 1 + e!(");") + end - $(after)" -end \ No newline at end of file + e!("(") + indent += 1 + ematch!("$(prefix)_$(ty)_$(ctor)_variantis_$(Tuple(param_ctor_is))", leaf) + a!(",") + e!("($(join(param_ctors, ", ")))") + indent -= 1 + if j == length(variantis_options) + e!(");") + else + e!(")") + end + end + e!("]) (fun param_variantis =>") + rparens_needed += 1 + + e!("let '($(join(["param$(parami)_ctor" for (parami, param) in enumerate(params) if param in tys], ", "))) := param_variantis in") + end + for (parami, param) in enumerate(params) + if param == ty + e!("bindGen (gen_$(if zero_case() "leaf_" else "" end)$(to_coq(param))") + a!(" param$(parami)_ctor") + zero_case() || a!(" size'") + a!(" $(update_stack_vars(type_ctor_parami_to_id[(ty, ctor, parami)])))") + e!("(fun p$(parami) : $(to_coq(param)) =>") + rparens_needed += 1 + elseif param ∈ tys + e!("bindGen (gen_$(to_coq(param)) $(p.ty_sizes[param]) $(update_stack_vars(type_ctor_parami_to_id[(ty, ctor, parami)])))") + e!("(fun p$(parami) : $(to_coq(param)) =>") + rparens_needed += 1 + elseif param == AnyBool + e!("let weight_true :=") + ematch!("$(prefix)$(ty)_$(ctor)_$(parami)_true", leaf) + e!("in") + e!("bindGen (freq [") + e!(" (weight_true, returnGen true);") + e!(" (1000-weight_true, returnGen false)") + e!("]) (fun p$(parami) : $(to_coq(param)) =>") + rparens_needed += 1 + elseif param == DistUInt32 + for n in twopowers(p.intwidth) + e!("let weight_$(n) :=") + ematch!("$(prefix)$(ty)_$(ctor)_$(parami)_num$(n)", leaf) + e!("in") + e!("bindGen (freq [") + e!(" (weight_$(n), returnGen $(n));") + e!(" (1000-weight_$(n), returnGen 0)") + e!("]) (fun n$(n) : nat =>") + rparens_needed += 1 + end + e!("let p$(parami) := $(join(["n$(n)" for n in twopowers(p.intwidth)], " + ")) in ") + else + error() + end + end + e!("returnGen ($(ctor) $(join(["p$(parami)" for parami in 1:length(params)], " ")))") + a!(")" ^ rparens_needed) + end + e!("end") + end + if !leaf + e!("end") + indent -= 1 + end + a!(".") + e!() + end + end + + e!("Definition gSized :=") + indent += 1 + e!("bindGen (freq [") + indent += 1 + for_indent(enumerate(variants(p.root_ty))) do (i, (ctor, params)) + o!("(") + matchid = "init_$(p.root_ty)_varianti_$(i)" + cases = matchid_to_cases[matchid] + cases = sort(cases) + e!("match (tt) with ") + for (name, w) in cases + e!("| $(name) => $(w)") + end + e!("end") + a!(",") + e!("Ctor_$(ctor)") + o!(")") + end + indent -= 1 + e!("]) (fun init_ctor =>") + e!("gen_$(to_coq(p.root_ty)) init_ctor $(p.ty_sizes[p.root_ty])$(" 0" ^ p.stack_size).") + a!(").") + e!() + e!(after) + join(segments, "\n") +end diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index ea4e932c..d3e26606 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -6,7 +6,7 @@ OUT_TOP_DIR = "/space/tjoa/tuning-output" ## PARSE ARGS if isempty(ARGS) - TAG = "test" + TAG = "test2" as = ["-f"] # g_p = TypeBasedBSTGenerator( # size=5, @@ -16,10 +16,16 @@ if isempty(ARGS) # ) g_p = DerivedGenerator{STLC}( root_ty=Expr.T, - ty_sizes=Dict(Expr.T=>2, Typ.T=>1), - stack_size=2, - intwidth=6, + ty_sizes=Dict(Expr.T=>1, Typ.T=>1), + stack_size=1, + intwidth=4, ) + # g_p = DerivedGenerator{RBT}( + # root_ty=ColorKVTree.t, + # ty_sizes=Dict(ColorKVTree.t=>2), + # stack_size=2, + # intwidth=6, + # ) # g_p = TypeBasedSTLCGenerator( # size=2, # ty_size=1, @@ -53,7 +59,7 @@ if isempty(ARGS) # forgiveness=0.1, # rand_forgiveness=false, # ) => lr, - MLELossConfig{STLC}(NumApps(), Linear()) => lr, + MLELossConfig{STLC}(TermSize(), Linear()) => lr, ] push!(as, replace(string(g_p), " "=>"")) push!(as, replace(string(l_p), " "=>"")) From 54790f2e40eb63ac3ff15dcc6e084627a4d5ea48 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 16 May 2024 19:35:58 -0700 Subject: [PATCH 148/231] derived coq typechecks for empyt stack --- examples/qc/benchmarks/lib/util.jl | 50 +++++++++++++++++++++--------- examples/qc/benchmarks/tool.jl | 4 +-- 2 files changed, 37 insertions(+), 17 deletions(-) diff --git a/examples/qc/benchmarks/lib/util.jl b/examples/qc/benchmarks/lib/util.jl index 6431008a..be218e1b 100644 --- a/examples/qc/benchmarks/lib/util.jl +++ b/examples/qc/benchmarks/lib/util.jl @@ -479,7 +479,7 @@ function derived_to_coq(p, adnodes_vals, io) matchid_to_cases = Dict() for (name, val) in adnodes_vals matchid, case = split(name, "%%") - case = "(" * join([tocoq(eval(Meta.parse(x))) for x in split(case, "%")], ", ") * ")" + case = if case == "" "tt" else "(" * join([tocoq(eval(Meta.parse(x))) for x in split(case, "%")], ", ") * ")" end val = thousandths(val) push!(get!(matchid_to_cases, matchid, []), (case, val)) end @@ -490,7 +490,11 @@ function derived_to_coq(p, adnodes_vals, io) stack_vars = ["(stack$(i) : nat)" for i in 1:p.stack_size] - update_stack_vars(loc) = join(stack_vars[2:end], " ") * " $(loc)" + update_stack_vars(loc) = if p.stack_size == 0 + "" + else + join(stack_vars[2:end], " ") * " $(loc)" + end segments = [] # Emit line @@ -505,7 +509,6 @@ function derived_to_coq(p, adnodes_vals, io) else " " ^ indent_ * s end - isempty(segments) || println(last(segments)) push!(segments, segment) end # Emit with outer indent @@ -526,18 +529,26 @@ function derived_to_coq(p, adnodes_vals, io) indent -= 1 end + coq_tuple(names) = if isempty(names) + "tt" + else + "($(join(names, ", ")))" + end + function ematch!(matchid, leaf) cases = matchid_to_cases[matchid] cases = sort(cases) if leaf - e!("match ($(join(stack_vars, ", "))) with ") + e!("match $(coq_tuple(stack_vars)) with ") else - e!("match (size, ($(join(stack_vars, ", ")))) with ") + e!("match (size, $(coq_tuple(stack_vars))) with ") end for (name, w) in cases e!("| $(name) => $(w)") end - e!("| _ => 500") + if !(leaf && isempty(stack_vars)) + e!("| _ => 500") + end e!("end") end @@ -609,8 +620,7 @@ function derived_to_coq(p, adnodes_vals, io) o!("| Ctor_$(leaf_prefix)$(ctor) =>") rparens_needed = 0 need_variantis = any( - (param in tys && param != ty) - || (param == ty && !zero_case()) + param in tys for param in params ) variantis_options = Iterators.product([ @@ -640,7 +650,7 @@ function derived_to_coq(p, adnodes_vals, io) indent += 1 ematch!("$(prefix)_$(ty)_$(ctor)_variantis_$(Tuple(param_ctor_is))", leaf) a!(",") - e!("($(join(param_ctors, ", ")))") + e!("returnGen ($(join(param_ctors, ", ")))") indent -= 1 e!(");") end @@ -649,9 +659,9 @@ function derived_to_coq(p, adnodes_vals, io) indent += 1 ematch!("$(prefix)_$(ty)_$(ctor)_variantis_$(Tuple(param_ctor_is))", leaf) a!(",") - e!("($(join(param_ctors, ", ")))") + e!("returnGen ($(join(param_ctors, ", ")))") indent -= 1 - if j == length(variantis_options) + if j < length(variantis_options) e!(");") else e!(")") @@ -671,7 +681,10 @@ function derived_to_coq(p, adnodes_vals, io) e!("(fun p$(parami) : $(to_coq(param)) =>") rparens_needed += 1 elseif param ∈ tys - e!("bindGen (gen_$(to_coq(param)) $(p.ty_sizes[param]) $(update_stack_vars(type_ctor_parami_to_id[(ty, ctor, parami)])))") + e!("bindGen (gen_$(to_coq(param))") + a!(" param$(parami)_ctor") + a!(" $(p.ty_sizes[param])") + a!(" $(update_stack_vars(type_ctor_parami_to_id[(ty, ctor, parami)])))") e!("(fun p$(parami) : $(to_coq(param)) =>") rparens_needed += 1 elseif param == AnyBool @@ -702,11 +715,14 @@ function derived_to_coq(p, adnodes_vals, io) e!("returnGen ($(ctor) $(join(["p$(parami)" for parami in 1:length(params)], " ")))") a!(")" ^ rparens_needed) end + + if !leaf + indent -= 1 + end e!("end") end if !leaf e!("end") - indent -= 1 end a!(".") e!() @@ -728,13 +744,17 @@ function derived_to_coq(p, adnodes_vals, io) end e!("end") a!(",") - e!("Ctor_$(ctor)") + e!("returnGen Ctor_$(ctor)") o!(")") + if i < length(variants(p.root_ty)) + a!(";") + end end indent -= 1 e!("]) (fun init_ctor =>") - e!("gen_$(to_coq(p.root_ty)) init_ctor $(p.ty_sizes[p.root_ty])$(" 0" ^ p.stack_size).") + e!("gen_$(to_coq(p.root_ty)) init_ctor $(p.ty_sizes[p.root_ty])$(" 0" ^ p.stack_size)") a!(").") + indent -= 1 e!() e!(after) join(segments, "\n") diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index d3e26606..69b42b5b 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -17,8 +17,8 @@ if isempty(ARGS) g_p = DerivedGenerator{STLC}( root_ty=Expr.T, ty_sizes=Dict(Expr.T=>1, Typ.T=>1), - stack_size=1, - intwidth=4, + stack_size=0, + intwidth=2, ) # g_p = DerivedGenerator{RBT}( # root_ty=ColorKVTree.t, From abf7016c43d0d5c70f84aef07405328d1e98523d Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 16 May 2024 20:45:01 -0700 Subject: [PATCH 149/231] small tweaks before annoying extraction change --- examples/qc/benchmarks/lib/util.jl | 10 +++++----- examples/qc/benchmarks/tool.jl | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/qc/benchmarks/lib/util.jl b/examples/qc/benchmarks/lib/util.jl index be218e1b..4bcc16f9 100644 --- a/examples/qc/benchmarks/lib/util.jl +++ b/examples/qc/benchmarks/lib/util.jl @@ -547,16 +547,16 @@ function derived_to_coq(p, adnodes_vals, io) e!("| $(name) => $(w)") end if !(leaf && isempty(stack_vars)) - e!("| _ => 500") + e!("| _ => 0") end e!("end") end for_indent(tys) do ty - o!("Inductive $(to_coq(ty))_leaf_ctor : Type :=") + o!("Inductive $(to_coq(ty))_leaf_ctor :=") for (ctor, params) in variants(ty) if !(ty in params) - e!("| Ctor_leaf_$(ctor) : $(to_coq(ty))_leaf_ctor") + e!("| Ctor_leaf_$(ctor)") end end a!(".") @@ -565,9 +565,9 @@ function derived_to_coq(p, adnodes_vals, io) sif(c, s) = if c s else "" end for_indent(tys) do ty - o!("Inductive $(to_coq(ty))_ctor : Type :=") + o!("Inductive $(to_coq(ty))_ctor :=") for (ctor, _) in variants(ty) - e!("| Ctor_$(ctor) : $(to_coq(ty))_ctor") + e!("| Ctor_$(ctor)") end a!(".") e!() diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 69b42b5b..3798fad0 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -16,9 +16,9 @@ if isempty(ARGS) # ) g_p = DerivedGenerator{STLC}( root_ty=Expr.T, - ty_sizes=Dict(Expr.T=>1, Typ.T=>1), - stack_size=0, - intwidth=2, + ty_sizes=Dict(Expr.T=>4, Typ.T=>1), + stack_size=2, + intwidth=6, ) # g_p = DerivedGenerator{RBT}( # root_ty=ColorKVTree.t, From 614711f418aacb8a5857b3db413b676d2ab95553 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 16 May 2024 22:10:19 -0700 Subject: [PATCH 150/231] hundredths and fix tuple extraction --- examples/qc/benchmarks/lib/util.jl | 42 ++++++++++++++++++++++++------ examples/qc/benchmarks/main.jl | 40 ++++++++++++++++------------ examples/qc/benchmarks/tool.jl | 4 +-- 3 files changed, 59 insertions(+), 27 deletions(-) diff --git a/examples/qc/benchmarks/lib/util.jl b/examples/qc/benchmarks/lib/util.jl index 4bcc16f9..73df6cc9 100644 --- a/examples/qc/benchmarks/lib/util.jl +++ b/examples/qc/benchmarks/lib/util.jl @@ -200,10 +200,10 @@ function cmd_out(cmd) end thousandths(n) = if isnan(n) "nan" else Integer(round(n, digits=3) * 1000) end +hundredths(n) = if isnan(n) "nan" else Integer(round(n * 100)) end global _soft_assert_ever_triggered = Ref(false) - function to_unquoted(e) io = IOBuffer() Base.show_unquoted(io, e) @@ -480,7 +480,7 @@ function derived_to_coq(p, adnodes_vals, io) for (name, val) in adnodes_vals matchid, case = split(name, "%%") case = if case == "" "tt" else "(" * join([tocoq(eval(Meta.parse(x))) for x in split(case, "%")], ", ") * ")" end - val = thousandths(val) + val = hundredths(val) push!(get!(matchid_to_cases, matchid, []), (case, val)) end @@ -547,7 +547,7 @@ function derived_to_coq(p, adnodes_vals, io) e!("| $(name) => $(w)") end if !(leaf && isempty(stack_vars)) - e!("| _ => 0") + e!("| _ => 500") end e!("end") end @@ -573,6 +573,10 @@ function derived_to_coq(p, adnodes_vals, io) e!() end + variantis_types_placeholder = "(* VARIANTIS TYPES GO HERE *)" + e!(variantis_types_placeholder) + variantis_types_needed = Set() + join2(it, sep) = join(it, sep) * sep for leaf in [true, false] @@ -623,6 +627,21 @@ function derived_to_coq(p, adnodes_vals, io) param in tys for param in params ) + variantis_types = [ + "$(to_coq(param))_$(if param == ty && zero_case() "leaf_" else "" end)ctor" + for param in params + if param in tys + ] + if length(variantis_types) > 1 + push!(variantis_types_needed, variantis_types) + end + variantis_struct = join(variantis_types, "_") + variantis_struct_ctor = if length(variantis_types) > 1 + "Mk$(variantis_struct) " + else + "" + end + variantis_options = Iterators.product([ [ # If were generating ourself, and we have zero fuel, then don't choose another recursive constructor @@ -643,14 +662,13 @@ function derived_to_coq(p, adnodes_vals, io) push!(param_ctors, b) end - if length(variantis_options) == 1 e!("(* no alternatives, so lets just put this again *)") e!("(") indent += 1 ematch!("$(prefix)_$(ty)_$(ctor)_variantis_$(Tuple(param_ctor_is))", leaf) a!(",") - e!("returnGen ($(join(param_ctors, ", ")))") + e!("returnGen ($(variantis_struct_ctor)$(join(param_ctors, " ")))") indent -= 1 e!(");") end @@ -659,7 +677,7 @@ function derived_to_coq(p, adnodes_vals, io) indent += 1 ematch!("$(prefix)_$(ty)_$(ctor)_variantis_$(Tuple(param_ctor_is))", leaf) a!(",") - e!("returnGen ($(join(param_ctors, ", ")))") + e!("returnGen ($(variantis_struct_ctor)$(join(param_ctors, " ")))") indent -= 1 if j < length(variantis_options) e!(");") @@ -670,7 +688,7 @@ function derived_to_coq(p, adnodes_vals, io) e!("]) (fun param_variantis =>") rparens_needed += 1 - e!("let '($(join(["param$(parami)_ctor" for (parami, param) in enumerate(params) if param in tys], ", "))) := param_variantis in") + e!("let '($(variantis_struct_ctor)$(join(["param$(parami)_ctor" for (parami, param) in enumerate(params) if param in tys], " "))) := param_variantis in") end for (parami, param) in enumerate(params) if param == ty @@ -757,5 +775,13 @@ function derived_to_coq(p, adnodes_vals, io) indent -= 1 e!() e!(after) - join(segments, "\n") + result = join(segments, "\n") + replace(result, "$(variantis_types_placeholder)" => join([ + begin + variantis_struct = join(variantis_types,"_") + "Inductive $(variantis_struct) := + | Mk$(variantis_struct) : $(join(variantis_types," -> ")) -> $(variantis_struct)." + end + for variantis_types in variantis_types_needed + ], "\n")) end diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 508746fb..24926c53 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -1,14 +1,20 @@ include("benchmarks.jl") GENERATION_PARAMS_LIST = [ - TypeBasedSTLCGenerator( - size=5, - ty_size=2, - dependents=[:size,:stack_tail], - ty_dependents=[:size,:stack_tail], + # TypeBasedSTLCGenerator( + # size=5, + # ty_size=2, + # dependents=[:size,:stack_tail], + # ty_dependents=[:size,:stack_tail], + # stack_size=2, + # intwidth=6, + # ), + DerivedGenerator{STLC}( + root_ty=Expr.T, + ty_sizes=Dict(Expr.T=>4, Typ.T=>1), stack_size=2, intwidth=6, - ), + ) # TypeBasedRBTGenerator( # size=5, # leaf_dependents=[:size,:parent_color,:stack_tail], @@ -20,7 +26,7 @@ GENERATION_PARAMS_LIST = [ ] LR_LIST = [0.3] FP_LIST = [0.] -FORIGIVENESS_LIST = [0.02, 0.1, 0.5] +FORIGIVENESS_LIST = [0] RAND_FORIGIVENESS_LIST = [true] RESAMPLING_FREQUENCY_LIST = [2] SAMPLES_PER_BATCH_LIST = [200] @@ -45,16 +51,16 @@ println() LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ - # MLELossConfig{STLC}(NumApps(), Linear()), - SamplingEntropy{STLC}( - resampling_frequency=resampling_frequency, - samples_per_batch=samples_per_batch, - property=STLCWellTyped(), - eq=eq, - failure_penalty=fp, - forgiveness=forgiveness, - rand_forgiveness=rand_forgiveness, - ) => lr, + MLELossConfig{STLC}(NumApps(), Linear()) => lr, + # SamplingEntropy{STLC}( + # resampling_frequency=resampling_frequency, + # samples_per_batch=samples_per_batch, + # property=STLCWellTyped(), + # eq=eq, + # failure_penalty=fp, + # forgiveness=forgiveness, + # rand_forgiveness=rand_forgiveness, + # ) => lr, # SamplingEntropy{BST}( # resampling_frequency=resampling_frequency, # samples_per_batch=samples_per_batch, diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 3798fad0..d699c2e5 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -1,6 +1,6 @@ include("benchmarks.jl") -TAG = "v33_stlc_forgiveness_rand" +TAG = "v34_test_derived_stlc_unif_apps" # TAG = "test" OUT_TOP_DIR = "/space/tjoa/tuning-output" @@ -59,7 +59,7 @@ if isempty(ARGS) # forgiveness=0.1, # rand_forgiveness=false, # ) => lr, - MLELossConfig{STLC}(TermSize(), Linear()) => lr, + MLELossConfig{STLC}(NumApps(), Linear()) => lr, ] push!(as, replace(string(g_p), " "=>"")) push!(as, replace(string(l_p), " "=>"")) From 5d0f0ea1d963ae0d3cdb64e5f3b58068684f44e4 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 16 May 2024 22:20:32 -0700 Subject: [PATCH 151/231] main --- examples/qc/benchmarks/main.jl | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 24926c53..19dc6089 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -31,7 +31,7 @@ RAND_FORIGIVENESS_LIST = [true] RESAMPLING_FREQUENCY_LIST = [2] SAMPLES_PER_BATCH_LIST = [200] EPOCHS_LIST = [2000] -EQ_LIST = [:prob_equals] +EQ_LIST = [:prob_equals, :eq_structure] n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, FORIGIVENESS_LIST, RAND_FORIGIVENESS_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST])) println(n_runs) @@ -51,16 +51,16 @@ println() LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ - MLELossConfig{STLC}(NumApps(), Linear()) => lr, - # SamplingEntropy{STLC}( - # resampling_frequency=resampling_frequency, - # samples_per_batch=samples_per_batch, - # property=STLCWellTyped(), - # eq=eq, - # failure_penalty=fp, - # forgiveness=forgiveness, - # rand_forgiveness=rand_forgiveness, - # ) => lr, + # MLELossConfig{STLC}(NumApps(), Linear()) => lr, + SamplingEntropy{STLC}( + resampling_frequency=resampling_frequency, + samples_per_batch=samples_per_batch, + property=STLCWellTyped(), + eq=eq, + failure_penalty=fp, + forgiveness=forgiveness, + rand_forgiveness=rand_forgiveness, + ) => lr, # SamplingEntropy{BST}( # resampling_frequency=resampling_frequency, # samples_per_batch=samples_per_batch, From b70653be00f4d6cd1cda40c696d58487882ea0ac Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 16 May 2024 22:20:36 -0700 Subject: [PATCH 152/231] Revert "main" This reverts commit 5d0f0ea1d963ae0d3cdb64e5f3b58068684f44e4. --- examples/qc/benchmarks/main.jl | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 19dc6089..24926c53 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -31,7 +31,7 @@ RAND_FORIGIVENESS_LIST = [true] RESAMPLING_FREQUENCY_LIST = [2] SAMPLES_PER_BATCH_LIST = [200] EPOCHS_LIST = [2000] -EQ_LIST = [:prob_equals, :eq_structure] +EQ_LIST = [:prob_equals] n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, FORIGIVENESS_LIST, RAND_FORIGIVENESS_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST])) println(n_runs) @@ -51,16 +51,16 @@ println() LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ - # MLELossConfig{STLC}(NumApps(), Linear()) => lr, - SamplingEntropy{STLC}( - resampling_frequency=resampling_frequency, - samples_per_batch=samples_per_batch, - property=STLCWellTyped(), - eq=eq, - failure_penalty=fp, - forgiveness=forgiveness, - rand_forgiveness=rand_forgiveness, - ) => lr, + MLELossConfig{STLC}(NumApps(), Linear()) => lr, + # SamplingEntropy{STLC}( + # resampling_frequency=resampling_frequency, + # samples_per_batch=samples_per_batch, + # property=STLCWellTyped(), + # eq=eq, + # failure_penalty=fp, + # forgiveness=forgiveness, + # rand_forgiveness=rand_forgiveness, + # ) => lr, # SamplingEntropy{BST}( # resampling_frequency=resampling_frequency, # samples_per_batch=samples_per_batch, From beb3a874844b9c46eb0bdee9fd045a187babfb86 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Fri, 17 May 2024 12:08:34 -0700 Subject: [PATCH 153/231] derived RBT --- examples/qc/benchmarks/benchmarks.jl | 101 ++++++++++++++++++++++++ examples/qc/benchmarks/lib/rbt/dist.jl | 2 + examples/qc/benchmarks/lib/stlc/dist.jl | 21 ++++- examples/qc/benchmarks/lib/util.jl | 41 ++++++---- examples/qc/benchmarks/main.jl | 38 +++++---- examples/qc/benchmarks/tool.jl | 42 ++++++---- 6 files changed, 195 insertions(+), 50 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index d4878bda..977e319f 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -743,6 +743,107 @@ end ################################## abstract type RBT <: Benchmark end +function sandwich(::Type{RBT}) + ( + "Require Import ZArith. +From QuickChick Require Import QuickChick. +From ExtLib Require Import Monad. +From ExtLib.Data.Monads Require Import OptionMonad. +Import QcNotation. +Import MonadNotation. +From Coq Require Import List. +Import ListNotations. + +From RBT Require Import Impl Spec.", +"(* --------------------- Tests --------------------- *) + +Definition test_prop_InsertValid := + forAll gSized (fun t => + forAll arbitrary (fun k => + forAll arbitrary (fun v => + (prop_InsertValid t k v)))). + +(*! QuickChick test_prop_InsertValid. *) + +Definition test_prop_DeleteValid := + forAll gSized (fun t => + forAll arbitrary (fun k => + prop_DeleteValid t k)). + +(*! QuickChick test_prop_DeleteValid. *) + +Definition test_prop_InsertPost := + forAll gSized (fun t => + forAll arbitrary (fun k => + forAll arbitrary (fun k' => + forAll arbitrary (fun v => + prop_InsertPost t k k' v)))). + +(*! QuickChick test_prop_InsertPost. *) + +Definition test_prop_DeletePost := + forAll gSized (fun t => + forAll arbitrary (fun k => + forAll arbitrary (fun k' => + prop_DeletePost t k k'))). + +(*! QuickChick test_prop_DeletePost. *) + +Definition test_prop_InsertModel := + forAll gSized (fun t => + forAll arbitrary (fun k => + forAll arbitrary (fun v => + prop_InsertModel t k v))). + +(*! QuickChick test_prop_InsertModel. *) + +Definition test_prop_DeleteModel := + forAll gSized (fun t => + forAll arbitrary (fun k => + prop_DeleteModel t k)). + +(*! QuickChick test_prop_DeleteModel. *) + +Definition test_prop_InsertInsert := + forAll gSized (fun t => + forAll arbitrary (fun k => + forAll arbitrary (fun k' => + forAll arbitrary (fun v => + forAll arbitrary (fun v' => + prop_InsertInsert t k k' v v'))))). + +(*! QuickChick test_prop_InsertInsert. *) + +Definition test_prop_InsertDelete := + forAll gSized (fun t => + forAll arbitrary (fun k => + forAll arbitrary (fun k' => + forAll arbitrary (fun v => + prop_InsertDelete t k k' v)))). + +(*! QuickChick test_prop_InsertDelete. *) + +Definition test_prop_DeleteInsert := + forAll gSized (fun t => + forAll arbitrary (fun k => + forAll arbitrary (fun k' => + forAll arbitrary (fun v' => + prop_DeleteInsert t k k' v')))). + +(*! QuickChick test_prop_DeleteInsert. *) + +Definition test_prop_DeleteDelete := + forAll gSized (fun t => + forAll arbitrary (fun k => + forAll arbitrary (fun k' => + prop_DeleteDelete t k k'))). + +(*! QuickChick test_prop_DeleteDelete. *) + " + ) +end + + struct RBTGeneration <: Generation{RBT} t::ColorKVTree.t end diff --git a/examples/qc/benchmarks/lib/rbt/dist.jl b/examples/qc/benchmarks/lib/rbt/dist.jl index 9475cab6..5d95fbfd 100644 --- a/examples/qc/benchmarks/lib/rbt/dist.jl +++ b/examples/qc/benchmarks/lib/rbt/dist.jl @@ -13,12 +13,14 @@ function Base.string(c::Color.T) B() -> "Color.B()", ] end +to_coq(::Type{Color.T}) = "Color" module ColorKVTree using Dice using Main: DistNat, Color @inductive t E() T(Color.T, t, DistInt32, DistInt32, t) end +to_coq(::Type{ColorKVTree.t}) = "Tree" function tree_size(e::ColorKVTree.t) @match e [ diff --git a/examples/qc/benchmarks/lib/stlc/dist.jl b/examples/qc/benchmarks/lib/stlc/dist.jl index 0f738c0e..4694d31a 100644 --- a/examples/qc/benchmarks/lib/stlc/dist.jl +++ b/examples/qc/benchmarks/lib/stlc/dist.jl @@ -274,6 +274,7 @@ function typecheck(ast::Tuple, gamma, depth=0) end end + function eq_except_numbers(x::Typ.T, y::Typ.T) @match x [ TBool() -> (@match y [ @@ -354,7 +355,7 @@ function eq_structure(x::Expr.T, y::Expr.T) ] end -function eq_except_numbers(x::Opt.T{T}, y::Opt.T{T}) where T +function eq_except_numbers(x::Opt.T{Expr.T}, y::Opt.T{Expr.T}) @match x [ Some(xv) -> (@match y [ Some(yv) -> eq_except_numbers(xv, yv), @@ -367,7 +368,7 @@ function eq_except_numbers(x::Opt.T{T}, y::Opt.T{T}) where T ] end -function eq_structure(x::Opt.T{T}, y::Opt.T{T}) where T +function eq_structure(x::Opt.T{Expr.T}, y::Opt.T{Expr.T}) @match x [ Some(xv) -> (@match y [ Some(yv) -> eq_structure(xv, yv), @@ -428,3 +429,19 @@ function eq_has_app(x::Opt.T{T}, y::Opt.T{T}) where T ]) ] end + +function might_typecheck(x::Expr.T) + @match x [ + Var(_) -> true, + Bool(_) -> false, + App(f2, x2) -> eq_structure(f1, f2) & eq_structure(x1, x2), + Abs(_, _) -> false, + ] +end + +function might_typecheck(x::Opt.T{Expr.T}) + @match x [ + None() -> false, + Some(xv) -> might_typecheck(xv) + ] +end \ No newline at end of file diff --git a/examples/qc/benchmarks/lib/util.jl b/examples/qc/benchmarks/lib/util.jl index 73df6cc9..556808ee 100644 --- a/examples/qc/benchmarks/lib/util.jl +++ b/examples/qc/benchmarks/lib/util.jl @@ -422,12 +422,12 @@ function generate(rs::RunState, p, track_return) ) elseif param == AnyBool flip_for(rs, "$(prefix)$(ty)_$(ctor)_$(parami)_true", dependents) - elseif param == DistUInt32 + elseif param in [DistUInt32, DistInt32] sum( @dice_ite if flip_for(rs, "$(prefix)$(ty)_$(ctor)_$(parami)_num$(n)", dependents) - DistUInt32(n) + param(n) else - DistUInt32(0) + param(0) end for n in twopowers(p.intwidth) ) @@ -588,8 +588,8 @@ function derived_to_coq(p, adnodes_vals, io) o!("Fixpoint") end a!(" gen_$(leaf_prefix)$(to_coq(ty)) ") - a!("(chosen_ctor : $(to_coq(ty))_$(leaf_prefix)ctor) ") leaf || a!("(size : nat) ") + a!("(chosen_ctor : $(to_coq(ty))_$(leaf_prefix)ctor) ") a!(join2(stack_vars, " ")) a!(": G $(to_coq(ty)) :=") @@ -693,15 +693,15 @@ function derived_to_coq(p, adnodes_vals, io) for (parami, param) in enumerate(params) if param == ty e!("bindGen (gen_$(if zero_case() "leaf_" else "" end)$(to_coq(param))") - a!(" param$(parami)_ctor") zero_case() || a!(" size'") + a!(" param$(parami)_ctor") a!(" $(update_stack_vars(type_ctor_parami_to_id[(ty, ctor, parami)])))") e!("(fun p$(parami) : $(to_coq(param)) =>") rparens_needed += 1 elseif param ∈ tys e!("bindGen (gen_$(to_coq(param))") - a!(" param$(parami)_ctor") a!(" $(p.ty_sizes[param])") + a!(" param$(parami)_ctor") a!(" $(update_stack_vars(type_ctor_parami_to_id[(ty, ctor, parami)])))") e!("(fun p$(parami) : $(to_coq(param)) =>") rparens_needed += 1 @@ -711,21 +711,30 @@ function derived_to_coq(p, adnodes_vals, io) e!("in") e!("bindGen (freq [") e!(" (weight_true, returnGen true);") - e!(" (1000-weight_true, returnGen false)") + e!(" (100-weight_true, returnGen false)") e!("]) (fun p$(parami) : $(to_coq(param)) =>") rparens_needed += 1 - elseif param == DistUInt32 + elseif param in [DistUInt32, DistInt32] for n in twopowers(p.intwidth) e!("let weight_$(n) :=") ematch!("$(prefix)$(ty)_$(ctor)_$(parami)_num$(n)", leaf) e!("in") e!("bindGen (freq [") - e!(" (weight_$(n), returnGen $(n));") - e!(" (1000-weight_$(n), returnGen 0)") - e!("]) (fun n$(n) : nat =>") + if param == DistUInt32 + e!(" (weight_$(n), returnGen $(n));") + e!(" (100-weight_$(n), returnGen 0)") + else + e!(" (weight_$(n), returnGen $(n)%Z);") + e!(" (100-weight_$(n), returnGen 0%Z)") + end + e!("]) (fun n$(n) =>") rparens_needed += 1 end - e!("let p$(parami) := $(join(["n$(n)" for n in twopowers(p.intwidth)], " + ")) in ") + if param == DistUInt32 + e!("let p$(parami) := $(join(["n$(n)" for n in twopowers(p.intwidth)], " + ")) in ") + else + e!("let p$(parami) := ($(join(["n$(n)" for n in twopowers(p.intwidth)], " + ")))%Z in ") + end else error() end @@ -755,12 +764,10 @@ function derived_to_coq(p, adnodes_vals, io) o!("(") matchid = "init_$(p.root_ty)_varianti_$(i)" cases = matchid_to_cases[matchid] - cases = sort(cases) - e!("match (tt) with ") + @assert length(cases) == 1 for (name, w) in cases - e!("| $(name) => $(w)") + e!("$(w)") end - e!("end") a!(",") e!("returnGen Ctor_$(ctor)") o!(")") @@ -770,7 +777,7 @@ function derived_to_coq(p, adnodes_vals, io) end indent -= 1 e!("]) (fun init_ctor =>") - e!("gen_$(to_coq(p.root_ty)) init_ctor $(p.ty_sizes[p.root_ty])$(" 0" ^ p.stack_size)") + e!("gen_$(to_coq(p.root_ty)) $(p.ty_sizes[p.root_ty]) init_ctor$(" 0" ^ p.stack_size)") a!(").") indent -= 1 e!() diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 24926c53..2f93dc88 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -9,9 +9,15 @@ GENERATION_PARAMS_LIST = [ # stack_size=2, # intwidth=6, # ), - DerivedGenerator{STLC}( - root_ty=Expr.T, - ty_sizes=Dict(Expr.T=>4, Typ.T=>1), + # DerivedGenerator{STLC}( + # root_ty=Expr.T, + # ty_sizes=Dict(Expr.T=>4, Typ.T=>1), + # stack_size=2, + # intwidth=6, + # ) + DerivedGenerator{RBT}( + root_ty=ColorKVTree.t, + ty_sizes=Dict(ColorKVTree.t=>4, Color.T=>0), stack_size=2, intwidth=6, ) @@ -51,7 +57,7 @@ println() LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ - MLELossConfig{STLC}(NumApps(), Linear()) => lr, + # MLELossConfig{STLC}(NumApps(), Linear()) => lr, # SamplingEntropy{STLC}( # resampling_frequency=resampling_frequency, # samples_per_batch=samples_per_batch, @@ -68,17 +74,19 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ # eq=eq, # failure_penalty=fp, # ) => lr, - # SamplingEntropy{RBT}( - # resampling_frequency=resampling_frequency, - # samples_per_batch=samples_per_batch, - # property=MultipleInvariants([ - # BookkeepingInvariant(), - # BalanceInvariant(), - # OrderInvariant(), - # ]), - # failure_penalty=fp, - # eq=eq, - # ) => lr, + SamplingEntropy{RBT}( + resampling_frequency=resampling_frequency, + samples_per_batch=samples_per_batch, + property=MultipleInvariants([ + BookkeepingInvariant(), + BalanceInvariant(), + OrderInvariant(), + ]), + eq=eq, + failure_penalty=fp, + forgiveness=forgiveness, + rand_forgiveness=rand_forgiveness, + ) => lr, ] for lr in LR_LIST for fp in FP_LIST diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index d699c2e5..dc588bcb 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -1,6 +1,8 @@ include("benchmarks.jl") -TAG = "v34_test_derived_stlc_unif_apps" +TAG = "v34_stlc_derived_spec_structure_and_prob_eq" +TAG = "v34_stlc_derived_unif_apps" +TAG = "v34_rbt_derived" # TAG = "test" OUT_TOP_DIR = "/space/tjoa/tuning-output" @@ -14,18 +16,18 @@ if isempty(ARGS) # num_dependents=[:size,:last_callsite], # intwidth=6, # ) - g_p = DerivedGenerator{STLC}( - root_ty=Expr.T, - ty_sizes=Dict(Expr.T=>4, Typ.T=>1), - stack_size=2, - intwidth=6, - ) - # g_p = DerivedGenerator{RBT}( - # root_ty=ColorKVTree.t, - # ty_sizes=Dict(ColorKVTree.t=>2), + # g_p = DerivedGenerator{STLC}( + # root_ty=Expr.T, + # ty_sizes=Dict(Expr.T=>4, Typ.T=>1), # stack_size=2, # intwidth=6, # ) + g_p = DerivedGenerator{RBT}( + root_ty=ColorKVTree.t, + ty_sizes=Dict(ColorKVTree.t=>4, Color.T=>0), + stack_size=1, + intwidth=6, + ) # g_p = TypeBasedSTLCGenerator( # size=2, # ty_size=1, @@ -45,21 +47,29 @@ if isempty(ARGS) lr = 0.5 fp = 0.01 l_p = [ + SamplingEntropy{RBT}( + resampling_frequency=1, + samples_per_batch=50, + property=MultipleInvariants([ + BookkeepingInvariant(), + BalanceInvariant(), + OrderInvariant(), + ]), + eq=:prob_equals, + failure_penalty=fp, + forgiveness=0.1, + rand_forgiveness=false, + ) => lr, # SamplingEntropy{STLC}( # resampling_frequency=1, # samples_per_batch=50, # property=STLCWellTyped(), - # # property=MultipleInvariants([ - # # BookkeepingInvariant(), - # # BalanceInvariant(), - # # OrderInvariant(), - # # ]), # eq=:prob_equals, # failure_penalty=fp, # forgiveness=0.1, # rand_forgiveness=false, # ) => lr, - MLELossConfig{STLC}(NumApps(), Linear()) => lr, + # MLELossConfig{STLC}(NumApps(), Linear()) => lr, ] push!(as, replace(string(g_p), " "=>"")) push!(as, replace(string(l_p), " "=>"")) From 315bc46909d25d984e6324d8899a4c361cb15eaf Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 18 May 2024 20:22:53 -0700 Subject: [PATCH 154/231] might type but its too forgiving --- examples/qc/benchmarks/benchmarks.jl | 9 +++- examples/qc/benchmarks/lib/stlc/dist.jl | 37 ++++++++++++--- examples/qc/benchmarks/lib/util.jl | 8 ++-- examples/qc/benchmarks/main.jl | 60 ++++++++++++------------- examples/qc/benchmarks/tool.jl | 51 ++++++++++----------- 5 files changed, 99 insertions(+), 66 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 977e319f..f925da8b 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -390,7 +390,7 @@ value(g::STLCGeneration) = g.e struct DerivedGenerator{T} <: GenerationParams{T} root_ty::Type - ty_sizes::Dict{Type, Integer} + ty_sizes::Vector{Pair{Type, Integer}} stack_size::Integer intwidth::Integer end @@ -930,6 +930,13 @@ function check_property(::STLCWellTyped, e::Opt.T{Expr.T}) end name(::STLCWellTyped) = "stlcwelltyped" +struct STLCMightType <: Property{STLC} end +function check_property(::STLCMightType, e::Opt.T{Expr.T}) + @assert isdeterministic(e) + might_typecheck(e) +end +name(::STLCMightType) = "stlcmighttype" + struct BSTOrderInvariant <: Property{BST} end diff --git a/examples/qc/benchmarks/lib/stlc/dist.jl b/examples/qc/benchmarks/lib/stlc/dist.jl index 4694d31a..bc7b0459 100644 --- a/examples/qc/benchmarks/lib/stlc/dist.jl +++ b/examples/qc/benchmarks/lib/stlc/dist.jl @@ -430,18 +430,43 @@ function eq_has_app(x::Opt.T{T}, y::Opt.T{T}) where T ] end -function might_typecheck(x::Expr.T) +function might_typecheck(x::Expr.T, gamma, depth) @match x [ - Var(_) -> true, - Bool(_) -> false, - App(f2, x2) -> eq_structure(f1, f2) & eq_structure(x1, x2), - Abs(_, _) -> false, + Var(i) -> begin + # var_depth = depth - i - 1 + # if !haskey(gamma, var_depth) + # return "Unknown var $(var_str(var_depth))" + # end + # gamma[var_depth] + :TypeVar # we leniently let this take any type it needs to + end, + Bool(_) -> :TBool, + App(e1, e2) -> begin + t1 = typecheck(e1, gamma, depth) + if t1 == :Error || t1 == :TBool + return :Error + end + if !(t1 in [:TFun, :TypeVar]) + return :Error + end + # Really, should check that t2 matches function input ty of t1 + typecheck(e2, gamma, depth) + end, + Abs(t_in, e) -> begin + gamma′ = copy(gamma) + gamma′[depth] = t_in + t1 = typecheck(e, gamma′, depth + 1) + if t1 == :Error + return :Error + end + :TFun + end, ] end function might_typecheck(x::Opt.T{Expr.T}) @match x [ None() -> false, - Some(xv) -> might_typecheck(xv) + Some(xv) -> might_typecheck(xv, Dict(), 0) != :Error ] end \ No newline at end of file diff --git a/examples/qc/benchmarks/lib/util.jl b/examples/qc/benchmarks/lib/util.jl index 556808ee..409b568b 100644 --- a/examples/qc/benchmarks/lib/util.jl +++ b/examples/qc/benchmarks/lib/util.jl @@ -415,7 +415,7 @@ function generate(rs::RunState, p, track_return) size - 1 end else - p.ty_sizes[param] + Dict(p.ty_sizes)[param] end, # todo: include leaf/zero_case in call location update_stack_tail(p, stack_tail, type_ctor_parami_to_id[(ty, ctor, parami)]) @@ -453,7 +453,7 @@ function generate(rs::RunState, p, track_return) "$(i)" => DistUInt32(i) for i in 1:length(variants(p.root_ty)) ]) - type_to_gen[p.root_ty](false, init_varianti, p.ty_sizes[p.root_ty], empty_stack(p)) + type_to_gen[p.root_ty](false, init_varianti, Dict(p.ty_sizes)[p.root_ty], empty_stack(p)) end to_coq(::Type{DistUInt32}) = "nat" @@ -700,7 +700,7 @@ function derived_to_coq(p, adnodes_vals, io) rparens_needed += 1 elseif param ∈ tys e!("bindGen (gen_$(to_coq(param))") - a!(" $(p.ty_sizes[param])") + a!(" $(Dict(p.ty_sizes)[param])") a!(" param$(parami)_ctor") a!(" $(update_stack_vars(type_ctor_parami_to_id[(ty, ctor, parami)])))") e!("(fun p$(parami) : $(to_coq(param)) =>") @@ -777,7 +777,7 @@ function derived_to_coq(p, adnodes_vals, io) end indent -= 1 e!("]) (fun init_ctor =>") - e!("gen_$(to_coq(p.root_ty)) $(p.ty_sizes[p.root_ty]) init_ctor$(" 0" ^ p.stack_size)") + e!("gen_$(to_coq(p.root_ty)) $(Dict(p.ty_sizes)[p.root_ty]) init_ctor$(" 0" ^ p.stack_size)") a!(").") indent -= 1 e!() diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 2f93dc88..ae341bef 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -9,18 +9,18 @@ GENERATION_PARAMS_LIST = [ # stack_size=2, # intwidth=6, # ), - # DerivedGenerator{STLC}( - # root_ty=Expr.T, - # ty_sizes=Dict(Expr.T=>4, Typ.T=>1), - # stack_size=2, - # intwidth=6, - # ) - DerivedGenerator{RBT}( - root_ty=ColorKVTree.t, - ty_sizes=Dict(ColorKVTree.t=>4, Color.T=>0), + DerivedGenerator{STLC}( + root_ty=Expr.T, + ty_sizes=[Expr.T=>4, Typ.T=>1], stack_size=2, intwidth=6, ) + # DerivedGenerator{RBT}( + # root_ty=ColorKVTree.t, + # ty_sizes=[ColorKVTree.t=>4, Color.T=>0], + # stack_size=2, + # intwidth=6, + # ) # TypeBasedRBTGenerator( # size=5, # leaf_dependents=[:size,:parent_color,:stack_tail], @@ -36,8 +36,8 @@ FORIGIVENESS_LIST = [0] RAND_FORIGIVENESS_LIST = [true] RESAMPLING_FREQUENCY_LIST = [2] SAMPLES_PER_BATCH_LIST = [200] -EPOCHS_LIST = [2000] -EQ_LIST = [:prob_equals] +EPOCHS_LIST = [2_000] +EQ_LIST = [:prob_equals, :eq_structure] n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, FORIGIVENESS_LIST, RAND_FORIGIVENESS_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST])) println(n_runs) @@ -58,35 +58,35 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ # MLELossConfig{STLC}(NumApps(), Linear()) => lr, - # SamplingEntropy{STLC}( + SamplingEntropy{STLC}( + resampling_frequency=resampling_frequency, + samples_per_batch=samples_per_batch, + property=STLCMightType(), + eq=eq, + failure_penalty=fp, + forgiveness=forgiveness, + rand_forgiveness=rand_forgiveness, + ) => lr, + # SamplingEntropy{BST}( # resampling_frequency=resampling_frequency, # samples_per_batch=samples_per_batch, - # property=STLCWellTyped(), + # property=BSTOrderInvariant(), # eq=eq, # failure_penalty=fp, - # forgiveness=forgiveness, - # rand_forgiveness=rand_forgiveness, # ) => lr, - # SamplingEntropy{BST}( + # SamplingEntropy{RBT}( # resampling_frequency=resampling_frequency, # samples_per_batch=samples_per_batch, - # property=BSTOrderInvariant(), + # property=MultipleInvariants([ + # BookkeepingInvariant(), + # BalanceInvariant(), + # OrderInvariant(), + # ]), # eq=eq, # failure_penalty=fp, + # forgiveness=forgiveness, + # rand_forgiveness=rand_forgiveness, # ) => lr, - SamplingEntropy{RBT}( - resampling_frequency=resampling_frequency, - samples_per_batch=samples_per_batch, - property=MultipleInvariants([ - BookkeepingInvariant(), - BalanceInvariant(), - OrderInvariant(), - ]), - eq=eq, - failure_penalty=fp, - forgiveness=forgiveness, - rand_forgiveness=rand_forgiveness, - ) => lr, ] for lr in LR_LIST for fp in FP_LIST diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index dc588bcb..39b65785 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -3,6 +3,7 @@ include("benchmarks.jl") TAG = "v34_stlc_derived_spec_structure_and_prob_eq" TAG = "v34_stlc_derived_unif_apps" TAG = "v34_rbt_derived" +TAG = "v35_stlc_might" # TAG = "test" OUT_TOP_DIR = "/space/tjoa/tuning-output" @@ -16,18 +17,18 @@ if isempty(ARGS) # num_dependents=[:size,:last_callsite], # intwidth=6, # ) - # g_p = DerivedGenerator{STLC}( - # root_ty=Expr.T, - # ty_sizes=Dict(Expr.T=>4, Typ.T=>1), - # stack_size=2, - # intwidth=6, - # ) - g_p = DerivedGenerator{RBT}( - root_ty=ColorKVTree.t, - ty_sizes=Dict(ColorKVTree.t=>4, Color.T=>0), - stack_size=1, + g_p = DerivedGenerator{STLC}( + root_ty=Expr.T, + ty_sizes=[Expr.T=>4, Typ.T=>1], + stack_size=2, intwidth=6, ) + # g_p = DerivedGenerator{RBT}( + # root_ty=ColorKVTree.t, + # ty_sizes=Dict(ColorKVTree.t=>4, Color.T=>0), + # stack_size=1, + # intwidth=6, + # ) # g_p = TypeBasedSTLCGenerator( # size=2, # ty_size=1, @@ -47,28 +48,28 @@ if isempty(ARGS) lr = 0.5 fp = 0.01 l_p = [ - SamplingEntropy{RBT}( - resampling_frequency=1, - samples_per_batch=50, - property=MultipleInvariants([ - BookkeepingInvariant(), - BalanceInvariant(), - OrderInvariant(), - ]), - eq=:prob_equals, - failure_penalty=fp, - forgiveness=0.1, - rand_forgiveness=false, - ) => lr, - # SamplingEntropy{STLC}( + # SamplingEntropy{RBT}( # resampling_frequency=1, # samples_per_batch=50, - # property=STLCWellTyped(), + # property=MultipleInvariants([ + # BookkeepingInvariant(), + # BalanceInvariant(), + # OrderInvariant(), + # ]), # eq=:prob_equals, # failure_penalty=fp, # forgiveness=0.1, # rand_forgiveness=false, # ) => lr, + SamplingEntropy{STLC}( + resampling_frequency=1, + samples_per_batch=50, + property=STLCMightType(), + eq=:prob_equals, + failure_penalty=fp, + forgiveness=0.1, + rand_forgiveness=false, + ) => lr, # MLELossConfig{STLC}(NumApps(), Linear()) => lr, ] push!(as, replace(string(g_p), " "=>"")) From d183e729d45ae7cac402e133ed2b6b8f1b27204c Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 18 May 2024 20:50:31 -0700 Subject: [PATCH 155/231] fix might_typecheck bug --- examples/qc/benchmarks/benchmarks.jl | 5 ++++- examples/qc/benchmarks/lib/stlc/dist.jl | 14 ++++++++++---- examples/qc/benchmarks/tool.jl | 2 +- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index f925da8b..1e143b41 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -933,7 +933,10 @@ name(::STLCWellTyped) = "stlcwelltyped" struct STLCMightType <: Property{STLC} end function check_property(::STLCMightType, e::Opt.T{Expr.T}) @assert isdeterministic(e) - might_typecheck(e) + meets = might_typecheck(e) + # assert this this is strictly weaker than full welltyped + @assert !check_property(STLCWellTyped(), e) || meets "$(opt_stlc_str(Dice.frombits(e, Dict())))" + meets end name(::STLCMightType) = "stlcmighttype" diff --git a/examples/qc/benchmarks/lib/stlc/dist.jl b/examples/qc/benchmarks/lib/stlc/dist.jl index bc7b0459..b9be7bc0 100644 --- a/examples/qc/benchmarks/lib/stlc/dist.jl +++ b/examples/qc/benchmarks/lib/stlc/dist.jl @@ -433,16 +433,18 @@ end function might_typecheck(x::Expr.T, gamma, depth) @match x [ Var(i) -> begin + # i = Dice.frombits(i, Dict()) # var_depth = depth - i - 1 # if !haskey(gamma, var_depth) - # return "Unknown var $(var_str(var_depth))" + # return :Error + # # return "Unknown var $(var_str(var_depth))" # end # gamma[var_depth] :TypeVar # we leniently let this take any type it needs to end, Bool(_) -> :TBool, App(e1, e2) -> begin - t1 = typecheck(e1, gamma, depth) + t1 = might_typecheck(e1, gamma, depth) if t1 == :Error || t1 == :TBool return :Error end @@ -450,12 +452,16 @@ function might_typecheck(x::Expr.T, gamma, depth) return :Error end # Really, should check that t2 matches function input ty of t1 - typecheck(e2, gamma, depth) + t2 = might_typecheck(e2, gamma, depth) + if t2 == :Error + return :Error + end + :TypeVar end, Abs(t_in, e) -> begin gamma′ = copy(gamma) gamma′[depth] = t_in - t1 = typecheck(e, gamma′, depth + 1) + t1 = might_typecheck(e, gamma′, depth + 1) if t1 == :Error return :Error end diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 39b65785..48b53784 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -3,7 +3,7 @@ include("benchmarks.jl") TAG = "v34_stlc_derived_spec_structure_and_prob_eq" TAG = "v34_stlc_derived_unif_apps" TAG = "v34_rbt_derived" -TAG = "v35_stlc_might" +TAG = "v36_stlc_might_fixed" # TAG = "test" OUT_TOP_DIR = "/space/tjoa/tuning-output" From 6a9f9805cc44db0b354f64aa1526db3a49795b30 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 18 May 2024 20:51:30 -0700 Subject: [PATCH 156/231] allow tobits for empty tuple --- src/dist/misc.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dist/misc.jl b/src/dist/misc.jl index 65c774e4..cb7012cf 100644 --- a/src/dist/misc.jl +++ b/src/dist/misc.jl @@ -12,7 +12,7 @@ frombits(::Nothing, _) = nothing ################################## tobits(x::Tuple) = - mapreduce(tobits, vcat, x) + mapreduce(tobits, vcat, x; init=[]) frombits(x::Tuple, world) = map(v -> frombits(v, world), x) From a2d9a0c02bfb927277684ed041e536e505ee5b2d Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 18 May 2024 20:57:10 -0700 Subject: [PATCH 157/231] stricter might_typecheck (check var nums) --- examples/qc/benchmarks/lib/stlc/dist.jl | 12 ++++++------ examples/qc/benchmarks/tool.jl | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/examples/qc/benchmarks/lib/stlc/dist.jl b/examples/qc/benchmarks/lib/stlc/dist.jl index b9be7bc0..323016be 100644 --- a/examples/qc/benchmarks/lib/stlc/dist.jl +++ b/examples/qc/benchmarks/lib/stlc/dist.jl @@ -433,12 +433,12 @@ end function might_typecheck(x::Expr.T, gamma, depth) @match x [ Var(i) -> begin - # i = Dice.frombits(i, Dict()) - # var_depth = depth - i - 1 - # if !haskey(gamma, var_depth) - # return :Error - # # return "Unknown var $(var_str(var_depth))" - # end + i = Dice.frombits(i, Dict()) + var_depth = depth - i - 1 + if !haskey(gamma, var_depth) + return :Error + end + # note that gamma is wrong! because we put dists in it # gamma[var_depth] :TypeVar # we leniently let this take any type it needs to end, diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 48b53784..1762a6db 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -4,6 +4,7 @@ TAG = "v34_stlc_derived_spec_structure_and_prob_eq" TAG = "v34_stlc_derived_unif_apps" TAG = "v34_rbt_derived" TAG = "v36_stlc_might_fixed" +TAG = "v37_stlc_might2" # this one is stricter # TAG = "test" OUT_TOP_DIR = "/space/tjoa/tuning-output" From 3b940055828d1b671eed6b67b778cf4a444772b3 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 19 May 2024 22:07:30 -0700 Subject: [PATCH 158/231] stlc var numbers --- examples/qc/benchmarks/benchmarks.jl | 11 +++++++++++ examples/qc/benchmarks/lib/stlc/dist.jl | 26 +++++++++++++++++++++++++ examples/qc/benchmarks/main.jl | 2 +- examples/qc/benchmarks/tool.jl | 3 ++- 4 files changed, 40 insertions(+), 2 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 1e143b41..5013ac04 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -941,6 +941,17 @@ end name(::STLCMightType) = "stlcmighttype" +struct STLCVarNumbers <: Property{STLC} end +function check_property(::STLCVarNumbers, e::Opt.T{Expr.T}) + @assert isdeterministic(e) + meets = var_numberings_good(e) + # assert this this is strictly weaker than mighttype + @assert !check_property(STLCMightType(), e) || meets "$(opt_stlc_str(Dice.frombits(e, Dict())))" + meets +end +name(::STLCVarNumbers) = "stlcvarnumbers" + + struct BSTOrderInvariant <: Property{BST} end check_property(::BSTOrderInvariant, t::KVTree.T) = diff --git a/examples/qc/benchmarks/lib/stlc/dist.jl b/examples/qc/benchmarks/lib/stlc/dist.jl index 323016be..ccafeeb4 100644 --- a/examples/qc/benchmarks/lib/stlc/dist.jl +++ b/examples/qc/benchmarks/lib/stlc/dist.jl @@ -475,4 +475,30 @@ function might_typecheck(x::Opt.T{Expr.T}) None() -> false, Some(xv) -> might_typecheck(xv, Dict(), 0) != :Error ] +end + +function var_numberings_good(x::Expr.T, gamma, depth) + @match x [ + Var(i) -> begin + i = Dice.frombits(i, Dict()) + var_depth = depth - i - 1 + haskey(gamma, var_depth) + end, + Bool(_) -> true, + App(e1, e2) -> begin + var_numberings_good(e1, gamma, depth) & var_numberings_good(e2, gamma, depth) + end, + Abs(t_in, e) -> begin + gamma′ = copy(gamma) + gamma′[depth] = t_in + var_numberings_good(e, gamma′, depth + 1) + end, + ] +end + +function var_numberings_good(x::Opt.T{Expr.T}) + @match x [ + None() -> false, + Some(xv) -> var_numberings_good(xv, Dict(), 0), + ] end \ No newline at end of file diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index ae341bef..8dbd326c 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -61,7 +61,7 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ SamplingEntropy{STLC}( resampling_frequency=resampling_frequency, samples_per_batch=samples_per_batch, - property=STLCMightType(), + property=STLCVarNumbers(), eq=eq, failure_penalty=fp, forgiveness=forgiveness, diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 1762a6db..e8fcb908 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -5,6 +5,7 @@ TAG = "v34_stlc_derived_unif_apps" TAG = "v34_rbt_derived" TAG = "v36_stlc_might_fixed" TAG = "v37_stlc_might2" # this one is stricter +TAG = "v38_stlc_vars" # this one is stricter # TAG = "test" OUT_TOP_DIR = "/space/tjoa/tuning-output" @@ -65,7 +66,7 @@ if isempty(ARGS) SamplingEntropy{STLC}( resampling_frequency=1, samples_per_batch=50, - property=STLCMightType(), + property=STLCVarNumbers(), eq=:prob_equals, failure_penalty=fp, forgiveness=0.1, From a45721b171b13b1f785d9240ce4c91b67e3a1e85 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 21 May 2024 20:30:31 -0700 Subject: [PATCH 159/231] print mle metric --- examples/qc/benchmarks/benchmarks.jl | 55 +++++++--------------------- examples/qc/benchmarks/tool.jl | 21 ++++++----- 2 files changed, 24 insertions(+), 52 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 5013ac04..903270d9 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -47,6 +47,19 @@ function run_benchmark( generation_emit_stats(rs, generation, s) generation_params_emit_stats(rs, generation_params, s) + + for (i, (p, lr)) in enumerate(loss_config_weight_pairs) + if p isa MLELossConfig + println_flush(rs.io, "Saving $(s) distribution...") + metric = compute_metric(p.metric, generation) + time_infer = @elapsed metric_dist = pr_mixed(rs.var_vals)(metric) + println(rs.io, " $(time_infer) seconds") + save_metric_dist(joinpath(rs.out_dir, "loss$(i)_dist_$(name(p.metric))_$(s).csv"), metric_dist; rs.io) + println(rs.io) + end + end + + println(rs.io) end emit_stats("initial") @@ -708,36 +721,6 @@ function create_loss_manager(rs::RunState, p::ApproxBSTConstructorEntropy, gener create_simple_loss_manager(rs, loss) end -################################## -# Sampling BST constructor entropy loss -################################## - -# struct SamplingBSTConstructorEntropy <: LossConfig{BST} -# resampling_frequency::Integer -# samples_per_batch::Integer -# function SamplingBSTConstructorEntropy(; resampling_frequency, samples_per_batch) -# new(resampling_frequency, samples_per_batch) -# end -# end -# to_subpath(p::SamplingBSTConstructorEntropy) = ["sampling_entropy", "freq=$(p.resampling_frequency),spb=$(p.samples_per_batch)"] -# function create_loss_manager(p::SamplingBSTConstructorEntropy, io, out_dir, var_vals, g::BSTGeneration) -# println_flush(io, "Building random_ctor graph...") -# time_build_random_ctor = @elapsed random_ctor = match(g.constructors_overapproximation, [ -# "Some" => e -> choice(collect_constructors(e)), # TODO: implement collect_constructors -# "None" => () -> DistInt32(-1), -# ]) -# println(io, " $(time_build_random_ctor) seconds") -# function train!(; epochs, learning_rate) -# train_via_sampling_entropy!( -# io, out_dir, var_vals, random_ctor; epochs, learning_rate, -# resampling_frequency=p.resampling_frequency, samples_per_batch=p.samples_per_batch, -# domain=values(bst_ctor_to_id), -# ignored_domain=[DistInt32(-1)] -# ) -# end -# LossMgrImpl(_ -> nothing, train!) -# end - ################################## # RBT generation ################################## @@ -1045,18 +1028,6 @@ function create_loss_manager(rs::RunState, p::MLELossConfig, generation) println(rs.io) SimpleLossMgr(loss, nothing) - - # TODO: fix. allow us to register_stats! to rs, or create MLELossMgr - # # Also save distribution of metric being trained - # function f_emit′(tag) - # println_flush(rs.io, "Saving $(tag) distribution...") - # time_infer = @elapsed metric_dist = pr_mixed(rs.var_vals)(metric) - # println(rs.io, " $(time_infer) seconds") - # save_metric_dist(joinpath(rs.out_dir, "dist_$(name(p.metric))_$(tag).csv"), metric_dist; rs.io) - # println(rs.io) - - # emit_stats(mgr, tag) - # end end struct RBTDepth <: Metric{RBT} end diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index e8fcb908..87381b56 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -6,6 +6,7 @@ TAG = "v34_rbt_derived" TAG = "v36_stlc_might_fixed" TAG = "v37_stlc_might2" # this one is stricter TAG = "v38_stlc_vars" # this one is stricter +TAG = "v39_stlc_linapps" # TAG = "test" OUT_TOP_DIR = "/space/tjoa/tuning-output" @@ -63,16 +64,16 @@ if isempty(ARGS) # forgiveness=0.1, # rand_forgiveness=false, # ) => lr, - SamplingEntropy{STLC}( - resampling_frequency=1, - samples_per_batch=50, - property=STLCVarNumbers(), - eq=:prob_equals, - failure_penalty=fp, - forgiveness=0.1, - rand_forgiveness=false, - ) => lr, - # MLELossConfig{STLC}(NumApps(), Linear()) => lr, + # SamplingEntropy{STLC}( + # resampling_frequency=1, + # samples_per_batch=50, + # property=STLCVarNumbers(), + # eq=:prob_equals, + # failure_penalty=fp, + # forgiveness=0.1, + # rand_forgiveness=false, + # ) => lr, + MLELossConfig{STLC}(NumApps(), Linear()) => lr, ] push!(as, replace(string(g_p), " "=>"")) push!(as, replace(string(l_p), " "=>"")) From 3d32996c6f5ede853908c95f45d95e197c85783a Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 22 May 2024 22:11:43 -0700 Subject: [PATCH 160/231] STLC samples --- examples/qc/benchmarks/benchmarks.jl | 57 +++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 903270d9..5f7b1af2 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -59,8 +59,61 @@ function run_benchmark( end end - println(rs.io) - end + # if T == STLC + # samples_to_take = 10_000 + # println_flush(rs.io, "Taking $(samples_to_take) metric samples...") + + # metrics = [NumApps(), TermSize()] + # metric_to_cts = Dict(metric => Dict() for metric in metrics) + + # a = ADComputer(rs.var_vals) + # time_sample = @elapsed with_concrete_ad_flips(rs.var_vals, value(generation)) do + # for _ in 1:samples_to_take + # sample = sample_as_dist(rs.rng, a, value(generation)) + # is_valid = check_property(STLCWellTyped(), sample) + # for (metric, cts) in metric_to_cts + # key = ( + # is_valid, + # Dice.frombits( + # compute_metric(metric, STLCGeneration(sample,[])), + # Dict()) + # ) + # get!(cts, key, 0) + # cts[key] += 1 + # end + # end + # end + # println_loud(rs, " $(time_sample) seconds") + # println_loud(rs, metric_to_cts) + + # for (metric, cts) in metric_to_cts + # filename = joinpath(rs.out_dir, "sampled_$(samples_to_take)_dist_$(name(metric))_$(s).csv") + # open(filename, "w") do file + # min_metric_val = minimum( + # metric_val + # for (valid, metric_val) in keys(cts) + # ) + # @assert min_metric_val >= 0 + # max_metric_val = maximum( + # metric_val + # for (valid, metric_val) in keys(cts) + # ) + # println(file, join([ + # if valid "$(metric_val)" else "$(metric_val)!" end + # for metric_val in 0:max_metric_val + # for valid in [true, false] + # ], "\t")) + # println(file, join([ + # get(cts, (valid, metric_val), 0) + # for metric_val in 0:max_metric_val + # for valid in [true, false] + # ], "\t")) + # end + # end + # end + + # println(rs.io) + # end emit_stats("initial") From 31db1c3967143596c938f4b4327b9a56125bf9b3 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 23 May 2024 19:48:30 -0700 Subject: [PATCH 161/231] update main and tool --- examples/qc/benchmarks/main.jl | 31 +++++++++++++++++-------------- examples/qc/benchmarks/tool.jl | 1 + 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 8dbd326c..5bf264c2 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -1,20 +1,20 @@ include("benchmarks.jl") GENERATION_PARAMS_LIST = [ - # TypeBasedSTLCGenerator( - # size=5, - # ty_size=2, - # dependents=[:size,:stack_tail], - # ty_dependents=[:size,:stack_tail], - # stack_size=2, - # intwidth=6, - # ), - DerivedGenerator{STLC}( - root_ty=Expr.T, - ty_sizes=[Expr.T=>4, Typ.T=>1], + TypeBasedSTLCGenerator( + size=5, + ty_size=2, + dependents=[:size,:stack_tail], + ty_dependents=[:size,:stack_tail], stack_size=2, intwidth=6, - ) + ), + # DerivedGenerator{STLC}( + # root_ty=Expr.T, + # ty_sizes=[Expr.T=>4, Typ.T=>1], + # stack_size=2, + # intwidth=6, + # ) # DerivedGenerator{RBT}( # root_ty=ColorKVTree.t, # ty_sizes=[ColorKVTree.t=>4, Color.T=>0], @@ -35,11 +35,12 @@ FP_LIST = [0.] FORIGIVENESS_LIST = [0] RAND_FORIGIVENESS_LIST = [true] RESAMPLING_FREQUENCY_LIST = [2] +PROPERTY_LIST = [STLCVarNumbers(), STLCMightType(), STLCWellTyped()] SAMPLES_PER_BATCH_LIST = [200] EPOCHS_LIST = [2_000] EQ_LIST = [:prob_equals, :eq_structure] -n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, FORIGIVENESS_LIST, RAND_FORIGIVENESS_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST])) +n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, FORIGIVENESS_LIST, RAND_FORIGIVENESS_LIST, PROPERTY_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST])) println(n_runs) @assert n_runs <= 10 @@ -48,6 +49,7 @@ println(n_runs) @show FP_LIST @show FORIGIVENESS_LIST @show RAND_FORIGIVENESS_LIST +@show PROPERTY_LIST @show RESAMPLING_FREQUENCY_LIST @show SAMPLES_PER_BATCH_LIST @show EPOCHS_LIST @@ -61,7 +63,7 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ SamplingEntropy{STLC}( resampling_frequency=resampling_frequency, samples_per_batch=samples_per_batch, - property=STLCVarNumbers(), + property=property, eq=eq, failure_penalty=fp, forgiveness=forgiveness, @@ -92,6 +94,7 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ for fp in FP_LIST for forgiveness in FORIGIVENESS_LIST for rand_forgiveness in RAND_FORIGIVENESS_LIST + for property in PROPERTY_LIST for resampling_frequency in RESAMPLING_FREQUENCY_LIST for samples_per_batch in SAMPLES_PER_BATCH_LIST for eq in EQ_LIST diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 87381b56..063e1954 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -7,6 +7,7 @@ TAG = "v36_stlc_might_fixed" TAG = "v37_stlc_might2" # this one is stricter TAG = "v38_stlc_vars" # this one is stricter TAG = "v39_stlc_linapps" +TAG = "v40_stlctb_abunch" # TAG = "test" OUT_TOP_DIR = "/space/tjoa/tuning-output" From 33bdcc21c25f23699ec7498bb85ec8efc0f21839 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 23 May 2024 23:03:06 -0700 Subject: [PATCH 162/231] fix syntax error --- examples/qc/benchmarks/benchmarks.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 5f7b1af2..1800b1b1 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -112,8 +112,8 @@ function run_benchmark( # end # end - # println(rs.io) - # end + println(rs.io) + end emit_stats("initial") From 1d57bf66278ef292b0eba427cc21b33342043239 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 25 May 2024 19:50:07 -0700 Subject: [PATCH 163/231] lang wip --- examples/qc/benchmarks/benchmarks.jl | 58 +++- examples/qc/benchmarks/lib/be.jl | 128 ++++++++ examples/qc/benchmarks/lib/lang.jl | 318 +++++++++++++++++++ examples/qc/benchmarks/lib/lib.jl | 2 + examples/qc/benchmarks/lib/stlc/dist.jl | 60 +++- examples/qc/benchmarks/lib/stlc/generator.jl | 11 +- examples/qc/benchmarks/lib/visit.jl | 108 +++++++ examples/qc/benchmarks/tool.jl | 14 +- 8 files changed, 672 insertions(+), 27 deletions(-) create mode 100644 examples/qc/benchmarks/lib/be.jl create mode 100644 examples/qc/benchmarks/lib/lang.jl create mode 100644 examples/qc/benchmarks/lib/visit.jl diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 1800b1b1..65723745 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -1,3 +1,4 @@ +abstract type GenerationParams{T} end include("lib/lib.jl") using Plots @@ -6,7 +7,6 @@ using Random ENV["GKSwstype"] = "100" # prevent plots from displaying abstract type Benchmark end -abstract type GenerationParams{T} end abstract type LossConfig{T} end abstract type LossMgr end @@ -437,8 +437,8 @@ end struct STLCGeneration <: Generation{STLC} - e::Opt.T{Expr.T} - constructors_overapproximation::Vector{Opt.T{Expr.T}} + e::OptExpr.T + constructors_overapproximation::Vector{OptExpr.T} end function generation_emit_stats(rs::RunState, g::STLCGeneration, s::String) println_flush(rs.io, "Saving samples...") @@ -474,13 +474,13 @@ function to_subpath(p::DerivedGenerator{T}) where T end function generate(rs::RunState, p::DerivedGenerator{T}) where T constructors_overapproximation = [] - function add_ctor(v::Opt.T{Expr.T}) + function add_ctor(v::OptExpr.T) push!(constructors_overapproximation, v) v end e = generate(rs, p, add_ctor) if T == STLC - STLCGeneration(Opt.Some(e), constructors_overapproximation) + STLCGeneration(OptExpr.Some(e), constructors_overapproximation) elseif T == BST BSTGeneration(e, constructors_overapproximation) elseif T == RBT @@ -523,7 +523,7 @@ function to_subpath(p::BespokeSTLCGenerator) end function generate(rs::RunState, p::BespokeSTLCGenerator) constructors_overapproximation = [] - function add_ctor(v::Opt.T{Expr.T}) + function add_ctor(v::OptExpr.T) push!(constructors_overapproximation, v) v end @@ -559,6 +559,46 @@ function generation_params_emit_stats(rs::RunState, p::BespokeSTLCGenerator, s) println_flush(rs.io) end +################################## +# Bespoke STLC generator using Lang +################################## + +struct LangBespokeSTLCGenerator <: GenerationParams{STLC} + expr_size::Integer + typ_size::Integer +end +LangBespokeSTLCGenerator(; expr_size, typ_size) = + LangBespokeSTLCGenerator(expr_size, typ_size) +function to_subpath(p::LangBespokeSTLCGenerator) + [ + "stlc", + "langbespoke", + "expr_sz=$(p.expr_size)-typ_sz=$(p.typ_size)", + ] +end +function generate(rs::RunState, p::LangBespokeSTLCGenerator) + constructors_overapproximation = [] + function add_ctor(v::OptExpr.T) + push!(constructors_overapproximation, v) + v + end + prog = gen_expr_lang(p.expr_size, p.typ_size) + e = to_dist(rs, prog) + STLCGeneration(e, constructors_overapproximation) +end + +function generation_params_emit_stats(rs::RunState, p::LangBespokeSTLCGenerator, s) + prog = gen_expr_lang(p.expr_size, p.typ_size) + + path = joinpath(rs.out_dir, "$(s)_Generator.v") + open(path, "w") do file + println(file, to_coq(rs, p, prog)) + end + println_flush(rs.io, "Saved Coq generator to $(path)") + println_flush(rs.io) +end + + ################################## # Type-based STLC generator ################################## @@ -954,7 +994,7 @@ function create_loss_manager(rs::RunState, p::SatisfyPropertyLoss, generation) end struct STLCWellTyped <: Property{STLC} end -function check_property(::STLCWellTyped, e::Opt.T{Expr.T}) +function check_property(::STLCWellTyped, e::OptExpr.T) @assert isdeterministic(e) @match e [ Some(e) -> (@match typecheck(e) [ @@ -967,7 +1007,7 @@ end name(::STLCWellTyped) = "stlcwelltyped" struct STLCMightType <: Property{STLC} end -function check_property(::STLCMightType, e::Opt.T{Expr.T}) +function check_property(::STLCMightType, e::OptExpr.T) @assert isdeterministic(e) meets = might_typecheck(e) # assert this this is strictly weaker than full welltyped @@ -978,7 +1018,7 @@ name(::STLCMightType) = "stlcmighttype" struct STLCVarNumbers <: Property{STLC} end -function check_property(::STLCVarNumbers, e::Opt.T{Expr.T}) +function check_property(::STLCVarNumbers, e::OptExpr.T) @assert isdeterministic(e) meets = var_numberings_good(e) # assert this this is strictly weaker than mighttype diff --git a/examples/qc/benchmarks/lib/be.jl b/examples/qc/benchmarks/lib/be.jl new file mode 100644 index 00000000..fe5fa5dd --- /dev/null +++ b/examples/qc/benchmarks/lib/be.jl @@ -0,0 +1,128 @@ +function gen_expr_lang(expr_size, typ_size) + v = L.Var + p = L.Param + + nil_typ() = L.Construct(ListTyp.T, :nil, []) + cons_typ(hd, tl) = L.Construct(ListTyp.T, :cons, [hd, tl]) + + nil_nat() = L.Construct(ListNat.T, :nil, []) + cons_nat(hd, tl) = L.Construct(ListNat.T, :cons, [hd, tl]) + + none_expr() = L.Construct(OptExpr.T, :None, []) + some_expr(x) = L.Construct(OptExpr.T, :Some, [x]) + + app(x, y) = L.Construct(Expr.T, :App, [x, y]) + var(n) = L.Construct(Expr.T, :Var, [n]) + abs(x, y) = L.Construct(Expr.T, :Abs, [x, y]) + bool(b) = L.Construct(Expr.T, :Bool, [b]) + + tfun(x, y) = L.Construct(Typ.T, :TFun, [x, y]) + tbool() = L.Construct(Typ.T, :TBool, []) + + bind_opt_expr(x, sym, body) = L.BindGen(x, :__x, + L.Match(v(:__x), [ + (:None, []) => L.Construct(OptExpr.T, :None, []), + (:Some, [sym]) => body + ]) + ) + + genVar = L.Function("genVar'", + [p(:ctx, Ctx.T), p(:t, Typ.T), p(:p, Nat.T), p(:r, ListNat.T)], ListNat.T, + L.Match(v(:ctx), [ + (:nil, []) => v(:r), + (:cons, [:t1, :ctx1]) => L.If( + L.Eq(v(:t), v(:t1)), + L.Call("genVar'", [v(:ctx1), v(:t), L.NatAdd([v(:p), L.Nat(1)]), cons_nat(v(:p), v(:r))]), + L.Call("genVar'", [v(:ctx1), v(:t), L.NatAdd([v(:p), L.Nat(1)]), v(:r)]), + ) + ]) + ) + + genZero = L.Function("genZero", [p(:size, Nat.T)], L.G{OptExpr.T}, + L.Match(v(:tau), [ + (:TBool, []) => L.BindGen( + L.GenBool([]), + :b, + L.ReturnGen(some_expr(bool(v(:b)))) + ), + (:TFun, [:T1, :T2]) => bind_opt_expr( + L.Call("genZero", [cons_typ(v(:T1), v(:env)), v(:T2)]), + :e, L.ReturnGen(some_expr(abs(v(:T1), v(:e)))) + ) + ]) + ) + + genTyp = L.Function("genTyp", [p(:size, Nat.T)], L.G{Typ.T}, + L.Match(L.Var(:size), [ + (:Z, []) => tbool(), + (:S, [:size1]) => L.BindGen( + L.Call("genTyp", [v(:size1)]), + :T1, + L.BindGen( + L.Call("genTyp", [v(:size1)]), + :T2, + tfun(v(:T1), v(:T2)) + ) + ) + ]) + ) + + genExpr = L.Function("genExpr", + [p(:env, ListTyp.T), p(:tau, Typ.T), p(:size, Nat.T)], L.G{OptExpr.T}, + L.Match(L.Var(:size), [ + (:Z, []) => + L.BindGen( + L.Backtrack([v(:size)], [ + "var" => L.OneOf( + L.ReturnGen(none_expr()), + L.Map( + L.Lambda([:x], L.ReturnGen(some_expr(var(v(:x))))), + L.Call("genVar'", [v(:env), v(:tau), L.Nat(0), nil_nat()]) + ) + ), + "zero" => L.Call("genZero", [v(:env), v(:tau)]) + ]), + :res, v(:res)), + (:S, [:size1]) => + L.BindGen( + L.Backtrack([v(:size)], [ + "var" => L.OneOf( + L.ReturnGen(none_expr()), + L.Map( + L.Lambda([:x], L.ReturnGen(some_expr(var(v(:x))))), + L.Call("genVar'", [v(:env), v(:tau), L.Nat(0), nil_nat()]) + ) + ), + "app" => L.BindGen( + L.Call("genTyp", [L.Nat(typ_size)]), :T1, + bind_opt_expr( + L.Call("genExpr", [v(:env), tfun(v(:T1), v(:tau)), v(:size1)]), + :e1, + bind_opt_expr( + L.Call("genExpr", [v(:env), v(:T1), v(:size1)]), + :e2, + L.ReturnGen(some_expr(app(v(:e1), v(:e2)))) + ) + ) + ), + "abs" => L.Match(v(:tau), [ + (:TBool, []) => + L.BindGen(L.GenBool([]), :b, L.ReturnGen(some_expr(bool(v(:b))))), + (:TFun, [:T1, :T2]) => + bind_opt_expr( + L.Call("genExpr", [cons_typ(v(:T1), v(:env)), v(:T2), v(:size1)]), + :e, L.ReturnGen(some_expr(abs(v(:T1), v(:e)))) + ) + ]) + ]), + :res, v(:res)) + ]) + ) + + e = L.BindGen( + L.Call("genTyp", [L.Nat(typ_size)]), + :typ, + L.Call("genExpr", [nil_typ(), v(:typ), L.Nat(expr_size)]) + ) + L.Program([genVar, genZero, genTyp, genExpr], e) +end diff --git a/examples/qc/benchmarks/lib/lang.jl b/examples/qc/benchmarks/lib/lang.jl new file mode 100644 index 00000000..32004eb7 --- /dev/null +++ b/examples/qc/benchmarks/lib/lang.jl @@ -0,0 +1,318 @@ +module L + using Dice: InductiveType + + abstract type Expr end + + abstract type G{T} end + + struct Param + name::Symbol + ty::Type + end + + # Basic operations + mutable struct Var <: Expr + s::Symbol + end + + mutable struct Nat <: Expr + x::Unsigned + end + + mutable struct Z <: Expr + x::Integer + end + + mutable struct Bool <: Expr + x::Base.Bool + end + + mutable struct NatAdd <: Expr + xs::Vector{Expr} + end + + mutable struct ZAdd <: Expr + xs::Vector{Expr} + end + + mutable struct Eq <: Expr + x::Expr + y::Expr + end + + mutable struct If <: Expr + c::Expr + t::Expr + e::Expr + end + mutable struct Construct <: Expr + inductive_type::Type + ctor::Symbol + args::Vector{Expr} + end + + mutable struct Match <: Expr + scrutinee::Expr + branches::Vector{Pair{Tuple{Symbol,Vector{Symbol}},Expr}} + end + + mutable struct Call <: Expr + f::String + args::Vector{Expr} + end + + # Not first-class (doesn't subtype Expr). + # They can capture values, so it'd be extra work to implement closures. + mutable struct Lambda + params::Vector{Symbol} + body::Expr + end + + mutable struct Map <: Expr + f::Lambda + l::Expr # must be a dist that defines map, like ListExpr.T + end + + # Randomness + mutable struct BindGen <: Expr + gen::Expr + var::Symbol + body::Expr + end + + mutable struct ReturnGen <: Expr + x::Expr + end + + mutable struct OneOf <: Expr + default::Expr + x::Expr # must be a dist that defines map, like ListExpr.T + end + + mutable struct Frequency <: Expr + dependents::Vector{Expr} + branches::Vector{Pair{String,Expr}} + end + + mutable struct Backtrack <: Expr + dependents::Vector{Expr} + branches::Vector{Pair{String,Expr}} + end + + mutable struct GenNat <: Expr + dependents::Vector{Expr} + width::Unsigned + end + + mutable struct GenZ <: Expr + dependents::Vector{Expr} + width::Unsigned + end + + mutable struct GenBool <: Expr + dependents::Vector{Expr} + end + + # Functions + mutable struct Function + name::String + params::Vector{Param} + ret_ty::Type + body::Expr + end + + mutable struct Program + functions::Vector{Function} + res::Expr + end +end + +# Interpret to a Dice dist +function to_dist(rs::RunState, prog::L.Program)::Dist + @dice_ite if flip(0.5) + OptExpr.Some(Expr.Bool(true)) + else + OptExpr.Some(Expr.App(Expr.Bool(true), Expr.Bool(true))) + end +end + +# Translate to a Coq program +function to_coq(rs::RunState, _::GenerationParams{T}, prog::L.Program)::String where T + vals = compute(rs.var_vals, values(rs.adnodes_of_interest)) + adnodes_vals = Dict(s => vals[adnode] for (s, adnode) in rs.adnodes_of_interest) + before, after = sandwich(T) + + segments = [] + # Emit line + indent = 0 + function e!(s=""; indent_=nothing) + if isnothing(indent_) + indent_ = indent + end + segment = if s == "" + # don't indent empty line + "" + else + " " ^ indent_ * s + end + push!(segments, segment) + end + # Emit with outer indent + o!(s) = e!(s, indent_=indent-1) + # Append to last line + function a!(s) + @assert !isempty(segments) + segments[end] = segments[end] * s + end + e!(before) + e!() + + function for_between(f, f_between, xs) + for (i, x) in enumerate(xs) + f(x) + if i < length(xs) + f_between() + end + end + end + + function with_indent(f) + indent += 1 + res = f() + indent -= 1 + return res + end + + function visit(x::L.Var) + a!(string(x.s)) + end + + function visit(x::L.Nat) + a!("$(x.x)") + end + + function visit(x::L.Z) + a!("$(x.x)%Z") + end + + function visit(x::L.Bool) + a!("$(x.x)") + end + + function visit(x::L.NatAdd) + a!("(") + for_between(() -> a!(" + "), x.xs) do x + visit(x) + end + a!(")") + end + + function visit(x::L.ZAdd) + a!("(") + for_between(() -> a!(" + "), x.xs) do x + visit(x) + end + a!(")%Z") + end + + function visit(x::L.Eq) + visit(x.x) + a!(" = ") + visit(x.y) + a!("?") + end + + function visit(x::L.If) + e!("if ") + visit(x.c) + a!(" then\n") + with_indent() do + visit(x.t) + end + e!("else\n") + with_indent() do + visit(x.e) + end + end + + function visit(x::L.Construct) + a!("(") + for arg in x.args + visit(arg) + end + a!(")") + end + + function visit(x::L.Match) + visit(x.scrutinee) + for ((ctor, args), body) in x.branches + visit(body) + end + end + + function visit(x::L.Call) + for arg in x.args + visit(arg) + end + end + + function visit(x::L.Lambda) + visit(x.body) + end + + function visit(x::L.Map) + visit(x.f) + visit(x.l) + end + + function visit(x::L.BindGen) + visit(x.gen) + visit(x.body) + end + + function visit(x::L.ReturnGen) + visit(x.x) + end + + function visit(x::L.OneOf) + visit(x.default) + visit(x.x) + end + + function visit(x::L.Frequency) + for (name, body) in x.branches + visit(body) + end + end + + function visit(x::L.Backtrack) + for (name, body) in x.branches + visit(body) + end + end + + function visit(x::L.GenNat) + end + + function visit(x::L.GenZ) + end + + function visit(x::L.GenBool) + end + + function visit(x::L.Function) + visit(x.body) + end + + function visit(x::L.Program) + for f in x.functions + visit(f) + end + visit(x.res) + end + visit(prog) + + e!(after) + + join(segments, "\n") +end diff --git a/examples/qc/benchmarks/lib/lib.jl b/examples/qc/benchmarks/lib/lib.jl index 682e61f7..23c49731 100644 --- a/examples/qc/benchmarks/lib/lib.jl +++ b/examples/qc/benchmarks/lib/lib.jl @@ -12,6 +12,7 @@ struct RunState rng::AbstractRNG end +include("lang.jl") include("util.jl") include("lruset/dist.jl") include("lruset/generator.jl") @@ -25,3 +26,4 @@ include("bst/to_coq.jl") include("rbt/dist.jl") include("rbt/generator.jl") include("rbt/to_coq.jl") +include("be.jl") diff --git a/examples/qc/benchmarks/lib/stlc/dist.jl b/examples/qc/benchmarks/lib/stlc/dist.jl index ccafeeb4..6fee19cd 100644 --- a/examples/qc/benchmarks/lib/stlc/dist.jl +++ b/examples/qc/benchmarks/lib/stlc/dist.jl @@ -11,6 +11,52 @@ module Expr @inductive T Var(DistNat) Bool(AnyBool) Abs(Typ.T, T) App(T, T) end +module OptExpr + using Dice + using Main: Expr + @inductive T None() Some(Expr.T) +end + +module ListTyp + using Dice + using Main: Typ + @inductive T nil() cons(Typ.T, T) +end + +module ListNat + using Dice + @inductive T nil() cons(DistUInt32, T) +end + +module ListOptExpr + using Dice + using Main: OptExpr + @inductive T nil() cons(OptExpr.T, T) +end + +module Nat + using Dice + T = DistUInt32 +end + +module Ctx + using Dice + using Main: Typ + @inductive T nil() cons(Typ.T, T) +end + +function one_of(default::OptExpr.T, l::ListOptExpr.T)::OptExpr.T + @match l [ + nil() -> default, + cons(x, xs) -> @dice_ite if flip_reciprocal(length(l)) + x + else + one_of(default, xs) + end + ] +end + + to_coq(::Type{Expr.T}) = "Expr" to_coq(::Type{Typ.T}) = "Typ" @@ -23,14 +69,14 @@ function term_size(e::Expr.T) ]) end -function term_size(e::Opt.T{Expr.T}) +function term_size(e::OptExpr.T) match(e, [ :Some => e -> term_size(e), :None => () -> DistUInt32(1024), ]) end -function num_apps(e::Opt.T{Expr.T}) +function num_apps(e::OptExpr.T) match(e, [ :Some => x -> num_apps(x), :None => () -> DistUInt32(1024), @@ -62,7 +108,7 @@ function ctor_to_id(ctor::Expr.T) ]) end -function opt_ctor_to_id(opt_ctor::Opt.T{Expr.T}) +function opt_ctor_to_id(opt_ctor::OptExpr.T) match(opt_ctor, [ :Some => ctor_to_id, :None => () -> DistInt32(-1), @@ -355,7 +401,7 @@ function eq_structure(x::Expr.T, y::Expr.T) ] end -function eq_except_numbers(x::Opt.T{Expr.T}, y::Opt.T{Expr.T}) +function eq_except_numbers(x::OptExpr.T, y::OptExpr.T) @match x [ Some(xv) -> (@match y [ Some(yv) -> eq_except_numbers(xv, yv), @@ -368,7 +414,7 @@ function eq_except_numbers(x::Opt.T{Expr.T}, y::Opt.T{Expr.T}) ] end -function eq_structure(x::Opt.T{Expr.T}, y::Opt.T{Expr.T}) +function eq_structure(x::OptExpr.T, y::OptExpr.T) @match x [ Some(xv) -> (@match y [ Some(yv) -> eq_structure(xv, yv), @@ -470,7 +516,7 @@ function might_typecheck(x::Expr.T, gamma, depth) ] end -function might_typecheck(x::Opt.T{Expr.T}) +function might_typecheck(x::OptExpr.T) @match x [ None() -> false, Some(xv) -> might_typecheck(xv, Dict(), 0) != :Error @@ -496,7 +542,7 @@ function var_numberings_good(x::Expr.T, gamma, depth) ] end -function var_numberings_good(x::Opt.T{Expr.T}) +function var_numberings_good(x::OptExpr.T) @match x [ None() -> false, Some(xv) -> var_numberings_good(xv, Dict(), 0), diff --git a/examples/qc/benchmarks/lib/stlc/generator.jl b/examples/qc/benchmarks/lib/stlc/generator.jl index 4191f496..311bbd93 100644 --- a/examples/qc/benchmarks/lib/stlc/generator.jl +++ b/examples/qc/benchmarks/lib/stlc/generator.jl @@ -2,12 +2,11 @@ # https://github.com/jwshi21/etna/blob/main/bench-suite/Coq/STLC/Methods/BespokeGenerator.v -Ctx = List{Typ.T} -function gen_var(ctx::Ctx, t::Typ.T, p::DistNat, r::List{DistNat})::List{DistNat} +function gen_var(ctx::Ctx.T, t::Typ.T, p::DistNat, r::List{DistNat})::List{DistNat} match(ctx, [ - :Nil => () -> r, - :Cons => (t′, ctx′) -> @dice_ite if prob_equals(t, t′) + :nil => () -> r, + :cons => (t′, ctx′) -> @dice_ite if prob_equals(t, t′) gen_var(ctx′, t, p + DistNat(1), DistCons(p, r)) else gen_var(ctx′, t, p + DistNat(1), r) @@ -23,7 +22,7 @@ function bind_opt(f, ma::Opt.T{T})::Opt.T{<:Any} where T end # TODO: try returning expr instead of opt extr? what does env do? -function gen_zero(env::Ctx, tau::Typ.T) +function gen_zero(env::Ctx.T, tau::Typ.T) match(tau, [ :TBool => () -> DistSome(DistBoolean(flip(0.5))), # TODO: should this be constant for just learning structure? :TFun => (T1, T2) -> bind_opt(gen_zero(DistCons(T1, env), T2)) do e @@ -45,7 +44,7 @@ function gen_bool() DistBoolean(flip(0.5)) end -function gen_expr(rs::RunState, env::Ctx, tau::Typ.T, sz::Integer, gen_typ_sz::Integer, by_sz, track_return)::Opt.T{Expr.T} +function gen_expr(rs::RunState, env::Ctx.T, tau::Typ.T, sz::Integer, gen_typ_sz::Integer, by_sz, track_return)::OptExpr.T track_return( begin for_prefix = if by_sz "sz$(sz)_" else "" end diff --git a/examples/qc/benchmarks/lib/visit.jl b/examples/qc/benchmarks/lib/visit.jl new file mode 100644 index 00000000..be8dae05 --- /dev/null +++ b/examples/qc/benchmarks/lib/visit.jl @@ -0,0 +1,108 @@ + function visit(x::L.Var) + end + + function visit(x::L.Nat) + end + + function visit(x::L.Z) + end + + function visit(x::L.Bool) + end + + function visit(x::L.NatAdd) + for x in x.xs + visit(x) + end + end + + function visit(x::L.ZAdd) + for x in x.xs + visit(x) + end + end + + function visit(x::L.Eq) + visit(x.x) + visit(x.y) + end + + function visit(x::L.If) + visit(x.c) + visit(x.t) + visit(x.e) + end + + function visit(x::L.Construct) + for arg in x.args + visit(arg) + end + end + + function visit(x::L.Match) + visit(x.scrutinee) + for ((ctor, args), body) in x.branches + visit(body) + end + end + + function visit(x::L.Call) + for arg in x.args + visit(arg) + end + end + + function visit(x::L.Lambda) + visit(x.body) + end + + function visit(x::L.Map) + visit(x.f) + visit(x.l) + end + + function visit(x::L.BindGen) + visit(x.gen) + visit(x.body) + end + + function visit(x::L.ReturnGen) + visit(x.x) + end + + function visit(x::L.OneOf) + visit(x.default) + visit(x.x) + end + + function visit(x::L.Frequency) + for (name, body) in x.branches + visit(body) + end + end + + function visit(x::L.Backtrack) + for (name, body) in x.branches + visit(body) + end + end + + function visit(x::L.GenNat) + end + + function visit(x::L.GenZ) + end + + function visit(x::L.GenBool) + end + + function visit(x::L.Function) + visit(x.body) + end + + function visit(x::L.Program) + for f in x.functions + visit(f) + end + visit(x.res) + end \ No newline at end of file diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 063e1954..77ea1335 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -21,11 +21,15 @@ if isempty(ARGS) # num_dependents=[:size,:last_callsite], # intwidth=6, # ) - g_p = DerivedGenerator{STLC}( - root_ty=Expr.T, - ty_sizes=[Expr.T=>4, Typ.T=>1], - stack_size=2, - intwidth=6, + # g_p = DerivedGenerator{STLC}( + # root_ty=Expr.T, + # ty_sizes=[Expr.T=>4, Typ.T=>1], + # stack_size=2, + # intwidth=6, + # ) + g_p = LangBespokeSTLCGenerator( + expr_size=5, + typ_size=2, ) # g_p = DerivedGenerator{RBT}( # root_ty=ColorKVTree.t, From 559da2278e3fdd2184203d0c56d7adf482604b7f Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 26 May 2024 17:04:23 -0700 Subject: [PATCH 164/231] Dice add inductivetype --- src/dist/inductive/inductive.jl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dist/inductive/inductive.jl b/src/dist/inductive/inductive.jl index 6839393e..87b2daff 100644 --- a/src/dist/inductive/inductive.jl +++ b/src/dist/inductive/inductive.jl @@ -1,5 +1,7 @@ # Distributions over inductively-defined types -export @inductive, @match, matches, variants +export @inductive, @match, matches, variants, InductiveType + +abstract type InductiveType <: Dist{Any} end # alternative to `nothing`, so `nothing` can be used as value _UNSET = gensym("unset") @@ -105,7 +107,7 @@ macro inductive(type, constructors...) ] tvs = if type isa Expr && type.head == :curly map(esc, type.args[2:end]) else [] end quote - struct $(ty) <: $(esc(:(Dice.Dist{Base.Any}))) + struct $(ty) <: $(esc(:(Dice.InductiveType))) union::$(esc(:(Dice.DistTaggedUnion))) end From f3431cc5ecbee9f84d6cd1ad1dd57a809b9f2c9d Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 26 May 2024 17:07:07 -0700 Subject: [PATCH 165/231] bespoke stlc arbitrary in lang --- examples/qc/benchmarks/benchmarks.jl | 23 ++++++ examples/qc/benchmarks/lib/be.jl | 36 +++++----- examples/qc/benchmarks/lib/lang.jl | 94 +++++++++++++++++++++---- examples/qc/benchmarks/lib/stlc/dist.jl | 12 ++-- 4 files changed, 133 insertions(+), 32 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 65723745..f2f8e57e 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -434,6 +434,29 @@ forAll gSized (fun (e: Expr) => " ) end +function sandwichmaybestlc() + ( + "From QuickChick Require Import QuickChick. Import QcNotation. +From Coq Require Import Bool ZArith List. Import ListNotations. +From ExtLib Require Import Monad. +From ExtLib.Data.Monads Require Import OptionMonad. +Import MonadNotation. + +From STLC Require Import Impl Spec.", +"Definition test_prop_SinglePreserve := +forAllMaybe gSized (fun (e: Expr) => + prop_SinglePreserve e). + +(*! QuickChick test_prop_SinglePreserve. *) + +Definition test_prop_MultiPreserve := +forAllMaybe gSized (fun (e: Expr) => + prop_MultiPreserve e). + +(*! QuickChick test_prop_MultiPreserve. *) + " + ) +end struct STLCGeneration <: Generation{STLC} diff --git a/examples/qc/benchmarks/lib/be.jl b/examples/qc/benchmarks/lib/be.jl index fe5fa5dd..fb74801b 100644 --- a/examples/qc/benchmarks/lib/be.jl +++ b/examples/qc/benchmarks/lib/be.jl @@ -19,9 +19,9 @@ function gen_expr_lang(expr_size, typ_size) tfun(x, y) = L.Construct(Typ.T, :TFun, [x, y]) tbool() = L.Construct(Typ.T, :TBool, []) - bind_opt_expr(x, sym, body) = L.BindGen(x, :__x, - L.Match(v(:__x), [ - (:None, []) => L.Construct(OptExpr.T, :None, []), + bind_opt_expr(x, sym, body) = L.BindGen(x, :_x, + L.Match(v(:_x), [ + (:None, []) => L.ReturnGen(L.Construct(OptExpr.T, :None, [])), (:Some, [sym]) => body ]) ) @@ -38,7 +38,8 @@ function gen_expr_lang(expr_size, typ_size) ]) ) - genZero = L.Function("genZero", [p(:size, Nat.T)], L.G{OptExpr.T}, + + genZero = L.Function("genZero", [p(:env, Ctx.T), p(:tau, Typ.T)], L.G{OptExpr.T}, L.Match(v(:tau), [ (:TBool, []) => L.BindGen( L.GenBool([]), @@ -54,23 +55,26 @@ function gen_expr_lang(expr_size, typ_size) genTyp = L.Function("genTyp", [p(:size, Nat.T)], L.G{Typ.T}, L.Match(L.Var(:size), [ - (:Z, []) => tbool(), - (:S, [:size1]) => L.BindGen( - L.Call("genTyp", [v(:size1)]), - :T1, - L.BindGen( + (:O, []) => L.ReturnGen(tbool()), + (:S, [:size1]) => L.Frequency([v(:size)], [ + "tbool" => L.ReturnGen(tbool()), + "tfun" => L.BindGen( L.Call("genTyp", [v(:size1)]), - :T2, - tfun(v(:T1), v(:T2)) - ) - ) + :T1, + L.BindGen( + L.Call("genTyp", [v(:size1)]), + :T2, + L.ReturnGen(tfun(v(:T1), v(:T2))) + ) + ), + ]) ]) ) genExpr = L.Function("genExpr", [p(:env, ListTyp.T), p(:tau, Typ.T), p(:size, Nat.T)], L.G{OptExpr.T}, L.Match(L.Var(:size), [ - (:Z, []) => + (:O, []) => L.BindGen( L.Backtrack([v(:size)], [ "var" => L.OneOf( @@ -82,7 +86,7 @@ function gen_expr_lang(expr_size, typ_size) ), "zero" => L.Call("genZero", [v(:env), v(:tau)]) ]), - :res, v(:res)), + :res, L.ReturnGen(v(:res))), (:S, [:size1]) => L.BindGen( L.Backtrack([v(:size)], [ @@ -115,7 +119,7 @@ function gen_expr_lang(expr_size, typ_size) ) ]) ]), - :res, v(:res)) + :res, L.ReturnGen(v(:res))) ]) ) diff --git a/examples/qc/benchmarks/lib/lang.jl b/examples/qc/benchmarks/lib/lang.jl index 32004eb7..0c7dc30d 100644 --- a/examples/qc/benchmarks/lib/lang.jl +++ b/examples/qc/benchmarks/lib/lang.jl @@ -136,11 +136,17 @@ function to_dist(rs::RunState, prog::L.Program)::Dist end end +to_coq(::Type{L.G{T}}) where T = "G ($(to_coq(T)))" + # Translate to a Coq program -function to_coq(rs::RunState, _::GenerationParams{T}, prog::L.Program)::String where T +function to_coq(rs::RunState, p::GenerationParams{T}, prog::L.Program)::String where T vals = compute(rs.var_vals, values(rs.adnodes_of_interest)) adnodes_vals = Dict(s => vals[adnode] for (s, adnode) in rs.adnodes_of_interest) - before, after = sandwich(T) + before, after = if p isa LangBespokeSTLCGenerator + sandwichmaybestlc() + else + sandwich(T) + end segments = [] # Emit line @@ -162,10 +168,21 @@ function to_coq(rs::RunState, _::GenerationParams{T}, prog::L.Program)::String w # Append to last line function a!(s) @assert !isempty(segments) + # if starting a new line, include indent + if segments[end] == "" || segments[end][end] == '\n' + s = " " ^ indent * s + end segments[end] = segments[end] * s end e!(before) e!() + function for_indent(f, iter) + indent += 1 + map(f, iter) + indent -= 1 + end + + space() = a!(" ") function for_between(f, f_between, xs) for (i, x) in enumerate(xs) @@ -176,6 +193,13 @@ function to_coq(rs::RunState, _::GenerationParams{T}, prog::L.Program)::String w end end + function for_between_indent(f, f_between, xs) + indent += 1 + for_between(f, f_between, xs) + indent -= 1 + end + + function with_indent(f) indent += 1 res = f() @@ -236,79 +260,125 @@ function to_coq(rs::RunState, _::GenerationParams{T}, prog::L.Program)::String w end function visit(x::L.Construct) - a!("(") - for arg in x.args + a!("($(x.ctor) ") + for_between(space, x.args) do arg visit(arg) end a!(")") end function visit(x::L.Match) + a!("match ") visit(x.scrutinee) - for ((ctor, args), body) in x.branches + a!(" with") + for_indent(x.branches) do ((ctor, args), body) + o!("| $(ctor) $(join([string(arg) for arg in args], " ")) => ") visit(body) end + e!("end") end function visit(x::L.Call) - for arg in x.args + a!("($(x.f) ") + for_between(space, x.args) do arg visit(arg) end + a!(")") end function visit(x::L.Lambda) - visit(x.body) + e!("(fun $(join([string(param) for param in x.params], " ")) => ") + with_indent() do + visit(x.body) + end + a!(")") end function visit(x::L.Map) + e!("(map ") visit(x.f) + space() visit(x.l) + a!(")") end function visit(x::L.BindGen) + e!("(bindGen ") visit(x.gen) - visit(x.body) + space() + visit(L.Lambda([x.var], x.body)) + a!(")") end function visit(x::L.ReturnGen) + e!("(returnGen ") visit(x.x) + a!(")") end function visit(x::L.OneOf) + e!("(oneOf_ ") visit(x.default) + space() visit(x.x) + a!(")") end function visit(x::L.Frequency) - for (name, body) in x.branches + e!("(freq [") + for_between_indent(() -> a!("; "), x.branches) do (name, body) + e!("(1, ") visit(body) + a!(")") end + a!("])") end function visit(x::L.Backtrack) - for (name, body) in x.branches + e!("(backtrack [") + for_between_indent(() -> a!("; "), x.branches) do (name, body) + e!("(1, ") visit(body) + a!(")") end + a!("])") end function visit(x::L.GenNat) + e!("arbitrary") end function visit(x::L.GenZ) + e!("arbitrary") end function visit(x::L.GenBool) + e!("arbitrary") end function visit(x::L.Function) - visit(x.body) + e!("Fixpoint $(x.name) ") + for_between(() -> a!(" "), x.params) do param + a!("($(param.name) : $(to_coq(param.ty)))") + end + a!(" : $(to_coq(x.ret_ty)) :=\n") + with_indent() do + visit(x.body) + end + a!(".") + e!() end function visit(x::L.Program) for f in x.functions visit(f) end - visit(x.res) + e!("Definition gSized :=\n") + with_indent() do + visit(x.res) + end + a!(".") + e!() end visit(prog) diff --git a/examples/qc/benchmarks/lib/stlc/dist.jl b/examples/qc/benchmarks/lib/stlc/dist.jl index 6fee19cd..e28ba8eb 100644 --- a/examples/qc/benchmarks/lib/stlc/dist.jl +++ b/examples/qc/benchmarks/lib/stlc/dist.jl @@ -4,46 +4,54 @@ module Typ using Dice @inductive T TBool() TFun(T, T) end +to_coq(::Type{Typ.T}) = "Typ" module Expr using Dice using Main: DistNat, Typ @inductive T Var(DistNat) Bool(AnyBool) Abs(Typ.T, T) App(T, T) end +to_coq(::Type{Expr.T}) = "Expr" module OptExpr using Dice using Main: Expr @inductive T None() Some(Expr.T) end +to_coq(::Type{OptExpr.T}) = "option Expr" module ListTyp using Dice using Main: Typ @inductive T nil() cons(Typ.T, T) end +to_coq(::Type{ListTyp.T}) = "list Typ" module ListNat using Dice @inductive T nil() cons(DistUInt32, T) end +to_coq(::Type{ListNat.T}) = "list nat" module ListOptExpr using Dice using Main: OptExpr @inductive T nil() cons(OptExpr.T, T) end +to_coq(::Type{ListOptExpr.T}) = "list option Expr" module Nat using Dice T = DistUInt32 end +to_coq(::Type{Nat.T}) = "nat" module Ctx using Dice using Main: Typ @inductive T nil() cons(Typ.T, T) end +to_coq(::Type{Ctx.T}) = "Ctx" function one_of(default::OptExpr.T, l::ListOptExpr.T)::OptExpr.T @match l [ @@ -56,10 +64,6 @@ function one_of(default::OptExpr.T, l::ListOptExpr.T)::OptExpr.T ] end - -to_coq(::Type{Expr.T}) = "Expr" -to_coq(::Type{Typ.T}) = "Typ" - function term_size(e::Expr.T) match(e, [ :Var => (i) -> DistUInt32(1), From 05b2ffa158424b15909537fb137749f8545c63fb Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 27 May 2024 14:35:21 -0700 Subject: [PATCH 166/231] match on int using O/S --- src/dist/inductive/nat.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dist/inductive/nat.jl b/src/dist/inductive/nat.jl index b4f0c276..2880c541 100644 --- a/src/dist/inductive/nat.jl +++ b/src/dist/inductive/nat.jl @@ -46,8 +46,8 @@ end function Dice.match(x::DistUInt32, branches) branch_dict = Dict(branches) @dice_ite if prob_equals(x, DistUInt32(0)) - branch_dict["Z"]() + branch_dict[:O]() else - branch_dict["S"](sticky_sub(x, DistUInt32(1))) + branch_dict[:S](sticky_sub(x, DistUInt32(1))) end end From 6b7f4c25195509aadda0ddf2227caed2fbf200ac Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 27 May 2024 14:35:44 -0700 Subject: [PATCH 167/231] interp L --- examples/qc/benchmarks/benchmarks.jl | 9 +- examples/qc/benchmarks/lib/be.jl | 34 +-- examples/qc/benchmarks/lib/lang.jl | 383 ++++++++++++++++++++++-- examples/qc/benchmarks/lib/lib.jl | 1 + examples/qc/benchmarks/lib/stlc/dist.jl | 14 + examples/qc/benchmarks/lib/util.jl | 95 +++++- examples/qc/benchmarks/test.jl | 2 +- examples/qc/benchmarks/tool.jl | 6 +- 8 files changed, 492 insertions(+), 52 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index f2f8e57e..03b7d7ca 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -600,14 +600,9 @@ function to_subpath(p::LangBespokeSTLCGenerator) ] end function generate(rs::RunState, p::LangBespokeSTLCGenerator) - constructors_overapproximation = [] - function add_ctor(v::OptExpr.T) - push!(constructors_overapproximation, v) - v - end prog = gen_expr_lang(p.expr_size, p.typ_size) - e = to_dist(rs, prog) - STLCGeneration(e, constructors_overapproximation) + res, prim_map, function_results = interp(rs, prog) + STLCGeneration(res, function_results["genExpr"]) end function generation_params_emit_stats(rs::RunState, p::LangBespokeSTLCGenerator, s) diff --git a/examples/qc/benchmarks/lib/be.jl b/examples/qc/benchmarks/lib/be.jl index fb74801b..c2e7bb1a 100644 --- a/examples/qc/benchmarks/lib/be.jl +++ b/examples/qc/benchmarks/lib/be.jl @@ -2,26 +2,26 @@ function gen_expr_lang(expr_size, typ_size) v = L.Var p = L.Param - nil_typ() = L.Construct(ListTyp.T, :nil, []) - cons_typ(hd, tl) = L.Construct(ListTyp.T, :cons, [hd, tl]) + nil_typ() = L.Construct(ListTyp.nil, []) + cons_typ(hd, tl) = L.Construct(ListTyp.cons, [hd, tl]) - nil_nat() = L.Construct(ListNat.T, :nil, []) - cons_nat(hd, tl) = L.Construct(ListNat.T, :cons, [hd, tl]) + nil_nat() = L.Construct(ListNat.nil, []) + cons_nat(hd, tl) = L.Construct(ListNat.cons, [hd, tl]) - none_expr() = L.Construct(OptExpr.T, :None, []) - some_expr(x) = L.Construct(OptExpr.T, :Some, [x]) + none_expr() = L.Construct(OptExpr.None, []) + some_expr(x) = L.Construct(OptExpr.Some, [x]) - app(x, y) = L.Construct(Expr.T, :App, [x, y]) - var(n) = L.Construct(Expr.T, :Var, [n]) - abs(x, y) = L.Construct(Expr.T, :Abs, [x, y]) - bool(b) = L.Construct(Expr.T, :Bool, [b]) + app(x, y) = L.Construct(Expr.App, [x, y]) + var(n) = L.Construct(Expr.Var, [n]) + abs(x, y) = L.Construct(Expr.Abs, [x, y]) + bool(b) = L.Construct(Expr.Bool, [b]) - tfun(x, y) = L.Construct(Typ.T, :TFun, [x, y]) - tbool() = L.Construct(Typ.T, :TBool, []) + tfun(x, y) = L.Construct(Typ.TFun, [x, y]) + tbool() = L.Construct(Typ.TBool, []) bind_opt_expr(x, sym, body) = L.BindGen(x, :_x, L.Match(v(:_x), [ - (:None, []) => L.ReturnGen(L.Construct(OptExpr.T, :None, [])), + (:None, []) => L.ReturnGen(L.Construct(OptExpr.None, [])), (:Some, [sym]) => body ]) ) @@ -76,10 +76,10 @@ function gen_expr_lang(expr_size, typ_size) L.Match(L.Var(:size), [ (:O, []) => L.BindGen( - L.Backtrack([v(:size)], [ + L.Backtrack([v(:size)], none_expr(), [ "var" => L.OneOf( L.ReturnGen(none_expr()), - L.Map( + L.Map(ListOptExpr, L.Lambda([:x], L.ReturnGen(some_expr(var(v(:x))))), L.Call("genVar'", [v(:env), v(:tau), L.Nat(0), nil_nat()]) ) @@ -89,10 +89,10 @@ function gen_expr_lang(expr_size, typ_size) :res, L.ReturnGen(v(:res))), (:S, [:size1]) => L.BindGen( - L.Backtrack([v(:size)], [ + L.Backtrack([v(:size)], none_expr(), [ "var" => L.OneOf( L.ReturnGen(none_expr()), - L.Map( + L.Map(ListOptExpr, L.Lambda([:x], L.ReturnGen(some_expr(var(v(:x))))), L.Call("genVar'", [v(:env), v(:tau), L.Nat(0), nil_nat()]) ) diff --git a/examples/qc/benchmarks/lib/lang.jl b/examples/qc/benchmarks/lib/lang.jl index 0c7dc30d..eca3c6c8 100644 --- a/examples/qc/benchmarks/lib/lang.jl +++ b/examples/qc/benchmarks/lib/lang.jl @@ -1,7 +1,9 @@ module L using Dice: InductiveType + # using DirectedAcyclicGraphs: Leaf, Inner + import DirectedAcyclicGraphs: NodeType, DAG, children, Leaf, Inner - abstract type Expr end + abstract type Expr <: DAG end abstract type G{T} end @@ -14,64 +16,90 @@ module L mutable struct Var <: Expr s::Symbol end + NodeType(::Type{Var}) = Leaf() mutable struct Nat <: Expr x::Unsigned end + NodeType(::Type{Nat}) = Leaf() mutable struct Z <: Expr x::Integer end + NodeType(::Type{Z}) = Leaf() mutable struct Bool <: Expr x::Base.Bool end + NodeType(::Type{Bool}) = Leaf() mutable struct NatAdd <: Expr xs::Vector{Expr} end + NodeType(::Type{NatAdd}) = Inner() + children(x::NatAdd) = x.xs mutable struct ZAdd <: Expr xs::Vector{Expr} end + NodeType(::Type{ZAdd}) = Inner() + children(x::ZAdd) = x.xs mutable struct Eq <: Expr x::Expr y::Expr end + NodeType(::Type{Eq}) = Inner() + children(x::Eq) = [x.x, x.y] mutable struct If <: Expr c::Expr t::Expr e::Expr end + NodeType(::Type{If}) = Inner() + children(x::If) = [x.c, x.t, x.e] + mutable struct Construct <: Expr - inductive_type::Type - ctor::Symbol + ctor::Main.Function args::Vector{Expr} end + NodeType(::Type{Construct}) = Inner() + children(x::Construct) = x.args mutable struct Match <: Expr scrutinee::Expr branches::Vector{Pair{Tuple{Symbol,Vector{Symbol}},Expr}} end + NodeType(::Type{Match}) = Inner() + children(x::Match) = vcat([x.scrutinee], [ + body + for ((ctor, args), body) in x.branches + ]) mutable struct Call <: Expr f::String args::Vector{Expr} end + NodeType(::Type{Call}) = Inner() + children(x::Call) = x.args # Not first-class (doesn't subtype Expr). # They can capture values, so it'd be extra work to implement closures. - mutable struct Lambda + mutable struct Lambda <: DAG params::Vector{Symbol} body::Expr end + NodeType(::Type{Lambda}) = Inner() + children(x::Lambda) = [x.body] mutable struct Map <: Expr + dest_module::Module f::Lambda l::Expr # must be a dist that defines map, like ListExpr.T end + NodeType(::Type{Map}) = Inner() + children(x::Map) = [x.f, x.l] # Randomness mutable struct BindGen <: Expr @@ -79,69 +107,325 @@ module L var::Symbol body::Expr end + NodeType(::Type{BindGen}) = Inner() + children(x::BindGen) = [x.gen, x.body] mutable struct ReturnGen <: Expr x::Expr end + NodeType(::Type{ReturnGen}) = Inner() + children(x::ReturnGen) = [x.x] mutable struct OneOf <: Expr default::Expr x::Expr # must be a dist that defines map, like ListExpr.T end + NodeType(::Type{OneOf}) = Inner() + children(x::OneOf) = [x.default, x.x] mutable struct Frequency <: Expr dependents::Vector{Expr} branches::Vector{Pair{String,Expr}} end + NodeType(::Type{Frequency}) = Inner() + children(x::Frequency) = vcat(x.dependents, [body for (name, body) in x.branches]) mutable struct Backtrack <: Expr dependents::Vector{Expr} + none::Expr branches::Vector{Pair{String,Expr}} end + NodeType(::Type{Backtrack}) = Inner() + children(x::Backtrack) = vcat(x.dependents, [x.none], [body for (name, body) in x.branches]) mutable struct GenNat <: Expr dependents::Vector{Expr} width::Unsigned end + NodeType(::Type{GenNat}) = Inner() + children(x::GenNat) = x.dependents mutable struct GenZ <: Expr dependents::Vector{Expr} width::Unsigned end + NodeType(::Type{GenZ}) = Inner() + children(x::GenZ) = x.dependents mutable struct GenBool <: Expr dependents::Vector{Expr} end + NodeType(::Type{GenBool}) = Inner() + children(x::GenBool) = x.dependents # Functions - mutable struct Function + mutable struct Function <: DAG name::String params::Vector{Param} ret_ty::Type body::Expr end + NodeType(::Type{Function}) = Inner() + children(x::Function) = [x.body] - mutable struct Program + mutable struct Program <: DAG functions::Vector{Function} res::Expr end + NodeType(::Type{Program}) = Inner() + children(x::Program) = vcat(x.functions, [x.res]) end +using DirectedAcyclicGraphs: children, isinner +dumbprint(x) = [getfield(x, field) for field in fieldnames(typeof(x))] +function check_tree(prog) + prim_map = Dict() + + prim_cts = Dict( + L.Frequency => 0, + L.Backtrack => 0, + L.GenNat => 0, + L.GenZ => 0, + L.GenBool => 0, + ) + + parent_of = Dict() + seen = Set{Any}([prog]) + to_visit = Any[prog] + while !isempty(to_visit) + x = pop!(to_visit) + + xty = typeof(x) + if haskey(prim_cts, xty) + prim_cts[xty] += 1 + prim_map[x] = "$(nameof(xty))$(prim_cts[xty])" + end + + if isinner(x) + for y in children(x) + if y in seen + println("====") + println("duplicate: $(y) $(dumbprint(y))") + println("second parent: $(x) $(dumbprint(x))") + println("first parent: $(parent_of[y]) $(dumbprint(parent_of[y]))") + error() + end + push!(seen, y) + parent_of[y] = x + push!(to_visit, y) + end + end + end + + prim_map +end + +Env = Dict{Symbol, Any} + # Interpret to a Dice dist -function to_dist(rs::RunState, prog::L.Program)::Dist - @dice_ite if flip(0.5) - OptExpr.Some(Expr.Bool(true)) - else - OptExpr.Some(Expr.App(Expr.Bool(true), Expr.Bool(true))) +function interp(rs::RunState, prog::L.Program) + prim_map = check_tree(prog) + + function with_binding(env, from, to) + env2 = copy(env) + env2[from] = to + env2 + end + + functions = Dict( + f.name => f + for f in prog.functions + ) + + function_results = Dict( + f.name => [] + for f in prog.functions + ) + + function interp(env::Env, x::L.Var) + env[x.s] + end + + function interp(env::Env, x::L.Nat) + DistUInt32(x.x) + end + + function interp(env::Env, x::L.Z) + DistInt32(x.x) + end + + function interp(env::Env, x::L.Bool) + x.x end + + function interp(env::Env, x::L.NatAdd) + sum( + interp(env, y) + for y in x.xs + ) + end + + function interp(env::Env, x::L.ZAdd) + sum( + interp(env, y) + for y in x.xs + ) + end + + function interp(env::Env, x::L.Eq) + prob_equals( + interp(env, x.x), + interp(env, x.y), + ) + end + + function interp(env::Env, x::L.If) + @dice_ite if interp(env, x.c) + interp(env, x.t) + else + interp(env, x.e) + end + end + + function interp(env::Env, x::L.Construct) + x.ctor([interp(env, arg) for arg in x.args]...) + end + + function interp(env::Env, x::L.Match) + Dice.match(interp(env, x.scrutinee), [ + ctor => (args...) -> begin + @assert length(args) == length(vars) + env1 = copy(env) + for (var, arg) in zip(vars, args) + env1[var] = arg + end + interp(env1, body) + end + for ((ctor, vars), body) in x.branches + ]) + end + + function interp(env::Env, x::L.Call) + f = functions[x.f] + @assert length(f.params) == length(x.args) + res = interp( + Env( + param.name => interp(env, arg) + for (param, arg) in zip(f.params, x.args) + ), + f.body + ) + push!(function_results[x.f], res) + res + end + + function interp(env::Env, x::L.Lambda) + error("Lambdas should be interped by Map.") + end + + function interp(env::Env, x::L.Map) + @assert length(x.f.params) == 1 + prob_map( + x.dest_module, + y -> begin + interp(with_binding(env, x.f.params[1], y), x.f.body) + end, + interp(env, x.l) + ) + end + + function interp(env::Env, x::L.BindGen) + # we're always in the monad. this is just a let + interp( + with_binding(env, x.var, interp(env, x.gen)), + x.body + ) + end + + function interp(env::Env, x::L.ReturnGen) + # always already in the monad + interp(env, x.x) + end + + function interp(env::Env, x::L.OneOf) + one_of( + interp(env, x.default), + interp(env, x.x), + ) + end + + function interp(env::Env, x::L.Frequency) + dependents = [interp(env, dependent) for dependent in x.dependents] + frequency_for(rs, prim_map[x], dependents, [ + name => interp(env, body) + for (name, body) in x.branches + ]) + end + + function interp(env::Env, x::L.Backtrack) + dependents = [interp(env, dependent) for dependent in x.dependents] + backtrack_for(rs, prim_map[x], dependents, [ + name => interp(env, body) + for (name, body) in x.branches + ], + interp(env, x.none) + ) + end + + function interp(env::Env, x::L.GenNat) + name = prim_map[x] + dependents = [interp(env, dependent) for dependent in x.dependents] + sum( + @dice_ite if flip_for(rs, "$(name)_num$(n)", dependents) + DistUInt32(n) + else + DistUInt32(0) + end + for n in twopowers(x.width) + ) + end + + function interp(env::Env, x::L.GenZ) + name = prim_map[x] + dependents = [interp(env, dependent) for dependent in x.dependents] + sum( + @dice_ite if flip_for(rs, "$(name)_num$(n)", dependents) + DistInt32(n) + else + DistInt32(0) + end + for n in twopowers(x.width) + ) + end + + function interp(env::Env, x::L.GenBool) + name = prim_map[x] + dependents = [interp(env, dependent) for dependent in x.dependents] + flip_for(rs, "$(name)_true", dependents) + end + + res = interp(Env(), prog.res) + + res, prim_map, function_results end to_coq(::Type{L.G{T}}) where T = "G ($(to_coq(T)))" # Translate to a Coq program function to_coq(rs::RunState, p::GenerationParams{T}, prog::L.Program)::String where T + prim_map = check_tree(prog) + vals = compute(rs.var_vals, values(rs.adnodes_of_interest)) adnodes_vals = Dict(s => vals[adnode] for (s, adnode) in rs.adnodes_of_interest) + + matchid_to_cases = Dict() + for (name, val) in adnodes_vals + matchid, case = split(name, "%%") + case = if case == "" "tt" else "(" * join([tocoq(eval(Meta.parse(x))) for x in split(case, "%")], ", ") * ")" end + val = hundredths(val) + push!(get!(matchid_to_cases, matchid, []), (case, val)) + end + before, after = if p isa LangBespokeSTLCGenerator sandwichmaybestlc() else @@ -260,7 +544,7 @@ function to_coq(rs::RunState, p::GenerationParams{T}, prog::L.Program)::String w end function visit(x::L.Construct) - a!("($(x.ctor) ") + a!("($(nameof(x.ctor)) ") for_between(space, x.args) do arg visit(arg) end @@ -324,10 +608,40 @@ function to_coq(rs::RunState, p::GenerationParams{T}, prog::L.Program)::String w a!(")") end + coq_tuple(names) = if isempty(names) + "tt" + else + "($(join(names, ", ")))" + end + + function ematch!(name, dependents) + a!("match (") + if isempty(dependents) + a!("tt") + else + for_between(() -> a!(", "), dependents) do dep + visit(dep) + end + end + a!(") with") + + cases = matchid_to_cases[name] + cases = sort(cases) + for (name, w) in cases + e!("| $(name) => $(w)") + end + if !isempty(dependents) + e!("| _ => 500") + end + e!("end") + end + function visit(x::L.Frequency) e!("(freq [") - for_between_indent(() -> a!("; "), x.branches) do (name, body) - e!("(1, ") + for_between_indent(() -> a!("; "), x.branches) do (brname, body) + e!("(") + ematch!("$(prim_map[x])_$(brname)", x.dependents) + a!(",") visit(body) a!(")") end @@ -336,8 +650,10 @@ function to_coq(rs::RunState, p::GenerationParams{T}, prog::L.Program)::String w function visit(x::L.Backtrack) e!("(backtrack [") - for_between_indent(() -> a!("; "), x.branches) do (name, body) - e!("(1, ") + for_between_indent(() -> a!("; "), x.branches) do (brname, body) + e!("(") + ematch!("$(prim_map[x])_$(brname)", x.dependents) + a!(",") visit(body) a!(")") end @@ -345,15 +661,44 @@ function to_coq(rs::RunState, p::GenerationParams{T}, prog::L.Program)::String w end function visit(x::L.GenNat) - e!("arbitrary") + name = prim_map[x] + for n in twopowers(x.width) + e!("(let _weight_$(n) := ") + ematch!("$(name)_num$(n)", x.dependents) + e!("in") + e!("bindGen (freq [") + e!(" (_weight_$(n), returnGen $(n));") + e!(" (100-_weight_$(n), returnGen 0)") + e!("]) (fun n$(n) =>") + end + e!(" $(join(["n$(n)" for n in twopowers(x.width)], " + "))") + e!(")" ^ (x.width + 1)) end function visit(x::L.GenZ) - e!("arbitrary") + name = prim_map[x] + for n in twopowers(x.width) + e!("(let _weight_$(n) := ") + ematch!("$(name)_num$(n)", x.dependents) + e!("in") + e!("bindGen (freq [") + e!(" (_weight_$(n), returnGen $(n)%Z);") + e!(" (100-_weight_$(n), returnGen 0%Z)") + e!("]) (fun n$(n) =>") + end + e!(" ($(join(["n$(n)" for n in twopowers(x.width)], " + ")))%Z") + e!(")" ^ (x.width + 1)) end function visit(x::L.GenBool) - e!("arbitrary") + name = prim_map[x] + e!("(let _weight_true := ") + ematch!("$(name)_true", x.dependents) + e!("in") + e!("freq [") + e!(" (_weight_true, returnGen true);") + e!(" (100-_weight_true, returnGen false)") + e!("])") end function visit(x::L.Function) diff --git a/examples/qc/benchmarks/lib/lib.jl b/examples/qc/benchmarks/lib/lib.jl index 23c49731..95b3e01d 100644 --- a/examples/qc/benchmarks/lib/lib.jl +++ b/examples/qc/benchmarks/lib/lib.jl @@ -10,6 +10,7 @@ struct RunState io::IO out_dir::String rng::AbstractRNG + prim_map end include("lang.jl") diff --git a/examples/qc/benchmarks/lib/stlc/dist.jl b/examples/qc/benchmarks/lib/stlc/dist.jl index e28ba8eb..13010188 100644 --- a/examples/qc/benchmarks/lib/stlc/dist.jl +++ b/examples/qc/benchmarks/lib/stlc/dist.jl @@ -33,6 +33,13 @@ module ListNat end to_coq(::Type{ListNat.T}) = "list nat" +function prob_map(dest_module, f, l::ListNat.T) + @match l [ + nil() -> dest_module.nil(), + cons(hd, tl) -> dest_module.cons(f(hd), prob_map(dest_module, f, tl)) + ] +end + module ListOptExpr using Dice using Main: OptExpr @@ -53,6 +60,13 @@ module Ctx end to_coq(::Type{Ctx.T}) = "Ctx" +function Base.length(l::ListOptExpr.T) + @match l [ + nil() -> DistUInt32(0), + cons(x, xs) -> DistUInt32(1) + length(xs), + ] +end + function one_of(default::OptExpr.T, l::ListOptExpr.T)::OptExpr.T @match l [ nil() -> default, diff --git a/examples/qc/benchmarks/lib/util.jl b/examples/qc/benchmarks/lib/util.jl index 409b568b..555ab566 100644 --- a/examples/qc/benchmarks/lib/util.jl +++ b/examples/qc/benchmarks/lib/util.jl @@ -1,3 +1,5 @@ +using Combinatorics: permutations + function empty_stack(p) Tuple(0 for _ in 1:p.stack_size) end @@ -62,13 +64,61 @@ end # sample_from(xs) # end -function backtrack(xs) - isempty(xs) && return DistNone() - x = sample_from(xs) - remove!(xs, x) - backtrack(xs) +# function backtrack(xs) +# isempty(xs) && return DistNone() +# x = sample_from(xs) +# remove!(xs, x) +# backtrack(xs) +# end + +# give a weight to the permutation +function weight_of(weights_xs) + function helper(weights_xs) + weight, x = weights_xs[1] + if length(weights_xs) == 1 + Dice.Constant(1), weight + else + rest = @view weights_xs[2:end] + w, rolling_sum = helper(rest) + + rolling_sum += weight + w *= weight / rolling_sum + + w, rolling_sum + end + end + w, _ = helper(weights_xs) + w end +function shuffle(weights_xs) + weights, xs = [], [] + for (weight, x) in weights_xs + push!(weights, weight) + push!(xs,x) + end + + frequency( + (weight_of(perm), [x for (weight, x) in perm]) + for perm in permutations(weights_xs) + ) +end + +function backtrack(default, weights_xs) + first_some(default, shuffle(weights_xs)) +end + +function first_some(default, xs) + isempty(xs) && return default + x, rest = xs[1], @view xs[2:end] + @dice_ite if Dice.matches(x, :Some) + x + else + first_some(default, rest) + end +end + + function first_some(::Type{T}, xs) where T isempty(xs) && return DistNone(T) x, rest = xs[1], @view xs[2:end] @@ -281,6 +331,37 @@ function flip_for(rs, name, dependents) res end +function backtrack_for(rs, name, dependents, casenames_xs, default) + casenames = [] + xs = [] + for (casename, x) in casenames_xs + push!(casenames, casename) + push!(xs, x) + end + + res = nothing + support = support_mixed(dependents; as_dist=true) + @assert !isempty(support) + for dependents_vals in support + t = join([string(x) for x in dependents_vals], "%") + weights = [ + register_weight!(rs, "$(name)_$(casename)%%$(t)") + for casename in casenames + ] + v = backtrack(default, collect(zip(weights, xs))) + if isnothing(res) + res = v + else + res = @dice_ite if prob_equals(dependents, dependents_vals) + v + else + res + end + end + end + res +end + function frequency_for(rs, name, dependents, casenames_xs) casenames = [] xs = [] @@ -316,6 +397,10 @@ function tocoq(i::Integer) "$(i)" end +function tocoq(i::DistUInt32) + Dice.frombits(i, Dict()) +end + function tocoq(v::Tuple) if v == () "tt" diff --git a/examples/qc/benchmarks/test.jl b/examples/qc/benchmarks/test.jl index e56d530e..7ad4aae0 100644 --- a/examples/qc/benchmarks/test.jl +++ b/examples/qc/benchmarks/test.jl @@ -18,7 +18,7 @@ function test(samples_per_batch, lr) mkdir(out_dir) log_path = "tmp/log" - rs = RunState(Valuation(), Dict{String,ADNode}(), open(log_path, "w"), out_dir, MersenneTwister(SEED)) + rs = RunState(Valuation(), Dict{String,ADNode}(), open(log_path, "w"), out_dir, MersenneTwister(SEED), nothing) v = flip(register_weight!(rs, "v"; random_value=true)) diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 77ea1335..6fc88ad1 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -28,8 +28,8 @@ if isempty(ARGS) # intwidth=6, # ) g_p = LangBespokeSTLCGenerator( - expr_size=5, - typ_size=2, + expr_size=2, + typ_size=1, ) # g_p = DerivedGenerator{RBT}( # root_ty=ColorKVTree.t, @@ -129,7 +129,7 @@ if isfile(log_path) && !allow_overwrite exit(1) end mkpath(out_dir) -rs = RunState(Valuation(), Dict{String,ADNode}(), open(log_path, "w"), out_dir, MersenneTwister(SEED)) +rs = RunState(Valuation(), Dict{String,ADNode}(), open(log_path, "w"), out_dir, MersenneTwister(SEED), nothing) println(stderr, "Logging to $(log_path)\n") From 306cafa761ab0672c5cd06dc07511b5ba2a7fd92 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 27 May 2024 22:56:57 -0700 Subject: [PATCH 168/231] derive lang --- examples/qc/benchmarks/benchmarks.jl | 148 ++++++++++++++++++++++++++- examples/qc/benchmarks/lib/lang.jl | 89 +++++++++++----- examples/qc/benchmarks/main.jl | 21 +++- examples/qc/benchmarks/tool.jl | 40 ++++---- 4 files changed, 248 insertions(+), 50 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 03b7d7ca..1e5b25ef 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -503,7 +503,7 @@ function generate(rs::RunState, p::DerivedGenerator{T}) where T end e = generate(rs, p, add_ctor) if T == STLC - STLCGeneration(OptExpr.Some(e), constructors_overapproximation) + STLCGeneration(OptExpr.Some(e), [OptExpr.Some(x) for x in constructors_overapproximation]) elseif T == BST BSTGeneration(e, constructors_overapproximation) elseif T == RBT @@ -526,6 +526,152 @@ function save_coq_generator(rs, p, s, f) println_flush(rs.io, "Saved Coq generator to $(path)") end + + +struct LangDerivedGenerator{T} <: GenerationParams{T} + root_ty::Type + ty_sizes::Vector{Pair{Type, Integer}} + stack_size::Integer + intwidth::Integer +end +LangDerivedGenerator{T}(; root_ty, ty_sizes, stack_size, intwidth) where T = + LangDerivedGenerator{T}(root_ty, ty_sizes, stack_size, intwidth) +function to_subpath(p::LangDerivedGenerator{T}) where T + [ + lowercase(string(T)), + "langderived", + "root_ty=$(p.root_ty)", + "ty-sizes=$(join(["$(ty)-$(size)" for (ty, size) in p.ty_sizes],"-"))", + "stack_size=$(p.stack_size)", + "intwidth=$(p.intwidth)", + ] +end +function generate(rs::RunState, p::LangDerivedGenerator{T}) where T + prog = derive_lang_generator(p) + res, prim_map, function_results = interp(rs, prog) + constructors_overapproximation = [] + if T == STLC + STLCGeneration(OptExpr.Some(res), [OptExpr.Some(e) for e in function_results["genExpr"]]) + elseif T == BST + BSTGeneration(res, function_results["genTree"]) + elseif T == RBT + RBTGeneration(res, function_results["genExpr"]) + else + error() + end +end + +function generation_params_emit_stats(rs::RunState, p::LangDerivedGenerator, s) + prog = derive_lang_generator(p) + + path = joinpath(rs.out_dir, "$(s)_Generator.v") + open(path, "w") do file + println(file, to_coq(rs, p, prog)) + end + println_flush(rs.io, "Saved Coq generator to $(path)") + println_flush(rs.io) +end + +function save_coq_generator(rs, p, s, f) + path = joinpath(rs.out_dir, "$(s)_Generator.v") + open(path, "w") do file + vals = compute(rs.var_vals, values(rs.adnodes_of_interest)) + adnodes_vals = Dict(s => vals[adnode] for (s, adnode) in rs.adnodes_of_interest) + println(file, f(p, adnodes_vals, rs.io)) + end + println_flush(rs.io, "Saved Coq generator to $(path)") +end + +function derive_lang_generator(p::LangDerivedGenerator{T}) where T + stack_vars = [Symbol("stack$(i)") for i in 1:p.stack_size] + + functions = [] + + tys, type_ctor_parami_to_id = collect_types(p.root_ty) + + dependents() = vcat( + [L.Var(:size)], + [L.Var(x) for x in stack_vars] + ) + + for ty in tys + func = L.Function( + "gen$(to_coq(ty))", + vcat( + [L.Param(:size, Nat.T)], + [L.Param(stack_var, Nat.T) for stack_var in stack_vars], + ), + ty, + L.Match(L.Var(:size), [ + if zero_case + (:O, []) + else + (:S, [:size1]) + end => + begin + freq_branches = [] + for (varianti, (ctor, params)) in enumerate(variants(ty)) + if zero_case && ty in params + continue + end + freq_branch = L.ReturnGen(L.Construct( + ctor, [ + L.Var(Symbol("p$(i)")) + for i in 1:length(params) + ] + )) + for (parami, param) in reverse(collect(enumerate(params))) + freq_branch = L.BindGen( + if param in tys + L.Call("gen$(to_coq(param))", vcat( + [ + if param == ty + L.Var(:size1) + else + L.Nat(Dict(p.ty_sizes)[param]) + end + ], + [ L.Var(stack_vars[i]) for i in 2:p.stack_size ], + [L.Loc()], + )) + elseif param == Nat.T + L.GenNat(dependents(), p.intwidth) + elseif param == DistInt32 + L.GenZ(dependents(), p.intwidth) + elseif param == AnyBool + L.GenBool(dependents()) + else + error("bad param type $(param)") + end, + Symbol("p$(parami)"), + freq_branch + ) + end + push!(freq_branches, + "$(ctor)" => freq_branch + ) + end + L.Frequency( dependents(), freq_branches) + end + for zero_case in [true, false] + ]) + ) + push!(functions, func) + end + + L.Program( + functions, + L.Call( + "gen$(to_coq(p.root_ty))", + vcat( + [L.Nat(Dict(p.ty_sizes)[p.root_ty])], + [L.Nat(0) for _ in 1:p.stack_size] + ) + ) + ) +end + + ################################## # Bespoke STLC generator ################################## diff --git a/examples/qc/benchmarks/lib/lang.jl b/examples/qc/benchmarks/lib/lang.jl index eca3c6c8..0d2b42e6 100644 --- a/examples/qc/benchmarks/lib/lang.jl +++ b/examples/qc/benchmarks/lib/lang.jl @@ -1,3 +1,5 @@ +using DataStructures + module L using Dice: InductiveType # using DirectedAcyclicGraphs: Leaf, Inner @@ -12,6 +14,10 @@ module L ty::Type end + mutable struct Loc <: Expr + end + NodeType(::Type{Loc}) = Leaf() + # Basic operations mutable struct Var <: Expr s::Symbol @@ -176,10 +182,30 @@ module L children(x::Program) = vcat(x.functions, [x.res]) end +function for_between(f, f_between, xs) + for (i, x) in enumerate(xs) + f(x) + if i < length(xs) + f_between() + end + end +end + +function Base.show(io::IO, x::Union{L.Program,L.Function,L.Expr,L.Lambda}) + ty = typeof(x) + show(io, ty) + print(io, "(") + for_between(() -> print(io, ", "), fieldnames(ty)) do field + show(getfield(x, field)) + end + print(io, ")") +end + using DirectedAcyclicGraphs: children, isinner dumbprint(x) = [getfield(x, field) for field in fieldnames(typeof(x))] function check_tree(prog) prim_map = Dict() + loc_map = Dict() prim_cts = Dict( L.Frequency => 0, @@ -191,9 +217,10 @@ function check_tree(prog) parent_of = Dict() seen = Set{Any}([prog]) - to_visit = Any[prog] + to_visit = Deque{Any}() + push!(to_visit, prog) while !isempty(to_visit) - x = pop!(to_visit) + x = popfirst!(to_visit) xty = typeof(x) if haskey(prim_cts, xty) @@ -201,6 +228,10 @@ function check_tree(prog) prim_map[x] = "$(nameof(xty))$(prim_cts[xty])" end + if x isa L.Loc + loc_map[x] = length(loc_map) + 1 + end + if isinner(x) for y in children(x) if y in seen @@ -217,14 +248,14 @@ function check_tree(prog) end end - prim_map + prim_map, loc_map end Env = Dict{Symbol, Any} # Interpret to a Dice dist function interp(rs::RunState, prog::L.Program) - prim_map = check_tree(prog) + prim_map, loc_map = check_tree(prog) function with_binding(env, from, to) env2 = copy(env) @@ -246,6 +277,10 @@ function interp(rs::RunState, prog::L.Program) env[x.s] end + function interp(env::Env, x::L.Loc) + DistUInt32(loc_map[x]) + end + function interp(env::Env, x::L.Nat) DistUInt32(x.x) end @@ -413,7 +448,7 @@ to_coq(::Type{L.G{T}}) where T = "G ($(to_coq(T)))" # Translate to a Coq program function to_coq(rs::RunState, p::GenerationParams{T}, prog::L.Program)::String where T - prim_map = check_tree(prog) + prim_map, loc_map = check_tree(prog) vals = compute(rs.var_vals, values(rs.adnodes_of_interest)) adnodes_vals = Dict(s => vals[adnode] for (s, adnode) in rs.adnodes_of_interest) @@ -468,15 +503,6 @@ function to_coq(rs::RunState, p::GenerationParams{T}, prog::L.Program)::String w space() = a!(" ") - function for_between(f, f_between, xs) - for (i, x) in enumerate(xs) - f(x) - if i < length(xs) - f_between() - end - end - end - function for_between_indent(f, f_between, xs) indent += 1 for_between(f, f_between, xs) @@ -495,6 +521,10 @@ function to_coq(rs::RunState, p::GenerationParams{T}, prog::L.Program)::String w a!(string(x.s)) end + function visit(x::L.Loc) + a!(string(loc_map[x])) + end + function visit(x::L.Nat) a!("$(x.x)") end @@ -637,21 +667,28 @@ function to_coq(rs::RunState, p::GenerationParams{T}, prog::L.Program)::String w end function visit(x::L.Frequency) - e!("(freq [") - for_between_indent(() -> a!("; "), x.branches) do (brname, body) - e!("(") - ematch!("$(prim_map[x])_$(brname)", x.dependents) - a!(",") - visit(body) - a!(")") + name = prim_map[x] + if length(x.branches) == 1 + e!("(* $(name) (single-branch) *) ") + visit(x.branches[1][2]) + else + e!("(* $(name) *) (freq [") + for_between_indent(() -> a!("; "), x.branches) do (brname, body) + e!("(* $(brname) *) (") + ematch!("$(name)_$(brname)", x.dependents) + a!(",") + visit(body) + a!(")") + end + a!("])") end - a!("])") end function visit(x::L.Backtrack) - e!("(backtrack [") + name = prim_map[x] + e!("(* $(name) *) (backtrack [") for_between_indent(() -> a!("; "), x.branches) do (brname, body) - e!("(") + e!("((* $(brname) *)") ematch!("$(prim_map[x])_$(brname)", x.dependents) a!(",") visit(body) @@ -662,6 +699,7 @@ function to_coq(rs::RunState, p::GenerationParams{T}, prog::L.Program)::String w function visit(x::L.GenNat) name = prim_map[x] + e!("(* $(name) *)") for n in twopowers(x.width) e!("(let _weight_$(n) := ") ematch!("$(name)_num$(n)", x.dependents) @@ -677,6 +715,7 @@ function to_coq(rs::RunState, p::GenerationParams{T}, prog::L.Program)::String w function visit(x::L.GenZ) name = prim_map[x] + e!("(* $(name) *)") for n in twopowers(x.width) e!("(let _weight_$(n) := ") ematch!("$(name)_num$(n)", x.dependents) @@ -692,7 +731,7 @@ function to_coq(rs::RunState, p::GenerationParams{T}, prog::L.Program)::String w function visit(x::L.GenBool) name = prim_map[x] - e!("(let _weight_true := ") + e!("(* $(name) *) (let _weight_true := ") ematch!("$(name)_true", x.dependents) e!("in") e!("freq [") diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 5bf264c2..cd7e8e87 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -1,14 +1,24 @@ include("benchmarks.jl") GENERATION_PARAMS_LIST = [ - TypeBasedSTLCGenerator( - size=5, - ty_size=2, - dependents=[:size,:stack_tail], - ty_dependents=[:size,:stack_tail], + # LangBespokeSTLCGenerator( + # expr_size=5, + # typ_size=2, + # ), + LangDerivedGenerator{STLC}( + root_ty=Expr.T, + ty_sizes=[Expr.T=>5, Typ.T=>2], stack_size=2, intwidth=6, ), + # TypeBasedSTLCGenerator( + # size=5, + # ty_size=2, + # dependents=[:size,:stack_tail], + # ty_dependents=[:size,:stack_tail], + # stack_size=2, + # intwidth=6, + # ), # DerivedGenerator{STLC}( # root_ty=Expr.T, # ty_sizes=[Expr.T=>4, Typ.T=>1], @@ -59,6 +69,7 @@ println() LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ + # ApproxSTLCConstructorEntropy() => lr, # MLELossConfig{STLC}(NumApps(), Linear()) => lr, SamplingEntropy{STLC}( resampling_frequency=resampling_frequency, diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 6fc88ad1..fb77fe52 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -1,14 +1,15 @@ include("benchmarks.jl") -TAG = "v34_stlc_derived_spec_structure_and_prob_eq" -TAG = "v34_stlc_derived_unif_apps" -TAG = "v34_rbt_derived" -TAG = "v36_stlc_might_fixed" -TAG = "v37_stlc_might2" # this one is stricter -TAG = "v38_stlc_vars" # this one is stricter -TAG = "v39_stlc_linapps" -TAG = "v40_stlctb_abunch" -# TAG = "test" +# TAG = "v34_stlc_derived_spec_structure_and_prob_eq" +# TAG = "v34_stlc_derived_unif_apps" +# TAG = "v34_rbt_derived" +# TAG = "v36_stlc_might_fixed" +# TAG = "v37_stlc_might2" # this one is stricter +# TAG = "v38_stlc_vars" # this one is stricter +# TAG = "v39_stlc_linapps" +# TAG = "v40_stlctb_abunch" +TAG = "v40_langstlcbespoke" +TAG = "v41_langderivedstlc" OUT_TOP_DIR = "/space/tjoa/tuning-output" ## PARSE ARGS @@ -21,16 +22,16 @@ if isempty(ARGS) # num_dependents=[:size,:last_callsite], # intwidth=6, # ) - # g_p = DerivedGenerator{STLC}( - # root_ty=Expr.T, - # ty_sizes=[Expr.T=>4, Typ.T=>1], - # stack_size=2, - # intwidth=6, - # ) - g_p = LangBespokeSTLCGenerator( - expr_size=2, - typ_size=1, + g_p = LangDerivedGenerator{STLC}( + root_ty=Expr.T, + ty_sizes=[Expr.T=>2, Typ.T=>1], + stack_size=2, + intwidth=6, ) + # g_p = LangBespokeSTLCGenerator( + # expr_size=2, + # typ_size=1, + # ) # g_p = DerivedGenerator{RBT}( # root_ty=ColorKVTree.t, # ty_sizes=Dict(ColorKVTree.t=>4, Color.T=>0), @@ -78,7 +79,8 @@ if isempty(ARGS) # forgiveness=0.1, # rand_forgiveness=false, # ) => lr, - MLELossConfig{STLC}(NumApps(), Linear()) => lr, + ApproxSTLCConstructorEntropy() => lr, + # MLELossConfig{STLC}(NumApps(), Linear()) => lr, ] push!(as, replace(string(g_p), " "=>"")) push!(as, replace(string(l_p), " "=>"")) From 22a5879cd04f034f692b5822f1de7bd44a4aad8a Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 27 May 2024 23:01:31 -0700 Subject: [PATCH 169/231] fix derive lang --- examples/qc/benchmarks/benchmarks.jl | 2 +- examples/qc/benchmarks/tool.jl | 72 +++++++++++++++++----------- 2 files changed, 44 insertions(+), 30 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 1e5b25ef..6d3d6f7f 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -601,7 +601,7 @@ function derive_lang_generator(p::LangDerivedGenerator{T}) where T [L.Param(:size, Nat.T)], [L.Param(stack_var, Nat.T) for stack_var in stack_vars], ), - ty, + L.G{ty}, L.Match(L.Var(:size), [ if zero_case (:O, []) diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index fb77fe52..d8b5fe78 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -22,12 +22,6 @@ if isempty(ARGS) # num_dependents=[:size,:last_callsite], # intwidth=6, # ) - g_p = LangDerivedGenerator{STLC}( - root_ty=Expr.T, - ty_sizes=[Expr.T=>2, Typ.T=>1], - stack_size=2, - intwidth=6, - ) # g_p = LangBespokeSTLCGenerator( # expr_size=2, # typ_size=1, @@ -56,32 +50,52 @@ if isempty(ARGS) # ) lr = 0.5 fp = 0.01 + g_p = LangDerivedGenerator{STLC}( + root_ty=Expr.T, + ty_sizes=[Expr.T=>2, Typ.T=>1], + stack_size=2, + intwidth=6, + ) l_p = [ - # SamplingEntropy{RBT}( - # resampling_frequency=1, - # samples_per_batch=50, - # property=MultipleInvariants([ - # BookkeepingInvariant(), - # BalanceInvariant(), - # OrderInvariant(), - # ]), - # eq=:prob_equals, - # failure_penalty=fp, - # forgiveness=0.1, - # rand_forgiveness=false, - # ) => lr, - # SamplingEntropy{STLC}( - # resampling_frequency=1, - # samples_per_batch=50, - # property=STLCVarNumbers(), - # eq=:prob_equals, - # failure_penalty=fp, - # forgiveness=0.1, - # rand_forgiveness=false, - # ) => lr, - ApproxSTLCConstructorEntropy() => lr, + SamplingEntropy{STLC}( + resampling_frequency=1, + samples_per_batch=50, + property=STLCVarNumbers(), + eq=:prob_equals, + failure_penalty=fp, + forgiveness=0.1, + rand_forgiveness=false, + ) => lr, + + # ApproxSTLCConstructorEntropy() => lr, # MLELossConfig{STLC}(NumApps(), Linear()) => lr, ] + + + # g_p = LangDerivedGenerator{RBT}( + # root_ty=ColorKVTree.T, + # ty_sizes=[ColorKVTree.T=>2, Color.T=>0], + # stack_size=2, + # intwidth=6, + # ) + # lp = [ + # SamplingEntropy{RBT}( + # resampling_frequency=1, + # samples_per_batch=50, + # property=MultipleInvariants([ + # BookkeepingInvariant(), + # BalanceInvariant(), + # OrderInvariant(), + # ]), + # eq=:prob_equals, + # failure_penalty=fp, + # forgiveness=0.1, + # rand_forgiveness=false, + # ) => lr, + # ] + + + push!(as, replace(string(g_p), " "=>"")) push!(as, replace(string(l_p), " "=>"")) push!(as, string(10)) From e0713ea856395425309390ae604cf978c6973d39 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 27 May 2024 23:19:07 -0700 Subject: [PATCH 170/231] lang derived stlc coq compiles --- examples/qc/benchmarks/lib/lang.jl | 8 ++++---- examples/qc/benchmarks/tool.jl | 15 +++++++-------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/examples/qc/benchmarks/lib/lang.jl b/examples/qc/benchmarks/lib/lang.jl index 0d2b42e6..95afae89 100644 --- a/examples/qc/benchmarks/lib/lang.jl +++ b/examples/qc/benchmarks/lib/lang.jl @@ -709,8 +709,8 @@ function to_coq(rs::RunState, p::GenerationParams{T}, prog::L.Program)::String w e!(" (100-_weight_$(n), returnGen 0)") e!("]) (fun n$(n) =>") end - e!(" $(join(["n$(n)" for n in twopowers(x.width)], " + "))") - e!(")" ^ (x.width + 1)) + e!(" returnGen ($(join(["n$(n)" for n in twopowers(x.width)], " + ")))") + e!(")" ^ (x.width * 2)) end function visit(x::L.GenZ) @@ -725,8 +725,8 @@ function to_coq(rs::RunState, p::GenerationParams{T}, prog::L.Program)::String w e!(" (100-_weight_$(n), returnGen 0%Z)") e!("]) (fun n$(n) =>") end - e!(" ($(join(["n$(n)" for n in twopowers(x.width)], " + ")))%Z") - e!(")" ^ (x.width + 1)) + e!(" returnGen ($(join(["n$(n)" for n in twopowers(x.width)], " + ")))%Z") + e!(")" ^ (x.width * 2 + 1)) end function visit(x::L.GenBool) diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index d8b5fe78..5d4bb083 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -8,7 +8,6 @@ include("benchmarks.jl") # TAG = "v38_stlc_vars" # this one is stricter # TAG = "v39_stlc_linapps" # TAG = "v40_stlctb_abunch" -TAG = "v40_langstlcbespoke" TAG = "v41_langderivedstlc" OUT_TOP_DIR = "/space/tjoa/tuning-output" @@ -22,10 +21,6 @@ if isempty(ARGS) # num_dependents=[:size,:last_callsite], # intwidth=6, # ) - # g_p = LangBespokeSTLCGenerator( - # expr_size=2, - # typ_size=1, - # ) # g_p = DerivedGenerator{RBT}( # root_ty=ColorKVTree.t, # ty_sizes=Dict(ColorKVTree.t=>4, Color.T=>0), @@ -56,6 +51,10 @@ if isempty(ARGS) stack_size=2, intwidth=6, ) + # g_p = LangBespokeSTLCGenerator( + # expr_size=2, + # typ_size=1, + # ) l_p = [ SamplingEntropy{STLC}( resampling_frequency=1, @@ -73,12 +72,12 @@ if isempty(ARGS) # g_p = LangDerivedGenerator{RBT}( - # root_ty=ColorKVTree.T, - # ty_sizes=[ColorKVTree.T=>2, Color.T=>0], + # root_ty=ColorKVTree.t, + # ty_sizes=[ColorKVTree.t=>2, Color.T=>0], # stack_size=2, # intwidth=6, # ) - # lp = [ + # l_p = [ # SamplingEntropy{RBT}( # resampling_frequency=1, # samples_per_batch=50, From 1b0e6c86aa40bef5be28e402cc8874682d8ca283 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 27 May 2024 23:23:50 -0700 Subject: [PATCH 171/231] add combinatorics --- Project.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Project.toml b/Project.toml index 20744ba0..88478fd0 100644 --- a/Project.toml +++ b/Project.toml @@ -5,6 +5,7 @@ version = "0.1.0" [deps] CUDD = "345a2cc7-28d8-58b2-abdf-cff77ea7d7f1" +Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" DirectedAcyclicGraphs = "1e6dae5e-d6e2-422d-9af3-452e7a3785ee" Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" From 85f0032cbfe81e644ea87108d0d3d22f7f68830a Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 28 May 2024 10:38:04 -0700 Subject: [PATCH 172/231] get langderivedgenerator to work for BST --- examples/qc/benchmarks/benchmarks.jl | 112 ++++++++++++++------------- examples/qc/benchmarks/lib/lang.jl | 17 +++- examples/qc/benchmarks/main.jl | 21 ++++- examples/qc/benchmarks/tool.jl | 42 +++++----- 4 files changed, 108 insertions(+), 84 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 6d3d6f7f..b2d29ef4 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -553,9 +553,9 @@ function generate(rs::RunState, p::LangDerivedGenerator{T}) where T if T == STLC STLCGeneration(OptExpr.Some(res), [OptExpr.Some(e) for e in function_results["genExpr"]]) elseif T == BST - BSTGeneration(res, function_results["genTree"]) + BSTGeneration(res) #, function_results["genTree"]) elseif T == RBT - RBTGeneration(res, function_results["genExpr"]) + RBTGeneration(res) #, function_results["genTree"]) else error() end @@ -594,7 +594,54 @@ function derive_lang_generator(p::LangDerivedGenerator{T}) where T [L.Var(x) for x in stack_vars] ) + function gen(ty, zero_case) + freq_branches = [] + for (varianti, (ctor, params)) in enumerate(variants(ty)) + if zero_case && ty in params + continue + end + freq_branch = L.ReturnGen(L.Construct( + ctor, [ + L.Var(Symbol("p$(i)")) + for i in 1:length(params) + ] + )) + for (parami, param) in reverse(collect(enumerate(params))) + freq_branch = L.BindGen( + if param in tys + L.Call("gen$(to_coq(param))", vcat( + [ + if param == ty + L.Var(:size1) + else + L.Nat(Dict(p.ty_sizes)[param]) + end + ], + [ L.Var(stack_vars[i]) for i in 2:p.stack_size ], + [L.Loc()], + )) + elseif param == Nat.T + L.GenNat(dependents(), p.intwidth) + elseif param == DistInt32 + L.GenZ(dependents(), p.intwidth) + elseif param == AnyBool + L.GenBool(dependents()) + else + error("bad param type $(param)") + end, + Symbol("p$(parami)"), + freq_branch + ) + end + push!(freq_branches, + "$(ctor)" => freq_branch + ) + end + L.Frequency( dependents(), freq_branches) + end + for ty in tys + recursive = any(ty in params for (ctor, params) in variants(ty)) func = L.Function( "gen$(to_coq(ty))", vcat( @@ -602,59 +649,14 @@ function derive_lang_generator(p::LangDerivedGenerator{T}) where T [L.Param(stack_var, Nat.T) for stack_var in stack_vars], ), L.G{ty}, - L.Match(L.Var(:size), [ - if zero_case - (:O, []) - else - (:S, [:size1]) - end => - begin - freq_branches = [] - for (varianti, (ctor, params)) in enumerate(variants(ty)) - if zero_case && ty in params - continue - end - freq_branch = L.ReturnGen(L.Construct( - ctor, [ - L.Var(Symbol("p$(i)")) - for i in 1:length(params) - ] - )) - for (parami, param) in reverse(collect(enumerate(params))) - freq_branch = L.BindGen( - if param in tys - L.Call("gen$(to_coq(param))", vcat( - [ - if param == ty - L.Var(:size1) - else - L.Nat(Dict(p.ty_sizes)[param]) - end - ], - [ L.Var(stack_vars[i]) for i in 2:p.stack_size ], - [L.Loc()], - )) - elseif param == Nat.T - L.GenNat(dependents(), p.intwidth) - elseif param == DistInt32 - L.GenZ(dependents(), p.intwidth) - elseif param == AnyBool - L.GenBool(dependents()) - else - error("bad param type $(param)") - end, - Symbol("p$(parami)"), - freq_branch - ) - end - push!(freq_branches, - "$(ctor)" => freq_branch - ) - end - L.Frequency( dependents(), freq_branches) - end - for zero_case in [true, false] - ]) + if recursive + L.Match(L.Var(:size), [ + (:O, []) => gen(ty, true), + (:S, [:size1]) => gen(ty, false), + ]) + else + gen(ty, true) + end ) push!(functions, func) end diff --git a/examples/qc/benchmarks/lib/lang.jl b/examples/qc/benchmarks/lib/lang.jl index 95afae89..49803fcc 100644 --- a/examples/qc/benchmarks/lib/lang.jl +++ b/examples/qc/benchmarks/lib/lang.jl @@ -25,7 +25,11 @@ module L NodeType(::Type{Var}) = Leaf() mutable struct Nat <: Expr - x::Unsigned + x::Integer + function Nat(x) + @assert x >= 0 + new(x) + end end NodeType(::Type{Nat}) = Leaf() @@ -196,7 +200,7 @@ function Base.show(io::IO, x::Union{L.Program,L.Function,L.Expr,L.Lambda}) show(io, ty) print(io, "(") for_between(() -> print(io, ", "), fieldnames(ty)) do field - show(getfield(x, field)) + show(io, getfield(x, field)) end print(io, ")") end @@ -726,7 +730,7 @@ function to_coq(rs::RunState, p::GenerationParams{T}, prog::L.Program)::String w e!("]) (fun n$(n) =>") end e!(" returnGen ($(join(["n$(n)" for n in twopowers(x.width)], " + ")))%Z") - e!(")" ^ (x.width * 2 + 1)) + e!(")" ^ (x.width * 2)) end function visit(x::L.GenBool) @@ -741,7 +745,12 @@ function to_coq(rs::RunState, p::GenerationParams{T}, prog::L.Program)::String w end function visit(x::L.Function) - e!("Fixpoint $(x.name) ") + recursive = any((y -> y isa L.Call && y.f == x.name), x) + if recursive + e!("Fixpoint $(x.name) ") + else + e!("Definition $(x.name) ") + end for_between(() -> a!(" "), x.params) do param a!("($(param.name) : $(to_coq(param.ty)))") end diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index cd7e8e87..340d4576 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -5,12 +5,20 @@ GENERATION_PARAMS_LIST = [ # expr_size=5, # typ_size=2, # ), - LangDerivedGenerator{STLC}( - root_ty=Expr.T, - ty_sizes=[Expr.T=>5, Typ.T=>2], + # LangDerivedGenerator{STLC}( + # root_ty=Expr.T, + # ty_sizes=[Expr.T=>5, Typ.T=>2], + # stack_size=2, + # intwidth=6, + # ), + LangDerivedGenerator{RBT}( + root_ty=ColorKVTree.t, + ty_sizes=[ColorKVTree.t=>5, Color.T=>0], stack_size=2, intwidth=6, - ), + ) + + # DEPRECATED # TypeBasedSTLCGenerator( # size=5, # ty_size=2, @@ -46,6 +54,11 @@ FORIGIVENESS_LIST = [0] RAND_FORIGIVENESS_LIST = [true] RESAMPLING_FREQUENCY_LIST = [2] PROPERTY_LIST = [STLCVarNumbers(), STLCMightType(), STLCWellTyped()] +PROPERTY_LIST = [MultipleInvariants([ + BookkeepingInvariant(), + BalanceInvariant(), + OrderInvariant(), +])] SAMPLES_PER_BATCH_LIST = [200] EPOCHS_LIST = [2_000] EQ_LIST = [:prob_equals, :eq_structure] diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 5d4bb083..2097bee6 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -71,27 +71,27 @@ if isempty(ARGS) ] - # g_p = LangDerivedGenerator{RBT}( - # root_ty=ColorKVTree.t, - # ty_sizes=[ColorKVTree.t=>2, Color.T=>0], - # stack_size=2, - # intwidth=6, - # ) - # l_p = [ - # SamplingEntropy{RBT}( - # resampling_frequency=1, - # samples_per_batch=50, - # property=MultipleInvariants([ - # BookkeepingInvariant(), - # BalanceInvariant(), - # OrderInvariant(), - # ]), - # eq=:prob_equals, - # failure_penalty=fp, - # forgiveness=0.1, - # rand_forgiveness=false, - # ) => lr, - # ] + g_p = LangDerivedGenerator{RBT}( + root_ty=ColorKVTree.t, + ty_sizes=[ColorKVTree.t=>2, Color.T=>0], + stack_size=2, + intwidth=6, + ) + l_p = [ + SamplingEntropy{RBT}( + resampling_frequency=1, + samples_per_batch=50, + property=MultipleInvariants([ + BookkeepingInvariant(), + BalanceInvariant(), + OrderInvariant(), + ]), + eq=:prob_equals, + failure_penalty=fp, + forgiveness=0.1, + rand_forgiveness=false, + ) => lr, + ] From 9f0e22dd6f64c5975e680c03bf154bfc97ad3f3e Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 28 May 2024 17:03:53 -0700 Subject: [PATCH 173/231] fix inductive for matches on (types with only one ctor? ctors with no args?) --- src/dist/inductive/inductive.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dist/inductive/inductive.jl b/src/dist/inductive/inductive.jl index 87b2daff..6e2e9b2d 100644 --- a/src/dist/inductive/inductive.jl +++ b/src/dist/inductive/inductive.jl @@ -123,7 +123,7 @@ macro inductive(type, constructors...) function $(esc(:(Base.match)))(x::$(ty), cases) where {$(tvs...)} @assert length(cases) == $(length(constructors)) - branches = [$([ + branches = $(esc(:(Base.Function)))[$([ :(_ -> error("Constructor $($(QuoteNode(ctor))) missing branch")) for (ctor, _) in plist ]...)] From dca7b1cc3a207d3384097717041f34de3cc41cf9 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 28 May 2024 17:04:04 -0700 Subject: [PATCH 174/231] derive siblings compiles for rbt --- examples/qc/benchmarks/benchmarks.jl | 284 ++++++++++++++++++++++- examples/qc/benchmarks/lib/be.jl | 2 +- examples/qc/benchmarks/lib/lang.jl | 97 +++++++- examples/qc/benchmarks/lib/rbt/dist.jl | 10 +- examples/qc/benchmarks/lib/rbt/to_coq.jl | 2 +- examples/qc/benchmarks/main.jl | 4 +- examples/qc/benchmarks/tool.jl | 6 +- 7 files changed, 386 insertions(+), 19 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index b2d29ef4..2da475b7 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -560,7 +560,6 @@ function generate(rs::RunState, p::LangDerivedGenerator{T}) where T error() end end - function generation_params_emit_stats(rs::RunState, p::LangDerivedGenerator, s) prog = derive_lang_generator(p) @@ -572,6 +571,51 @@ function generation_params_emit_stats(rs::RunState, p::LangDerivedGenerator, s) println_flush(rs.io) end + +struct LangSiblingDerivedGenerator{T} <: GenerationParams{T} + root_ty::Type + ty_sizes::Vector{Pair{Type, Integer}} + stack_size::Integer + intwidth::Integer +end +LangSiblingDerivedGenerator{T}(; root_ty, ty_sizes, stack_size, intwidth) where T = + LangSiblingDerivedGenerator{T}(root_ty, ty_sizes, stack_size, intwidth) +function to_subpath(p::LangSiblingDerivedGenerator{T}) where T + [ + lowercase(string(T)), + "langsiblingderived", + "root_ty=$(p.root_ty)", + "ty-sizes=$(join(["$(ty)-$(size)" for (ty, size) in p.ty_sizes],"-"))", + "stack_size=$(p.stack_size)", + "intwidth=$(p.intwidth)", + ] +end +function generate(rs::RunState, p::LangSiblingDerivedGenerator{T}) where T + prog = derive_lang_sibling_generator(p) + res, prim_map, function_results = interp(rs, prog) + constructors_overapproximation = [] + if T == STLC + STLCGeneration(OptExpr.Some(res), [OptExpr.Some(e) for e in function_results["genExpr"]]) + elseif T == BST + BSTGeneration(res) #, function_results["genTree"]) + elseif T == RBT + RBTGeneration(res) #, function_results["genTree"]) + else + error() + end +end +function generation_params_emit_stats(rs::RunState, p::LangSiblingDerivedGenerator, s) + prog = derive_lang_sibling_generator(p) + + path = joinpath(rs.out_dir, "$(s)_Generator.v") + open(path, "w") do file + println(file, to_coq(rs, p, prog)) + end + println_flush(rs.io, "Saved Coq generator to $(path)") + println_flush(rs.io) +end + + function save_coq_generator(rs, p, s, f) path = joinpath(rs.out_dir, "$(s)_Generator.v") open(path, "w") do file @@ -662,6 +706,7 @@ function derive_lang_generator(p::LangDerivedGenerator{T}) where T end L.Program( + [], functions, L.Call( "gen$(to_coq(p.root_ty))", @@ -673,6 +718,243 @@ function derive_lang_generator(p::LangDerivedGenerator{T}) where T ) end +module LeafCtorColorKVTree + using Dice + @inductive t LeafCtorColorKVTree_E() +end +to_coq(::Type{LeafCtorColorKVTree.t}) = "LeafCtorColorKVTree" + +module LeafCtorColor + using Dice + @inductive t LeafCtorColor_R() LeafCtorColor_B() +end +to_coq(::Type{LeafCtorColor.t}) = "LeafCtorColor" + +module CtorColorKVTree + using Dice + @inductive t CtorColorKVTree_E() CtorColorKVTree_T() +end +to_coq(::Type{CtorColorKVTree.t}) = "CtorColorKVTree" + +module CtorColor + using Dice + @inductive t CtorColor_R() CtorColor_B() +end +to_coq(::Type{CtorColor.t}) = "CtorColor" + +ctor_tys(::Type{ColorKVTree.t}) = [CtorColorKVTree.t, LeafCtorColorKVTree.t] +ctor_tys(::Type{Color.t}) = [CtorColor.t, LeafCtorColor.t] + +function ctor_ty(ty, leaf) + inner_ctor_ty, leaf_ctor_ty = ctor_tys(ty) + if leaf leaf_ctor_ty else inner_ctor_ty end +end + +unctor = Dict( + LeafCtorColorKVTree.LeafCtorColorKVTree_E => ColorKVTree.E, + CtorColorKVTree.CtorColorKVTree_T => ColorKVTree.T, + CtorColorKVTree.CtorColorKVTree_E => ColorKVTree.E, + LeafCtorColor.LeafCtorColor_R => Color.R, + LeafCtorColor.LeafCtorColor_B => Color.B, + CtorColor.CtorColor_R => Color.R, + CtorColor.CtorColor_B => Color.B, +) + +function module_of_func(f) + @assert all(m.module == methods(f)[1].module for m in methods(f)) "$(f) $(methods(f))" + methods(f)[1].module +end + +function ctor_to_params(f) + m = module_of_func(f) + for (ctor, params) in variants(m.t) + if f == ctor + return params + end + end + error("ctor_to_params failed $(f) $(m)") +end + +ty_is_recursive(ty) = any(ty in params for (ctor, params) in variants(ty)) + +function derive_lang_sibling_generator(p::LangSiblingDerivedGenerator{T}) where T + stack_vars = [Symbol("stack$(i)") for i in 1:p.stack_size] + + functions = [] + + tys, type_ctor_parami_to_id = collect_types(p.root_ty) + + dependents(leaf, zero_case) = collect(vcat( + if !leaf && !zero_case() + [L.Var(:size)] + else + [] + end, + [L.Var(x) for x in stack_vars] + )) + + function gen(ty, leaf, _zero_case) + zero_case() = if leaf + error("don't check zero_case() if leaf") + else + _zero_case + end + + + chosen_ctor_branches = [] + for (chosen_ctor_id, chosen_ctor_id_params) in variants(ctor_ty(ty, leaf)) + @assert isempty(chosen_ctor_id_params) + + chosen_ctor = unctor[chosen_ctor_id] + chosen_ctor_params = ctor_to_params(chosen_ctor) + + sub_ctors_tys = [ + ctor_ty(param, !ty_is_recursive(param) || param == ty && zero_case()) + for param in chosen_ctor_params + if param ∈ tys + ] + + j = 0 + i_to_j = Dict() + i_to_is_leaf = Dict() + for (i, param) in enumerate(chosen_ctor_params) + if param ∈ tys + j += 1 + i_to_j[i] = j + i_to_is_leaf[i] = !ty_is_recursive(param) || param == ty && zero_case() + end + end + + temp = vec(collect(Iterators.product([ + [ctor for (ctor, _) in variants(sub_ctor_ty)] + for sub_ctor_ty in sub_ctors_tys + ]...))) + + res = L.ReturnGen(L.Construct( + chosen_ctor, [ + L.Var(Symbol("p$(i)")) + for i in 1:length(chosen_ctor_params) + ] + )) + for (ccpi, chosen_ctor_param) in reverse(collect(enumerate(chosen_ctor_params))) + res = L.BindGen( + if chosen_ctor_param in tys + chosen_ctor_param_is_leaf = !ty_is_recursive(chosen_ctor_param) || chosen_ctor_param == ty && !leaf && zero_case() + subres = L.Call( + if chosen_ctor_param_is_leaf + "genLeaf$(to_coq(chosen_ctor_param))" + else + "gen$(to_coq(chosen_ctor_param))" + end, + vcat( + if chosen_ctor_param_is_leaf + [] + elseif chosen_ctor_param == ty + [ L.Var(:size1) ] + else + [L.Nat(Dict(p.ty_sizes)[chosen_ctor_param] - 1) ] + end, + if haskey(i_to_j, ccpi) + [L.Var(Symbol("ctor$(i_to_j[ccpi])"))] + else + [] + end, + [L.Var(stack_vars[i]) for i in 2:p.stack_size ], + [L.Loc()], + ) + ) + elseif chosen_ctor_param == Nat.T + L.GenNat(dependents(leaf, zero_case), p.intwidth) + elseif chosen_ctor_param == DistInt32 + L.GenZ(dependents(leaf, zero_case), p.intwidth) + elseif chosen_ctor_param == AnyBool + L.GenBool(dependents(leaf, zero_case)) + else + error("bad param type $(chosen_ctor_param)") + end, + Symbol("p$(ccpi)"), + res + ) + end + + res = if isempty(sub_ctors_tys) + res + else + L.BindGen( + L.Frequency(dependents(leaf, zero_case), [ + "$(i)" => L.ReturnGen(L.Tuple( + sub_ctors_tys, + [L.Construct(ctor, []) for ctor in x], + )) + for (i, x) in enumerate(temp) + ]), + :param_variantis, + L.UnpackTuple(L.Var(:param_variantis), + [L.Param(Symbol("ctor$(i)"), sub_ctor_ty) for (i,sub_ctor_ty) in enumerate(sub_ctors_tys)], + res + ) + ) + end + push!(chosen_ctor_branches, (Symbol(nameof(chosen_ctor_id)), []) => res) + end + L.Match(L.Var(:chosen_ctor), chosen_ctor_branches) + end + + for ty in tys + leaffunc = L.Function( + "genLeaf$(to_coq(ty))", + vcat( + [L.Param(:chosen_ctor, ctor_ty(ty, true))], + [L.Param(stack_var, Nat.T) for stack_var in stack_vars], + ), + L.G{ty}, + gen(ty, true, nothing) + ) + push!(functions, leaffunc) + + if ty_is_recursive(ty) + func = L.Function( + "gen$(to_coq(ty))", + vcat( + [L.Param(:size, Nat.T)], + [L.Param(:chosen_ctor, ctor_ty(ty, false))], + [L.Param(stack_var, Nat.T) for stack_var in stack_vars], + ), + L.G{ty}, + L.Match(L.Var(:size), [ + (:O, []) => gen(ty, false, true), + (:S, [:size1]) => gen(ty, false, false), + ]) + ) + push!(functions, func) + end + end + + L.Program( + collect(Iterators.flatten([ + [module_of_func(ctor_ty) for ctor_ty in ctor_tys(ty)] + for ty in keys(Dict(p.ty_sizes)) + ])), + functions, + L.BindGen( + L.Frequency([], [ + "$(i)" => L.ReturnGen(L.Construct(ctor, [])) + for (i, (ctor, _)) in enumerate(variants(ctor_ty(p.root_ty, false))) + ]), + :init_ctor, + L.Call( + "gen$(to_coq(p.root_ty))", + vcat( + [L.Nat(Dict(p.ty_sizes)[p.root_ty] - 1)], + [L.Var(:init_ctor)], + [L.Nat(0) for _ in 1:p.stack_size] + ) + ) + ) + ) +end + + ################################## # Bespoke STLC generator diff --git a/examples/qc/benchmarks/lib/be.jl b/examples/qc/benchmarks/lib/be.jl index c2e7bb1a..eff0434b 100644 --- a/examples/qc/benchmarks/lib/be.jl +++ b/examples/qc/benchmarks/lib/be.jl @@ -128,5 +128,5 @@ function gen_expr_lang(expr_size, typ_size) :typ, L.Call("genExpr", [nil_typ(), v(:typ), L.Nat(expr_size)]) ) - L.Program([genVar, genZero, genTyp, genExpr], e) + L.Program([], [genVar, genZero, genTyp, genExpr], e) end diff --git a/examples/qc/benchmarks/lib/lang.jl b/examples/qc/benchmarks/lib/lang.jl index 49803fcc..c5c248f9 100644 --- a/examples/qc/benchmarks/lib/lang.jl +++ b/examples/qc/benchmarks/lib/lang.jl @@ -79,7 +79,7 @@ module L mutable struct Match <: Expr scrutinee::Expr - branches::Vector{Pair{Tuple{Symbol,Vector{Symbol}},Expr}} + branches::Vector{Pair{Main.Tuple{Symbol,Vector{Symbol}},Expr}} end NodeType(::Type{Match}) = Inner() children(x::Match) = vcat([x.scrutinee], [ @@ -94,6 +94,21 @@ module L NodeType(::Type{Call}) = Inner() children(x::Call) = x.args + mutable struct Tuple <: Expr + tys::Vector{Type} + components::Vector{Expr} + end + NodeType(::Type{Tuple}) = Inner() + children(x::Tuple) = x.components + + mutable struct UnpackTuple <: Expr + e::Expr + bindings::Vector{Param} + body::Expr + end + NodeType(::Type{UnpackTuple}) = Inner() + children(x::UnpackTuple) = [x.e, x.body] + # Not first-class (doesn't subtype Expr). # They can capture values, so it'd be extra work to implement closures. mutable struct Lambda <: DAG @@ -179,6 +194,7 @@ module L children(x::Function) = [x.body] mutable struct Program <: DAG + type_modules::Vector{Module} functions::Vector{Function} res::Expr end @@ -210,6 +226,7 @@ dumbprint(x) = [getfield(x, field) for field in fieldnames(typeof(x))] function check_tree(prog) prim_map = Dict() loc_map = Dict() + tuple_tys = Set() prim_cts = Dict( L.Frequency => 0, @@ -236,6 +253,12 @@ function check_tree(prog) loc_map[x] = length(loc_map) + 1 end + if x isa L.Tuple + tys = Tuple(x.tys) + push!(tuple_tys, tys) + end + + if isinner(x) for y in children(x) if y in seen @@ -252,14 +275,14 @@ function check_tree(prog) end end - prim_map, loc_map + prim_map, loc_map, tuple_tys end Env = Dict{Symbol, Any} # Interpret to a Dice dist function interp(rs::RunState, prog::L.Program) - prim_map, loc_map = check_tree(prog) + prim_map, loc_map, tuple_tys = check_tree(prog) function with_binding(env, from, to) env2 = copy(env) @@ -330,6 +353,21 @@ function interp(rs::RunState, prog::L.Program) x.ctor([interp(env, arg) for arg in x.args]...) end + function interp(env::Env, x::L.Tuple) + Tuple([interp(env, component) for component in x.components]) + end + + function interp(env::Env, x::L.UnpackTuple) + tup = interp(env, x.e) + env1 = copy(env) + @assert length(x.bindings) == length(tup) + for (param, v) in zip(x.bindings, tup) + env1[param.name] = v + end + + interp(env1, x.body) + end + function interp(env::Env, x::L.Match) Dice.match(interp(env, x.scrutinee), [ ctor => (args...) -> begin @@ -452,7 +490,7 @@ to_coq(::Type{L.G{T}}) where T = "G ($(to_coq(T)))" # Translate to a Coq program function to_coq(rs::RunState, p::GenerationParams{T}, prog::L.Program)::String where T - prim_map, loc_map = check_tree(prog) + prim_map, loc_map, tuple_tys = check_tree(prog) vals = compute(rs.var_vals, values(rs.adnodes_of_interest)) adnodes_vals = Dict(s => vals[adnode] for (s, adnode) in rs.adnodes_of_interest) @@ -497,8 +535,7 @@ function to_coq(rs::RunState, p::GenerationParams{T}, prog::L.Program)::String w end segments[end] = segments[end] * s end - e!(before) - e!() + function for_indent(f, iter) indent += 1 map(f, iter) @@ -596,6 +633,27 @@ function to_coq(rs::RunState, p::GenerationParams{T}, prog::L.Program)::String w e!("end") end + tuple_to_struct(tys) = "Mk$(join([to_coq(ty) for ty in tys]))" + + function visit(x::L.Tuple) + tys = Tuple(x.tys) + a!("($(tuple_to_struct(tys)) ") + for_between(() -> a!(" "), x.components) do component + visit(component) + end + a!(")") + + end + + function visit(x::L.UnpackTuple) + tys = Tuple(param.ty for param in x.bindings) + a!("(let '($(tuple_to_struct(tys)) $(join([param.name for param in x.bindings], " "))) := ") + visit(x.e) + a!(" in\n") + visit(x.body) + a!(")") + end + function visit(x::L.Call) a!("($(x.f) ") for_between(space, x.args) do arg @@ -773,6 +831,33 @@ function to_coq(rs::RunState, p::GenerationParams{T}, prog::L.Program)::String w a!(".") e!() end + + e!(before) + e!() + + for type_module in prog.type_modules + e!("Inductive $(nameof(type_module)) :=") + for_indent(variants(type_module.t)) do (ctor, params) + @assert isempty(params) "params not supported yet" + e!("| $(nameof(ctor))") + end + a!(".") + e!() + end + + for tys in tuple_tys + s = join([to_coq(ty) for ty in tys]) + e!("Inductive Tup$(s) :=") + with_indent() do + e!("| Mk$(s) : ") + for ty in tys + a!("$(to_coq(ty)) -> ") + end + a!("Tup$(s).\n") + end + end + + visit(prog) e!(after) diff --git a/examples/qc/benchmarks/lib/rbt/dist.jl b/examples/qc/benchmarks/lib/rbt/dist.jl index 5d95fbfd..1c29802a 100644 --- a/examples/qc/benchmarks/lib/rbt/dist.jl +++ b/examples/qc/benchmarks/lib/rbt/dist.jl @@ -4,21 +4,21 @@ using Dice module Color using Dice - @inductive T R() B() + @inductive t R() B() end -function Base.string(c::Color.T) +function Base.string(c::Color.t) @assert isdeterministic(c) @match c [ R() -> "Color.R()", B() -> "Color.B()", ] end -to_coq(::Type{Color.T}) = "Color" +to_coq(::Type{Color.t}) = "Color" module ColorKVTree using Dice using Main: DistNat, Color - @inductive t E() T(Color.T, t, DistInt32, DistInt32, t) + @inductive t E() T(Color.t, t, DistInt32, DistInt32, t) end to_coq(::Type{ColorKVTree.t}) = "Tree" @@ -40,7 +40,7 @@ function rbt_depth(e::ColorKVTree.t) ] end -is_red(c::Color.T) = matches(c, :R) +is_red(c::Color.t) = matches(c, :R) # Check that all paths through the tree have the same number of black nodes function satisfies_bookkeeping_invariant(e::ColorKVTree.t) diff --git a/examples/qc/benchmarks/lib/rbt/to_coq.jl b/examples/qc/benchmarks/lib/rbt/to_coq.jl index 2243f7d2..64778b21 100644 --- a/examples/qc/benchmarks/lib/rbt/to_coq.jl +++ b/examples/qc/benchmarks/lib/rbt/to_coq.jl @@ -1,6 +1,6 @@ flatten = Iterators.flatten -function tocoq(c::Color.T) +function tocoq(c::Color.t) @match c [ Red() -> "R", Black() -> "B", diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 340d4576..f7c7ef25 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -13,7 +13,7 @@ GENERATION_PARAMS_LIST = [ # ), LangDerivedGenerator{RBT}( root_ty=ColorKVTree.t, - ty_sizes=[ColorKVTree.t=>5, Color.T=>0], + ty_sizes=[ColorKVTree.t=>5, Color.t=>0], stack_size=2, intwidth=6, ) @@ -35,7 +35,7 @@ GENERATION_PARAMS_LIST = [ # ) # DerivedGenerator{RBT}( # root_ty=ColorKVTree.t, - # ty_sizes=[ColorKVTree.t=>4, Color.T=>0], + # ty_sizes=[ColorKVTree.t=>4, Color.t=>0], # stack_size=2, # intwidth=6, # ) diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 2097bee6..51000b68 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -23,7 +23,7 @@ if isempty(ARGS) # ) # g_p = DerivedGenerator{RBT}( # root_ty=ColorKVTree.t, - # ty_sizes=Dict(ColorKVTree.t=>4, Color.T=>0), + # ty_sizes=Dict(ColorKVTree.t=>4, Color.t=>0), # stack_size=1, # intwidth=6, # ) @@ -71,9 +71,9 @@ if isempty(ARGS) ] - g_p = LangDerivedGenerator{RBT}( + g_p = LangSiblingDerivedGenerator{RBT}( root_ty=ColorKVTree.t, - ty_sizes=[ColorKVTree.t=>2, Color.T=>0], + ty_sizes=[ColorKVTree.t=>2, Color.t=>0], stack_size=2, intwidth=6, ) From 5b203360f65f6362292cc19332da55c4b27bb394 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 28 May 2024 21:28:01 -0700 Subject: [PATCH 175/231] lang derived siblings stlc compiles --- e | 0 examples/qc/benchmarks/benchmarks.jl | 110 ++++++++++++------- examples/qc/benchmarks/lib/be.jl | 8 +- examples/qc/benchmarks/lib/bst/dist.jl | 8 +- examples/qc/benchmarks/lib/bst/generator.jl | 2 +- examples/qc/benchmarks/lib/lang.jl | 22 ++-- examples/qc/benchmarks/lib/stlc/dist.jl | 86 +++++++-------- examples/qc/benchmarks/lib/stlc/generator.jl | 8 +- examples/qc/benchmarks/main.jl | 73 ++++++------ examples/qc/benchmarks/tool.jl | 49 +++++---- src/dist/inductive/nat.jl | 8 +- 11 files changed, 208 insertions(+), 166 deletions(-) create mode 100644 e diff --git a/e b/e new file mode 100644 index 00000000..e69de29b diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 2da475b7..198fd103 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -460,8 +460,8 @@ end struct STLCGeneration <: Generation{STLC} - e::OptExpr.T - constructors_overapproximation::Vector{OptExpr.T} + e::OptExpr.t + constructors_overapproximation::Vector{OptExpr.t} end function generation_emit_stats(rs::RunState, g::STLCGeneration, s::String) println_flush(rs.io, "Saving samples...") @@ -497,7 +497,7 @@ function to_subpath(p::DerivedGenerator{T}) where T end function generate(rs::RunState, p::DerivedGenerator{T}) where T constructors_overapproximation = [] - function add_ctor(v::OptExpr.T) + function add_ctor(v::OptExpr.t) push!(constructors_overapproximation, v) v end @@ -664,7 +664,7 @@ function derive_lang_generator(p::LangDerivedGenerator{T}) where T [ L.Var(stack_vars[i]) for i in 2:p.stack_size ], [L.Loc()], )) - elseif param == Nat.T + elseif param == Nat.t L.GenNat(dependents(), p.intwidth) elseif param == DistInt32 L.GenZ(dependents(), p.intwidth) @@ -689,8 +689,8 @@ function derive_lang_generator(p::LangDerivedGenerator{T}) where T func = L.Function( "gen$(to_coq(ty))", vcat( - [L.Param(:size, Nat.T)], - [L.Param(stack_var, Nat.T) for stack_var in stack_vars], + [L.Param(:size, Nat.t)], + [L.Param(stack_var, Nat.t) for stack_var in stack_vars], ), L.G{ty}, if recursive @@ -718,47 +718,77 @@ function derive_lang_generator(p::LangDerivedGenerator{T}) where T ) end +unctor = Dict() + module LeafCtorColorKVTree using Dice @inductive t LeafCtorColorKVTree_E() end to_coq(::Type{LeafCtorColorKVTree.t}) = "LeafCtorColorKVTree" - -module LeafCtorColor - using Dice - @inductive t LeafCtorColor_R() LeafCtorColor_B() -end -to_coq(::Type{LeafCtorColor.t}) = "LeafCtorColor" - +unctor[LeafCtorColorKVTree.LeafCtorColorKVTree_E] = ColorKVTree.E module CtorColorKVTree using Dice @inductive t CtorColorKVTree_E() CtorColorKVTree_T() end to_coq(::Type{CtorColorKVTree.t}) = "CtorColorKVTree" +unctor[CtorColorKVTree.CtorColorKVTree_T] = ColorKVTree.T +unctor[CtorColorKVTree.CtorColorKVTree_E] = ColorKVTree.E +ctor_tys(::Type{ColorKVTree.t}) = [CtorColorKVTree.t, LeafCtorColorKVTree.t] +module LeafCtorColor + using Dice + @inductive t LeafCtorColor_R() LeafCtorColor_B() +end +to_coq(::Type{LeafCtorColor.t}) = "LeafCtorColor" +unctor[LeafCtorColor.LeafCtorColor_R] = Color.R +unctor[LeafCtorColor.LeafCtorColor_B] = Color.B module CtorColor using Dice @inductive t CtorColor_R() CtorColor_B() end to_coq(::Type{CtorColor.t}) = "CtorColor" - -ctor_tys(::Type{ColorKVTree.t}) = [CtorColorKVTree.t, LeafCtorColorKVTree.t] ctor_tys(::Type{Color.t}) = [CtorColor.t, LeafCtorColor.t] +unctor[CtorColor.CtorColor_R] = Color.R +unctor[CtorColor.CtorColor_B] = Color.B + +module LeafCtorTyp + using Dice + @inductive t LeafCtorTyp_TBool() +end +to_coq(::Type{LeafCtorTyp.t}) = "LeafCtorTyp" +unctor[LeafCtorTyp.LeafCtorTyp_TBool] = Typ.TBool +module CtorTyp + using Dice + @inductive t CtorTyp_TBool() CtorTyp_TFun() +end +to_coq(::Type{CtorTyp.t}) = "CtorTyp" +unctor[CtorTyp.CtorTyp_TBool] = Typ.TBool +unctor[CtorTyp.CtorTyp_TFun] = Typ.TFun +ctor_tys(::Type{Typ.t}) = [CtorTyp.t, LeafCtorTyp.t] + +module LeafCtorExpr + using Dice + @inductive t LeafCtorExpr_Var() LeafCtorExpr_Bool() +end +to_coq(::Type{LeafCtorExpr.t}) = "LeafCtorExpr" +unctor[LeafCtorExpr.LeafCtorExpr_Var] = Expr.Var +unctor[LeafCtorExpr.LeafCtorExpr_Bool] = Expr.Bool +module CtorExpr + using Dice + @inductive t CtorExpr_Var() CtorExpr_Bool() CtorExpr_Abs() CtorExpr_App() +end +to_coq(::Type{CtorExpr.t}) = "CtorExpr" +unctor[CtorExpr.CtorExpr_Var] = Expr.Var +unctor[CtorExpr.CtorExpr_Bool] = Expr.Bool +unctor[CtorExpr.CtorExpr_Abs] = Expr.Abs +unctor[CtorExpr.CtorExpr_App] = Expr.App +ctor_tys(::Type{Expr.t}) = [CtorExpr.t, LeafCtorExpr.t] function ctor_ty(ty, leaf) inner_ctor_ty, leaf_ctor_ty = ctor_tys(ty) if leaf leaf_ctor_ty else inner_ctor_ty end end -unctor = Dict( - LeafCtorColorKVTree.LeafCtorColorKVTree_E => ColorKVTree.E, - CtorColorKVTree.CtorColorKVTree_T => ColorKVTree.T, - CtorColorKVTree.CtorColorKVTree_E => ColorKVTree.E, - LeafCtorColor.LeafCtorColor_R => Color.R, - LeafCtorColor.LeafCtorColor_B => Color.B, - CtorColor.CtorColor_R => Color.R, - CtorColor.CtorColor_B => Color.B, -) function module_of_func(f) @assert all(m.module == methods(f)[1].module for m in methods(f)) "$(f) $(methods(f))" @@ -863,7 +893,7 @@ function derive_lang_sibling_generator(p::LangSiblingDerivedGenerator{T}) where [L.Loc()], ) ) - elseif chosen_ctor_param == Nat.T + elseif chosen_ctor_param == Nat.t L.GenNat(dependents(leaf, zero_case), p.intwidth) elseif chosen_ctor_param == DistInt32 L.GenZ(dependents(leaf, zero_case), p.intwidth) @@ -905,7 +935,7 @@ function derive_lang_sibling_generator(p::LangSiblingDerivedGenerator{T}) where "genLeaf$(to_coq(ty))", vcat( [L.Param(:chosen_ctor, ctor_ty(ty, true))], - [L.Param(stack_var, Nat.T) for stack_var in stack_vars], + [L.Param(stack_var, Nat.t) for stack_var in stack_vars], ), L.G{ty}, gen(ty, true, nothing) @@ -916,9 +946,9 @@ function derive_lang_sibling_generator(p::LangSiblingDerivedGenerator{T}) where func = L.Function( "gen$(to_coq(ty))", vcat( - [L.Param(:size, Nat.T)], + [L.Param(:size, Nat.t)], [L.Param(:chosen_ctor, ctor_ty(ty, false))], - [L.Param(stack_var, Nat.T) for stack_var in stack_vars], + [L.Param(stack_var, Nat.t) for stack_var in stack_vars], ), L.G{ty}, L.Match(L.Var(:size), [ @@ -976,7 +1006,7 @@ function to_subpath(p::BespokeSTLCGenerator) end function generate(rs::RunState, p::BespokeSTLCGenerator) constructors_overapproximation = [] - function add_ctor(v::OptExpr.T) + function add_ctor(v::OptExpr.t) push!(constructors_overapproximation, v) v end @@ -1074,12 +1104,12 @@ function to_subpath(p::TypeBasedSTLCGenerator) end function generate(rs::RunState, p::TypeBasedSTLCGenerator) constructors_overapproximation = [] - function add_ctor(v::Expr.T) - push!(constructors_overapproximation, Opt.Some(Expr.T, v)) + function add_ctor(v::Expr.t) + push!(constructors_overapproximation, Opt.Some(Expr.t, v)) v end e = tb_gen_expr(rs, p, p.size, empty_stack(p), add_ctor) - STLCGeneration(Opt.Some(Expr.T, e), constructors_overapproximation) + STLCGeneration(Opt.Some(Expr.t, e), constructors_overapproximation) end function generation_params_emit_stats(rs::RunState, p::TypeBasedSTLCGenerator, s) save_coq_generator(rs, p, s, typebased_stlc_to_coq) @@ -1154,8 +1184,8 @@ end abstract type BST <: Benchmark end struct BSTGeneration <: Generation{BST} - t::KVTree.T - constructors_overapproximation::Vector{KVTree.T} + t::KVTree.t + constructors_overapproximation::Vector{KVTree.t} end function generation_emit_stats(rs::RunState, g::BSTGeneration, s::String) end @@ -1193,7 +1223,7 @@ function to_subpath(p::BespokeBSTGenerator) end function generate(rs::RunState, p::BespokeBSTGenerator) constructors_overapproximation = [] - function add_ctor(v::KVTree.T) + function add_ctor(v::KVTree.t) push!(constructors_overapproximation, v) v end @@ -1234,7 +1264,7 @@ function to_subpath(p::TypeBasedBSTGenerator) end function generate(rs::RunState, p::TypeBasedBSTGenerator) constructors_overapproximation = [] - function add_ctor(v::KVTree.T) + function add_ctor(v::KVTree.t) push!(constructors_overapproximation, v) v end @@ -1442,7 +1472,7 @@ function create_loss_manager(rs::RunState, p::SatisfyPropertyLoss, generation) end struct STLCWellTyped <: Property{STLC} end -function check_property(::STLCWellTyped, e::OptExpr.T) +function check_property(::STLCWellTyped, e::OptExpr.t) @assert isdeterministic(e) @match e [ Some(e) -> (@match typecheck(e) [ @@ -1455,7 +1485,7 @@ end name(::STLCWellTyped) = "stlcwelltyped" struct STLCMightType <: Property{STLC} end -function check_property(::STLCMightType, e::OptExpr.T) +function check_property(::STLCMightType, e::OptExpr.t) @assert isdeterministic(e) meets = might_typecheck(e) # assert this this is strictly weaker than full welltyped @@ -1466,7 +1496,7 @@ name(::STLCMightType) = "stlcmighttype" struct STLCVarNumbers <: Property{STLC} end -function check_property(::STLCVarNumbers, e::OptExpr.T) +function check_property(::STLCVarNumbers, e::OptExpr.t) @assert isdeterministic(e) meets = var_numberings_good(e) # assert this this is strictly weaker than mighttype @@ -1478,7 +1508,7 @@ name(::STLCVarNumbers) = "stlcvarnumbers" struct BSTOrderInvariant <: Property{BST} end -check_property(::BSTOrderInvariant, t::KVTree.T) = +check_property(::BSTOrderInvariant, t::KVTree.t) = satisfies_order_invariant(t) name(::BSTOrderInvariant) = "order" diff --git a/examples/qc/benchmarks/lib/be.jl b/examples/qc/benchmarks/lib/be.jl index eff0434b..9b0c5c01 100644 --- a/examples/qc/benchmarks/lib/be.jl +++ b/examples/qc/benchmarks/lib/be.jl @@ -27,7 +27,7 @@ function gen_expr_lang(expr_size, typ_size) ) genVar = L.Function("genVar'", - [p(:ctx, Ctx.T), p(:t, Typ.T), p(:p, Nat.T), p(:r, ListNat.T)], ListNat.T, + [p(:ctx, Ctx.t), p(:t, Typ.t), p(:p, Nat.t), p(:r, ListNat.t)], ListNat.t, L.Match(v(:ctx), [ (:nil, []) => v(:r), (:cons, [:t1, :ctx1]) => L.If( @@ -39,7 +39,7 @@ function gen_expr_lang(expr_size, typ_size) ) - genZero = L.Function("genZero", [p(:env, Ctx.T), p(:tau, Typ.T)], L.G{OptExpr.T}, + genZero = L.Function("genZero", [p(:env, Ctx.t), p(:tau, Typ.t)], L.G{OptExpr.t}, L.Match(v(:tau), [ (:TBool, []) => L.BindGen( L.GenBool([]), @@ -53,7 +53,7 @@ function gen_expr_lang(expr_size, typ_size) ]) ) - genTyp = L.Function("genTyp", [p(:size, Nat.T)], L.G{Typ.T}, + genTyp = L.Function("genTyp", [p(:size, Nat.t)], L.G{Typ.t}, L.Match(L.Var(:size), [ (:O, []) => L.ReturnGen(tbool()), (:S, [:size1]) => L.Frequency([v(:size)], [ @@ -72,7 +72,7 @@ function gen_expr_lang(expr_size, typ_size) ) genExpr = L.Function("genExpr", - [p(:env, ListTyp.T), p(:tau, Typ.T), p(:size, Nat.T)], L.G{OptExpr.T}, + [p(:env, ListTyp.t), p(:tau, Typ.t), p(:size, Nat.t)], L.G{OptExpr.t}, L.Match(L.Var(:size), [ (:O, []) => L.BindGen( diff --git a/examples/qc/benchmarks/lib/bst/dist.jl b/examples/qc/benchmarks/lib/bst/dist.jl index 82658392..682001dd 100644 --- a/examples/qc/benchmarks/lib/bst/dist.jl +++ b/examples/qc/benchmarks/lib/bst/dist.jl @@ -2,7 +2,7 @@ module KVTree using Dice using Main: DistNat - @inductive T Leaf() Node(T, DistNat, DistNat, T) + @inductive t Leaf() Node(t, DistNat, DistNat, t) end bst_ctor_to_id = Dict( @@ -10,14 +10,14 @@ bst_ctor_to_id = Dict( :Node => DistInt32(1), ) -function ctor_to_id(ctor::KVTree.T) +function ctor_to_id(ctor::KVTree.t) match(ctor, [ :Leaf => () -> bst_ctor_to_id[:Leaf] :Node => (_, _, _, _) -> bst_ctor_to_id[:Node] ]) end -function satisfies_order_invariant(t::KVTree.T) +function satisfies_order_invariant(t::KVTree.t) function helper(t, lo, hi) @match t [ Leaf() -> true, @@ -32,7 +32,7 @@ function satisfies_order_invariant(t::KVTree.T) helper(t, nothing, nothing) end -function eq_except_numbers(x::KVTree.T, y::KVTree.T) +function eq_except_numbers(x::KVTree.t, y::KVTree.t) @match x [ Leaf() -> (@match y [ Leaf() -> true, diff --git a/examples/qc/benchmarks/lib/bst/generator.jl b/examples/qc/benchmarks/lib/bst/generator.jl index f5c885d2..bf50f8e0 100644 --- a/examples/qc/benchmarks/lib/bst/generator.jl +++ b/examples/qc/benchmarks/lib/bst/generator.jl @@ -83,7 +83,7 @@ function typebased_gen_tree(rs, p, size::Integer, last_callsite, track_return) ) end -function tree_size(e::KVTree.T) +function tree_size(e::KVTree.t) match(e, [ :Leaf => () -> DistUInt32(0), :Node => (l, k, v, r) -> DistUInt32(1) + tree_size(l) + tree_size(r), diff --git a/examples/qc/benchmarks/lib/lang.jl b/examples/qc/benchmarks/lib/lang.jl index c5c248f9..6d5c3cd8 100644 --- a/examples/qc/benchmarks/lib/lang.jl +++ b/examples/qc/benchmarks/lib/lang.jl @@ -121,7 +121,7 @@ module L mutable struct Map <: Expr dest_module::Module f::Lambda - l::Expr # must be a dist that defines map, like ListExpr.T + l::Expr # must be a dist that defines map, like ListExpr.t end NodeType(::Type{Map}) = Inner() children(x::Map) = [x.f, x.l] @@ -143,7 +143,7 @@ module L mutable struct OneOf <: Expr default::Expr - x::Expr # must be a dist that defines map, like ListExpr.T + x::Expr # must be a dist that defines map, like ListExpr.t end NodeType(::Type{OneOf}) = Inner() children(x::OneOf) = [x.default, x.x] @@ -717,13 +717,17 @@ function to_coq(rs::RunState, p::GenerationParams{T}, prog::L.Program)::String w end a!(") with") - cases = matchid_to_cases[name] - cases = sort(cases) - for (name, w) in cases - e!("| $(name) => $(w)") - end - if !isempty(dependents) - e!("| _ => 500") + if haskey(matchid_to_cases, name) + cases = matchid_to_cases[name] + cases = sort(cases) + for (name, w) in cases + e!("| $(name) => $(w)") + end + if !isempty(dependents) + e!("| _ => 500") + end + else + e!("(* This match is dead code *) | _ => 500") end e!("end") end diff --git a/examples/qc/benchmarks/lib/stlc/dist.jl b/examples/qc/benchmarks/lib/stlc/dist.jl index 13010188..b76fbf38 100644 --- a/examples/qc/benchmarks/lib/stlc/dist.jl +++ b/examples/qc/benchmarks/lib/stlc/dist.jl @@ -2,38 +2,38 @@ module Typ using Dice - @inductive T TBool() TFun(T, T) + @inductive t TBool() TFun(t, t) end -to_coq(::Type{Typ.T}) = "Typ" +to_coq(::Type{Typ.t}) = "Typ" module Expr using Dice using Main: DistNat, Typ - @inductive T Var(DistNat) Bool(AnyBool) Abs(Typ.T, T) App(T, T) + @inductive t Var(DistNat) Bool(AnyBool) Abs(Typ.t, t) App(t, t) end -to_coq(::Type{Expr.T}) = "Expr" +to_coq(::Type{Expr.t}) = "Expr" module OptExpr using Dice using Main: Expr - @inductive T None() Some(Expr.T) + @inductive t None() Some(Expr.t) end -to_coq(::Type{OptExpr.T}) = "option Expr" +to_coq(::Type{OptExpr.t}) = "option Expr" module ListTyp using Dice using Main: Typ - @inductive T nil() cons(Typ.T, T) + @inductive t nil() cons(Typ.t, t) end -to_coq(::Type{ListTyp.T}) = "list Typ" +to_coq(::Type{ListTyp.t}) = "list Typ" module ListNat using Dice - @inductive T nil() cons(DistUInt32, T) + @inductive t nil() cons(DistUInt32, t) end -to_coq(::Type{ListNat.T}) = "list nat" +to_coq(::Type{ListNat.t}) = "list nat" -function prob_map(dest_module, f, l::ListNat.T) +function prob_map(dest_module, f, l::ListNat.t) @match l [ nil() -> dest_module.nil(), cons(hd, tl) -> dest_module.cons(f(hd), prob_map(dest_module, f, tl)) @@ -43,31 +43,31 @@ end module ListOptExpr using Dice using Main: OptExpr - @inductive T nil() cons(OptExpr.T, T) + @inductive t nil() cons(OptExpr.t, t) end -to_coq(::Type{ListOptExpr.T}) = "list option Expr" +to_coq(::Type{ListOptExpr.t}) = "list option Expr" module Nat using Dice - T = DistUInt32 + t = DistUInt32 end -to_coq(::Type{Nat.T}) = "nat" +to_coq(::Type{Nat.t}) = "nat" module Ctx using Dice using Main: Typ - @inductive T nil() cons(Typ.T, T) + @inductive t nil() cons(Typ.t, t) end -to_coq(::Type{Ctx.T}) = "Ctx" +to_coq(::Type{Ctx.t}) = "Ctx" -function Base.length(l::ListOptExpr.T) +function Base.length(l::ListOptExpr.t) @match l [ nil() -> DistUInt32(0), cons(x, xs) -> DistUInt32(1) + length(xs), ] end -function one_of(default::OptExpr.T, l::ListOptExpr.T)::OptExpr.T +function one_of(default::OptExpr.t, l::ListOptExpr.t)::OptExpr.t @match l [ nil() -> default, cons(x, xs) -> @dice_ite if flip_reciprocal(length(l)) @@ -78,7 +78,7 @@ function one_of(default::OptExpr.T, l::ListOptExpr.T)::OptExpr.T ] end -function term_size(e::Expr.T) +function term_size(e::Expr.t) match(e, [ :Var => (i) -> DistUInt32(1), :Bool => (b) -> DistUInt32(1), @@ -87,21 +87,21 @@ function term_size(e::Expr.T) ]) end -function term_size(e::OptExpr.T) +function term_size(e::OptExpr.t) match(e, [ :Some => e -> term_size(e), :None => () -> DistUInt32(1024), ]) end -function num_apps(e::OptExpr.T) +function num_apps(e::OptExpr.t) match(e, [ :Some => x -> num_apps(x), :None => () -> DistUInt32(1024), ]) end -function num_apps(e::Expr.T) +function num_apps(e::Expr.t) match(e, [ :Var => (i) -> DistUInt32(0), :Bool => (b) -> DistUInt32(0), @@ -117,7 +117,7 @@ stlc_ctor_to_id = Dict( :Abs => DistInt32(3), ) -function ctor_to_id(ctor::Expr.T) +function ctor_to_id(ctor::Expr.t) match(ctor, [ :Var => _ -> stlc_ctor_to_id[:Var] :Bool => _ -> stlc_ctor_to_id[:Bool] @@ -126,7 +126,7 @@ function ctor_to_id(ctor::Expr.T) ]) end -function opt_ctor_to_id(opt_ctor::OptExpr.T) +function opt_ctor_to_id(opt_ctor::OptExpr.t) match(opt_ctor, [ :Some => ctor_to_id, :None => () -> DistInt32(-1), @@ -249,30 +249,30 @@ function to_int(x::DistUInt32) first(keys(dist)) end -function typecheck(ast::Expr.T, gamma, depth=0)::Opt.T{Typ.T} +function typecheck(ast::Expr.t, gamma, depth=0)::Opt.T{Typ.t} @match ast [ Var(i) -> begin var_depth = depth - to_int(i) - 1 - haskey(gamma, var_depth) || return Opt.None(Typ.T) + haskey(gamma, var_depth) || return Opt.None(Typ.t) Opt.Some(gamma[var_depth]) end, Bool(_) -> Opt.Some(Typ.TBool()), Abs(t_in, e) -> begin gamma′ = copy(gamma) gamma′[depth] = t_in - Opt.map(Typ.T, typecheck(e, gamma′, depth + 1)) do t_out + Opt.map(Typ.t, typecheck(e, gamma′, depth + 1)) do t_out Typ.TFun(t_in, t_out) end end, App(e1, e2) -> begin - Opt.bind(Typ.T, typecheck(e1, gamma, depth)) do t1 + Opt.bind(Typ.t, typecheck(e1, gamma, depth)) do t1 @match t1 [ - TBool() -> Opt.None(Typ.T), - TFun(t1_in, t1_out) -> Opt.bind(Typ.T, typecheck(e2, gamma, depth)) do t2 + TBool() -> Opt.None(Typ.t), + TFun(t1_in, t1_out) -> Opt.bind(Typ.t, typecheck(e2, gamma, depth)) do t2 if prob_equals(t1_in, t2) Opt.Some(t1_out) else - Opt.None(Typ.T) + Opt.None(Typ.t) end end, ] @@ -339,7 +339,7 @@ function typecheck(ast::Tuple, gamma, depth=0) end -function eq_except_numbers(x::Typ.T, y::Typ.T) +function eq_except_numbers(x::Typ.t, y::Typ.t) @match x [ TBool() -> (@match y [ TBool() -> true, @@ -352,7 +352,7 @@ function eq_except_numbers(x::Typ.T, y::Typ.T) ] end -function eq_except_numbers(x::Expr.T, y::Expr.T) +function eq_except_numbers(x::Expr.t, y::Expr.t) @match x [ Var(_) -> (@match y [ Var(_) -> true, @@ -381,7 +381,7 @@ function eq_except_numbers(x::Expr.T, y::Expr.T) ] end -function has_app(x::Expr.T) +function has_app(x::Expr.t) @match x [ Var(_) -> false, Bool(_) -> false, @@ -390,7 +390,7 @@ function has_app(x::Expr.T) ] end -function eq_structure(x::Expr.T, y::Expr.T) +function eq_structure(x::Expr.t, y::Expr.t) @match x [ Var(_) -> (@match y [ Var(_) -> true, @@ -419,7 +419,7 @@ function eq_structure(x::Expr.T, y::Expr.T) ] end -function eq_except_numbers(x::OptExpr.T, y::OptExpr.T) +function eq_except_numbers(x::OptExpr.t, y::OptExpr.t) @match x [ Some(xv) -> (@match y [ Some(yv) -> eq_except_numbers(xv, yv), @@ -432,7 +432,7 @@ function eq_except_numbers(x::OptExpr.T, y::OptExpr.T) ] end -function eq_structure(x::OptExpr.T, y::OptExpr.T) +function eq_structure(x::OptExpr.t, y::OptExpr.t) @match x [ Some(xv) -> (@match y [ Some(yv) -> eq_structure(xv, yv), @@ -458,7 +458,7 @@ function eq_num_apps(x::Opt.T{T}, y::Opt.T{T}) where T ] end -function sat_num_apps(e::Expr.T, k::DistUInt32) +function sat_num_apps(e::Expr.t, k::DistUInt32) @match e [ Var(_) -> DistUInt32(0), Bool(_) -> DistUInt32(0), @@ -494,7 +494,7 @@ function eq_has_app(x::Opt.T{T}, y::Opt.T{T}) where T ] end -function might_typecheck(x::Expr.T, gamma, depth) +function might_typecheck(x::Expr.t, gamma, depth) @match x [ Var(i) -> begin i = Dice.frombits(i, Dict()) @@ -534,14 +534,14 @@ function might_typecheck(x::Expr.T, gamma, depth) ] end -function might_typecheck(x::OptExpr.T) +function might_typecheck(x::OptExpr.t) @match x [ None() -> false, Some(xv) -> might_typecheck(xv, Dict(), 0) != :Error ] end -function var_numberings_good(x::Expr.T, gamma, depth) +function var_numberings_good(x::Expr.t, gamma, depth) @match x [ Var(i) -> begin i = Dice.frombits(i, Dict()) @@ -560,7 +560,7 @@ function var_numberings_good(x::Expr.T, gamma, depth) ] end -function var_numberings_good(x::OptExpr.T) +function var_numberings_good(x::OptExpr.t) @match x [ None() -> false, Some(xv) -> var_numberings_good(xv, Dict(), 0), diff --git a/examples/qc/benchmarks/lib/stlc/generator.jl b/examples/qc/benchmarks/lib/stlc/generator.jl index 311bbd93..7c7f8056 100644 --- a/examples/qc/benchmarks/lib/stlc/generator.jl +++ b/examples/qc/benchmarks/lib/stlc/generator.jl @@ -3,7 +3,7 @@ -function gen_var(ctx::Ctx.T, t::Typ.T, p::DistNat, r::List{DistNat})::List{DistNat} +function gen_var(ctx::Ctx.t, t::Typ.t, p::DistNat, r::List{DistNat})::List{DistNat} match(ctx, [ :nil => () -> r, :cons => (t′, ctx′) -> @dice_ite if prob_equals(t, t′) @@ -22,7 +22,7 @@ function bind_opt(f, ma::Opt.T{T})::Opt.T{<:Any} where T end # TODO: try returning expr instead of opt extr? what does env do? -function gen_zero(env::Ctx.T, tau::Typ.T) +function gen_zero(env::Ctx.t, tau::Typ.t) match(tau, [ :TBool => () -> DistSome(DistBoolean(flip(0.5))), # TODO: should this be constant for just learning structure? :TFun => (T1, T2) -> bind_opt(gen_zero(DistCons(T1, env), T2)) do e @@ -44,14 +44,14 @@ function gen_bool() DistBoolean(flip(0.5)) end -function gen_expr(rs::RunState, env::Ctx.T, tau::Typ.T, sz::Integer, gen_typ_sz::Integer, by_sz, track_return)::OptExpr.T +function gen_expr(rs::RunState, env::Ctx.t, tau::Typ.t, sz::Integer, gen_typ_sz::Integer, by_sz, track_return)::OptExpr.t track_return( begin for_prefix = if by_sz "sz$(sz)_" else "" end if sz == 0 backtrack_for(rs, for_prefix * "zero", [ one_of( - map(Expr.T)( + map(Expr.t)( DistVar, gen_var(env, tau, zero(DistNat), DistNil(DistNat)) ) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index f7c7ef25..b7ab2331 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -6,17 +6,23 @@ GENERATION_PARAMS_LIST = [ # typ_size=2, # ), # LangDerivedGenerator{STLC}( - # root_ty=Expr.T, - # ty_sizes=[Expr.T=>5, Typ.T=>2], + # root_ty=Expr.t, + # ty_sizes=[Expr.t=>5, Typ.t=>2], # stack_size=2, # intwidth=6, # ), - LangDerivedGenerator{RBT}( - root_ty=ColorKVTree.t, - ty_sizes=[ColorKVTree.t=>5, Color.t=>0], - stack_size=2, + LangSiblingDerivedGenerator{STLC}( + root_ty=Expr.t, + ty_sizes=[Expr.t=>5, Typ.t=>2], + stack_size=1, intwidth=6, ) + # LangSiblingDerivedGenerator{RBT}( + # root_ty=ColorKVTree.t, + # ty_sizes=[ColorKVTree.t=>5, Color.t=>0], + # stack_size=2, + # intwidth=6, + # ) # DEPRECATED # TypeBasedSTLCGenerator( @@ -28,8 +34,8 @@ GENERATION_PARAMS_LIST = [ # intwidth=6, # ), # DerivedGenerator{STLC}( - # root_ty=Expr.T, - # ty_sizes=[Expr.T=>4, Typ.T=>1], + # root_ty=Expr.t, + # ty_sizes=[Expr.t=>4, Typ.t=>1], # stack_size=2, # intwidth=6, # ) @@ -54,16 +60,17 @@ FORIGIVENESS_LIST = [0] RAND_FORIGIVENESS_LIST = [true] RESAMPLING_FREQUENCY_LIST = [2] PROPERTY_LIST = [STLCVarNumbers(), STLCMightType(), STLCWellTyped()] -PROPERTY_LIST = [MultipleInvariants([ - BookkeepingInvariant(), - BalanceInvariant(), - OrderInvariant(), -])] +# PROPERTY_LIST = [MultipleInvariants([ +# BookkeepingInvariant(), +# BalanceInvariant(), +# OrderInvariant(), +# ])] SAMPLES_PER_BATCH_LIST = [200] EPOCHS_LIST = [2_000] EQ_LIST = [:prob_equals, :eq_structure] +# EQ_LIST = [:prob_equals, :eq_except_numbers] -n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, FORIGIVENESS_LIST, RAND_FORIGIVENESS_LIST, PROPERTY_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST])) +n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, FORIGIVENESS_LIST, RAND_FORIGIVENESS_LIST, PROPERTY_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST, EQ_LIST])) println(n_runs) @assert n_runs <= 10 @@ -84,35 +91,35 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ [ # ApproxSTLCConstructorEntropy() => lr, # MLELossConfig{STLC}(NumApps(), Linear()) => lr, - SamplingEntropy{STLC}( - resampling_frequency=resampling_frequency, - samples_per_batch=samples_per_batch, - property=property, - eq=eq, - failure_penalty=fp, - forgiveness=forgiveness, - rand_forgiveness=rand_forgiveness, - ) => lr, - # SamplingEntropy{BST}( + # SamplingEntropy{STLC}( # resampling_frequency=resampling_frequency, # samples_per_batch=samples_per_batch, - # property=BSTOrderInvariant(), + # property=property, # eq=eq, # failure_penalty=fp, + # forgiveness=forgiveness, + # rand_forgiveness=rand_forgiveness, # ) => lr, - # SamplingEntropy{RBT}( + # SamplingEntropy{BST}( # resampling_frequency=resampling_frequency, # samples_per_batch=samples_per_batch, - # property=MultipleInvariants([ - # BookkeepingInvariant(), - # BalanceInvariant(), - # OrderInvariant(), - # ]), + # property=BSTOrderInvariant(), # eq=eq, # failure_penalty=fp, - # forgiveness=forgiveness, - # rand_forgiveness=rand_forgiveness, # ) => lr, + SamplingEntropy{RBT}( + resampling_frequency=resampling_frequency, + samples_per_batch=samples_per_batch, + property=MultipleInvariants([ + BookkeepingInvariant(), + BalanceInvariant(), + OrderInvariant(), + ]), + eq=eq, + failure_penalty=fp, + forgiveness=forgiveness, + rand_forgiveness=rand_forgiveness, + ) => lr, ] for lr in LR_LIST for fp in FP_LIST diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 51000b68..73fbc3b4 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -9,6 +9,7 @@ include("benchmarks.jl") # TAG = "v39_stlc_linapps" # TAG = "v40_stlctb_abunch" TAG = "v41_langderivedstlc" +TAG = "v42_langsiblingderivedrbt" OUT_TOP_DIR = "/space/tjoa/tuning-output" ## PARSE ARGS @@ -45,9 +46,9 @@ if isempty(ARGS) # ) lr = 0.5 fp = 0.01 - g_p = LangDerivedGenerator{STLC}( - root_ty=Expr.T, - ty_sizes=[Expr.T=>2, Typ.T=>1], + g_p = LangSiblingDerivedGenerator{STLC}( + root_ty=Expr.t, + ty_sizes=[Expr.t=>2, Typ.t=>2], stack_size=2, intwidth=6, ) @@ -71,27 +72,27 @@ if isempty(ARGS) ] - g_p = LangSiblingDerivedGenerator{RBT}( - root_ty=ColorKVTree.t, - ty_sizes=[ColorKVTree.t=>2, Color.t=>0], - stack_size=2, - intwidth=6, - ) - l_p = [ - SamplingEntropy{RBT}( - resampling_frequency=1, - samples_per_batch=50, - property=MultipleInvariants([ - BookkeepingInvariant(), - BalanceInvariant(), - OrderInvariant(), - ]), - eq=:prob_equals, - failure_penalty=fp, - forgiveness=0.1, - rand_forgiveness=false, - ) => lr, - ] + # g_p = LangSiblingDerivedGenerator{RBT}( + # root_ty=ColorKVTree.t, + # ty_sizes=[ColorKVTree.t=>2, Color.t=>0], + # stack_size=2, + # intwidth=6, + # ) + # l_p = [ + # SamplingEntropy{RBT}( + # resampling_frequency=1, + # samples_per_batch=50, + # property=MultipleInvariants([ + # BookkeepingInvariant(), + # BalanceInvariant(), + # OrderInvariant(), + # ]), + # eq=:prob_equals, + # failure_penalty=fp, + # forgiveness=0.1, + # rand_forgiveness=false, + # ) => lr, + # ] diff --git a/src/dist/inductive/nat.jl b/src/dist/inductive/nat.jl index 2880c541..254f7bb7 100644 --- a/src/dist/inductive/nat.jl +++ b/src/dist/inductive/nat.jl @@ -2,10 +2,10 @@ export Nat, nat_ast_to_int module Nat using Dice - @inductive T Z() S(T) + @inductive t Z() S(t) end -function Nat.T(x::Unsigned) +function Nat.t(x::Unsigned) res = DistZero() for _ in 1:x res = DistSucc(res) @@ -13,9 +13,9 @@ function Nat.T(x::Unsigned) res end -Base.zero(::Type{Nat.T}) = Nat.Z() +Base.zero(::Type{Nat.t}) = Nat.Z() -function Base.:(+)(x::Nat.T, y::Nat.T) +function Base.:(+)(x::Nat.t, y::Nat.t) match(y, [ "Z" => () -> x "S" => y′ -> Nat.S(x) + y′ From f71e168a6a4c9082ce2899dc6a48c70b595add48 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 29 May 2024 14:16:35 -0700 Subject: [PATCH 176/231] add stlcmaytype --- examples/qc/benchmarks/benchmarks.jl | 10 ++++++ examples/qc/benchmarks/lib/stlc/dist.jl | 42 +++++++++++++++++++++++++ examples/qc/benchmarks/main.jl | 41 ++++++++++++------------ examples/qc/benchmarks/tool.jl | 4 ++- 4 files changed, 76 insertions(+), 21 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 198fd103..052a79d9 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -1495,6 +1495,16 @@ end name(::STLCMightType) = "stlcmighttype" +struct STLCMayType <: Property{STLC} end +function check_property(::STLCMayType, e::OptExpr.t) + @assert isdeterministic(e) + meets = may_typecheck(e) + # assert this this is strictly weaker than might type + @assert !check_property(STLCMightType(), e) || meets "$(opt_stlc_str(Dice.frombits(e, Dict())))" + meets +end +name(::STLCMayType) = "stlcmaytype" + struct STLCVarNumbers <: Property{STLC} end function check_property(::STLCVarNumbers, e::OptExpr.t) @assert isdeterministic(e) diff --git a/examples/qc/benchmarks/lib/stlc/dist.jl b/examples/qc/benchmarks/lib/stlc/dist.jl index b76fbf38..fd47b049 100644 --- a/examples/qc/benchmarks/lib/stlc/dist.jl +++ b/examples/qc/benchmarks/lib/stlc/dist.jl @@ -494,6 +494,48 @@ function eq_has_app(x::Opt.T{T}, y::Opt.T{T}) where T ] end + +function may_typecheck(x::Expr.t, under_abs) + @match x [ + Var(i) -> begin + if !under_abs + return :Error + end + :TypeVar # we leniently let this take any type it needs to + end, + Bool(_) -> :TBool, + App(e1, e2) -> begin + t1 = may_typecheck(e1, under_abs) + if t1 == :Error || t1 == :TBool + return :Error + end + if !(t1 in [:TFun, :TypeVar]) + return :Error + end + # Really, should check that t2 matches function input ty of t1 + t2 = may_typecheck(e2, under_abs) + if t2 == :Error + return :Error + end + :TypeVar + end, + Abs(t_in, e) -> begin + t1 = may_typecheck(e, true) + if t1 == :Error + return :Error + end + :TFun + end, + ] +end + +function may_typecheck(x::OptExpr.t) + @match x [ + None() -> false, + Some(xv) -> may_typecheck(xv, false) != :Error + ] +end + function might_typecheck(x::Expr.t, gamma, depth) @match x [ Var(i) -> begin diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index b7ab2331..79eac994 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -59,7 +59,8 @@ FP_LIST = [0.] FORIGIVENESS_LIST = [0] RAND_FORIGIVENESS_LIST = [true] RESAMPLING_FREQUENCY_LIST = [2] -PROPERTY_LIST = [STLCVarNumbers(), STLCMightType(), STLCWellTyped()] +# PROPERTY_LIST = [STLCVarNumbers(), STLCMightType(), STLCWellTyped()] +PROPERTY_LIST = [STLCMayType()] # PROPERTY_LIST = [MultipleInvariants([ # BookkeepingInvariant(), # BalanceInvariant(), @@ -91,35 +92,35 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ [ # ApproxSTLCConstructorEntropy() => lr, # MLELossConfig{STLC}(NumApps(), Linear()) => lr, - # SamplingEntropy{STLC}( + SamplingEntropy{STLC}( + resampling_frequency=resampling_frequency, + samples_per_batch=samples_per_batch, + property=property, + eq=eq, + failure_penalty=fp, + forgiveness=forgiveness, + rand_forgiveness=rand_forgiveness, + ) => lr, + # SamplingEntropy{BST}( # resampling_frequency=resampling_frequency, # samples_per_batch=samples_per_batch, - # property=property, + # property=BSTOrderInvariant(), # eq=eq, # failure_penalty=fp, - # forgiveness=forgiveness, - # rand_forgiveness=rand_forgiveness, # ) => lr, - # SamplingEntropy{BST}( + # SamplingEntropy{RBT}( # resampling_frequency=resampling_frequency, # samples_per_batch=samples_per_batch, - # property=BSTOrderInvariant(), + # property=MultipleInvariants([ + # BookkeepingInvariant(), + # BalanceInvariant(), + # OrderInvariant(), + # ]), # eq=eq, # failure_penalty=fp, + # forgiveness=forgiveness, + # rand_forgiveness=rand_forgiveness, # ) => lr, - SamplingEntropy{RBT}( - resampling_frequency=resampling_frequency, - samples_per_batch=samples_per_batch, - property=MultipleInvariants([ - BookkeepingInvariant(), - BalanceInvariant(), - OrderInvariant(), - ]), - eq=eq, - failure_penalty=fp, - forgiveness=forgiveness, - rand_forgiveness=rand_forgiveness, - ) => lr, ] for lr in LR_LIST for fp in FP_LIST diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 73fbc3b4..4e70c2b3 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -10,6 +10,8 @@ include("benchmarks.jl") # TAG = "v40_stlctb_abunch" TAG = "v41_langderivedstlc" TAG = "v42_langsiblingderivedrbt" +TAG = "v43_langsiblingderivedstlc" +TAG = "v44_stlcmaytype" OUT_TOP_DIR = "/space/tjoa/tuning-output" ## PARSE ARGS @@ -60,7 +62,7 @@ if isempty(ARGS) SamplingEntropy{STLC}( resampling_frequency=1, samples_per_batch=50, - property=STLCVarNumbers(), + property=STLCMayType(), eq=:prob_equals, failure_penalty=fp, forgiveness=0.1, From 836d31de1ff797e7ad8a7406f73efb160455b8be Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 3 Jun 2024 11:00:58 -0700 Subject: [PATCH 177/231] LD: add arbitrary_prims --- examples/qc/benchmarks/benchmarks.jl | 28 +++++++++++++++++---- examples/qc/benchmarks/lib/lang.jl | 33 +++++++++++++++++++++++++ examples/qc/benchmarks/lib/stlc/dist.jl | 17 +++++++++++++ examples/qc/benchmarks/main.jl | 19 +++++++------- examples/qc/benchmarks/tool.jl | 3 ++- 5 files changed, 85 insertions(+), 15 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 052a79d9..010982f7 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -533,9 +533,10 @@ struct LangDerivedGenerator{T} <: GenerationParams{T} ty_sizes::Vector{Pair{Type, Integer}} stack_size::Integer intwidth::Integer + arbitrary_prims::Bool end -LangDerivedGenerator{T}(; root_ty, ty_sizes, stack_size, intwidth) where T = - LangDerivedGenerator{T}(root_ty, ty_sizes, stack_size, intwidth) +LangDerivedGenerator{T}(; root_ty, ty_sizes, stack_size, intwidth, arbitrary_prims) where T = + LangDerivedGenerator{T}(root_ty, ty_sizes, stack_size, intwidth, arbitrary_prims) function to_subpath(p::LangDerivedGenerator{T}) where T [ lowercase(string(T)), @@ -544,6 +545,7 @@ function to_subpath(p::LangDerivedGenerator{T}) where T "ty-sizes=$(join(["$(ty)-$(size)" for (ty, size) in p.ty_sizes],"-"))", "stack_size=$(p.stack_size)", "intwidth=$(p.intwidth)", + "arbitrary_prims=$(p.arbitrary_prims)", ] end function generate(rs::RunState, p::LangDerivedGenerator{T}) where T @@ -665,11 +667,23 @@ function derive_lang_generator(p::LangDerivedGenerator{T}) where T [L.Loc()], )) elseif param == Nat.t - L.GenNat(dependents(), p.intwidth) + if p.arbitrary_prims + L.ArbitraryNat() + else + L.GenNat(dependents(), p.intwidth) + end elseif param == DistInt32 - L.GenZ(dependents(), p.intwidth) + if p.arbitrary_prims + L.ArbitraryZ() + else + L.GenZ(dependents(), p.intwidth) + end elseif param == AnyBool - L.GenBool(dependents()) + if p.arbitrary_prims + L.ArbitraryBool() + else + L.GenBool(dependents()) + end else error("bad param type $(param)") end, @@ -1501,6 +1515,10 @@ function check_property(::STLCMayType, e::OptExpr.t) meets = may_typecheck(e) # assert this this is strictly weaker than might type @assert !check_property(STLCMightType(), e) || meets "$(opt_stlc_str(Dice.frombits(e, Dict())))" + @assert check_property(STLCMightType(), rem_num_bools(e)) == meets "eq to might rem $(opt_stlc_str(Dice.frombits(e, Dict())))" + + # only applies when arbitrary_prims = true + # @assert check_property(STLCMightType(), e) == meets "eq to might rem $(opt_stlc_str(Dice.frombits(e, Dict())))" meets end name(::STLCMayType) = "stlcmaytype" diff --git a/examples/qc/benchmarks/lib/lang.jl b/examples/qc/benchmarks/lib/lang.jl index 6d5c3cd8..bd86913b 100644 --- a/examples/qc/benchmarks/lib/lang.jl +++ b/examples/qc/benchmarks/lib/lang.jl @@ -183,6 +183,15 @@ module L NodeType(::Type{GenBool}) = Inner() children(x::GenBool) = x.dependents + mutable struct ArbitraryBool <: Expr end + NodeType(::Type{ArbitraryBool}) = Leaf() + + mutable struct ArbitraryNat <: Expr end + NodeType(::Type{ArbitraryNat}) = Leaf() + + mutable struct ArbitraryZ <: Expr end + NodeType(::Type{ArbitraryZ}) = Leaf() + # Functions mutable struct Function <: DAG name::String @@ -481,6 +490,18 @@ function interp(rs::RunState, prog::L.Program) flip_for(rs, "$(name)_true", dependents) end + function interp(env::Env, x::L.ArbitraryBool) + true + end + + function interp(env::Env, x::L.ArbitraryNat) + DistUInt32(0) + end + + function interp(env::Env, x::L.ArbitraryZ) + DistInt32(0) + end + res = interp(Env(), prog.res) res, prim_map, function_results @@ -806,6 +827,18 @@ function to_coq(rs::RunState, p::GenerationParams{T}, prog::L.Program)::String w e!("])") end + function visit(x::L.ArbitraryBool) + e!("arbitrary") + end + + function visit(x::L.ArbitraryNat) + e!("arbitrary") + end + + function visit(x::L.ArbitraryZ) + e!("arbitrary") + end + function visit(x::L.Function) recursive = any((y -> y isa L.Call && y.f == x.name), x) if recursive diff --git a/examples/qc/benchmarks/lib/stlc/dist.jl b/examples/qc/benchmarks/lib/stlc/dist.jl index fd47b049..a7a591a7 100644 --- a/examples/qc/benchmarks/lib/stlc/dist.jl +++ b/examples/qc/benchmarks/lib/stlc/dist.jl @@ -529,6 +529,23 @@ function may_typecheck(x::Expr.t, under_abs) ] end +function rem_num_bools(x::Expr.t) + @match x [ + Var(_) -> Expr.Var(DistUInt32(0)), + Bool(_) -> Expr.Bool(true), + App(e1, e2) -> Expr.App(rem_num_bools(e1), rem_num_bools(e2)), + Abs(t_in, e) -> Expr.Abs(t_in, rem_num_bools(e)), + ] +end + +function rem_num_bools(x::OptExpr.t) + @match x [ + None() -> OptExpr.None(), + Some(xv) -> OptExpr.Some(rem_num_bools(xv)), + ] +end + + function may_typecheck(x::OptExpr.t) @match x [ None() -> false, diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 79eac994..47e66a1a 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -5,18 +5,19 @@ GENERATION_PARAMS_LIST = [ # expr_size=5, # typ_size=2, # ), - # LangDerivedGenerator{STLC}( - # root_ty=Expr.t, - # ty_sizes=[Expr.t=>5, Typ.t=>2], - # stack_size=2, - # intwidth=6, - # ), - LangSiblingDerivedGenerator{STLC}( + LangDerivedGenerator{STLC}( root_ty=Expr.t, ty_sizes=[Expr.t=>5, Typ.t=>2], - stack_size=1, + stack_size=2, intwidth=6, - ) + arbitrary_prims=true, + ), + # LangSiblingDerivedGenerator{STLC}( + # root_ty=Expr.t, + # ty_sizes=[Expr.t=>5, Typ.t=>2], + # stack_size=1, + # intwidth=6, + # ) # LangSiblingDerivedGenerator{RBT}( # root_ty=ColorKVTree.t, # ty_sizes=[ColorKVTree.t=>5, Color.t=>0], diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 4e70c2b3..40437332 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -48,11 +48,12 @@ if isempty(ARGS) # ) lr = 0.5 fp = 0.01 - g_p = LangSiblingDerivedGenerator{STLC}( + g_p = LangDerivedGenerator{STLC}( root_ty=Expr.t, ty_sizes=[Expr.t=>2, Typ.t=>2], stack_size=2, intwidth=6, + arbitrary_prims=true, ) # g_p = LangBespokeSTLCGenerator( # expr_size=2, From 3ed1f065728585f04141374ae1f0e2afcdba7f70 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 4 Jun 2024 12:42:21 -0700 Subject: [PATCH 178/231] small tweaks --- examples/qc/benchmarks/benchmarks.jl | 4 +-- examples/qc/benchmarks/main.jl | 34 ++++++++++----------- examples/qc/benchmarks/tool.jl | 44 +++++++++++----------------- 3 files changed, 36 insertions(+), 46 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 010982f7..4003cddf 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -1119,11 +1119,11 @@ end function generate(rs::RunState, p::TypeBasedSTLCGenerator) constructors_overapproximation = [] function add_ctor(v::Expr.t) - push!(constructors_overapproximation, Opt.Some(Expr.t, v)) + push!(constructors_overapproximation, OptExpr.Some(v)) v end e = tb_gen_expr(rs, p, p.size, empty_stack(p), add_ctor) - STLCGeneration(Opt.Some(Expr.t, e), constructors_overapproximation) + STLCGeneration(OptExpr.Some(e), constructors_overapproximation) end function generation_params_emit_stats(rs::RunState, p::TypeBasedSTLCGenerator, s) save_coq_generator(rs, p, s, typebased_stlc_to_coq) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 47e66a1a..6009104f 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -5,13 +5,13 @@ GENERATION_PARAMS_LIST = [ # expr_size=5, # typ_size=2, # ), - LangDerivedGenerator{STLC}( - root_ty=Expr.t, - ty_sizes=[Expr.t=>5, Typ.t=>2], - stack_size=2, - intwidth=6, - arbitrary_prims=true, - ), + # LangDerivedGenerator{STLC}( + # root_ty=Expr.t, + # ty_sizes=[Expr.t=>5, Typ.t=>2], + # stack_size=2, + # intwidth=6, + # arbitrary_prims=true, + # ), # LangSiblingDerivedGenerator{STLC}( # root_ty=Expr.t, # ty_sizes=[Expr.t=>5, Typ.t=>2], @@ -26,14 +26,14 @@ GENERATION_PARAMS_LIST = [ # ) # DEPRECATED - # TypeBasedSTLCGenerator( - # size=5, - # ty_size=2, - # dependents=[:size,:stack_tail], - # ty_dependents=[:size,:stack_tail], - # stack_size=2, - # intwidth=6, - # ), + TypeBasedSTLCGenerator( + size=5, + ty_size=2, + dependents=[:size,:stack_tail], + ty_dependents=[:size,:stack_tail], + stack_size=2, + intwidth=6, + ), # DerivedGenerator{STLC}( # root_ty=Expr.t, # ty_sizes=[Expr.t=>4, Typ.t=>1], @@ -69,12 +69,12 @@ PROPERTY_LIST = [STLCMayType()] # ])] SAMPLES_PER_BATCH_LIST = [200] EPOCHS_LIST = [2_000] -EQ_LIST = [:prob_equals, :eq_structure] +EQ_LIST = [:eq_structure] # EQ_LIST = [:prob_equals, :eq_except_numbers] n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, FORIGIVENESS_LIST, RAND_FORIGIVENESS_LIST, PROPERTY_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST, EQ_LIST])) println(n_runs) -@assert n_runs <= 10 +@assert n_runs <= 12 @show GENERATION_PARAMS_LIST @show LR_LIST diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 40437332..8b813487 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -1,17 +1,7 @@ include("benchmarks.jl") -# TAG = "v34_stlc_derived_spec_structure_and_prob_eq" -# TAG = "v34_stlc_derived_unif_apps" -# TAG = "v34_rbt_derived" -# TAG = "v36_stlc_might_fixed" -# TAG = "v37_stlc_might2" # this one is stricter -# TAG = "v38_stlc_vars" # this one is stricter -# TAG = "v39_stlc_linapps" -# TAG = "v40_stlctb_abunch" -TAG = "v41_langderivedstlc" -TAG = "v42_langsiblingderivedrbt" -TAG = "v43_langsiblingderivedstlc" -TAG = "v44_stlcmaytype" +TAG = "v45_stlcmayarb" +TAG = "v46_tbmay" OUT_TOP_DIR = "/space/tjoa/tuning-output" ## PARSE ARGS @@ -30,14 +20,14 @@ if isempty(ARGS) # stack_size=1, # intwidth=6, # ) - # g_p = TypeBasedSTLCGenerator( - # size=2, - # ty_size=1, - # dependents=[:size,:stack_tail], - # ty_dependents=[:size,:stack_tail], - # stack_size=2, - # intwidth=6, - # ) + g_p = TypeBasedSTLCGenerator( + size=2, + ty_size=1, + dependents=[:size,:stack_tail], + ty_dependents=[:size,:stack_tail], + stack_size=2, + intwidth=6, + ) # g_p = TypeBasedRBTGenerator( # size=3, # leaf_dependents=[:size,:parent_color,:stack_tail], @@ -48,13 +38,13 @@ if isempty(ARGS) # ) lr = 0.5 fp = 0.01 - g_p = LangDerivedGenerator{STLC}( - root_ty=Expr.t, - ty_sizes=[Expr.t=>2, Typ.t=>2], - stack_size=2, - intwidth=6, - arbitrary_prims=true, - ) + # g_p = LangDerivedGenerator{STLC}( + # root_ty=Expr.t, + # ty_sizes=[Expr.t=>2, Typ.t=>2], + # stack_size=2, + # intwidth=6, + # arbitrary_prims=true, + # ) # g_p = LangBespokeSTLCGenerator( # expr_size=2, # typ_size=1, From 50bd5f1227636b2ee7f3c9cbba52b8986d7d12cc Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 4 Jun 2024 12:53:42 -0700 Subject: [PATCH 179/231] update stats --- stats/stats.py | 73 +++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 60 insertions(+), 13 deletions(-) diff --git a/stats/stats.py b/stats/stats.py index 5e7bd396..8af0ac84 100755 --- a/stats/stats.py +++ b/stats/stats.py @@ -8,22 +8,64 @@ from dataclasses import dataclass, field from typing import List, Callable -WORKLOAD = "RBT" +WORKLOAD = "STLC" ORDER_ONLY = True -ORDER = [ # Put rows in this order and also assert that these generators exist - # "EntropyGenerator.v", - "ConsiderStack3Generator.v", -] +ORDER: List[str] = { # Put rows in this order and also assert that these generators exist + "STLC": [ + # # class: bespoke + # "BespokeGenerator", + # "LBespokeGenerator", + # "LBespokeACEGenerator", + # "LBespokeApproxConstructorEntropyGenerator", + # # class: type-based + # "TypeBasedGenerator", + # "LDGenerator", + # "LDEqMightGenerator", + # "LDEqVarGenerator", + # "LDEqWellGenerator", + # "LDStructureMightGenerator", + # "LDStructureVarGenerator", + # "LDStructureWellGenerator", + # "LSDGenerator", + # "LSDStructureMightGenerator", + # "LSDStructureWellGenerator", + # "LSDGenerator", + # "LSDStructureMayGenerator", + # "LSDEqMayGenerator", + # "LDStructureMayGenerator", + # "LDEqMayGenerator", + # "LDMayStructureArb_Freq5_SPB50_LR10Generator", + # "LDMayStructureArb_Freq5_SPB50_LR30Generator", + # "LDMayStructureArb_Freq5_SPB50_LR50Generator", + # "TBMay10Generator", + # "TBMay30Generator", + # "TBMay50Generator", +"LDMayStructureArb_Freq2_SPB200_LR10Generator", +"LDMayStructureArb_Freq2_SPB200_LR30Generator", +"LDMayStructureArb_Freq2_SPB200_LR50Generator", +"LDMayStructureArb_Freq2_SPB50_LR10Generator", +"LDMayStructureArb_Freq2_SPB50_LR30Generator", +"LDMayStructureArb_Freq2_SPB50_LR50Generator", +"LDMayStructureArb_Freq5_SPB200_LR10Generator", + ], + + "RBT": [ + "TypeBasedGenerator", + "LSDEqGenerator", + "LSDExceptNumsGenerator", + "LSDGenerator", + ] +}[WORKLOAD] STRAT_DIR = f"/space/tjoa/etna/workloads/Coq/{WORKLOAD}/Strategies/" OUT_DIR = f"/space/tjoa/Dice.jl/stats/{WORKLOAD}" COQ_PROJECT_DIR = f"/space/tjoa/etna/workloads/Coq/{WORKLOAD}" -NUM_TESTS = 10_000 +NUM_TESTS = 100_000 @dataclass class Workload: type: str - generator: str + generator: Callable[[str],str] invariant_check: str metrics: List[str] extra_definitions: str @@ -32,7 +74,7 @@ class Workload: WORKLOADS = { "STLC": Workload( type="Expr", - generator="gSized", + generator=lambda _:"gSized", invariant_check="isJust (mt %s)", metrics=["sizeSTLC", "num_apps"], extra_definitions=""" @@ -46,7 +88,7 @@ class Workload: ), "BST": Workload( type="Tree", - generator="gSized", + generator=lambda _:"gSized", invariant_check="isBST %s", metrics=["size", "height"], extra_definitions=""" @@ -59,7 +101,7 @@ class Workload: ), "RBT": Workload( type="Tree", - generator="arbitrary", + generator=lambda filename: "arbitrary" if "typebased" in filename.lower() else "gSized", invariant_check="isRBT %s", metrics=["size", "height"], extra_definitions=""" @@ -75,6 +117,11 @@ class Workload: workload = WORKLOADS[WORKLOAD] +ORDER = [ + f"{s}.v" + for s in ORDER +] + def main(): # List generators generators = [ @@ -158,7 +205,7 @@ def collect_stats(path, filename, metric_to_generator_to_counts): if may_fail: pgrm += """ Definition collect {A : Type} `{_ : Show A} (f : """ + workload.type + """ -> A) : Checker := - forAll """ + workload.generator + """ (fun (t : option """ + workload.type + """) => + forAll """ + workload.generator(filename) + """ (fun (t : option """ + workload.type + """) => match t with | Some t => if """ + (workload.invariant_check % "t") + """ then @@ -171,7 +218,7 @@ def collect_stats(path, filename, metric_to_generator_to_counts): else: pgrm += """ Definition collect {A : Type} `{_ : Show A} (f : """ + workload.type + """ -> A) : Checker := - forAll """ + workload.generator + """ (fun (t : """ + workload.type + """) => + forAll """ + workload.generator(filename) + """ (fun (t : """ + workload.type + """) => if """ + (workload.invariant_check % "t") + """ then collect (append "valid " (show (f t))) true else @@ -216,7 +263,7 @@ def remove_junk(s): print(s) last_line_blank = line_blank - exit(1) + # exit(1) assert p.returncode == 0 From e1b15336856c413671d8c699d9fe44bb789e480a Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 5 Jun 2024 10:32:11 -0700 Subject: [PATCH 180/231] better tool --- examples/qc/benchmarks/tool.jl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 8b813487..0c702dc8 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -37,7 +37,7 @@ if isempty(ARGS) # intwidth=6, # ) lr = 0.5 - fp = 0.01 + fp = 0 # g_p = LangDerivedGenerator{STLC}( # root_ty=Expr.t, # ty_sizes=[Expr.t=>2, Typ.t=>2], @@ -53,11 +53,11 @@ if isempty(ARGS) SamplingEntropy{STLC}( resampling_frequency=1, samples_per_batch=50, - property=STLCMayType(), - eq=:prob_equals, + property=STLCMightType(), + eq=:eq_structure, failure_penalty=fp, - forgiveness=0.1, - rand_forgiveness=false, + forgiveness=0, + rand_forgiveness=true, ) => lr, # ApproxSTLCConstructorEntropy() => lr, From 414f5ad6ef0c9a9fe1a8ec0702242c2759ed9025 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 6 Jun 2024 11:05:01 -0700 Subject: [PATCH 181/231] lang bst --- examples/qc/benchmarks/benchmarks.jl | 219 +++++++++++++++++++- examples/qc/benchmarks/lib/bst/dist.jl | 27 +-- examples/qc/benchmarks/lib/bst/generator.jl | 22 +- examples/qc/benchmarks/main.jl | 22 +- examples/qc/benchmarks/tool.jl | 30 ++- 5 files changed, 277 insertions(+), 43 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 4003cddf..909dfee0 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -555,7 +555,7 @@ function generate(rs::RunState, p::LangDerivedGenerator{T}) where T if T == STLC STLCGeneration(OptExpr.Some(res), [OptExpr.Some(e) for e in function_results["genExpr"]]) elseif T == BST - BSTGeneration(res) #, function_results["genTree"]) + BSTGeneration(res, function_results["genTree"]) elseif T == RBT RBTGeneration(res) #, function_results["genTree"]) else @@ -734,6 +734,21 @@ end unctor = Dict() +module LeafCtorKVTree + using Dice + @inductive t LeafCtorKVTree_E() +end +to_coq(::Type{LeafCtorKVTree.t}) = "LeafCtorKVTree" +unctor[LeafCtorKVTree.LeafCtorKVTree_E] = KVTree.E +module CtorKVTree + using Dice + @inductive t CtorKVTree_E() CtorKVTree_T() +end +to_coq(::Type{CtorKVTree.t}) = "CtorKVTree" +unctor[CtorKVTree.CtorKVTree_T] = KVTree.T +unctor[CtorKVTree.CtorKVTree_E] = KVTree.E +ctor_tys(::Type{KVTree.t}) = [CtorKVTree.t, LeafCtorKVTree.t] + module LeafCtorColorKVTree using Dice @inductive t LeafCtorColorKVTree_E() @@ -1197,6 +1212,208 @@ end ################################## abstract type BST <: Benchmark end +function sandwich(::Type{BST}) + ( + "From QuickChick Require Import QuickChick. Import QcNotation. +From Coq Require Import List. Import ListNotations. +From Coq Require Import ZArith. +From ExtLib Require Import Monad. +Import MonadNotation. + +From BST Require Import Impl. +From BST Require Import Spec.", +"Definition manual_shrink_tree := +fun x : Tree => +let + fix aux_shrink (x' : Tree) : list Tree := + match x' with + | E => [] + | T p0 p1 p2 p3 => + ([p0] ++ + map (fun shrunk : Tree => T shrunk p1 p2 p3) (aux_shrink p0) ++ + []) ++ + (map (fun shrunk : nat => T p0 shrunk p2 p3) (shrink p1) ++ []) ++ + (map (fun shrunk : nat => T p0 p1 shrunk p3) (shrink p2) ++ []) ++ + ([p3] ++ + map (fun shrunk : Tree => T p0 p1 p2 shrunk) (aux_shrink p3) ++ + []) ++ [] + end in +aux_shrink x. + + +#[global] +Instance shrTree : Shrink (Tree) := +{| shrink x := manual_shrink_tree x |}. + +Definition test_prop_InsertValid := +forAll gSized (fun (t: Tree) => +forAll arbitrary (fun (k: nat) => +forAll arbitrary (fun (v: nat) => +prop_InsertValid t k v))) +. + +(*! QuickChick test_prop_InsertValid. *) + +Definition test_prop_DeleteValid := +forAll gSized (fun (t: Tree) => +forAll arbitrary (fun (k: nat) => +prop_DeleteValid t k)) +. + +(*! QuickChick test_prop_DeleteValid. *) + + +Definition test_prop_UnionValid := +forAll gSized (fun (t1: Tree) => +forAll gSized (fun (t2: Tree) => +prop_UnionValid t1 t2)) +. + +(*! QuickChick test_prop_UnionValid. *) + +Definition test_prop_InsertPost := +forAll gSized (fun (t: Tree) => +forAll arbitrary (fun (k: nat) => +forAll arbitrary (fun (k': nat) => +forAll arbitrary (fun (v: nat) => +prop_InsertPost t k k' v)))) +. + +(*! QuickChick test_prop_InsertPost. *) + +Definition test_prop_DeletePost := +forAll gSized (fun (t: Tree) => +forAll arbitrary (fun (k: nat) => +forAll arbitrary (fun (k': nat) => +prop_DeletePost t k k'))) +. + +(*! QuickChick test_prop_DeletePost. *) + +Definition test_prop_UnionPost := +forAll gSized (fun (t: Tree) => +forAll gSized (fun (t': Tree) => +forAll arbitrary (fun (k: nat) => +prop_UnionPost t t' k))) +. + +(*! QuickChick test_prop_UnionPost. *) + +Definition test_prop_InsertModel := +forAll gSized (fun (t: Tree) => +forAll arbitrary (fun (k: nat) => +forAll arbitrary (fun (v: nat) => +prop_InsertModel t k v))) +. + +(*! QuickChick test_prop_InsertModel. *) + +Definition test_prop_DeleteModel := +forAll gSized (fun (t: Tree) => +forAll arbitrary (fun (k: nat) => +prop_DeleteModel t k)) +. + +(*! QuickChick test_prop_DeleteModel. *) + +Definition test_prop_UnionModel := +forAll gSized (fun (t: Tree) => +forAll gSized (fun (t': Tree) => +prop_UnionModel t t')) +. + +(*! QuickChick test_prop_UnionModel. *) + +Definition test_prop_InsertInsert := +forAll gSized (fun (t: Tree) => +forAll arbitrary (fun (k: nat) => +forAll arbitrary (fun (k': nat) => +forAll arbitrary (fun (v: nat) => +forAll arbitrary (fun (v': nat) => +prop_InsertInsert t k k' v v'))))) +. + +(*! QuickChick test_prop_InsertInsert. *) + +Definition test_prop_InsertDelete := +forAll gSized (fun (t: Tree) => +forAll arbitrary (fun (k: nat) => +forAll arbitrary (fun (k': nat) => +forAll arbitrary (fun (v: nat) => +prop_InsertDelete t k k' v)))) +. + +(*! QuickChick test_prop_InsertDelete. *) + +Definition test_prop_InsertUnion := +forAll gSized (fun (t: Tree) => +forAll gSized (fun (t': Tree) => +forAll arbitrary (fun (k: nat) => +forAll arbitrary (fun (v: nat) => +prop_InsertUnion t t' k v)))) +. + +(*! QuickChick test_prop_InsertUnion. *) + +Definition test_prop_DeleteInsert := +forAll gSized (fun (t: Tree) => +forAll arbitrary (fun (k: nat) => +forAll arbitrary (fun (k': nat) => +forAll arbitrary (fun (v': nat) => +prop_DeleteInsert t k k' v')))) +. + +(*! QuickChick test_prop_DeleteInsert. *) + +Definition test_prop_DeleteDelete := +forAllShrink gSized shrink (fun (t: Tree) => +forAllShrink arbitrary shrink (fun (k: nat) => +forAllShrink arbitrary shrink (fun (k': nat) => +whenFail' (fun tt => show (t, k, k', delete k t, delete k' t, delete k (delete k' t), delete k' (delete k t))) +(prop_DeleteDelete t k k')))) +. + +(*! QuickChick test_prop_DeleteDelete. *) + +Definition test_prop_DeleteUnion := +forAll gSized (fun (t: Tree) => +forAll gSized (fun (t': Tree) => +forAll arbitrary (fun (k: nat) => +prop_DeleteUnion t t' k))) +. + +(*! QuickChick test_prop_DeleteUnion. *) + +Definition test_prop_UnionDeleteInsert := +forAll gSized (fun (t :Tree) => +forAll gSized (fun (t': Tree) => +forAll arbitrary (fun (k: nat) => +forAll arbitrary (fun (v: nat) => +prop_UnionDeleteInsert t t' k v)))) +. + +(*! QuickChick test_prop_UnionDeleteInsert. *) + +Definition test_prop_UnionUnionIdem := +forAll gSized (fun (t: Tree) => +prop_UnionUnionIdem t) +. + +(*! QuickChick test_prop_UnionUnionIdem. *) + +Definition test_prop_UnionUnionAssoc := +forAll gSized (fun (t1: Tree) => +forAll gSized (fun (t2: Tree) => +forAll gSized (fun (t3: Tree) => +prop_UnionUnionAssoc t1 t2 t3))) +. + +(*! QuickChick test_prop_UnionUnionAssoc. *) + " + ) +end + + struct BSTGeneration <: Generation{BST} t::KVTree.t constructors_overapproximation::Vector{KVTree.t} diff --git a/examples/qc/benchmarks/lib/bst/dist.jl b/examples/qc/benchmarks/lib/bst/dist.jl index 682001dd..946435d4 100644 --- a/examples/qc/benchmarks/lib/bst/dist.jl +++ b/examples/qc/benchmarks/lib/bst/dist.jl @@ -2,26 +2,27 @@ module KVTree using Dice using Main: DistNat - @inductive t Leaf() Node(t, DistNat, DistNat, t) + @inductive t E() T(t, DistNat, DistNat, t) end +to_coq(::Type{KVTree.t}) = "Tree" bst_ctor_to_id = Dict( - :Leaf => DistInt32(0), - :Node => DistInt32(1), + :E => DistInt32(0), + :T => DistInt32(1), ) function ctor_to_id(ctor::KVTree.t) match(ctor, [ - :Leaf => () -> bst_ctor_to_id[:Leaf] - :Node => (_, _, _, _) -> bst_ctor_to_id[:Node] + :E => () -> bst_ctor_to_id[:E] + :T => (_, _, _, _) -> bst_ctor_to_id[:T] ]) end function satisfies_order_invariant(t::KVTree.t) function helper(t, lo, hi) @match t [ - Leaf() -> true, - Node(l, k, v, r) -> begin + E() -> true, + T(l, k, v, r) -> begin (if isnothing(lo) true else lo < k end) & (if isnothing(hi) true else k < hi end) & helper(l, lo, k) & @@ -34,13 +35,13 @@ end function eq_except_numbers(x::KVTree.t, y::KVTree.t) @match x [ - Leaf() -> (@match y [ - Leaf() -> true, - Node(yl, yk, yv, yr) -> false, + E() -> (@match y [ + E() -> true, + T(yl, yk, yv, yr) -> false, ]), - Node(xl, xk, xv, xr) -> (@match y [ - Leaf() -> false, - Node(yl, yk, yv, yr) -> eq_except_numbers(xl, yl) & eq_except_numbers(xr, yr), + T(xl, xk, xv, xr) -> (@match y [ + E() -> false, + T(yl, yk, yv, yr) -> eq_except_numbers(xl, yl) & eq_except_numbers(xr, yr), ]), ] end diff --git a/examples/qc/benchmarks/lib/bst/generator.jl b/examples/qc/benchmarks/lib/bst/generator.jl index bf50f8e0..c6c591f1 100644 --- a/examples/qc/benchmarks/lib/bst/generator.jl +++ b/examples/qc/benchmarks/lib/bst/generator.jl @@ -3,11 +3,11 @@ safedec(x::DistUInt{T}) where T = @dice_ite if prob_equals(x, DistUInt{T}(0)) Di function gen_tree(rs, s::Integer, lo::DistNat, hi::DistNat, approx_unif::Bool, track_return) track_return( @dice_ite if s == 0 || hi - lo < DistNat(2) - KVTree.Leaf() + KVTree.E() else s′ = s - 1 if flip(register_weight!(rs, "sz$(s)")) - KVTree.Leaf() + KVTree.E() else k = if approx_unif unif_approx(lo + DistNat(1), safedec(hi)) @@ -17,7 +17,7 @@ function gen_tree(rs, s::Integer, lo::DistNat, hi::DistNat, approx_unif::Bool, t v = DistNat(0) # arbitrary l = gen_tree(rs, s′, lo, k, approx_unif, track_return) r = gen_tree(rs, s′, k, hi, approx_unif, track_return) - KVTree.Node(l, k, v, r) + KVTree.T(l, k, v, r) end end ) @@ -26,17 +26,17 @@ end function gen_tree_dummy_vals(rs, s::Integer, track_return) track_return( @dice_ite if s == 0 - KVTree.Leaf() + KVTree.E() else s′ = s - 1 if flip(register_weight!(rs, "sz$(s)")) - KVTree.Leaf() + KVTree.E() else k = DistNat(0) v = DistNat(0) # arbitrary l = gen_tree_dummy_vals(rs, s′, track_return) r = gen_tree_dummy_vals(rs, s′, track_return) - KVTree.Node(l, k, v, r) + KVTree.T(l, k, v, r) end end ) @@ -60,11 +60,11 @@ function typebased_gen_tree(rs, p, size::Integer, last_callsite, track_return) track_return( @dice_ite if size == 0 - KVTree.Leaf() + KVTree.E() else s′ = size - 1 if dependents_to_flip("leaf", p.leaf_dependents) - KVTree.Leaf() + KVTree.E() else l = typebased_gen_tree(rs, p, s′, 10, track_return) r = typebased_gen_tree(rs, p, s′, 11, track_return) @@ -77,7 +77,7 @@ function typebased_gen_tree(rs, p, size::Integer, last_callsite, track_return) for n in twopowers(p.intwidth) ) v = DistNat(0) # arbitrary - KVTree.Node(l, k, v, r) + KVTree.T(l, k, v, r) end end ) @@ -85,7 +85,7 @@ end function tree_size(e::KVTree.t) match(e, [ - :Leaf => () -> DistUInt32(0), - :Node => (l, k, v, r) -> DistUInt32(1) + tree_size(l) + tree_size(r), + :E => () -> DistUInt32(0), + :T => (l, k, v, r) -> DistUInt32(1) + tree_size(l) + tree_size(r), ]) end diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 6009104f..5a1160cf 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -24,16 +24,22 @@ GENERATION_PARAMS_LIST = [ # stack_size=2, # intwidth=6, # ) - - # DEPRECATED - TypeBasedSTLCGenerator( - size=5, - ty_size=2, - dependents=[:size,:stack_tail], - ty_dependents=[:size,:stack_tail], + LangDerivedGenerator{BST}( + root_ty=KVTree.t, + ty_sizes=[KVTree.t=>5], stack_size=2, intwidth=6, - ), + arbitrary_prims=false, + ) + # DEPRECATED + # TypeBasedSTLCGenerator( + # size=5, + # ty_size=2, + # dependents=[:size,:stack_tail], + # ty_dependents=[:size,:stack_tail], + # stack_size=2, + # intwidth=6, + # ), # DerivedGenerator{STLC}( # root_ty=Expr.t, # ty_sizes=[Expr.t=>4, Typ.t=>1], diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 0c702dc8..bfff2e53 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -2,6 +2,7 @@ include("benchmarks.jl") TAG = "v45_stlcmayarb" TAG = "v46_tbmay" +TAG = "v48_bst_lang" OUT_TOP_DIR = "/space/tjoa/tuning-output" ## PARSE ARGS @@ -38,23 +39,32 @@ if isempty(ARGS) # ) lr = 0.5 fp = 0 - # g_p = LangDerivedGenerator{STLC}( - # root_ty=Expr.t, - # ty_sizes=[Expr.t=>2, Typ.t=>2], - # stack_size=2, - # intwidth=6, - # arbitrary_prims=true, - # ) + g_p = LangDerivedGenerator{BST}( + root_ty=KVTree.t, + ty_sizes=[KVTree.t=>5], + stack_size=2, + intwidth=6, + arbitrary_prims=false, + ) # g_p = LangBespokeSTLCGenerator( # expr_size=2, # typ_size=1, # ) l_p = [ - SamplingEntropy{STLC}( + # SamplingEntropy{STLC}( + # resampling_frequency=1, + # samples_per_batch=50, + # property=STLCMightType(), + # eq=:eq_structure, + # failure_penalty=fp, + # forgiveness=0, + # rand_forgiveness=true, + # ) => lr, + SamplingEntropy{BST}( resampling_frequency=1, samples_per_batch=50, - property=STLCMightType(), - eq=:eq_structure, + property=BSTOrderInvariant(), + eq=:prob_equals, failure_penalty=fp, forgiveness=0, rand_forgiveness=true, From 6e4722296e2480b9116e080ed8e255df5228c8d5 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 6 Jun 2024 11:07:28 -0700 Subject: [PATCH 182/231] update main --- examples/qc/benchmarks/main.jl | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 5a1160cf..f14cde25 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -30,7 +30,7 @@ GENERATION_PARAMS_LIST = [ stack_size=2, intwidth=6, arbitrary_prims=false, - ) + ), # DEPRECATED # TypeBasedSTLCGenerator( # size=5, @@ -60,6 +60,12 @@ GENERATION_PARAMS_LIST = [ # stack_size=3, # intwidth=6, # ), + TypeBasedBSTGenerator( + size=5, + leaf_dependents=[:size,:last_callsite], + num_dependents=[:size,:last_callsite], + intwidth=6, + ), ] LR_LIST = [0.3] FP_LIST = [0.] @@ -67,7 +73,7 @@ FORIGIVENESS_LIST = [0] RAND_FORIGIVENESS_LIST = [true] RESAMPLING_FREQUENCY_LIST = [2] # PROPERTY_LIST = [STLCVarNumbers(), STLCMightType(), STLCWellTyped()] -PROPERTY_LIST = [STLCMayType()] +PROPERTY_LIST = [BSTOrderInvariant()] # PROPERTY_LIST = [MultipleInvariants([ # BookkeepingInvariant(), # BalanceInvariant(), @@ -75,8 +81,8 @@ PROPERTY_LIST = [STLCMayType()] # ])] SAMPLES_PER_BATCH_LIST = [200] EPOCHS_LIST = [2_000] -EQ_LIST = [:eq_structure] -# EQ_LIST = [:prob_equals, :eq_except_numbers] +# EQ_LIST = [:eq_structure] +EQ_LIST = [:prob_equals, :eq_except_numbers] n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, FORIGIVENESS_LIST, RAND_FORIGIVENESS_LIST, PROPERTY_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST, EQ_LIST])) println(n_runs) From 39f41461d8fb98f565a9bbc93fb63fba5ab9ca53 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 6 Jun 2024 11:08:22 -0700 Subject: [PATCH 183/231] update main --- examples/qc/benchmarks/main.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index f14cde25..19c1f152 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -105,7 +105,7 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ [ # ApproxSTLCConstructorEntropy() => lr, # MLELossConfig{STLC}(NumApps(), Linear()) => lr, - SamplingEntropy{STLC}( + SamplingEntropy{BST}( resampling_frequency=resampling_frequency, samples_per_batch=samples_per_batch, property=property, From 0a9c1020043be988bf95b16dc4d95f595bfa618b Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 6 Jun 2024 11:15:20 -0700 Subject: [PATCH 184/231] main for rbt 1k --- examples/qc/benchmarks/main.jl | 48 +++++++++++++++++----------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 19c1f152..451b9081 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -18,19 +18,19 @@ GENERATION_PARAMS_LIST = [ # stack_size=1, # intwidth=6, # ) - # LangSiblingDerivedGenerator{RBT}( - # root_ty=ColorKVTree.t, - # ty_sizes=[ColorKVTree.t=>5, Color.t=>0], - # stack_size=2, - # intwidth=6, - # ) - LangDerivedGenerator{BST}( - root_ty=KVTree.t, - ty_sizes=[KVTree.t=>5], + LangSiblingDerivedGenerator{RBT}( + root_ty=ColorKVTree.t, + ty_sizes=[ColorKVTree.t=>5, Color.t=>0], stack_size=2, intwidth=6, - arbitrary_prims=false, - ), + ) + # LangDerivedGenerator{BST}( + # root_ty=KVTree.t, + # ty_sizes=[KVTree.t=>5], + # stack_size=2, + # intwidth=6, + # arbitrary_prims=false, + # ), # DEPRECATED # TypeBasedSTLCGenerator( # size=5, @@ -60,12 +60,12 @@ GENERATION_PARAMS_LIST = [ # stack_size=3, # intwidth=6, # ), - TypeBasedBSTGenerator( - size=5, - leaf_dependents=[:size,:last_callsite], - num_dependents=[:size,:last_callsite], - intwidth=6, - ), + # TypeBasedBSTGenerator( + # size=5, + # leaf_dependents=[:size,:last_callsite], + # num_dependents=[:size,:last_callsite], + # intwidth=6, + # ), ] LR_LIST = [0.3] FP_LIST = [0.] @@ -73,13 +73,13 @@ FORIGIVENESS_LIST = [0] RAND_FORIGIVENESS_LIST = [true] RESAMPLING_FREQUENCY_LIST = [2] # PROPERTY_LIST = [STLCVarNumbers(), STLCMightType(), STLCWellTyped()] -PROPERTY_LIST = [BSTOrderInvariant()] -# PROPERTY_LIST = [MultipleInvariants([ -# BookkeepingInvariant(), -# BalanceInvariant(), -# OrderInvariant(), -# ])] -SAMPLES_PER_BATCH_LIST = [200] +# PROPERTY_LIST = [BSTOrderInvariant()] +PROPERTY_LIST = [MultipleInvariants([ + BookkeepingInvariant(), + BalanceInvariant(), + OrderInvariant(), +])] +SAMPLES_PER_BATCH_LIST = [1000] EPOCHS_LIST = [2_000] # EQ_LIST = [:eq_structure] EQ_LIST = [:prob_equals, :eq_except_numbers] From 4f03b63308d21c15eeb61f8edcf483575debe77e Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 6 Jun 2024 11:16:07 -0700 Subject: [PATCH 185/231] main for rbt 1k --- examples/qc/benchmarks/main.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 451b9081..b5683c44 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -105,7 +105,7 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ [ # ApproxSTLCConstructorEntropy() => lr, # MLELossConfig{STLC}(NumApps(), Linear()) => lr, - SamplingEntropy{BST}( + SamplingEntropy{RBT}( resampling_frequency=resampling_frequency, samples_per_batch=samples_per_batch, property=property, From b3423940b03fe6abb75422f04d21e261a0a18834 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Fri, 7 Jun 2024 02:46:25 -0700 Subject: [PATCH 186/231] stlc thin --- examples/qc/benchmarks/benchmarks.jl | 10 ++-- examples/qc/benchmarks/lib/stlc/dist.jl | 74 +++++++++++++++++++------ examples/qc/benchmarks/main.jl | 44 +++++++-------- examples/qc/benchmarks/tool.jl | 1 + stats/stats.py | 27 ++++++--- 5 files changed, 104 insertions(+), 52 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 909dfee0..4811b589 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -465,11 +465,11 @@ struct STLCGeneration <: Generation{STLC} end function generation_emit_stats(rs::RunState, g::STLCGeneration, s::String) println_flush(rs.io, "Saving samples...") - # time_sample = @elapsed with_concrete_ad_flips(rs.var_vals, g.e) do - # save_samples(rs, joinpath(rs.out_dir, "terms_$(s).txt"), g.e) - # end - # println(rs.io, " $(time_sample) seconds") - # println(rs.io) + time_sample = @elapsed with_concrete_ad_flips(rs.var_vals, g.e) do + save_samples(rs, joinpath(rs.out_dir, "terms_$(s).txt"), g.e) + end + println(rs.io, " $(time_sample) seconds") + println(rs.io) end value(g::STLCGeneration) = g.e diff --git a/examples/qc/benchmarks/lib/stlc/dist.jl b/examples/qc/benchmarks/lib/stlc/dist.jl index a7a591a7..f9602f13 100644 --- a/examples/qc/benchmarks/lib/stlc/dist.jl +++ b/examples/qc/benchmarks/lib/stlc/dist.jl @@ -494,6 +494,21 @@ function eq_has_app(x::Opt.T{T}, y::Opt.T{T}) where T ] end +function rem_num_bools(x::Expr.t) + @match x [ + Var(_) -> Expr.Var(DistUInt32(0)), + Bool(_) -> Expr.Bool(true), + App(e1, e2) -> Expr.App(rem_num_bools(e1), rem_num_bools(e2)), + Abs(t_in, e) -> Expr.Abs(t_in, rem_num_bools(e)), + ] +end + +function rem_num_bools(x::OptExpr.t) + @match x [ + None() -> OptExpr.None(), + Some(xv) -> OptExpr.Some(rem_num_bools(xv)), + ] +end function may_typecheck(x::Expr.t, under_abs) @match x [ @@ -529,23 +544,6 @@ function may_typecheck(x::Expr.t, under_abs) ] end -function rem_num_bools(x::Expr.t) - @match x [ - Var(_) -> Expr.Var(DistUInt32(0)), - Bool(_) -> Expr.Bool(true), - App(e1, e2) -> Expr.App(rem_num_bools(e1), rem_num_bools(e2)), - Abs(t_in, e) -> Expr.Abs(t_in, rem_num_bools(e)), - ] -end - -function rem_num_bools(x::OptExpr.t) - @match x [ - None() -> OptExpr.None(), - Some(xv) -> OptExpr.Some(rem_num_bools(xv)), - ] -end - - function may_typecheck(x::OptExpr.t) @match x [ None() -> false, @@ -624,4 +622,46 @@ function var_numberings_good(x::OptExpr.t) None() -> false, Some(xv) -> var_numberings_good(xv, Dict(), 0), ] +end + +# right now mayer = might +function mayer_typecheck(x::Expr.t, under_abs) + @match x [ + Var(i) -> begin + if !under_abs + return :Error + end + :TypeVar # we leniently let this take any type it needs to + end, + Bool(_) -> :TBool, + App(e1, e2) -> begin + t1 = mayer_typecheck(e1, under_abs) + if t1 == :Error || t1 == :TBool + return :Error + end + if !(t1 in [:TFun, :TypeVar]) + return :Error + end + # Really, should check that t2 matches function input ty of t1 + t2 = mayer_typecheck(e2, under_abs) + if t2 == :Error + return :Error + end + :TypeVar + end, + Abs(t_in, e) -> begin + t1 = mayer_typecheck(e, true) + if t1 == :Error + return :Error + end + :TFun + end, + ] +end + +function mayer_typecheck(x::OptExpr.t) + @match x [ + None() -> false, + Some(xv) -> mayer_typecheck(xv, false) != :Error + ] end \ No newline at end of file diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index b5683c44..41b7550e 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -5,25 +5,25 @@ GENERATION_PARAMS_LIST = [ # expr_size=5, # typ_size=2, # ), - # LangDerivedGenerator{STLC}( - # root_ty=Expr.t, - # ty_sizes=[Expr.t=>5, Typ.t=>2], - # stack_size=2, - # intwidth=6, - # arbitrary_prims=true, - # ), + LangDerivedGenerator{STLC}( + root_ty=Expr.t, + ty_sizes=[Expr.t=>5, Typ.t=>2], + stack_size=2, + intwidth=3, + arbitrary_prims=false, + ), # LangSiblingDerivedGenerator{STLC}( # root_ty=Expr.t, # ty_sizes=[Expr.t=>5, Typ.t=>2], # stack_size=1, # intwidth=6, # ) - LangSiblingDerivedGenerator{RBT}( - root_ty=ColorKVTree.t, - ty_sizes=[ColorKVTree.t=>5, Color.t=>0], - stack_size=2, - intwidth=6, - ) + # LangSiblingDerivedGenerator{RBT}( + # root_ty=ColorKVTree.t, + # ty_sizes=[ColorKVTree.t=>5, Color.t=>0], + # stack_size=2, + # intwidth=6, + # ) # LangDerivedGenerator{BST}( # root_ty=KVTree.t, # ty_sizes=[KVTree.t=>5], @@ -73,16 +73,16 @@ FORIGIVENESS_LIST = [0] RAND_FORIGIVENESS_LIST = [true] RESAMPLING_FREQUENCY_LIST = [2] # PROPERTY_LIST = [STLCVarNumbers(), STLCMightType(), STLCWellTyped()] -# PROPERTY_LIST = [BSTOrderInvariant()] -PROPERTY_LIST = [MultipleInvariants([ - BookkeepingInvariant(), - BalanceInvariant(), - OrderInvariant(), -])] +PROPERTY_LIST = [STLCMayType()] +# PROPERTY_LIST = [MultipleInvariants([ +# BookkeepingInvariant(), +# BalanceInvariant(), +# OrderInvariant(), +# ])] SAMPLES_PER_BATCH_LIST = [1000] EPOCHS_LIST = [2_000] -# EQ_LIST = [:eq_structure] -EQ_LIST = [:prob_equals, :eq_except_numbers] +EQ_LIST = [:eq_structure] +# EQ_LIST = [:prob_equals, :eq_except_numbers] n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, FORIGIVENESS_LIST, RAND_FORIGIVENESS_LIST, PROPERTY_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST, EQ_LIST])) println(n_runs) @@ -105,7 +105,7 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ [ # ApproxSTLCConstructorEntropy() => lr, # MLELossConfig{STLC}(NumApps(), Linear()) => lr, - SamplingEntropy{RBT}( + SamplingEntropy{STLC}( resampling_frequency=resampling_frequency, samples_per_batch=samples_per_batch, property=property, diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index bfff2e53..6f3b1cce 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -3,6 +3,7 @@ include("benchmarks.jl") TAG = "v45_stlcmayarb" TAG = "v46_tbmay" TAG = "v48_bst_lang" +TAG = "v49_stlcmaythin" OUT_TOP_DIR = "/space/tjoa/tuning-output" ## PARSE ARGS diff --git a/stats/stats.py b/stats/stats.py index 8af0ac84..c067a6ba 100755 --- a/stats/stats.py +++ b/stats/stats.py @@ -40,20 +40,31 @@ # "TBMay10Generator", # "TBMay30Generator", # "TBMay50Generator", -"LDMayStructureArb_Freq2_SPB200_LR10Generator", -"LDMayStructureArb_Freq2_SPB200_LR30Generator", -"LDMayStructureArb_Freq2_SPB200_LR50Generator", -"LDMayStructureArb_Freq2_SPB50_LR10Generator", -"LDMayStructureArb_Freq2_SPB50_LR30Generator", -"LDMayStructureArb_Freq2_SPB50_LR50Generator", -"LDMayStructureArb_Freq5_SPB200_LR10Generator", + "ReproTBMightGenerator", +# "LDMayStructureArb_Freq2_SPB200_LR10Generator", +# "LDMayStructureArb_Freq2_SPB200_LR30Generator", +# "LDMayStructureArb_Freq2_SPB200_LR50Generator", +# "LDMayStructureArb_Freq2_SPB50_LR10Generator", +# "LDMayStructureArb_Freq2_SPB50_LR30Generator", +# "LDMayStructureArb_Freq2_SPB50_LR50Generator", +# "LDMayStructureArb_Freq5_SPB200_LR10Generator", ], "RBT": [ "TypeBasedGenerator", "LSDEqGenerator", "LSDExceptNumsGenerator", - "LSDGenerator", + "LSDEq2Generator", + "LSDExcept2Generator", + # "LSDGenerator", + ], + + "BST": [ + "TypeBasedGenerator", + "LEqGenerator", + "LExceptGenerator", + "TBEqGenerator", + "TBExceptGenerator", ] }[WORKLOAD] From a70bd5a800e9d6e27248663bbe08c5a4a28d211e Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Fri, 7 Jun 2024 02:48:11 -0700 Subject: [PATCH 187/231] no dtt --- examples/qc/benchmarks/lib/util.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/qc/benchmarks/lib/util.jl b/examples/qc/benchmarks/lib/util.jl index 555ab566..56e908da 100644 --- a/examples/qc/benchmarks/lib/util.jl +++ b/examples/qc/benchmarks/lib/util.jl @@ -223,7 +223,7 @@ function save_samples(rs, filename, e; n_samples=200) for _ in 1:n_samples expr_dist = sample_as_dist(rs.rng, a, e) expr = Dice.frombits(expr_dist, Dict()) - diff_test_typecheck(expr_dist, expr) + # diff_test_typecheck(expr_dist, expr) println(file, opt_stlc_str(expr)) # typecheck_opt(expr) end From e180e52e1aa0c4a12d2a5aad712e1f5742fd78ed Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 9 Jun 2024 23:43:24 -0700 Subject: [PATCH 188/231] add bound --- examples/qc/benchmarks/benchmarks.jl | 9 +++++++-- examples/qc/benchmarks/main.jl | 24 +++++++++++++----------- examples/qc/benchmarks/tool.jl | 16 ++++++++++------ 3 files changed, 30 insertions(+), 19 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 4811b589..44bac293 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -22,7 +22,8 @@ function run_benchmark( rs::RunState, generation_params::GenerationParams{T}, loss_config_weight_pairs::AbstractVector{<:Pair{<:LossConfig{T}, <:Real}}, - epochs::Integer + epochs::Integer, + bound::Real, ) where T println_flush(rs.io, "Building generation computation graph...") time_build_generation = @elapsed generation = generate(rs, generation_params) @@ -147,7 +148,11 @@ function run_benchmark( # update vars for (adnode, d) in derivs if adnode isa Var - rs.var_vals[adnode] -= d + rs.var_vals[adnode] = clamp( + rs.var_vals[adnode] - d, + inverse_sigmoid(bound), + inverse_sigmoid(1 - bound), + ) # println(rs.io, "$(adnode) $(-d)") end end diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 41b7550e..bfa9e103 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -12,12 +12,12 @@ GENERATION_PARAMS_LIST = [ intwidth=3, arbitrary_prims=false, ), - # LangSiblingDerivedGenerator{STLC}( - # root_ty=Expr.t, - # ty_sizes=[Expr.t=>5, Typ.t=>2], - # stack_size=1, - # intwidth=6, - # ) + LangSiblingDerivedGenerator{STLC}( + root_ty=Expr.t, + ty_sizes=[Expr.t=>5, Typ.t=>2], + stack_size=1, + intwidth=3, + ) # LangSiblingDerivedGenerator{RBT}( # root_ty=ColorKVTree.t, # ty_sizes=[ColorKVTree.t=>5, Color.t=>0], @@ -79,12 +79,13 @@ PROPERTY_LIST = [STLCMayType()] # BalanceInvariant(), # OrderInvariant(), # ])] -SAMPLES_PER_BATCH_LIST = [1000] +SAMPLES_PER_BATCH_LIST = [200] EPOCHS_LIST = [2_000] -EQ_LIST = [:eq_structure] +EQ_LIST = [:prob_equals, :eq_structure] +BOUND_LIST = [0.05, 0.1] # EQ_LIST = [:prob_equals, :eq_except_numbers] -n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, FORIGIVENESS_LIST, RAND_FORIGIVENESS_LIST, PROPERTY_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST, EQ_LIST])) +n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, FORIGIVENESS_LIST, RAND_FORIGIVENESS_LIST, PROPERTY_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST, EQ_LIST, BOUND_LIST])) println(n_runs) @assert n_runs <= 12 @@ -98,6 +99,7 @@ println(n_runs) @show SAMPLES_PER_BATCH_LIST @show EPOCHS_LIST @show EQ_LIST +@show BOUND_LIST println() LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ @@ -164,11 +166,11 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ TOOL_PATH = "examples/qc/benchmarks/tool.jl" -@sync for (p, lcws, epochs) in Base.product(GENERATION_PARAMS_LIST, LOSS_CONFIG_WEIGHT_PAIRS_LIST, EPOCHS_LIST) +@sync for (p, lcws, epochs, bound) in Base.product(GENERATION_PARAMS_LIST, LOSS_CONFIG_WEIGHT_PAIRS_LIST, EPOCHS_LIST, BOUND_LIST) flags = join([s for s in ARGS if startswith(s, "-")], " ") lcws_s = replace(string(lcws), " "=>"") p_s = replace(string(p), " "=>"") - s = "julia --project $(TOOL_PATH) $(flags) $(p_s) $(lcws_s) $(epochs)" + s = "julia --project $(TOOL_PATH) $(flags) $(p_s) $(lcws_s) $(epochs) $(bound)" cmd = Cmd(Cmd(convert(Vector{String}, split(s))), ignorestatus=true) println(s) out = IOBuffer() diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 6f3b1cce..00da0353 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -4,6 +4,7 @@ TAG = "v45_stlcmayarb" TAG = "v46_tbmay" TAG = "v48_bst_lang" TAG = "v49_stlcmaythin" +TAG = "boundtest" OUT_TOP_DIR = "/space/tjoa/tuning-output" ## PARSE ARGS @@ -103,18 +104,20 @@ if isempty(ARGS) push!(as, replace(string(g_p), " "=>"")) push!(as, replace(string(l_p), " "=>"")) push!(as, string(10)) + push!(as, string(0.1)) empty!(ARGS) append!(ARGS, as) end +expected_types = [GenerationParams, AbstractVector{<:Pair{<:LossConfig, <:Real}}, Integer, Real] + args = ARGS allow_overwrite = "-f" ∈ args args = filter(a -> a != "-f", args) -if length(args) != 3 - println("Expected 3 positional args, got $(length(args))") +if length(args) != length(expected_types) + println("Expected $(length(expected_types)) positional args, got $(length(args))") exit(1) end -expected_types = [GenerationParams, AbstractVector{<:Pair{<:LossConfig, <:Real}}, Integer] evaled_args = [] for (i, (arg, expected_type)) in enumerate(zip(args, expected_types)) evaled_arg = eval(Meta.parse(arg)) @@ -124,9 +127,8 @@ for (i, (arg, expected_type)) in enumerate(zip(args, expected_types)) end push!(evaled_args, evaled_arg) end -generation_params, loss_config_weight_pairs, epochs = evaled_args +generation_params, loss_config_weight_pairs, epochs, bound = evaled_args EPOCHS = epochs - SEED = 0 out_dir = joinpath( @@ -139,6 +141,7 @@ out_dir = joinpath( for (c, w) in loss_config_weight_pairs ]...), ["epochs=$(epochs)"], + ["bound=$(bound)"], ) ) log_path = joinpath(out_dir, "log.log") @@ -161,13 +164,14 @@ println_loud(rs, "TAG: $(TAG)") println_loud(rs, generation_params) println_loud(rs, loss_config_weight_pairs) println_loud(rs, "Epochs: $(epochs)") +println_loud(rs, "Bound: $(bound)") println_loud(rs, "DistNat: $(DistNat)") println_loud(rs, "SEED: $(SEED)") println_loud(rs) println("Logging to $(log_path)") println() -run_benchmark(rs, generation_params, loss_config_weight_pairs, epochs) +run_benchmark(rs, generation_params, loss_config_weight_pairs, epochs, bound) t′ = now() println_loud(rs, t′) From 22cea70a12073434458085d62b3a3758867259f0 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 11 Jun 2024 21:02:27 -0700 Subject: [PATCH 189/231] RBT bound --- examples/qc/benchmarks/main.jl | 52 +++++++++++++++++----------------- examples/qc/benchmarks/tool.jl | 3 +- stats/stats.py | 12 +++++++- 3 files changed, 39 insertions(+), 28 deletions(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index bfa9e103..4dc6dc09 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -5,25 +5,25 @@ GENERATION_PARAMS_LIST = [ # expr_size=5, # typ_size=2, # ), - LangDerivedGenerator{STLC}( - root_ty=Expr.t, - ty_sizes=[Expr.t=>5, Typ.t=>2], - stack_size=2, - intwidth=3, - arbitrary_prims=false, - ), - LangSiblingDerivedGenerator{STLC}( - root_ty=Expr.t, - ty_sizes=[Expr.t=>5, Typ.t=>2], - stack_size=1, - intwidth=3, - ) - # LangSiblingDerivedGenerator{RBT}( - # root_ty=ColorKVTree.t, - # ty_sizes=[ColorKVTree.t=>5, Color.t=>0], + # LangDerivedGenerator{STLC}( + # root_ty=Expr.t, + # ty_sizes=[Expr.t=>5, Typ.t=>2], # stack_size=2, - # intwidth=6, + # intwidth=3, + # arbitrary_prims=false, + # ), + # LangSiblingDerivedGenerator{STLC}( + # root_ty=Expr.t, + # ty_sizes=[Expr.t=>5, Typ.t=>2], + # stack_size=1, + # intwidth=3, # ) + LangSiblingDerivedGenerator{RBT}( + root_ty=ColorKVTree.t, + ty_sizes=[ColorKVTree.t=>5, Color.t=>0], + stack_size=2, + intwidth=6, + ) # LangDerivedGenerator{BST}( # root_ty=KVTree.t, # ty_sizes=[KVTree.t=>5], @@ -73,17 +73,17 @@ FORIGIVENESS_LIST = [0] RAND_FORIGIVENESS_LIST = [true] RESAMPLING_FREQUENCY_LIST = [2] # PROPERTY_LIST = [STLCVarNumbers(), STLCMightType(), STLCWellTyped()] -PROPERTY_LIST = [STLCMayType()] -# PROPERTY_LIST = [MultipleInvariants([ -# BookkeepingInvariant(), -# BalanceInvariant(), -# OrderInvariant(), -# ])] +# PROPERTY_LIST = [STLCMayType()] +PROPERTY_LIST = [MultipleInvariants([ + BookkeepingInvariant(), + BalanceInvariant(), + OrderInvariant(), +])] SAMPLES_PER_BATCH_LIST = [200] EPOCHS_LIST = [2_000] -EQ_LIST = [:prob_equals, :eq_structure] -BOUND_LIST = [0.05, 0.1] -# EQ_LIST = [:prob_equals, :eq_except_numbers] +# EQ_LIST = [:prob_equals, :eq_structure] +BOUND_LIST = [0., 0.05, 0.1, 0.2] +EQ_LIST = [:prob_equals, :eq_except_numbers] n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, FORIGIVENESS_LIST, RAND_FORIGIVENESS_LIST, PROPERTY_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST, EQ_LIST, BOUND_LIST])) println(n_runs) diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 00da0353..dee83b64 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -4,7 +4,8 @@ TAG = "v45_stlcmayarb" TAG = "v46_tbmay" TAG = "v48_bst_lang" TAG = "v49_stlcmaythin" -TAG = "boundtest" +TAG = "v50_stlcbound" +TAG = "v51_rbtbound" OUT_TOP_DIR = "/space/tjoa/tuning-output" ## PARSE ARGS diff --git a/stats/stats.py b/stats/stats.py index c067a6ba..0db3c53b 100755 --- a/stats/stats.py +++ b/stats/stats.py @@ -40,7 +40,7 @@ # "TBMay10Generator", # "TBMay30Generator", # "TBMay50Generator", - "ReproTBMightGenerator", + # "ReproTBMightGenerator", # "LDMayStructureArb_Freq2_SPB200_LR10Generator", # "LDMayStructureArb_Freq2_SPB200_LR30Generator", # "LDMayStructureArb_Freq2_SPB200_LR50Generator", @@ -48,6 +48,16 @@ # "LDMayStructureArb_Freq2_SPB50_LR30Generator", # "LDMayStructureArb_Freq2_SPB50_LR50Generator", # "LDMayStructureArb_Freq5_SPB200_LR10Generator", + "LDThinInitGenerator", + # "LDThinMayEqGenerator", + # "LDThinMayStructureGenerator", + # "LDThinMayStructureGenerator", + # "LDThinMayStructure2Generator", + ] + [ + f"{template}May{eq}Bound{bound}Generator" + for template in ["LD", "LSD"] + for eq in ["Structure", "Eq"] + for bound in ["05", "10"] ], "RBT": [ From 9fd48b541c83354dee7a9a8bcd32c3905a95434d Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 11 Jun 2024 21:03:21 -0700 Subject: [PATCH 190/231] switch workload --- examples/qc/benchmarks/main.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 4dc6dc09..b6fcfa39 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -107,7 +107,7 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ [ # ApproxSTLCConstructorEntropy() => lr, # MLELossConfig{STLC}(NumApps(), Linear()) => lr, - SamplingEntropy{STLC}( + SamplingEntropy{RBT}( resampling_frequency=resampling_frequency, samples_per_batch=samples_per_batch, property=property, From 79389b8f9ec80def2ba15ab23dd92041419b1e6a Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 13 Jun 2024 20:09:53 -0700 Subject: [PATCH 191/231] ace bound --- examples/qc/benchmarks/main.jl | 59 +++++++++++----------- examples/qc/benchmarks/tool.jl | 1 + stats/renamer.py | 89 ++++++++++++++++++++++++++++++++++ stats/stats.py | 20 +++++--- 4 files changed, 134 insertions(+), 35 deletions(-) create mode 100755 stats/renamer.py diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index b6fcfa39..a2f56d72 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -1,10 +1,10 @@ include("benchmarks.jl") GENERATION_PARAMS_LIST = [ - # LangBespokeSTLCGenerator( - # expr_size=5, - # typ_size=2, - # ), + LangBespokeSTLCGenerator( + expr_size=5, + typ_size=2, + ), # LangDerivedGenerator{STLC}( # root_ty=Expr.t, # ty_sizes=[Expr.t=>5, Typ.t=>2], @@ -18,12 +18,12 @@ GENERATION_PARAMS_LIST = [ # stack_size=1, # intwidth=3, # ) - LangSiblingDerivedGenerator{RBT}( - root_ty=ColorKVTree.t, - ty_sizes=[ColorKVTree.t=>5, Color.t=>0], - stack_size=2, - intwidth=6, - ) + # LangSiblingDerivedGenerator{RBT}( + # root_ty=ColorKVTree.t, + # ty_sizes=[ColorKVTree.t=>5, Color.t=>0], + # stack_size=2, + # intwidth=6, + # ) # LangDerivedGenerator{BST}( # root_ty=KVTree.t, # ty_sizes=[KVTree.t=>5], @@ -67,23 +67,24 @@ GENERATION_PARAMS_LIST = [ # intwidth=6, # ), ] -LR_LIST = [0.3] +LR_LIST = [0.03] FP_LIST = [0.] FORIGIVENESS_LIST = [0] RAND_FORIGIVENESS_LIST = [true] RESAMPLING_FREQUENCY_LIST = [2] # PROPERTY_LIST = [STLCVarNumbers(), STLCMightType(), STLCWellTyped()] -# PROPERTY_LIST = [STLCMayType()] -PROPERTY_LIST = [MultipleInvariants([ - BookkeepingInvariant(), - BalanceInvariant(), - OrderInvariant(), -])] +PROPERTY_LIST = [BSTOrderInvariant()] +# PROPERTY_LIST = [MultipleInvariants([ +# BookkeepingInvariant(), +# BalanceInvariant(), +# OrderInvariant(), +# ])] SAMPLES_PER_BATCH_LIST = [200] EPOCHS_LIST = [2_000] # EQ_LIST = [:prob_equals, :eq_structure] -BOUND_LIST = [0., 0.05, 0.1, 0.2] -EQ_LIST = [:prob_equals, :eq_except_numbers] +BOUND_LIST = [0.1] +EQ_LIST = [:prob_equals] +# EQ_LIST = [nothing] n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, FORIGIVENESS_LIST, RAND_FORIGIVENESS_LIST, PROPERTY_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST, EQ_LIST, BOUND_LIST])) println(n_runs) @@ -105,17 +106,17 @@ println() LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ - # ApproxSTLCConstructorEntropy() => lr, + ApproxSTLCConstructorEntropy() => lr, # MLELossConfig{STLC}(NumApps(), Linear()) => lr, - SamplingEntropy{RBT}( - resampling_frequency=resampling_frequency, - samples_per_batch=samples_per_batch, - property=property, - eq=eq, - failure_penalty=fp, - forgiveness=forgiveness, - rand_forgiveness=rand_forgiveness, - ) => lr, + # SamplingEntropy{BST}( + # resampling_frequency=resampling_frequency, + # samples_per_batch=samples_per_batch, + # property=property, + # eq=eq, + # failure_penalty=fp, + # forgiveness=forgiveness, + # rand_forgiveness=rand_forgiveness, + # ) => lr, # SamplingEntropy{BST}( # resampling_frequency=resampling_frequency, # samples_per_batch=samples_per_batch, diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index dee83b64..9d8f870c 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -6,6 +6,7 @@ TAG = "v48_bst_lang" TAG = "v49_stlcmaythin" TAG = "v50_stlcbound" TAG = "v51_rbtbound" +TAG = "v52_stlcace_w_bounds" OUT_TOP_DIR = "/space/tjoa/tuning-output" ## PARSE ARGS diff --git a/stats/renamer.py b/stats/renamer.py new file mode 100755 index 00000000..c9e1a2bc --- /dev/null +++ b/stats/renamer.py @@ -0,0 +1,89 @@ +#!/usr/bin/env python + +import os +import shutil + +def get_label(segments, segment_labels): + res = None + for segment, label in segment_labels.items(): + if segment in segments: + assert res is None, f"multiple {segments} {segment_labels}" + res = label + assert res is not None, f"none {segments} {segment_labels}" + + if isinstance(label, tuple): + lbl, rest = res + for x in rest: + lbl += get_label(segments, x) + return lbl + else: + assert isinstance(label, str) + return res + +rootdir = "/space/tjoa/tuning-output/v51_rbtbound/" +filename_to_dir: dict[str, str] = {} +for root, subdirs, files in os.walk(rootdir): + if "trained_Generator.v" in files: + assert root[:len(rootdir)] == rootdir + segments = root[len(rootdir):].split("/") + + new = "" + new += get_label(segments, { + "rbt": "R_", + "stlc": "S_", + "bst": "B_", + }) + new += get_label(segments, { + "langderived": ("LD", [ + {"stack_size=2": ""}, + { + "intwidth=3": "Thin", + "intwidth=6": "", + }, + ]), + "langsiblingderived": ("LSD", [ + {"stack_size=2": ""}, + { + "intwidth=3": "Thin", + "intwidth=6": "", + }, + ]), + }) + new += get_label(segments, { + "reinforce_sampling_entropy": ("", [ + { + "eq=eq_except_numbers": "Except", + "eq=eq_structure": "Structure", + "eq=prob_equals": "Eq", + }, + { + "prop=bookkeepingANDbalanceANDorder": "", + # todo: May, Might + }, + {"failure_penalty=0.0": ""}, + {"forgiveness=0": ""}, + {"rand_forgiveness=true": ""}, + ]) + }) + new += get_label(segments, { + "0.3": "", + }) + new += get_label(segments, { + "epochs=2000": "", + }) + new += get_label(segments, { + "bound=0.0": "", + "bound=0.05": "Bound05", + "bound=0.1": "Bound10", + "bound=0.2": "Bound20", + }) + new += "Generator.v" + + assert new not in filename_to_dir, f"{new} {filename_to_dir}" + filename_to_dir[new] = root + +for new, root in filename_to_dir.items(): + src = os.path.join(root, "trained_Generator.v") + dst = os.path.join(root, new) + shutil.copyfile(src, dst) + print(f"\"{new[:-2]}\",") diff --git a/stats/stats.py b/stats/stats.py index 0db3c53b..0697eebe 100755 --- a/stats/stats.py +++ b/stats/stats.py @@ -8,7 +8,7 @@ from dataclasses import dataclass, field from typing import List, Callable -WORKLOAD = "STLC" +WORKLOAD = "RBT" ORDER_ONLY = True ORDER: List[str] = { # Put rows in this order and also assert that these generators exist "STLC": [ @@ -61,12 +61,20 @@ ], "RBT": [ - "TypeBasedGenerator", - "LSDEqGenerator", - "LSDExceptNumsGenerator", - "LSDEq2Generator", - "LSDExcept2Generator", + # "TypeBasedGenerator", + # "LSDEqGenerator", + # "LSDExceptNumsGenerator", + # "LSDEq2Generator", + # "LSDExcept2Generator", # "LSDGenerator", +"R_LSDEqBound05Generator", +"R_LSDEqBound20Generator", +"R_LSDEqGenerator", +"R_LSDEqBound10Generator", +"R_LSDExceptBound05Generator", +"R_LSDExceptBound20Generator", +"R_LSDExceptGenerator", +"R_LSDExceptBound10Generator", ], "BST": [ From bc54e01a2cf7078e4504e1428020154918d4cba3 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 13 Jun 2024 20:11:24 -0700 Subject: [PATCH 192/231] bst bound --- examples/qc/benchmarks/main.jl | 50 +++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index a2f56d72..b24072f4 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -1,10 +1,10 @@ include("benchmarks.jl") GENERATION_PARAMS_LIST = [ - LangBespokeSTLCGenerator( - expr_size=5, - typ_size=2, - ), + # LangBespokeSTLCGenerator( + # expr_size=5, + # typ_size=2, + # ), # LangDerivedGenerator{STLC}( # root_ty=Expr.t, # ty_sizes=[Expr.t=>5, Typ.t=>2], @@ -24,13 +24,19 @@ GENERATION_PARAMS_LIST = [ # stack_size=2, # intwidth=6, # ) - # LangDerivedGenerator{BST}( - # root_ty=KVTree.t, - # ty_sizes=[KVTree.t=>5], - # stack_size=2, - # intwidth=6, - # arbitrary_prims=false, - # ), + LangDerivedGenerator{BST}( + root_ty=KVTree.t, + ty_sizes=[KVTree.t=>5], + stack_size=2, + intwidth=6, + ) + LangDerivedGenerator{BST}( + root_ty=KVTree.t, + ty_sizes=[KVTree.t=>5], + stack_size=2, + intwidth=6, + arbitrary_prims=false, + ), # DEPRECATED # TypeBasedSTLCGenerator( # size=5, @@ -67,7 +73,7 @@ GENERATION_PARAMS_LIST = [ # intwidth=6, # ), ] -LR_LIST = [0.03] +LR_LIST = [0.3] FP_LIST = [0.] FORIGIVENESS_LIST = [0] RAND_FORIGIVENESS_LIST = [true] @@ -106,17 +112,17 @@ println() LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ - ApproxSTLCConstructorEntropy() => lr, + # ApproxSTLCConstructorEntropy() => lr, # MLELossConfig{STLC}(NumApps(), Linear()) => lr, - # SamplingEntropy{BST}( - # resampling_frequency=resampling_frequency, - # samples_per_batch=samples_per_batch, - # property=property, - # eq=eq, - # failure_penalty=fp, - # forgiveness=forgiveness, - # rand_forgiveness=rand_forgiveness, - # ) => lr, + SamplingEntropy{BST}( + resampling_frequency=resampling_frequency, + samples_per_batch=samples_per_batch, + property=property, + eq=eq, + failure_penalty=fp, + forgiveness=forgiveness, + rand_forgiveness=rand_forgiveness, + ) => lr, # SamplingEntropy{BST}( # resampling_frequency=resampling_frequency, # samples_per_batch=samples_per_batch, From 3f2ce62be39f15ff9d10ced7c041ef6810478540 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Fri, 14 Jun 2024 11:07:53 -0700 Subject: [PATCH 193/231] stlc well --- examples/qc/benchmarks/main.jl | 56 +++++++++++++++++----------------- examples/qc/benchmarks/tool.jl | 1 + stats/renamer.py | 17 ++++++++--- 3 files changed, 41 insertions(+), 33 deletions(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index b24072f4..9b69074b 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -5,38 +5,38 @@ GENERATION_PARAMS_LIST = [ # expr_size=5, # typ_size=2, # ), - # LangDerivedGenerator{STLC}( - # root_ty=Expr.t, - # ty_sizes=[Expr.t=>5, Typ.t=>2], - # stack_size=2, - # intwidth=3, - # arbitrary_prims=false, - # ), - # LangSiblingDerivedGenerator{STLC}( - # root_ty=Expr.t, - # ty_sizes=[Expr.t=>5, Typ.t=>2], - # stack_size=1, - # intwidth=3, - # ) + LangDerivedGenerator{STLC}( + root_ty=Expr.t, + ty_sizes=[Expr.t=>5, Typ.t=>2], + stack_size=2, + intwidth=3, + arbitrary_prims=false, + ), + LangSiblingDerivedGenerator{STLC}( + root_ty=Expr.t, + ty_sizes=[Expr.t=>5, Typ.t=>2], + stack_size=2, + intwidth=3, + ) # LangSiblingDerivedGenerator{RBT}( # root_ty=ColorKVTree.t, # ty_sizes=[ColorKVTree.t=>5, Color.t=>0], # stack_size=2, # intwidth=6, # ) - LangDerivedGenerator{BST}( - root_ty=KVTree.t, - ty_sizes=[KVTree.t=>5], - stack_size=2, - intwidth=6, - ) - LangDerivedGenerator{BST}( - root_ty=KVTree.t, - ty_sizes=[KVTree.t=>5], - stack_size=2, - intwidth=6, - arbitrary_prims=false, - ), + # LangSiblingDerivedGenerator{BST}( + # root_ty=KVTree.t, + # ty_sizes=[KVTree.t=>5], + # stack_size=2, + # intwidth=6, + # ), + # LangDerivedGenerator{BST}( + # root_ty=KVTree.t, + # ty_sizes=[KVTree.t=>5], + # stack_size=2, + # intwidth=6, + # arbitrary_prims=false, + # ), # DEPRECATED # TypeBasedSTLCGenerator( # size=5, @@ -79,7 +79,7 @@ FORIGIVENESS_LIST = [0] RAND_FORIGIVENESS_LIST = [true] RESAMPLING_FREQUENCY_LIST = [2] # PROPERTY_LIST = [STLCVarNumbers(), STLCMightType(), STLCWellTyped()] -PROPERTY_LIST = [BSTOrderInvariant()] +PROPERTY_LIST = [STLCWellTyped()] # PROPERTY_LIST = [MultipleInvariants([ # BookkeepingInvariant(), # BalanceInvariant(), @@ -114,7 +114,7 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ [ # ApproxSTLCConstructorEntropy() => lr, # MLELossConfig{STLC}(NumApps(), Linear()) => lr, - SamplingEntropy{BST}( + SamplingEntropy{STLC}( resampling_frequency=resampling_frequency, samples_per_batch=samples_per_batch, property=property, diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 9d8f870c..4e0dc68b 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -7,6 +7,7 @@ TAG = "v49_stlcmaythin" TAG = "v50_stlcbound" TAG = "v51_rbtbound" TAG = "v52_stlcace_w_bounds" +TAG = "v53_stlc_well_bounds" OUT_TOP_DIR = "/space/tjoa/tuning-output" ## PARSE ARGS diff --git a/stats/renamer.py b/stats/renamer.py index c9e1a2bc..88ad7836 100755 --- a/stats/renamer.py +++ b/stats/renamer.py @@ -11,16 +11,16 @@ def get_label(segments, segment_labels): res = label assert res is not None, f"none {segments} {segment_labels}" - if isinstance(label, tuple): + if isinstance(res, tuple): lbl, rest = res for x in rest: lbl += get_label(segments, x) return lbl else: - assert isinstance(label, str) + assert isinstance(res, str) return res -rootdir = "/space/tjoa/tuning-output/v51_rbtbound/" +rootdir = "/space/tjoa/tuning-output/v52_stlcace_w_bounds" filename_to_dir: dict[str, str] = {} for root, subdirs, files in os.walk(rootdir): if "trained_Generator.v" in files: @@ -34,6 +34,7 @@ def get_label(segments, segment_labels): "bst": "B_", }) new += get_label(segments, { + "langbespoke": "Bespoke", "langderived": ("LD", [ {"stack_size=2": ""}, { @@ -58,15 +59,18 @@ def get_label(segments, segment_labels): }, { "prop=bookkeepingANDbalanceANDorder": "", + "prop=order": "", # todo: May, Might }, {"failure_penalty=0.0": ""}, {"forgiveness=0": ""}, {"rand_forgiveness=true": ""}, - ]) + ]), + "approx_entropy": "ACE", }) new += get_label(segments, { - "0.3": "", + "0.3": "LR30", + "0.03": "LR03", }) new += get_label(segments, { "epochs=2000": "", @@ -86,4 +90,7 @@ def get_label(segments, segment_labels): src = os.path.join(root, "trained_Generator.v") dst = os.path.join(root, new) shutil.copyfile(src, dst) + print(dst) +print() +for new, root in filename_to_dir.items(): print(f"\"{new[:-2]}\",") From a8a90a0f1a2a5c85661af8b32d046650a775cd7e Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Fri, 14 Jun 2024 17:17:53 -0700 Subject: [PATCH 194/231] rbt bigger --- examples/qc/benchmarks/main.jl | 50 +++++++++++++++++++--------------- examples/qc/benchmarks/tool.jl | 1 + 2 files changed, 29 insertions(+), 22 deletions(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 9b69074b..86588be1 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -5,25 +5,31 @@ GENERATION_PARAMS_LIST = [ # expr_size=5, # typ_size=2, # ), - LangDerivedGenerator{STLC}( - root_ty=Expr.t, - ty_sizes=[Expr.t=>5, Typ.t=>2], + # LangDerivedGenerator{STLC}( + # root_ty=Expr.t, + # ty_sizes=[Expr.t=>5, Typ.t=>2], + # stack_size=2, + # intwidth=3, + # arbitrary_prims=false, + # ), + # LangSiblingDerivedGenerator{STLC}( + # root_ty=Expr.t, + # ty_sizes=[Expr.t=>5, Typ.t=>2], + # stack_size=2, + # intwidth=3, + # ) + LangSiblingDerivedGenerator{RBT}( + root_ty=ColorKVTree.t, + ty_sizes=[ColorKVTree.t=>6, Color.t=>0], stack_size=2, - intwidth=3, - arbitrary_prims=false, - ), - LangSiblingDerivedGenerator{STLC}( - root_ty=Expr.t, - ty_sizes=[Expr.t=>5, Typ.t=>2], + intwidth=6, + ) + LangSiblingDerivedGenerator{RBT}( + root_ty=ColorKVTree.t, + ty_sizes=[ColorKVTree.t=>8, Color.t=>0], stack_size=2, - intwidth=3, + intwidth=6, ) - # LangSiblingDerivedGenerator{RBT}( - # root_ty=ColorKVTree.t, - # ty_sizes=[ColorKVTree.t=>5, Color.t=>0], - # stack_size=2, - # intwidth=6, - # ) # LangSiblingDerivedGenerator{BST}( # root_ty=KVTree.t, # ty_sizes=[KVTree.t=>5], @@ -79,12 +85,12 @@ FORIGIVENESS_LIST = [0] RAND_FORIGIVENESS_LIST = [true] RESAMPLING_FREQUENCY_LIST = [2] # PROPERTY_LIST = [STLCVarNumbers(), STLCMightType(), STLCWellTyped()] -PROPERTY_LIST = [STLCWellTyped()] -# PROPERTY_LIST = [MultipleInvariants([ -# BookkeepingInvariant(), -# BalanceInvariant(), -# OrderInvariant(), -# ])] +# PROPERTY_LIST = [STLCWellTyped()] +PROPERTY_LIST = [MultipleInvariants([ + BookkeepingInvariant(), + BalanceInvariant(), + OrderInvariant(), +])] SAMPLES_PER_BATCH_LIST = [200] EPOCHS_LIST = [2_000] # EQ_LIST = [:prob_equals, :eq_structure] diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 4e0dc68b..7f9e22c0 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -8,6 +8,7 @@ TAG = "v50_stlcbound" TAG = "v51_rbtbound" TAG = "v52_stlcace_w_bounds" TAG = "v53_stlc_well_bounds" +TAG = "v54_rbt_bigger" OUT_TOP_DIR = "/space/tjoa/tuning-output" ## PARSE ARGS From 96c37eb46b7c964d8329352f9acd85a5e6393e5a Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 15 Jun 2024 14:50:18 -0700 Subject: [PATCH 195/231] stlc faster --- examples/qc/benchmarks/main.jl | 46 +++++++++++++++++----------------- examples/qc/benchmarks/tool.jl | 1 + stats/renamer.py | 13 +++++++--- 3 files changed, 33 insertions(+), 27 deletions(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 86588be1..bf47fa62 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -12,24 +12,24 @@ GENERATION_PARAMS_LIST = [ # intwidth=3, # arbitrary_prims=false, # ), - # LangSiblingDerivedGenerator{STLC}( - # root_ty=Expr.t, - # ty_sizes=[Expr.t=>5, Typ.t=>2], - # stack_size=2, - # intwidth=3, - # ) - LangSiblingDerivedGenerator{RBT}( - root_ty=ColorKVTree.t, - ty_sizes=[ColorKVTree.t=>6, Color.t=>0], - stack_size=2, - intwidth=6, - ) - LangSiblingDerivedGenerator{RBT}( - root_ty=ColorKVTree.t, - ty_sizes=[ColorKVTree.t=>8, Color.t=>0], + LangSiblingDerivedGenerator{STLC}( + root_ty=Expr.t, + ty_sizes=[Expr.t=>5, Typ.t=>2], stack_size=2, - intwidth=6, + intwidth=3, ) + # LangSiblingDerivedGenerator{RBT}( + # root_ty=ColorKVTree.t, + # ty_sizes=[ColorKVTree.t=>6, Color.t=>0], + # stack_size=2, + # intwidth=6, + # ) + # LangSiblingDerivedGenerator{RBT}( + # root_ty=ColorKVTree.t, + # ty_sizes=[ColorKVTree.t=>8, Color.t=>0], + # stack_size=2, + # intwidth=6, + # ) # LangSiblingDerivedGenerator{BST}( # root_ty=KVTree.t, # ty_sizes=[KVTree.t=>5], @@ -86,13 +86,13 @@ RAND_FORIGIVENESS_LIST = [true] RESAMPLING_FREQUENCY_LIST = [2] # PROPERTY_LIST = [STLCVarNumbers(), STLCMightType(), STLCWellTyped()] # PROPERTY_LIST = [STLCWellTyped()] -PROPERTY_LIST = [MultipleInvariants([ - BookkeepingInvariant(), - BalanceInvariant(), - OrderInvariant(), -])] -SAMPLES_PER_BATCH_LIST = [200] -EPOCHS_LIST = [2_000] +# PROPERTY_LIST = [MultipleInvariants([ +# BookkeepingInvariant(), +# BalanceInvariant(), +# OrderInvariant(), +# ])] +SAMPLES_PER_BATCH_LIST = [50, 200] +EPOCHS_LIST = [500, 700] # EQ_LIST = [:prob_equals, :eq_structure] BOUND_LIST = [0.1] EQ_LIST = [:prob_equals] diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 7f9e22c0..8aa24207 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -9,6 +9,7 @@ TAG = "v51_rbtbound" TAG = "v52_stlcace_w_bounds" TAG = "v53_stlc_well_bounds" TAG = "v54_rbt_bigger" +TAG = "v55_stlc_faster" OUT_TOP_DIR = "/space/tjoa/tuning-output" ## PARSE ARGS diff --git a/stats/renamer.py b/stats/renamer.py index 88ad7836..1d928412 100755 --- a/stats/renamer.py +++ b/stats/renamer.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +rootdir = "/space/tjoa/tuning-output/v53_stlc_well_bounds" import os import shutil @@ -20,7 +21,6 @@ def get_label(segments, segment_labels): assert isinstance(res, str) return res -rootdir = "/space/tjoa/tuning-output/v52_stlcace_w_bounds" filename_to_dir: dict[str, str] = {} for root, subdirs, files in os.walk(rootdir): if "trained_Generator.v" in files: @@ -29,9 +29,9 @@ def get_label(segments, segment_labels): new = "" new += get_label(segments, { - "rbt": "R_", - "stlc": "S_", - "bst": "B_", + "rbt": "R", + "stlc": "S", + "bst": "B", }) new += get_label(segments, { "langbespoke": "Bespoke", @@ -60,6 +60,7 @@ def get_label(segments, segment_labels): { "prop=bookkeepingANDbalanceANDorder": "", "prop=order": "", + "prop=stlcwelltyped": "Well", # todo: May, Might }, {"failure_penalty=0.0": ""}, @@ -72,6 +73,10 @@ def get_label(segments, segment_labels): "0.3": "LR30", "0.03": "LR03", }) + # new += get_label(segments, { + # "ty-sizes=Main.ColorKVTree.t-6-Main.Color.t-0": "Sz6", + # "ty-sizes=Main.ColorKVTree.t-8-Main.Color.t-0": "Sz8", + # }) new += get_label(segments, { "epochs=2000": "", }) From ebf03304257b2eaff40190efac7ce15a6a660a5c Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 15 Jun 2024 14:57:48 -0700 Subject: [PATCH 196/231] x --- examples/qc/benchmarks/main.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index bf47fa62..48d2a23c 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -85,7 +85,7 @@ FORIGIVENESS_LIST = [0] RAND_FORIGIVENESS_LIST = [true] RESAMPLING_FREQUENCY_LIST = [2] # PROPERTY_LIST = [STLCVarNumbers(), STLCMightType(), STLCWellTyped()] -# PROPERTY_LIST = [STLCWellTyped()] +PROPERTY_LIST = [STLCWellTyped()] # PROPERTY_LIST = [MultipleInvariants([ # BookkeepingInvariant(), # BalanceInvariant(), From 3aa4faa5da5013ec2ce2af929b697fe6567e5d92 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 15 Jun 2024 21:32:52 -0700 Subject: [PATCH 197/231] update renamer --- stats/renamer.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/stats/renamer.py b/stats/renamer.py index 1d928412..4f893f8e 100755 --- a/stats/renamer.py +++ b/stats/renamer.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -rootdir = "/space/tjoa/tuning-output/v53_stlc_well_bounds" +rootdir = "/space/tjoa/tuning-output/v55_stlc_faster" import os import shutil @@ -78,7 +78,9 @@ def get_label(segments, segment_labels): # "ty-sizes=Main.ColorKVTree.t-8-Main.Color.t-0": "Sz8", # }) new += get_label(segments, { - "epochs=2000": "", + "epochs=2000": "Epochs2000", + "epochs=700": "Epochs700", + "epochs=500": "Epochs500", }) new += get_label(segments, { "bound=0.0": "", @@ -86,6 +88,10 @@ def get_label(segments, segment_labels): "bound=0.1": "Bound10", "bound=0.2": "Bound20", }) + new += get_label(segments, { + "freq=2-spb=200": "SPB200", + "freq=2-spb=50": "SPB50", + }) new += "Generator.v" assert new not in filename_to_dir, f"{new} {filename_to_dir}" From cbbd700938b224e6930b2db7fea243e3fa7d5e7c Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 17 Jun 2024 00:06:24 -0700 Subject: [PATCH 198/231] rbt small --- examples/qc/benchmarks/main.jl | 83 ++++++---------------------------- examples/qc/benchmarks/tool.jl | 1 + 2 files changed, 15 insertions(+), 69 deletions(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 48d2a23c..f0778d2e 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -5,79 +5,24 @@ GENERATION_PARAMS_LIST = [ # expr_size=5, # typ_size=2, # ), - # LangDerivedGenerator{STLC}( + # LangSiblingDerivedGenerator{STLC}( # root_ty=Expr.t, # ty_sizes=[Expr.t=>5, Typ.t=>2], # stack_size=2, # intwidth=3, - # arbitrary_prims=false, - # ), - LangSiblingDerivedGenerator{STLC}( - root_ty=Expr.t, - ty_sizes=[Expr.t=>5, Typ.t=>2], + # ) + LangSiblingDerivedGenerator{RBT}( + root_ty=ColorKVTree.t, + ty_sizes=[ColorKVTree.t=>4, Color.t=>0], stack_size=2, intwidth=3, ) - # LangSiblingDerivedGenerator{RBT}( - # root_ty=ColorKVTree.t, - # ty_sizes=[ColorKVTree.t=>6, Color.t=>0], - # stack_size=2, - # intwidth=6, - # ) - # LangSiblingDerivedGenerator{RBT}( - # root_ty=ColorKVTree.t, - # ty_sizes=[ColorKVTree.t=>8, Color.t=>0], - # stack_size=2, - # intwidth=6, - # ) # LangSiblingDerivedGenerator{BST}( # root_ty=KVTree.t, # ty_sizes=[KVTree.t=>5], # stack_size=2, # intwidth=6, # ), - # LangDerivedGenerator{BST}( - # root_ty=KVTree.t, - # ty_sizes=[KVTree.t=>5], - # stack_size=2, - # intwidth=6, - # arbitrary_prims=false, - # ), - # DEPRECATED - # TypeBasedSTLCGenerator( - # size=5, - # ty_size=2, - # dependents=[:size,:stack_tail], - # ty_dependents=[:size,:stack_tail], - # stack_size=2, - # intwidth=6, - # ), - # DerivedGenerator{STLC}( - # root_ty=Expr.t, - # ty_sizes=[Expr.t=>4, Typ.t=>1], - # stack_size=2, - # intwidth=6, - # ) - # DerivedGenerator{RBT}( - # root_ty=ColorKVTree.t, - # ty_sizes=[ColorKVTree.t=>4, Color.t=>0], - # stack_size=2, - # intwidth=6, - # ) - # TypeBasedRBTGenerator( - # size=5, - # leaf_dependents=[:size,:parent_color,:stack_tail], - # red_dependents=[:size,:parent_color,:stack_tail], - # num_dependents=[:size,:parent_color,:stack_tail], - # stack_size=3, - # intwidth=6, - # ), - # TypeBasedBSTGenerator( - # size=5, - # leaf_dependents=[:size,:last_callsite], - # num_dependents=[:size,:last_callsite], - # intwidth=6, - # ), ] LR_LIST = [0.3] FP_LIST = [0.] @@ -85,14 +30,14 @@ FORIGIVENESS_LIST = [0] RAND_FORIGIVENESS_LIST = [true] RESAMPLING_FREQUENCY_LIST = [2] # PROPERTY_LIST = [STLCVarNumbers(), STLCMightType(), STLCWellTyped()] -PROPERTY_LIST = [STLCWellTyped()] -# PROPERTY_LIST = [MultipleInvariants([ -# BookkeepingInvariant(), -# BalanceInvariant(), -# OrderInvariant(), -# ])] -SAMPLES_PER_BATCH_LIST = [50, 200] -EPOCHS_LIST = [500, 700] +# PROPERTY_LIST = [STLCWellTyped()] +PROPERTY_LIST = [MultipleInvariants([ + BookkeepingInvariant(), + BalanceInvariant(), + OrderInvariant(), +])] +SAMPLES_PER_BATCH_LIST = [200] +EPOCHS_LIST = [2000] # EQ_LIST = [:prob_equals, :eq_structure] BOUND_LIST = [0.1] EQ_LIST = [:prob_equals] @@ -120,7 +65,7 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ [ # ApproxSTLCConstructorEntropy() => lr, # MLELossConfig{STLC}(NumApps(), Linear()) => lr, - SamplingEntropy{STLC}( + SamplingEntropy{RBT}( resampling_frequency=resampling_frequency, samples_per_batch=samples_per_batch, property=property, diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 8aa24207..247e3c9f 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -10,6 +10,7 @@ TAG = "v52_stlcace_w_bounds" TAG = "v53_stlc_well_bounds" TAG = "v54_rbt_bigger" TAG = "v55_stlc_faster" +TAG = "v56_rbt_thin" OUT_TOP_DIR = "/space/tjoa/tuning-output" ## PARSE ARGS From 57bfd1a1bf2cdc262afcafbf27eaed8df3c1a1be Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 17 Jun 2024 03:05:07 -0700 Subject: [PATCH 199/231] bst small --- examples/qc/benchmarks/main.jl | 33 +++++++++++++++++---------------- examples/qc/benchmarks/tool.jl | 1 + stats/renamer.py | 3 ++- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index f0778d2e..9dc8e328 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -11,18 +11,18 @@ GENERATION_PARAMS_LIST = [ # stack_size=2, # intwidth=3, # ) - LangSiblingDerivedGenerator{RBT}( - root_ty=ColorKVTree.t, - ty_sizes=[ColorKVTree.t=>4, Color.t=>0], + # LangSiblingDerivedGenerator{RBT}( + # root_ty=ColorKVTree.t, + # ty_sizes=[ColorKVTree.t=>4, Color.t=>0], + # stack_size=2, + # intwidth=3, + # ) + LangSiblingDerivedGenerator{BST}( + root_ty=KVTree.t, + ty_sizes=[KVTree.t=>4], stack_size=2, intwidth=3, - ) - # LangSiblingDerivedGenerator{BST}( - # root_ty=KVTree.t, - # ty_sizes=[KVTree.t=>5], - # stack_size=2, - # intwidth=6, - # ), + ), ] LR_LIST = [0.3] FP_LIST = [0.] @@ -31,11 +31,12 @@ RAND_FORIGIVENESS_LIST = [true] RESAMPLING_FREQUENCY_LIST = [2] # PROPERTY_LIST = [STLCVarNumbers(), STLCMightType(), STLCWellTyped()] # PROPERTY_LIST = [STLCWellTyped()] -PROPERTY_LIST = [MultipleInvariants([ - BookkeepingInvariant(), - BalanceInvariant(), - OrderInvariant(), -])] +PROPERTY_LIST = [BSTOrderInvariant()] +# PROPERTY_LIST = [MultipleInvariants([ +# BookkeepingInvariant(), +# BalanceInvariant(), +# OrderInvariant(), +# ])] SAMPLES_PER_BATCH_LIST = [200] EPOCHS_LIST = [2000] # EQ_LIST = [:prob_equals, :eq_structure] @@ -65,7 +66,7 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ [ # ApproxSTLCConstructorEntropy() => lr, # MLELossConfig{STLC}(NumApps(), Linear()) => lr, - SamplingEntropy{RBT}( + SamplingEntropy{BST}( resampling_frequency=resampling_frequency, samples_per_batch=samples_per_batch, property=property, diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 247e3c9f..b90514de 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -11,6 +11,7 @@ TAG = "v53_stlc_well_bounds" TAG = "v54_rbt_bigger" TAG = "v55_stlc_faster" TAG = "v56_rbt_thin" +TAG = "v57_bst_small" OUT_TOP_DIR = "/space/tjoa/tuning-output" ## PARSE ARGS diff --git a/stats/renamer.py b/stats/renamer.py index 4f893f8e..73702d26 100755 --- a/stats/renamer.py +++ b/stats/renamer.py @@ -1,5 +1,6 @@ #!/usr/bin/env python -rootdir = "/space/tjoa/tuning-output/v55_stlc_faster" +rootdir = "/space/tjoa/tuning-output/v56_rbt_thin" +# rootdir = "/space/tjoa/tuning-output/v55_stlc_faster" import os import shutil From 95b41afa65d74ac4c4daff1079d3ae9c5c0174ce Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 17 Jun 2024 03:15:06 -0700 Subject: [PATCH 200/231] small fix --- examples/qc/benchmarks/benchmarks.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 44bac293..6b2031a3 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -604,7 +604,7 @@ function generate(rs::RunState, p::LangSiblingDerivedGenerator{T}) where T if T == STLC STLCGeneration(OptExpr.Some(res), [OptExpr.Some(e) for e in function_results["genExpr"]]) elseif T == BST - BSTGeneration(res) #, function_results["genTree"]) + BSTGeneration(res, function_results["genTree"]) elseif T == RBT RBTGeneration(res) #, function_results["genTree"]) else From fceceb1d21709bb873c1857fb934a553ea1e2335 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 22 Jun 2024 07:23:04 -0700 Subject: [PATCH 201/231] bespoke se --- examples/qc/benchmarks/main.jl | 27 ++++++++++++--------------- examples/qc/benchmarks/tool.jl | 3 ++- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 9dc8e328..5d6187df 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -1,10 +1,10 @@ include("benchmarks.jl") GENERATION_PARAMS_LIST = [ - # LangBespokeSTLCGenerator( - # expr_size=5, - # typ_size=2, - # ), + LangBespokeSTLCGenerator( + expr_size=5, + typ_size=2, + ), # LangSiblingDerivedGenerator{STLC}( # root_ty=Expr.t, # ty_sizes=[Expr.t=>5, Typ.t=>2], @@ -17,21 +17,20 @@ GENERATION_PARAMS_LIST = [ # stack_size=2, # intwidth=3, # ) - LangSiblingDerivedGenerator{BST}( - root_ty=KVTree.t, - ty_sizes=[KVTree.t=>4], - stack_size=2, - intwidth=3, - ), +# LangSiblingDerivedGenerator{BST}( +# root_ty=KVTree.t, +# ty_sizes=[KVTree.t=>4], +# stack_size=2, +# intwidth=3, +# ), ] LR_LIST = [0.3] FP_LIST = [0.] FORIGIVENESS_LIST = [0] RAND_FORIGIVENESS_LIST = [true] RESAMPLING_FREQUENCY_LIST = [2] -# PROPERTY_LIST = [STLCVarNumbers(), STLCMightType(), STLCWellTyped()] -# PROPERTY_LIST = [STLCWellTyped()] -PROPERTY_LIST = [BSTOrderInvariant()] +PROPERTY_LIST = [STLCWellTyped()] +# PROPERTY_LIST = [BSTOrderInvariant()] # PROPERTY_LIST = [MultipleInvariants([ # BookkeepingInvariant(), # BalanceInvariant(), @@ -39,10 +38,8 @@ PROPERTY_LIST = [BSTOrderInvariant()] # ])] SAMPLES_PER_BATCH_LIST = [200] EPOCHS_LIST = [2000] -# EQ_LIST = [:prob_equals, :eq_structure] BOUND_LIST = [0.1] EQ_LIST = [:prob_equals] -# EQ_LIST = [nothing] n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, FORIGIVENESS_LIST, RAND_FORIGIVENESS_LIST, PROPERTY_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST, EQ_LIST, BOUND_LIST])) println(n_runs) diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index b90514de..e7e12ec1 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -12,6 +12,7 @@ TAG = "v54_rbt_bigger" TAG = "v55_stlc_faster" TAG = "v56_rbt_thin" TAG = "v57_bst_small" +TAG = "v58_stlc_bespoke_se" OUT_TOP_DIR = "/space/tjoa/tuning-output" ## PARSE ARGS @@ -185,4 +186,4 @@ println_loud(rs, t′) println_loud(rs, "Total time elapsed: $(canonicalize(t′ - t))") println(stderr, log_path) -# include("dump_loss_graph.jl") \ No newline at end of file +# include("dump_loss_graph.jl") From e61132915f034f28a865484f1afde306ec7b83d1 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 22 Jun 2024 07:24:58 -0700 Subject: [PATCH 202/231] more lrs --- examples/qc/benchmarks/main.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 5d6187df..4c70cbc1 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -25,6 +25,7 @@ GENERATION_PARAMS_LIST = [ # ), ] LR_LIST = [0.3] +LR_LIST = [0.001, 0.003, 0.01, 0.03, 0.1, 0.3] FP_LIST = [0.] FORIGIVENESS_LIST = [0] RAND_FORIGIVENESS_LIST = [true] From e6177e783c5c9c3bb475207d84a3f8f22d94166a Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 22 Jun 2024 07:39:23 -0700 Subject: [PATCH 203/231] repro and space2 --- examples/qc/benchmarks/main.jl | 2 +- examples/qc/benchmarks/tool.jl | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 4c70cbc1..0b3b65c8 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -64,7 +64,7 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ [ # ApproxSTLCConstructorEntropy() => lr, # MLELossConfig{STLC}(NumApps(), Linear()) => lr, - SamplingEntropy{BST}( + SamplingEntropy{STLC}( resampling_frequency=resampling_frequency, samples_per_batch=samples_per_batch, property=property, diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index e7e12ec1..6b65a8ce 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -13,7 +13,8 @@ TAG = "v55_stlc_faster" TAG = "v56_rbt_thin" TAG = "v57_bst_small" TAG = "v58_stlc_bespoke_se" -OUT_TOP_DIR = "/space/tjoa/tuning-output" +TAG = "v59_repro" +OUT_TOP_DIR = "/space2/tjoa/tuning-output" ## PARSE ARGS if isempty(ARGS) From 057b790f81c7f5ea69a1368c37b3e5f33b633c06 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 22 Jun 2024 08:03:14 -0700 Subject: [PATCH 204/231] eval repo scripts --- eval.sh | 4 ++++ mkeval.sh | 6 ++++++ 2 files changed, 10 insertions(+) create mode 100644 eval.sh create mode 100644 mkeval.sh diff --git a/eval.sh b/eval.sh new file mode 100644 index 00000000..740098ea --- /dev/null +++ b/eval.sh @@ -0,0 +1,4 @@ +julia --project $TOOL "LangSiblingDerivedGenerator{BST}(Main.KVTree.t,Pair{Type,Integer}[Main.KVTree.t=>4],2,3)" "Pair{SamplingEntropy{BST},Float64}[SamplingEntropy{BST}(2,200,BSTOrderInvariant(),:prob_equals,0.0,0,true)=>0.3]" "2000" "0.1" +julia --project $TOOL "LangSiblingDerivedGenerator{RBT}(Main.ColorKVTree.t,Pair{Type,Integer}[Main.ColorKVTree.t=>4,Main.Color.t=>0],2,3)" "Pair{SamplingEntropy{RBT},Float64}[SamplingEntropy{RBT}(2,200,MultipleInvariants{RBT}(Property{RBT}[BookkeepingInvariant(),BalanceInvariant(),OrderInvariant()]),:prob_equals,0.0,0,true)=>0.3]" "2000" "0.1" +julia --project $TOOL "LangSiblingDerivedGenerator{STLC}(Main.Expr.t,Pair{Type,Integer}[Main.Expr.t=>5,Main.Typ.t=>2],2,3)" "Pair{SamplingEntropy{STLC},Float64}[SamplingEntropy{STLC}(2,200,STLCWellTyped(),:prob_equals,0.0,0,true)=>0.3]" "2000" "0.1" +julia --project $TOOL "LangBespokeSTLCGenerator(5,2)" "[ApproxSTLCConstructorEntropy()=>0.03]" "2000" "0.1" diff --git a/mkeval.sh b/mkeval.sh new file mode 100644 index 00000000..942a5b8c --- /dev/null +++ b/mkeval.sh @@ -0,0 +1,6 @@ +TO=/space2/tjoa/tuning-output +cat "$(dirname $(find $TO -name *BSmallTrainedGenerator*))/log.log" | head -n 1 +cat "$(dirname $(find $TO -name *RLSDThinSmallGenerator*))/log.log" | head -n 1 +cat "$(dirname $(find $TO -name *SLSDThinEqWellLR30Bound10Generator*))/log.log" | head -n 1 +cat "$(dirname $(find $TO -name *SBespokeACELR03Bound10Generator*))/log.log" | head -n 1 + From 8239f53dc86f288810ca740ffc50150210c7baff Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 26 Jun 2024 07:53:02 -0700 Subject: [PATCH 205/231] stlc bespoke 5 1 --- eval.sh | 8 ++++---- examples/qc/benchmarks/main.jl | 2 +- examples/qc/benchmarks/tool.jl | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eval.sh b/eval.sh index 740098ea..0b62f24c 100644 --- a/eval.sh +++ b/eval.sh @@ -1,4 +1,4 @@ -julia --project $TOOL "LangSiblingDerivedGenerator{BST}(Main.KVTree.t,Pair{Type,Integer}[Main.KVTree.t=>4],2,3)" "Pair{SamplingEntropy{BST},Float64}[SamplingEntropy{BST}(2,200,BSTOrderInvariant(),:prob_equals,0.0,0,true)=>0.3]" "2000" "0.1" -julia --project $TOOL "LangSiblingDerivedGenerator{RBT}(Main.ColorKVTree.t,Pair{Type,Integer}[Main.ColorKVTree.t=>4,Main.Color.t=>0],2,3)" "Pair{SamplingEntropy{RBT},Float64}[SamplingEntropy{RBT}(2,200,MultipleInvariants{RBT}(Property{RBT}[BookkeepingInvariant(),BalanceInvariant(),OrderInvariant()]),:prob_equals,0.0,0,true)=>0.3]" "2000" "0.1" -julia --project $TOOL "LangSiblingDerivedGenerator{STLC}(Main.Expr.t,Pair{Type,Integer}[Main.Expr.t=>5,Main.Typ.t=>2],2,3)" "Pair{SamplingEntropy{STLC},Float64}[SamplingEntropy{STLC}(2,200,STLCWellTyped(),:prob_equals,0.0,0,true)=>0.3]" "2000" "0.1" -julia --project $TOOL "LangBespokeSTLCGenerator(5,2)" "[ApproxSTLCConstructorEntropy()=>0.03]" "2000" "0.1" +julia --project $TOOL -f "LangSiblingDerivedGenerator{BST}(Main.KVTree.t,Pair{Type,Integer}[Main.KVTree.t=>4],2,3)" "Pair{SamplingEntropy{BST},Float64}[SamplingEntropy{BST}(2,200,BSTOrderInvariant(),:prob_equals,0.0,0,true)=>0.3]" "2000" "0.1" +julia --project $TOOL -f "LangSiblingDerivedGenerator{RBT}(Main.ColorKVTree.t,Pair{Type,Integer}[Main.ColorKVTree.t=>4,Main.Color.t=>0],2,3)" "Pair{SamplingEntropy{RBT},Float64}[SamplingEntropy{RBT}(2,200,MultipleInvariants{RBT}(Property{RBT}[BookkeepingInvariant(),BalanceInvariant(),OrderInvariant()]),:prob_equals,0.0,0,true)=>0.3]" "2000" "0.1" +julia --project $TOOL -f "LangSiblingDerivedGenerator{STLC}(Main.Expr.t,Pair{Type,Integer}[Main.Expr.t=>5,Main.Typ.t=>2],2,3)" "Pair{SamplingEntropy{STLC},Float64}[SamplingEntropy{STLC}(2,200,STLCWellTyped(),:prob_equals,0.0,0,true)=>0.3]" "2000" "0.1" +julia --project $TOOL -f "LangBespokeSTLCGenerator(5,2)" "[ApproxSTLCConstructorEntropy()=>0.03]" "2000" "0.1" diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 0b3b65c8..8d8e761e 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -3,7 +3,7 @@ include("benchmarks.jl") GENERATION_PARAMS_LIST = [ LangBespokeSTLCGenerator( expr_size=5, - typ_size=2, + typ_size=1, ), # LangSiblingDerivedGenerator{STLC}( # root_ty=Expr.t, diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 6b65a8ce..6f213ef5 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -13,7 +13,7 @@ TAG = "v55_stlc_faster" TAG = "v56_rbt_thin" TAG = "v57_bst_small" TAG = "v58_stlc_bespoke_se" -TAG = "v59_repro" +# TAG = "v59_repro" OUT_TOP_DIR = "/space2/tjoa/tuning-output" ## PARSE ARGS From 544cad2cd61181ee7493715809e126f269766017 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 26 Jun 2024 07:53:33 -0700 Subject: [PATCH 206/231] update tag --- examples/qc/benchmarks/tool.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 6f213ef5..40b19a02 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -13,6 +13,7 @@ TAG = "v55_stlc_faster" TAG = "v56_rbt_thin" TAG = "v57_bst_small" TAG = "v58_stlc_bespoke_se" +TAG = "v60_stlc_bespoke_se" # TAG = "v59_repro" OUT_TOP_DIR = "/space2/tjoa/tuning-output" From 76bebd9f0dda5b7657577f67860c6e6058647334 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 26 Jun 2024 07:55:44 -0700 Subject: [PATCH 207/231] add faaster --- examples/qc/benchmarks/main.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 8d8e761e..9b3f4185 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -24,8 +24,8 @@ GENERATION_PARAMS_LIST = [ # intwidth=3, # ), ] -LR_LIST = [0.3] -LR_LIST = [0.001, 0.003, 0.01, 0.03, 0.1, 0.3] +# LR_LIST = [0.3] +LR_LIST = [0.01, 0.1, 0.3] FP_LIST = [0.] FORIGIVENESS_LIST = [0] RAND_FORIGIVENESS_LIST = [true] @@ -37,8 +37,8 @@ PROPERTY_LIST = [STLCWellTyped()] # BalanceInvariant(), # OrderInvariant(), # ])] -SAMPLES_PER_BATCH_LIST = [200] -EPOCHS_LIST = [2000] +SAMPLES_PER_BATCH_LIST = [50, 200] +EPOCHS_LIST = [500, 2000] BOUND_LIST = [0.1] EQ_LIST = [:prob_equals] From 07bf4eaabe1841d972878af456f31142286d71ba Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sat, 29 Jun 2024 07:57:59 -0700 Subject: [PATCH 208/231] 51 se --- examples/qc/benchmarks/main.jl | 25 +++++++++++++------------ examples/qc/benchmarks/tool.jl | 1 + 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 9b3f4185..30233f88 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -25,7 +25,7 @@ GENERATION_PARAMS_LIST = [ # ), ] # LR_LIST = [0.3] -LR_LIST = [0.01, 0.1, 0.3] +LR_LIST = [0.01, 0.03, 0.1, 0.3] FP_LIST = [0.] FORIGIVENESS_LIST = [0] RAND_FORIGIVENESS_LIST = [true] @@ -39,6 +39,7 @@ PROPERTY_LIST = [STLCWellTyped()] # ])] SAMPLES_PER_BATCH_LIST = [50, 200] EPOCHS_LIST = [500, 2000] +SAMPLES_PER_BATCH_LIST = [nothing] BOUND_LIST = [0.1] EQ_LIST = [:prob_equals] @@ -62,18 +63,18 @@ println() LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ - # ApproxSTLCConstructorEntropy() => lr, + ApproxSTLCConstructorEntropy() => lr, # MLELossConfig{STLC}(NumApps(), Linear()) => lr, - SamplingEntropy{STLC}( - resampling_frequency=resampling_frequency, - samples_per_batch=samples_per_batch, - property=property, - eq=eq, - failure_penalty=fp, - forgiveness=forgiveness, - rand_forgiveness=rand_forgiveness, - ) => lr, - # SamplingEntropy{BST}( +# SamplingEntropy{STLC}( +# resampling_frequency=resampling_frequency, +# samples_per_batch=samples_per_batch, +# property=property, +# eq=eq, +# failure_penalty=fp, +# forgiveness=forgiveness, +# rand_forgiveness=rand_forgiveness, +# ) => lr, +# # SamplingEntropy{BST}( # resampling_frequency=resampling_frequency, # samples_per_batch=samples_per_batch, # property=BSTOrderInvariant(), diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 40b19a02..f498e0cb 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -14,6 +14,7 @@ TAG = "v56_rbt_thin" TAG = "v57_bst_small" TAG = "v58_stlc_bespoke_se" TAG = "v60_stlc_bespoke_se" +TAG = "v61_stlc_51_ace" # TAG = "v59_repro" OUT_TOP_DIR = "/space2/tjoa/tuning-output" From 583a5b84308076d465b4fce350b85ca05f0504f3 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 7 Jul 2024 16:32:44 -0700 Subject: [PATCH 209/231] se force meets --- examples/qc/benchmarks/benchmarks.jl | 1 + examples/qc/benchmarks/main.jl | 26 +++++++++++++------------- examples/qc/benchmarks/tool.jl | 1 + 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 6b2031a3..bec8a38b 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -276,6 +276,7 @@ function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) lpr_eq_expanded = Dice.expand_logprs(l, lpr_eq) # diff_test_typecheck(sample, Dice.frombits(sample, Dict())) meets = m.consider(sample) + @assert meets meets && (num_meeting += 1) loss_here, actual_loss_here = if meets || (m.p.rand_forgiveness && rand(rs.rng) < m.p.forgiveness) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 30233f88..1dd921f8 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -37,9 +37,9 @@ PROPERTY_LIST = [STLCWellTyped()] # BalanceInvariant(), # OrderInvariant(), # ])] -SAMPLES_PER_BATCH_LIST = [50, 200] -EPOCHS_LIST = [500, 2000] -SAMPLES_PER_BATCH_LIST = [nothing] +SAMPLES_PER_BATCH_LIST = [50] +EPOCHS_LIST = [10] +# SAMPLES_PER_BATCH_LIST = [nothing] BOUND_LIST = [0.1] EQ_LIST = [:prob_equals] @@ -63,17 +63,17 @@ println() LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ - ApproxSTLCConstructorEntropy() => lr, + # ApproxSTLCConstructorEntropy() => lr, # MLELossConfig{STLC}(NumApps(), Linear()) => lr, -# SamplingEntropy{STLC}( -# resampling_frequency=resampling_frequency, -# samples_per_batch=samples_per_batch, -# property=property, -# eq=eq, -# failure_penalty=fp, -# forgiveness=forgiveness, -# rand_forgiveness=rand_forgiveness, -# ) => lr, + SamplingEntropy{STLC}( + resampling_frequency=resampling_frequency, + samples_per_batch=samples_per_batch, + property=property, + eq=eq, + failure_penalty=fp, + forgiveness=forgiveness, + rand_forgiveness=rand_forgiveness, + ) => lr, # # SamplingEntropy{BST}( # resampling_frequency=resampling_frequency, # samples_per_batch=samples_per_batch, diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index f498e0cb..80c0f1aa 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -15,6 +15,7 @@ TAG = "v57_bst_small" TAG = "v58_stlc_bespoke_se" TAG = "v60_stlc_bespoke_se" TAG = "v61_stlc_51_ace" +TAG = "v61_stlc_bespoke_se_force_meets" # TAG = "v59_repro" OUT_TOP_DIR = "/space2/tjoa/tuning-output" From 44bd0d36c8a91c7e54a2765b1cc4a3972fe39284 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 8 Jul 2024 15:35:10 -0700 Subject: [PATCH 210/231] structure --- examples/qc/benchmarks/benchmarks.jl | 12 ++++++-- examples/qc/benchmarks/main.jl | 9 +++--- examples/qc/benchmarks/tool.jl | 43 ++++++++++++++-------------- 3 files changed, 36 insertions(+), 28 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index bec8a38b..b84657c7 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -215,6 +215,7 @@ struct SamplingEntropy{T} <: LossConfig{T} failure_penalty::Real forgiveness::Real rand_forgiveness::Bool + keyf::Symbol end mutable struct SamplingEntropyLossMgr <: LossMgr @@ -270,6 +271,10 @@ function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) elseif m.p.eq == :eq_structure eq_structure elseif m.p.eq == :prob_equals prob_equals else error() end + + keyf = if m.p.keyf == :identity identity + else error() end + loss, actual_loss = sum( begin lpr_eq = LogPr(f_eq(m.val, sample)) @@ -1805,8 +1810,8 @@ name(::TrueProperty{T}) where T = "trueproperty" # Sampling STLC entropy loss ################################## -function SamplingEntropy{T}(; resampling_frequency, samples_per_batch, property, eq, failure_penalty, forgiveness, rand_forgiveness) where T - SamplingEntropy{T}(resampling_frequency, samples_per_batch, property, eq, failure_penalty, forgiveness, rand_forgiveness) +function SamplingEntropy{T}(; resampling_frequency, samples_per_batch, property, eq, failure_penalty, forgiveness, rand_forgiveness, keyf) where T + SamplingEntropy{T}(resampling_frequency, samples_per_batch, property, eq, failure_penalty, forgiveness, rand_forgiveness, keyf) end to_subpath(p::SamplingEntropy) = [ @@ -1816,7 +1821,8 @@ to_subpath(p::SamplingEntropy) = [ "prop=$(name(p.property))", "failure_penalty=$(p.failure_penalty)", "forgiveness=$(p.forgiveness)", - "rand_forgiveness=$(p.rand_forgiveness)" + "rand_forgiveness=$(p.rand_forgiveness)", + "keyf=$(p.keyf)", ] function create_loss_manager(::RunState, p::SamplingEntropy{T}, g::Generation{T}) where T function consider(sample) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 1dd921f8..129f9e16 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -3,7 +3,7 @@ include("benchmarks.jl") GENERATION_PARAMS_LIST = [ LangBespokeSTLCGenerator( expr_size=5, - typ_size=1, + typ_size=2, ), # LangSiblingDerivedGenerator{STLC}( # root_ty=Expr.t, @@ -37,11 +37,11 @@ PROPERTY_LIST = [STLCWellTyped()] # BalanceInvariant(), # OrderInvariant(), # ])] -SAMPLES_PER_BATCH_LIST = [50] -EPOCHS_LIST = [10] +SAMPLES_PER_BATCH_LIST = [50, 200] +EPOCHS_LIST = [500, 2000] # SAMPLES_PER_BATCH_LIST = [nothing] BOUND_LIST = [0.1] -EQ_LIST = [:prob_equals] +EQ_LIST = [:eq_structure] n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, FORIGIVENESS_LIST, RAND_FORIGIVENESS_LIST, PROPERTY_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST, EQ_LIST, BOUND_LIST])) println(n_runs) @@ -73,6 +73,7 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ failure_penalty=fp, forgiveness=forgiveness, rand_forgiveness=rand_forgiveness, + keyf=:identity, ) => lr, # # SamplingEntropy{BST}( # resampling_frequency=resampling_frequency, diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 80c0f1aa..79069422 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -35,14 +35,14 @@ if isempty(ARGS) # stack_size=1, # intwidth=6, # ) - g_p = TypeBasedSTLCGenerator( - size=2, - ty_size=1, - dependents=[:size,:stack_tail], - ty_dependents=[:size,:stack_tail], - stack_size=2, - intwidth=6, - ) + # g_p = TypeBasedSTLCGenerator( + # size=2, + # ty_size=1, + # dependents=[:size,:stack_tail], + # ty_dependents=[:size,:stack_tail], + # stack_size=2, + # intwidth=6, + # ) # g_p = TypeBasedRBTGenerator( # size=3, # leaf_dependents=[:size,:parent_color,:stack_tail], @@ -53,17 +53,17 @@ if isempty(ARGS) # ) lr = 0.5 fp = 0 - g_p = LangDerivedGenerator{BST}( - root_ty=KVTree.t, - ty_sizes=[KVTree.t=>5], - stack_size=2, - intwidth=6, - arbitrary_prims=false, - ) - # g_p = LangBespokeSTLCGenerator( - # expr_size=2, - # typ_size=1, + # g_p = LangDerivedGenerator{BST}( + # root_ty=KVTree.t, + # ty_sizes=[KVTree.t=>5], + # stack_size=2, + # intwidth=6, + # arbitrary_prims=false, # ) + g_p = LangBespokeSTLCGenerator( + expr_size=2, + typ_size=1, + ) l_p = [ # SamplingEntropy{STLC}( # resampling_frequency=1, @@ -74,14 +74,15 @@ if isempty(ARGS) # forgiveness=0, # rand_forgiveness=true, # ) => lr, - SamplingEntropy{BST}( + SamplingEntropy{STLC}( resampling_frequency=1, samples_per_batch=50, - property=BSTOrderInvariant(), - eq=:prob_equals, + property=STLCWellTyped(), + eq=:eq_structure, failure_penalty=fp, forgiveness=0, rand_forgiveness=true, + keyf=:identity, ) => lr, # ApproxSTLCConstructorEntropy() => lr, From f0b35b54b486b52ffeab3db2d416c36997dc62dd Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 8 Jul 2024 15:48:54 -0700 Subject: [PATCH 211/231] ex unif stlc --- examples/qc/benchmarks/main.jl | 29 +++++++++++++++-------------- examples/qc/benchmarks/tool.jl | 22 ++++++++++++---------- 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 129f9e16..9814365b 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -25,7 +25,7 @@ GENERATION_PARAMS_LIST = [ # ), ] # LR_LIST = [0.3] -LR_LIST = [0.01, 0.03, 0.1, 0.3] +LR_LIST = [0.01, 0.03, 0.1] FP_LIST = [0.] FORIGIVENESS_LIST = [0] RAND_FORIGIVENESS_LIST = [true] @@ -38,8 +38,9 @@ PROPERTY_LIST = [STLCWellTyped()] # OrderInvariant(), # ])] SAMPLES_PER_BATCH_LIST = [50, 200] -EPOCHS_LIST = [500, 2000] -# SAMPLES_PER_BATCH_LIST = [nothing] +EPOCHS_LIST = [2000] + +SAMPLES_PER_BATCH_LIST = [nothing] BOUND_LIST = [0.1] EQ_LIST = [:eq_structure] @@ -64,17 +65,17 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ # ApproxSTLCConstructorEntropy() => lr, - # MLELossConfig{STLC}(NumApps(), Linear()) => lr, - SamplingEntropy{STLC}( - resampling_frequency=resampling_frequency, - samples_per_batch=samples_per_batch, - property=property, - eq=eq, - failure_penalty=fp, - forgiveness=forgiveness, - rand_forgiveness=rand_forgiveness, - keyf=:identity, - ) => lr, + MLELossConfig{STLC}(NumApps(), Linear()) => lr, + # SamplingEntropy{STLC}( + # resampling_frequency=resampling_frequency, + # samples_per_batch=samples_per_batch, + # property=property, + # eq=eq, + # failure_penalty=fp, + # forgiveness=forgiveness, + # rand_forgiveness=rand_forgiveness, + # keyf=:identity, + # ) => lr, # # SamplingEntropy{BST}( # resampling_frequency=resampling_frequency, # samples_per_batch=samples_per_batch, diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 79069422..f1aaae59 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -16,6 +16,7 @@ TAG = "v58_stlc_bespoke_se" TAG = "v60_stlc_bespoke_se" TAG = "v61_stlc_51_ace" TAG = "v61_stlc_bespoke_se_force_meets" +TAG = "v62_ex_unif_stlc" # TAG = "v59_repro" OUT_TOP_DIR = "/space2/tjoa/tuning-output" @@ -74,16 +75,17 @@ if isempty(ARGS) # forgiveness=0, # rand_forgiveness=true, # ) => lr, - SamplingEntropy{STLC}( - resampling_frequency=1, - samples_per_batch=50, - property=STLCWellTyped(), - eq=:eq_structure, - failure_penalty=fp, - forgiveness=0, - rand_forgiveness=true, - keyf=:identity, - ) => lr, + # SamplingEntropy{STLC}( + # resampling_frequency=1, + # samples_per_batch=50, + # property=STLCWellTyped(), + # eq=:eq_structure, + # failure_penalty=fp, + # forgiveness=0, + # rand_forgiveness=true, + # keyf=:identity, + # ) => lr, + MLELossConfig{STLC}(NumApps(), Linear()) => lr, # ApproxSTLCConstructorEntropy() => lr, # MLELossConfig{STLC}(NumApps(), Linear()) => lr, From 0d63501a8ffbfd12fe78bb9b16d010108c42f4eb Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 9 Jul 2024 17:06:53 -0700 Subject: [PATCH 212/231] idk --- examples/qc/benchmarks/benchmarks.jl | 111 ++++++++++++++------------- examples/qc/benchmarks/main.jl | 29 +++---- examples/qc/benchmarks/tool.jl | 16 +++- 3 files changed, 89 insertions(+), 67 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index b84657c7..6056ad4c 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -60,58 +60,64 @@ function run_benchmark( end end - # if T == STLC - # samples_to_take = 10_000 - # println_flush(rs.io, "Taking $(samples_to_take) metric samples...") - - # metrics = [NumApps(), TermSize()] - # metric_to_cts = Dict(metric => Dict() for metric in metrics) - - # a = ADComputer(rs.var_vals) - # time_sample = @elapsed with_concrete_ad_flips(rs.var_vals, value(generation)) do - # for _ in 1:samples_to_take - # sample = sample_as_dist(rs.rng, a, value(generation)) - # is_valid = check_property(STLCWellTyped(), sample) - # for (metric, cts) in metric_to_cts - # key = ( - # is_valid, - # Dice.frombits( - # compute_metric(metric, STLCGeneration(sample,[])), - # Dict()) - # ) - # get!(cts, key, 0) - # cts[key] += 1 - # end - # end - # end - # println_loud(rs, " $(time_sample) seconds") - # println_loud(rs, metric_to_cts) - - # for (metric, cts) in metric_to_cts - # filename = joinpath(rs.out_dir, "sampled_$(samples_to_take)_dist_$(name(metric))_$(s).csv") - # open(filename, "w") do file - # min_metric_val = minimum( - # metric_val - # for (valid, metric_val) in keys(cts) - # ) - # @assert min_metric_val >= 0 - # max_metric_val = maximum( - # metric_val - # for (valid, metric_val) in keys(cts) - # ) - # println(file, join([ - # if valid "$(metric_val)" else "$(metric_val)!" end - # for metric_val in 0:max_metric_val - # for valid in [true, false] - # ], "\t")) - # println(file, join([ - # get(cts, (valid, metric_val), 0) - # for metric_val in 0:max_metric_val - # for valid in [true, false] - # ], "\t")) - # end - # end - # end + if T == STLC + bespoke = generation_params isa LangBespokeSTLCGenerator + samples_to_take = 10_000 + println_flush(rs.io, "Taking $(samples_to_take) metric samples $(bespoke)...") + + metrics = [NumApps(), TermSize()] + metric_to_cts = Dict(metric => Dict() for metric in metrics) + + a = ADComputer(rs.var_vals) + time_sample = @elapsed with_concrete_ad_flips(rs.var_vals, value(generation)) do + for _ in 1:samples_to_take + sample = sample_as_dist(rs.rng, a, value(generation)) + is_valid = check_property(STLCWellTyped(), sample) + @assert !bespoke || is_valid + for (metric, cts) in metric_to_cts + key = ( + is_valid, + Dice.frombits( + compute_metric(metric, STLCGeneration(sample,[])), + Dict()) + ) + get!(cts, key, 0) + cts[key] += 1 + end + end + end + println_loud(rs, " $(time_sample) seconds") + println_loud(rs, metric_to_cts) + + for (metric, cts) in metric_to_cts + filename = joinpath(rs.out_dir, "sampled_$(samples_to_take)_dist_$(name(metric))_$(s).csv") + open(filename, "w") do file + min_metric_val = minimum( + metric_val + for (valid, metric_val) in keys(cts) + ) + @assert min_metric_val >= 0 + max_metric_val = maximum( + metric_val + for (valid, metric_val) in keys(cts) + ) + + valids = if bespoke + [true] else [true, false] end + println(file, join([ + if valid "$(metric_val)" else "$(metric_val)!" end + for metric_val in 0:max_metric_val + for valid in valids + + ], "\t")) + println(file, join([ + get(cts, (valid, metric_val), 0) + for metric_val in 0:max_metric_val + for valid in valids + ], "\t")) + end + end + end println(rs.io) end @@ -273,6 +279,7 @@ function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) else error() end keyf = if m.p.keyf == :identity identity + elseif m.p.keyf == :num_apps num_apps else error() end loss, actual_loss = sum( diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 9814365b..2ff3f9c2 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -31,6 +31,7 @@ FORIGIVENESS_LIST = [0] RAND_FORIGIVENESS_LIST = [true] RESAMPLING_FREQUENCY_LIST = [2] PROPERTY_LIST = [STLCWellTyped()] +PROPERTY_LIST = [TrueProperty{STLC}()] # PROPERTY_LIST = [BSTOrderInvariant()] # PROPERTY_LIST = [MultipleInvariants([ # BookkeepingInvariant(), @@ -38,11 +39,11 @@ PROPERTY_LIST = [STLCWellTyped()] # OrderInvariant(), # ])] SAMPLES_PER_BATCH_LIST = [50, 200] -EPOCHS_LIST = [2000] +EPOCHS_LIST = [50,200] -SAMPLES_PER_BATCH_LIST = [nothing] +# SAMPLES_PER_BATCH_LIST = [nothing] BOUND_LIST = [0.1] -EQ_LIST = [:eq_structure] +EQ_LIST = [:prob_equals] n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, FORIGIVENESS_LIST, RAND_FORIGIVENESS_LIST, PROPERTY_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST, EQ_LIST, BOUND_LIST])) println(n_runs) @@ -65,17 +66,17 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ # ApproxSTLCConstructorEntropy() => lr, - MLELossConfig{STLC}(NumApps(), Linear()) => lr, - # SamplingEntropy{STLC}( - # resampling_frequency=resampling_frequency, - # samples_per_batch=samples_per_batch, - # property=property, - # eq=eq, - # failure_penalty=fp, - # forgiveness=forgiveness, - # rand_forgiveness=rand_forgiveness, - # keyf=:identity, - # ) => lr, + # MLELossConfig{STLC}(NumApps(), Linear()) => lr, + SamplingEntropy{STLC}( + resampling_frequency=resampling_frequency, + samples_per_batch=samples_per_batch, + property=property, + eq=eq, + failure_penalty=fp, + forgiveness=forgiveness, + rand_forgiveness=rand_forgiveness, + keyf=:num_apps, + ) => lr, # # SamplingEntropy{BST}( # resampling_frequency=resampling_frequency, # samples_per_batch=samples_per_batch, diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index f1aaae59..9625e959 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -17,6 +17,8 @@ TAG = "v60_stlc_bespoke_se" TAG = "v61_stlc_51_ace" TAG = "v61_stlc_bespoke_se_force_meets" TAG = "v62_ex_unif_stlc" +TAG = "v63_ex_unif_stlc_entropy" +TAG = "fig_rbt" # TAG = "v59_repro" OUT_TOP_DIR = "/space2/tjoa/tuning-output" @@ -85,7 +87,19 @@ if isempty(ARGS) # rand_forgiveness=true, # keyf=:identity, # ) => lr, - MLELossConfig{STLC}(NumApps(), Linear()) => lr, + # MLELossConfig{STLC}(NumApps(), Linear()) => lr, + + # Apps entropy + SamplingEntropy{STLC}( + resampling_frequency=1, + samples_per_batch=50, + property=TrueProperty{STLC}(), + eq=:prob_equals, + failure_penalty=fp, + forgiveness=0, + rand_forgiveness=true, + keyf=:num_apps, + ) => lr, # ApproxSTLCConstructorEntropy() => lr, # MLELossConfig{STLC}(NumApps(), Linear()) => lr, From b4bfa4cad316391816143542ea8a32e9de7f9e5e Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 9 Jul 2024 17:30:31 -0700 Subject: [PATCH 213/231] rbt ablation --- examples/qc/benchmarks/main.jl | 39 +++++++++++++++++----------------- examples/qc/benchmarks/tool.jl | 16 +++++++------- 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 2ff3f9c2..dcd54ed4 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -1,22 +1,22 @@ include("benchmarks.jl") GENERATION_PARAMS_LIST = [ - LangBespokeSTLCGenerator( - expr_size=5, - typ_size=2, - ), + # LangBespokeSTLCGenerator( + # expr_size=5, + # typ_size=2, + # ), # LangSiblingDerivedGenerator{STLC}( # root_ty=Expr.t, # ty_sizes=[Expr.t=>5, Typ.t=>2], # stack_size=2, # intwidth=3, # ) - # LangSiblingDerivedGenerator{RBT}( - # root_ty=ColorKVTree.t, - # ty_sizes=[ColorKVTree.t=>4, Color.t=>0], - # stack_size=2, - # intwidth=3, - # ) + LangSiblingDerivedGenerator{RBT}( + root_ty=ColorKVTree.t, + ty_sizes=[ColorKVTree.t=>4, Color.t=>0], + stack_size=2, + intwidth=3, + ) # LangSiblingDerivedGenerator{BST}( # root_ty=KVTree.t, # ty_sizes=[KVTree.t=>4], @@ -30,19 +30,18 @@ FP_LIST = [0.] FORIGIVENESS_LIST = [0] RAND_FORIGIVENESS_LIST = [true] RESAMPLING_FREQUENCY_LIST = [2] -PROPERTY_LIST = [STLCWellTyped()] -PROPERTY_LIST = [TrueProperty{STLC}()] # PROPERTY_LIST = [BSTOrderInvariant()] -# PROPERTY_LIST = [MultipleInvariants([ -# BookkeepingInvariant(), -# BalanceInvariant(), -# OrderInvariant(), -# ])] -SAMPLES_PER_BATCH_LIST = [50, 200] -EPOCHS_LIST = [50,200] +PROPERTY_LIST = [MultipleInvariants([ + BookkeepingInvariant(), + BalanceInvariant(), + OrderInvariant(), +]), +TrueProperty{RBT}()] +SAMPLES_PER_BATCH_LIST = [200] +EPOCHS_LIST = [2000] # SAMPLES_PER_BATCH_LIST = [nothing] -BOUND_LIST = [0.1] +BOUND_LIST = [0, 0.1] EQ_LIST = [:prob_equals] n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, FORIGIVENESS_LIST, RAND_FORIGIVENESS_LIST, PROPERTY_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST, EQ_LIST, BOUND_LIST])) diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 9625e959..ceda258c 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -18,7 +18,7 @@ TAG = "v61_stlc_51_ace" TAG = "v61_stlc_bespoke_se_force_meets" TAG = "v62_ex_unif_stlc" TAG = "v63_ex_unif_stlc_entropy" -TAG = "fig_rbt" +TAG = "v64_fig_rbt" # TAG = "v59_repro" OUT_TOP_DIR = "/space2/tjoa/tuning-output" @@ -46,13 +46,13 @@ if isempty(ARGS) # stack_size=2, # intwidth=6, # ) - # g_p = TypeBasedRBTGenerator( - # size=3, - # leaf_dependents=[:size,:parent_color,:stack_tail], - # red_dependents=[:size,:parent_color,:stack_tail], - # num_dependents=[:size,:parent_color,:stack_tail], - # stack_size=2, - # intwidth=6, + g_p = TypeBasedRBTGenerator( + size=3, + leaf_dependents=[:size,:parent_color,:stack_tail], + red_dependents=[:size,:parent_color,:stack_tail], + num_dependents=[:size,:parent_color,:stack_tail], + stack_size=2, + intwidth=6, # ) lr = 0.5 fp = 0 From 9a181cca5572040f50315412fa3cdf8ad749fcb3 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 9 Jul 2024 22:12:19 -0700 Subject: [PATCH 214/231] fixes --- examples/qc/benchmarks/benchmarks.jl | 2 +- examples/qc/benchmarks/main.jl | 2 +- examples/qc/benchmarks/tool.jl | 2 +- stats/renamer.py | 4 ++++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 6056ad4c..adaddf09 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -288,7 +288,7 @@ function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) lpr_eq_expanded = Dice.expand_logprs(l, lpr_eq) # diff_test_typecheck(sample, Dice.frombits(sample, Dict())) meets = m.consider(sample) - @assert meets + # @assert meets meets && (num_meeting += 1) loss_here, actual_loss_here = if meets || (m.p.rand_forgiveness && rand(rs.rng) < m.p.forgiveness) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index dcd54ed4..d256682e 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -66,7 +66,7 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ [ # ApproxSTLCConstructorEntropy() => lr, # MLELossConfig{STLC}(NumApps(), Linear()) => lr, - SamplingEntropy{STLC}( + SamplingEntropy{RBT}( resampling_frequency=resampling_frequency, samples_per_batch=samples_per_batch, property=property, diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index ceda258c..4fd30182 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -53,7 +53,7 @@ if isempty(ARGS) num_dependents=[:size,:parent_color,:stack_tail], stack_size=2, intwidth=6, - # ) + ) lr = 0.5 fp = 0 # g_p = LangDerivedGenerator{BST}( diff --git a/stats/renamer.py b/stats/renamer.py index 73702d26..e6facd76 100755 --- a/stats/renamer.py +++ b/stats/renamer.py @@ -1,6 +1,7 @@ #!/usr/bin/env python rootdir = "/space/tjoa/tuning-output/v56_rbt_thin" # rootdir = "/space/tjoa/tuning-output/v55_stlc_faster" +rootdir = "/space2/tjoa/tuning-output/v64_fig_rbt" import os import shutil @@ -62,6 +63,7 @@ def get_label(segments, segment_labels): "prop=bookkeepingANDbalanceANDorder": "", "prop=order": "", "prop=stlcwelltyped": "Well", + "prop=trueproperty": "", # todo: May, Might }, {"failure_penalty=0.0": ""}, @@ -72,7 +74,9 @@ def get_label(segments, segment_labels): }) new += get_label(segments, { "0.3": "LR30", + "0.1": "LR10", "0.03": "LR03", + "0.01": "LR01", }) # new += get_label(segments, { # "ty-sizes=Main.ColorKVTree.t-6-Main.Color.t-0": "Sz6", From e6ef8ebe5d930132afd11d90fcd6cfae7572f4ea Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 9 Jul 2024 22:38:38 -0700 Subject: [PATCH 215/231] simpler ace --- examples/qc/benchmarks/benchmarks.jl | 7 ++++- examples/qc/benchmarks/lib/lib.jl | 1 + examples/qc/benchmarks/main.jl | 47 +++++++++++++++------------- examples/qc/benchmarks/tool.jl | 27 ++++++++-------- 4 files changed, 47 insertions(+), 35 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index adaddf09..a9ed0204 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -1109,7 +1109,11 @@ end function generate(rs::RunState, p::LangBespokeSTLCGenerator) prog = gen_expr_lang(p.expr_size, p.typ_size) res, prim_map, function_results = interp(rs, prog) - STLCGeneration(res, function_results["genExpr"]) + STLCGeneration(res, [ + interp(rs, gen_expr_lang(size, p.typ_size))[1] + for size in 0:p.expr_size + ]) + # STLCGeneration(res, function_results["genExpr"]) end function generation_params_emit_stats(rs::RunState, p::LangBespokeSTLCGenerator, s) @@ -1170,6 +1174,7 @@ struct ApproxSTLCConstructorEntropy <: LossConfig{STLC} end to_subpath(::ApproxSTLCConstructorEntropy) = ["approx_entropy"] function create_loss_manager(rs::RunState, p::ApproxSTLCConstructorEntropy, generation) println_flush(rs.io, "Building computation graph for $(p)...") + @assert length(generation.constructors_overapproximation) == rs.p.expr_size + 1 time_build_loss = @elapsed loss = sum( neg_entropy(opt_ctor_to_id(ctor), values(stlc_ctor_to_id), ignore_non_support=true) for ctor in generation.constructors_overapproximation diff --git a/examples/qc/benchmarks/lib/lib.jl b/examples/qc/benchmarks/lib/lib.jl index 95b3e01d..34759f00 100644 --- a/examples/qc/benchmarks/lib/lib.jl +++ b/examples/qc/benchmarks/lib/lib.jl @@ -11,6 +11,7 @@ struct RunState out_dir::String rng::AbstractRNG prim_map + p end include("lang.jl") diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index d256682e..83ad25a5 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -1,22 +1,22 @@ include("benchmarks.jl") GENERATION_PARAMS_LIST = [ - # LangBespokeSTLCGenerator( - # expr_size=5, - # typ_size=2, - # ), + LangBespokeSTLCGenerator( + expr_size=5, + typ_size=2, + ), # LangSiblingDerivedGenerator{STLC}( # root_ty=Expr.t, # ty_sizes=[Expr.t=>5, Typ.t=>2], # stack_size=2, # intwidth=3, # ) - LangSiblingDerivedGenerator{RBT}( - root_ty=ColorKVTree.t, - ty_sizes=[ColorKVTree.t=>4, Color.t=>0], - stack_size=2, - intwidth=3, - ) + # LangSiblingDerivedGenerator{RBT}( + # root_ty=ColorKVTree.t, + # ty_sizes=[ColorKVTree.t=>4, Color.t=>0], + # stack_size=2, + # intwidth=3, + # ) # LangSiblingDerivedGenerator{BST}( # root_ty=KVTree.t, # ty_sizes=[KVTree.t=>4], @@ -37,13 +37,18 @@ PROPERTY_LIST = [MultipleInvariants([ OrderInvariant(), ]), TrueProperty{RBT}()] + SAMPLES_PER_BATCH_LIST = [200] EPOCHS_LIST = [2000] # SAMPLES_PER_BATCH_LIST = [nothing] BOUND_LIST = [0, 0.1] + EQ_LIST = [:prob_equals] +PROPERTY_LIST = [nothing] +BOUND_LIST = [nothing] + n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, FORIGIVENESS_LIST, RAND_FORIGIVENESS_LIST, PROPERTY_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST, EQ_LIST, BOUND_LIST])) println(n_runs) @assert n_runs <= 12 @@ -64,18 +69,18 @@ println() LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ - # ApproxSTLCConstructorEntropy() => lr, + ApproxSTLCConstructorEntropy() => lr, # MLELossConfig{STLC}(NumApps(), Linear()) => lr, - SamplingEntropy{RBT}( - resampling_frequency=resampling_frequency, - samples_per_batch=samples_per_batch, - property=property, - eq=eq, - failure_penalty=fp, - forgiveness=forgiveness, - rand_forgiveness=rand_forgiveness, - keyf=:num_apps, - ) => lr, + # SamplingEntropy{RBT}( + # resampling_frequency=resampling_frequency, + # samples_per_batch=samples_per_batch, + # property=property, + # eq=eq, + # failure_penalty=fp, + # forgiveness=forgiveness, + # rand_forgiveness=rand_forgiveness, + # keyf=:num_apps, + # ) => lr, # # SamplingEntropy{BST}( # resampling_frequency=resampling_frequency, # samples_per_batch=samples_per_batch, diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 4fd30182..2ce470ec 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -19,6 +19,7 @@ TAG = "v61_stlc_bespoke_se_force_meets" TAG = "v62_ex_unif_stlc" TAG = "v63_ex_unif_stlc_entropy" TAG = "v64_fig_rbt" +TAG = "v65_simpler_ace" # TAG = "v59_repro" OUT_TOP_DIR = "/space2/tjoa/tuning-output" @@ -90,18 +91,18 @@ if isempty(ARGS) # MLELossConfig{STLC}(NumApps(), Linear()) => lr, # Apps entropy - SamplingEntropy{STLC}( - resampling_frequency=1, - samples_per_batch=50, - property=TrueProperty{STLC}(), - eq=:prob_equals, - failure_penalty=fp, - forgiveness=0, - rand_forgiveness=true, - keyf=:num_apps, - ) => lr, - - # ApproxSTLCConstructorEntropy() => lr, + # SamplingEntropy{STLC}( + # resampling_frequency=1, + # samples_per_batch=50, + # property=TrueProperty{STLC}(), + # eq=:prob_equals, + # failure_penalty=fp, + # forgiveness=0, + # rand_forgiveness=true, + # keyf=:num_apps, + # ) => lr, + + ApproxSTLCConstructorEntropy() => lr, # MLELossConfig{STLC}(NumApps(), Linear()) => lr, ] @@ -181,7 +182,7 @@ if isfile(log_path) && !allow_overwrite exit(1) end mkpath(out_dir) -rs = RunState(Valuation(), Dict{String,ADNode}(), open(log_path, "w"), out_dir, MersenneTwister(SEED), nothing) +rs = RunState(Valuation(), Dict{String,ADNode}(), open(log_path, "w"), out_dir, MersenneTwister(SEED), nothing,generation_params) println(stderr, "Logging to $(log_path)\n") From 630d819bcbbccac9d9ef3f1cc688babebf12f3bc Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 9 Jul 2024 22:40:16 -0700 Subject: [PATCH 216/231] fix --- examples/qc/benchmarks/main.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 83ad25a5..876abe2c 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -42,12 +42,11 @@ SAMPLES_PER_BATCH_LIST = [200] EPOCHS_LIST = [2000] # SAMPLES_PER_BATCH_LIST = [nothing] -BOUND_LIST = [0, 0.1] +BOUND_LIST = [0.1] EQ_LIST = [:prob_equals] PROPERTY_LIST = [nothing] -BOUND_LIST = [nothing] n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, FORIGIVENESS_LIST, RAND_FORIGIVENESS_LIST, PROPERTY_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST, EQ_LIST, BOUND_LIST])) println(n_runs) From dcebc81411267451df6c711c70b7543d05be7bac Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 9 Jul 2024 23:03:42 -0700 Subject: [PATCH 217/231] no samples --- examples/qc/benchmarks/benchmarks.jl | 126 +++++++++++++-------------- stats/renamer.py | 4 +- stats/stats.py | 16 +--- 3 files changed, 69 insertions(+), 77 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index a9ed0204..e83a8767 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -60,64 +60,64 @@ function run_benchmark( end end - if T == STLC - bespoke = generation_params isa LangBespokeSTLCGenerator - samples_to_take = 10_000 - println_flush(rs.io, "Taking $(samples_to_take) metric samples $(bespoke)...") - - metrics = [NumApps(), TermSize()] - metric_to_cts = Dict(metric => Dict() for metric in metrics) - - a = ADComputer(rs.var_vals) - time_sample = @elapsed with_concrete_ad_flips(rs.var_vals, value(generation)) do - for _ in 1:samples_to_take - sample = sample_as_dist(rs.rng, a, value(generation)) - is_valid = check_property(STLCWellTyped(), sample) - @assert !bespoke || is_valid - for (metric, cts) in metric_to_cts - key = ( - is_valid, - Dice.frombits( - compute_metric(metric, STLCGeneration(sample,[])), - Dict()) - ) - get!(cts, key, 0) - cts[key] += 1 - end - end - end - println_loud(rs, " $(time_sample) seconds") - println_loud(rs, metric_to_cts) - - for (metric, cts) in metric_to_cts - filename = joinpath(rs.out_dir, "sampled_$(samples_to_take)_dist_$(name(metric))_$(s).csv") - open(filename, "w") do file - min_metric_val = minimum( - metric_val - for (valid, metric_val) in keys(cts) - ) - @assert min_metric_val >= 0 - max_metric_val = maximum( - metric_val - for (valid, metric_val) in keys(cts) - ) - - valids = if bespoke - [true] else [true, false] end - println(file, join([ - if valid "$(metric_val)" else "$(metric_val)!" end - for metric_val in 0:max_metric_val - for valid in valids + # if T == STLC + # bespoke = generation_params isa LangBespokeSTLCGenerator + # samples_to_take = 10_000 + # println_flush(rs.io, "Taking $(samples_to_take) metric samples $(bespoke)...") + + # metrics = [NumApps(), TermSize()] + # metric_to_cts = Dict(metric => Dict() for metric in metrics) + + # a = ADComputer(rs.var_vals) + # time_sample = @elapsed with_concrete_ad_flips(rs.var_vals, value(generation)) do + # for _ in 1:samples_to_take + # sample = sample_as_dist(rs.rng, a, value(generation)) + # is_valid = check_property(STLCWellTyped(), sample) + # @assert !bespoke || is_valid + # for (metric, cts) in metric_to_cts + # key = ( + # is_valid, + # Dice.frombits( + # compute_metric(metric, STLCGeneration(sample,[])), + # Dict()) + # ) + # get!(cts, key, 0) + # cts[key] += 1 + # end + # end + # end + # println_loud(rs, " $(time_sample) seconds") + # println_loud(rs, metric_to_cts) + + # for (metric, cts) in metric_to_cts + # filename = joinpath(rs.out_dir, "sampled_$(samples_to_take)_dist_$(name(metric))_$(s).csv") + # open(filename, "w") do file + # min_metric_val = minimum( + # metric_val + # for (valid, metric_val) in keys(cts) + # ) + # @assert min_metric_val >= 0 + # max_metric_val = maximum( + # metric_val + # for (valid, metric_val) in keys(cts) + # ) + + # valids = if bespoke + # [true] else [true, false] end + # println(file, join([ + # if valid "$(metric_val)" else "$(metric_val)!" end + # for metric_val in 0:max_metric_val + # for valid in valids - ], "\t")) - println(file, join([ - get(cts, (valid, metric_val), 0) - for metric_val in 0:max_metric_val - for valid in valids - ], "\t")) - end - end - end + # ], "\t")) + # println(file, join([ + # get(cts, (valid, metric_val), 0) + # for metric_val in 0:max_metric_val + # for valid in valids + # ], "\t")) + # end + # end + # end println(rs.io) end @@ -482,12 +482,12 @@ struct STLCGeneration <: Generation{STLC} constructors_overapproximation::Vector{OptExpr.t} end function generation_emit_stats(rs::RunState, g::STLCGeneration, s::String) - println_flush(rs.io, "Saving samples...") - time_sample = @elapsed with_concrete_ad_flips(rs.var_vals, g.e) do - save_samples(rs, joinpath(rs.out_dir, "terms_$(s).txt"), g.e) - end - println(rs.io, " $(time_sample) seconds") - println(rs.io) + # println_flush(rs.io, "Saving samples...") + # time_sample = @elapsed with_concrete_ad_flips(rs.var_vals, g.e) do + # save_samples(rs, joinpath(rs.out_dir, "terms_$(s).txt"), g.e) + # end + # println(rs.io, " $(time_sample) seconds") + # println(rs.io) end value(g::STLCGeneration) = g.e diff --git a/stats/renamer.py b/stats/renamer.py index e6facd76..66e09a20 100755 --- a/stats/renamer.py +++ b/stats/renamer.py @@ -60,7 +60,7 @@ def get_label(segments, segment_labels): "eq=prob_equals": "Eq", }, { - "prop=bookkeepingANDbalanceANDorder": "", + "prop=bookkeepingANDbalanceANDorder": "Valid", "prop=order": "", "prop=stlcwelltyped": "Well", "prop=trueproperty": "", @@ -99,7 +99,7 @@ def get_label(segments, segment_labels): }) new += "Generator.v" - assert new not in filename_to_dir, f"{new} {filename_to_dir}" + assert new not in filename_to_dir, f"{new}\n{root}\n{filename_to_dir[new]}" filename_to_dir[new] = root for new, root in filename_to_dir.items(): diff --git a/stats/stats.py b/stats/stats.py index 0697eebe..bcde8ce6 100755 --- a/stats/stats.py +++ b/stats/stats.py @@ -9,7 +9,7 @@ from typing import List, Callable WORKLOAD = "RBT" -ORDER_ONLY = True +ORDER_ONLY = False ORDER: List[str] = { # Put rows in this order and also assert that these generators exist "STLC": [ # # class: bespoke @@ -67,14 +67,6 @@ # "LSDEq2Generator", # "LSDExcept2Generator", # "LSDGenerator", -"R_LSDEqBound05Generator", -"R_LSDEqBound20Generator", -"R_LSDEqGenerator", -"R_LSDEqBound10Generator", -"R_LSDExceptBound05Generator", -"R_LSDExceptBound20Generator", -"R_LSDExceptGenerator", -"R_LSDExceptBound10Generator", ], "BST": [ @@ -86,9 +78,9 @@ ] }[WORKLOAD] -STRAT_DIR = f"/space/tjoa/etna/workloads/Coq/{WORKLOAD}/Strategies/" -OUT_DIR = f"/space/tjoa/Dice.jl/stats/{WORKLOAD}" -COQ_PROJECT_DIR = f"/space/tjoa/etna/workloads/Coq/{WORKLOAD}" +STRAT_DIR = f"/scratch/tjoa/etna/workloads/Coq/{WORKLOAD}/Strategies/" +OUT_DIR = f"/scratch/tjoa/Dice.jl/stats/{WORKLOAD}" +COQ_PROJECT_DIR = f"/scratch/tjoa/etna/workloads/Coq/{WORKLOAD}" NUM_TESTS = 100_000 @dataclass From c4aa247bb2c74f81c5b32f433cf3e8f6ece763e3 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Tue, 9 Jul 2024 23:46:58 -0700 Subject: [PATCH 218/231] rbt --- examples/qc/benchmarks/main.jl | 46 +++++++++++++++++----------------- examples/qc/benchmarks/tool.jl | 1 + 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 876abe2c..f9a501b7 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -1,22 +1,22 @@ include("benchmarks.jl") GENERATION_PARAMS_LIST = [ - LangBespokeSTLCGenerator( - expr_size=5, - typ_size=2, - ), + # LangBespokeSTLCGenerator( + # expr_size=5, + # typ_size=2, + # ), # LangSiblingDerivedGenerator{STLC}( # root_ty=Expr.t, # ty_sizes=[Expr.t=>5, Typ.t=>2], # stack_size=2, # intwidth=3, # ) - # LangSiblingDerivedGenerator{RBT}( - # root_ty=ColorKVTree.t, - # ty_sizes=[ColorKVTree.t=>4, Color.t=>0], - # stack_size=2, - # intwidth=3, - # ) + LangSiblingDerivedGenerator{RBT}( + root_ty=ColorKVTree.t, + ty_sizes=[ColorKVTree.t=>4, Color.t=>0], + stack_size=2, + intwidth=3, + ) # LangSiblingDerivedGenerator{BST}( # root_ty=KVTree.t, # ty_sizes=[KVTree.t=>4], @@ -25,7 +25,7 @@ GENERATION_PARAMS_LIST = [ # ), ] # LR_LIST = [0.3] -LR_LIST = [0.01, 0.03, 0.1] +LR_LIST = [0.3] FP_LIST = [0.] FORIGIVENESS_LIST = [0] RAND_FORIGIVENESS_LIST = [true] @@ -42,7 +42,7 @@ SAMPLES_PER_BATCH_LIST = [200] EPOCHS_LIST = [2000] # SAMPLES_PER_BATCH_LIST = [nothing] -BOUND_LIST = [0.1] +BOUND_LIST = [0, 0.1] EQ_LIST = [:prob_equals] @@ -68,18 +68,18 @@ println() LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ - ApproxSTLCConstructorEntropy() => lr, + # ApproxSTLCConstructorEntropy() => lr, # MLELossConfig{STLC}(NumApps(), Linear()) => lr, - # SamplingEntropy{RBT}( - # resampling_frequency=resampling_frequency, - # samples_per_batch=samples_per_batch, - # property=property, - # eq=eq, - # failure_penalty=fp, - # forgiveness=forgiveness, - # rand_forgiveness=rand_forgiveness, - # keyf=:num_apps, - # ) => lr, + SamplingEntropy{RBT}( + resampling_frequency=resampling_frequency, + samples_per_batch=samples_per_batch, + property=property, + eq=eq, + failure_penalty=fp, + forgiveness=forgiveness, + rand_forgiveness=rand_forgiveness, + keyf=:identity, + ) => lr, # # SamplingEntropy{BST}( # resampling_frequency=resampling_frequency, # samples_per_batch=samples_per_batch, diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 2ce470ec..7ba8f914 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -20,6 +20,7 @@ TAG = "v62_ex_unif_stlc" TAG = "v63_ex_unif_stlc_entropy" TAG = "v64_fig_rbt" TAG = "v65_simpler_ace" +TAG = "v66_fig2_rbt" # TAG = "v59_repro" OUT_TOP_DIR = "/space2/tjoa/tuning-output" From 1d1cf397399fb7e6754601edf4632586f4b77bba Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 10 Jul 2024 16:02:36 -0700 Subject: [PATCH 219/231] rbt for unif depth --- examples/qc/benchmarks/main.jl | 42 +++++++++++++++++----------------- examples/qc/benchmarks/tool.jl | 1 + stats/renamer.py | 2 +- 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index f9a501b7..1a6baa3a 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -25,18 +25,20 @@ GENERATION_PARAMS_LIST = [ # ), ] # LR_LIST = [0.3] -LR_LIST = [0.3] +LR_LIST = [0.003, 0.01, 0.03, 0.1, 0.3] FP_LIST = [0.] FORIGIVENESS_LIST = [0] RAND_FORIGIVENESS_LIST = [true] RESAMPLING_FREQUENCY_LIST = [2] # PROPERTY_LIST = [BSTOrderInvariant()] -PROPERTY_LIST = [MultipleInvariants([ - BookkeepingInvariant(), - BalanceInvariant(), - OrderInvariant(), -]), -TrueProperty{RBT}()] +# PROPERTY_LIST = [MultipleInvariants([ +# BookkeepingInvariant(), +# BalanceInvariant(), +# OrderInvariant(), +# ]), +# TrueProperty{RBT}()] + +PROPERTY_LIST = [nothing] SAMPLES_PER_BATCH_LIST = [200] EPOCHS_LIST = [2000] @@ -46,8 +48,6 @@ BOUND_LIST = [0, 0.1] EQ_LIST = [:prob_equals] -PROPERTY_LIST = [nothing] - n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, FORIGIVENESS_LIST, RAND_FORIGIVENESS_LIST, PROPERTY_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST, EQ_LIST, BOUND_LIST])) println(n_runs) @assert n_runs <= 12 @@ -69,18 +69,18 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ # ApproxSTLCConstructorEntropy() => lr, - # MLELossConfig{STLC}(NumApps(), Linear()) => lr, - SamplingEntropy{RBT}( - resampling_frequency=resampling_frequency, - samples_per_batch=samples_per_batch, - property=property, - eq=eq, - failure_penalty=fp, - forgiveness=forgiveness, - rand_forgiveness=rand_forgiveness, - keyf=:identity, - ) => lr, -# # SamplingEntropy{BST}( + MLELossConfig{RBT}(RBTDepth(), Uniform()) => lr, +# SamplingEntropy{RBT}( +# resampling_frequency=resampling_frequency, +# samples_per_batch=samples_per_batch, +# property=property, +# eq=eq, +# failure_penalty=fp, +# forgiveness=forgiveness, +# rand_forgiveness=rand_forgiveness, +# keyf=:identity, +# ) => lr, +# # # SamplingEntropy{BST}( # resampling_frequency=resampling_frequency, # samples_per_batch=samples_per_batch, # property=BSTOrderInvariant(), diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 7ba8f914..e775d80c 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -21,6 +21,7 @@ TAG = "v63_ex_unif_stlc_entropy" TAG = "v64_fig_rbt" TAG = "v65_simpler_ace" TAG = "v66_fig2_rbt" +TAG = "v67_rbt_unif_apps" # TAG = "v59_repro" OUT_TOP_DIR = "/space2/tjoa/tuning-output" diff --git a/stats/renamer.py b/stats/renamer.py index 66e09a20..cc561221 100755 --- a/stats/renamer.py +++ b/stats/renamer.py @@ -1,7 +1,7 @@ #!/usr/bin/env python rootdir = "/space/tjoa/tuning-output/v56_rbt_thin" # rootdir = "/space/tjoa/tuning-output/v55_stlc_faster" -rootdir = "/space2/tjoa/tuning-output/v64_fig_rbt" +rootdir = "/space2/tjoa/tuning-output/v66_fig2_rbt" import os import shutil From 6b794812fe19ef40b0e47711b6c08dfef6992090 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 10 Jul 2024 16:04:05 -0700 Subject: [PATCH 220/231] rbt speconly --- examples/qc/benchmarks/main.jl | 7 ++++++- examples/qc/benchmarks/tool.jl | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 1a6baa3a..f0d1a783 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -69,7 +69,12 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ # ApproxSTLCConstructorEntropy() => lr, - MLELossConfig{RBT}(RBTDepth(), Uniform()) => lr, + SatisfyPropertyLoss{RBT}(MultipleInvariants([ + BookkeepingInvariant(), + BalanceInvariant(), + OrderInvariant(), + ])) => lr, + # MLELossConfig{RBT}(RBTDepth(), Uniform()) => lr, # SamplingEntropy{RBT}( # resampling_frequency=resampling_frequency, # samples_per_batch=samples_per_batch, diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index e775d80c..05a7c12c 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -22,6 +22,7 @@ TAG = "v64_fig_rbt" TAG = "v65_simpler_ace" TAG = "v66_fig2_rbt" TAG = "v67_rbt_unif_apps" +TAG = "v68_rbt_spec" # TAG = "v59_repro" OUT_TOP_DIR = "/space2/tjoa/tuning-output" From c6374535e77ca3e4a1fc32ecb6310da07a0d4182 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Sun, 14 Jul 2024 12:14:16 -0700 Subject: [PATCH 221/231] after deadine --- stats/stats.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stats/stats.py b/stats/stats.py index bcde8ce6..c11dac98 100755 --- a/stats/stats.py +++ b/stats/stats.py @@ -9,7 +9,7 @@ from typing import List, Callable WORKLOAD = "RBT" -ORDER_ONLY = False +ORDER_ONLY = True ORDER: List[str] = { # Put rows in this order and also assert that these generators exist "STLC": [ # # class: bespoke @@ -61,6 +61,8 @@ ], "RBT": [ + "SpecGenerator", + "SpecBoundGenerator", # "TypeBasedGenerator", # "LSDEqGenerator", # "LSDExceptNumsGenerator", From 78a5d2c27c3f83a5a73fecdbe5054c1c6ffa0f7f Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 15 Jul 2024 23:24:18 -0700 Subject: [PATCH 222/231] attempt faster stlc --- examples/qc/benchmarks/main.jl | 62 +++++++++++++++++----------------- examples/qc/benchmarks/tool.jl | 1 + 2 files changed, 32 insertions(+), 31 deletions(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index f0d1a783..3570a8fd 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -5,18 +5,18 @@ GENERATION_PARAMS_LIST = [ # expr_size=5, # typ_size=2, # ), - # LangSiblingDerivedGenerator{STLC}( - # root_ty=Expr.t, - # ty_sizes=[Expr.t=>5, Typ.t=>2], + LangSiblingDerivedGenerator{STLC}( + root_ty=Expr.t, + ty_sizes=[Expr.t=>5, Typ.t=>2], + stack_size=1, + intwidth=3, + ) + # LangSiblingDerivedGenerator{RBT}( + # root_ty=ColorKVTree.t, + # ty_sizes=[ColorKVTree.t=>4, Color.t=>0], # stack_size=2, # intwidth=3, # ) - LangSiblingDerivedGenerator{RBT}( - root_ty=ColorKVTree.t, - ty_sizes=[ColorKVTree.t=>4, Color.t=>0], - stack_size=2, - intwidth=3, - ) # LangSiblingDerivedGenerator{BST}( # root_ty=KVTree.t, # ty_sizes=[KVTree.t=>4], @@ -25,11 +25,11 @@ GENERATION_PARAMS_LIST = [ # ), ] # LR_LIST = [0.3] -LR_LIST = [0.003, 0.01, 0.03, 0.1, 0.3] +LR_LIST = [0.01, 0.03, 0.1, 0.3] FP_LIST = [0.] FORIGIVENESS_LIST = [0] RAND_FORIGIVENESS_LIST = [true] -RESAMPLING_FREQUENCY_LIST = [2] +RESAMPLING_FREQUENCY_LIST = [1,2,5] # PROPERTY_LIST = [BSTOrderInvariant()] # PROPERTY_LIST = [MultipleInvariants([ # BookkeepingInvariant(), @@ -40,17 +40,17 @@ RESAMPLING_FREQUENCY_LIST = [2] PROPERTY_LIST = [nothing] -SAMPLES_PER_BATCH_LIST = [200] -EPOCHS_LIST = [2000] +SAMPLES_PER_BATCH_LIST = [50] +EPOCHS_LIST = [500,1000] # SAMPLES_PER_BATCH_LIST = [nothing] -BOUND_LIST = [0, 0.1] +BOUND_LIST = [0.1] EQ_LIST = [:prob_equals] n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, FORIGIVENESS_LIST, RAND_FORIGIVENESS_LIST, PROPERTY_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST, EQ_LIST, BOUND_LIST])) println(n_runs) -@assert n_runs <= 12 +@assert n_runs <= 24 @show GENERATION_PARAMS_LIST @show LR_LIST @@ -69,23 +69,23 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ # ApproxSTLCConstructorEntropy() => lr, - SatisfyPropertyLoss{RBT}(MultipleInvariants([ - BookkeepingInvariant(), - BalanceInvariant(), - OrderInvariant(), - ])) => lr, + # SatisfyPropertyLoss{RBT}(MultipleInvariants([ + # BookkeepingInvariant(), + # BalanceInvariant(), + # OrderInvariant(), + # ])) => lr, # MLELossConfig{RBT}(RBTDepth(), Uniform()) => lr, -# SamplingEntropy{RBT}( -# resampling_frequency=resampling_frequency, -# samples_per_batch=samples_per_batch, -# property=property, -# eq=eq, -# failure_penalty=fp, -# forgiveness=forgiveness, -# rand_forgiveness=rand_forgiveness, -# keyf=:identity, -# ) => lr, -# # # SamplingEntropy{BST}( + SamplingEntropy{STLC}( + resampling_frequency=resampling_frequency, + samples_per_batch=samples_per_batch, + property=property, + eq=eq, + failure_penalty=fp, + forgiveness=forgiveness, + rand_forgiveness=rand_forgiveness, + keyf=:identity, + ) => lr, + # SamplingEntropy{BST}( # resampling_frequency=resampling_frequency, # samples_per_batch=samples_per_batch, # property=BSTOrderInvariant(), diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 05a7c12c..6a0cde53 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -23,6 +23,7 @@ TAG = "v65_simpler_ace" TAG = "v66_fig2_rbt" TAG = "v67_rbt_unif_apps" TAG = "v68_rbt_spec" +TAG = "v69_attempt_stlctb_faster" # TAG = "v59_repro" OUT_TOP_DIR = "/space2/tjoa/tuning-output" From d2f1ab680239046b3736586461d5013630f6beae Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Mon, 15 Jul 2024 23:26:04 -0700 Subject: [PATCH 223/231] fix typo --- examples/qc/benchmarks/main.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 3570a8fd..ef8399ee 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -30,7 +30,7 @@ FP_LIST = [0.] FORIGIVENESS_LIST = [0] RAND_FORIGIVENESS_LIST = [true] RESAMPLING_FREQUENCY_LIST = [1,2,5] -# PROPERTY_LIST = [BSTOrderInvariant()] +PROPERTY_LIST = [STLCWellTyped()] # PROPERTY_LIST = [MultipleInvariants([ # BookkeepingInvariant(), # BalanceInvariant(), @@ -38,7 +38,7 @@ RESAMPLING_FREQUENCY_LIST = [1,2,5] # ]), # TrueProperty{RBT}()] -PROPERTY_LIST = [nothing] +# PROPERTY_LIST = [nothing] SAMPLES_PER_BATCH_LIST = [50] EPOCHS_LIST = [500,1000] From b6432be2985e311c9ee98c32a801e4d4a419cfbb Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 17 Jul 2024 18:55:23 -0700 Subject: [PATCH 224/231] bools fig --- examples/qc/benchmarks/benchmarks.jl | 22 +++++++++---------- examples/qc/benchmarks/main.jl | 32 ++++++++++++++-------------- examples/qc/benchmarks/tool.jl | 1 + stats/renamer.py | 22 +++++++++++++++---- 4 files changed, 46 insertions(+), 31 deletions(-) diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index e83a8767..058c7adb 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -197,17 +197,17 @@ struct SimpleLossMgr <: LossMgr end end function produce_loss(rs::RunState, m::SimpleLossMgr, epoch::Integer) - # dist_path = joinpath(rs.out_dir, "dist.csv") - # if epoch == 1 - # clear_file(dist_path) - # end - # d = pr_mixed(rs.var_vals)(m.val) - # open(dist_path, "a") do f - # println(f, join([d[i] for i in 0:15],"\t")) - # end - # if epoch == EPOCHS - # mk_areaplot(dist_path) - # end + dist_path = joinpath(rs.out_dir, "dist.csv") + if epoch == 1 + clear_file(dist_path) + end + d = pr_mixed(rs.var_vals)(m.val) + open(dist_path, "a") do f + println(f, join([d[i] for i in 0:7],"\t")) + end + if epoch == EPOCHS + mk_areaplot(dist_path) + end m.loss end diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index ef8399ee..280327f0 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -41,7 +41,7 @@ PROPERTY_LIST = [STLCWellTyped()] # PROPERTY_LIST = [nothing] SAMPLES_PER_BATCH_LIST = [50] -EPOCHS_LIST = [500,1000] +EPOCHS_LIST = [500] # SAMPLES_PER_BATCH_LIST = [nothing] BOUND_LIST = [0.1] @@ -50,7 +50,7 @@ EQ_LIST = [:prob_equals] n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, FORIGIVENESS_LIST, RAND_FORIGIVENESS_LIST, PROPERTY_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST, EQ_LIST, BOUND_LIST])) println(n_runs) -@assert n_runs <= 24 +@assert n_runs <= 12 @show GENERATION_PARAMS_LIST @show LR_LIST @@ -118,20 +118,20 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ])) -# N = 4 -# GENERATION_PARAMS_LIST = [Flips{N}()] -# # LR_LIST = [0.0001, 0.0003, 0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1, 3, 10, 30, 100, 300] -# LR_LIST = [0.0001, 0.0002, 0.0005, 0.001, 0.002, 0.005, 0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 3, 10, 30, 100] -# LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ -# ( -# [ -# # BoolsExactEntropy{3}() => lr, -# SamplingEntropy{Bools{N}}(resampling_frequency=10, samples_per_batch=100) => lr, -# ] -# for lr in LR_LIST -# ), -# ])) -# EPOCHS_LIST = [10_000] +N = 3 +GENERATION_PARAMS_LIST = [Flips{N}()] +# LR_LIST = [0.0001, 0.0003, 0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1, 3, 10, 30, 100, 300] +LR_LIST = [0.0001, 0.0002, 0.0005, 0.001, 0.002, 0.005, 0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 3, 10, 30, 100] +LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ + ( + [ + # BoolsExactEntropy{3}() => lr, + SamplingEntropy{Bools{N}}(resampling_frequency=10, samples_per_batch=100) => lr, + ] + for lr in LR_LIST + ), +])) +EPOCHS_LIST = [100] TOOL_PATH = "examples/qc/benchmarks/tool.jl" diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl index 6a0cde53..040a641f 100644 --- a/examples/qc/benchmarks/tool.jl +++ b/examples/qc/benchmarks/tool.jl @@ -24,6 +24,7 @@ TAG = "v66_fig2_rbt" TAG = "v67_rbt_unif_apps" TAG = "v68_rbt_spec" TAG = "v69_attempt_stlctb_faster" +TAG = "v70_bools_fig" # TAG = "v59_repro" OUT_TOP_DIR = "/space2/tjoa/tuning-output" diff --git a/stats/renamer.py b/stats/renamer.py index cc561221..6ed891d8 100755 --- a/stats/renamer.py +++ b/stats/renamer.py @@ -1,7 +1,9 @@ #!/usr/bin/env python rootdir = "/space/tjoa/tuning-output/v56_rbt_thin" # rootdir = "/space/tjoa/tuning-output/v55_stlc_faster" + rootdir = "/space2/tjoa/tuning-output/v66_fig2_rbt" +rootdir = "/space2/tjoa/tuning-output/v69_attempt_stlctb_faster" import os import shutil @@ -38,14 +40,19 @@ def get_label(segments, segment_labels): new += get_label(segments, { "langbespoke": "Bespoke", "langderived": ("LD", [ - {"stack_size=2": ""}, + { + "stack_size=2": "", + }, { "intwidth=3": "Thin", "intwidth=6": "", }, ]), "langsiblingderived": ("LSD", [ - {"stack_size=2": ""}, + { + "stack_size=2": "", + "stack_size=1": "Stack1", + }, { "intwidth=3": "Thin", "intwidth=6": "", @@ -94,8 +101,15 @@ def get_label(segments, segment_labels): "bound=0.2": "Bound20", }) new += get_label(segments, { - "freq=2-spb=200": "SPB200", - "freq=2-spb=50": "SPB50", + "freq=5-spb=200": "Freq5SPB200", + "freq=5-spb=100": "Freq5SPB100", + "freq=5-spb=50": "Freq5SPB50", + "freq=2-spb=200": "Freq2SPB200", + "freq=2-spb=100": "Freq2SPB100", + "freq=2-spb=50": "Freq2SPB50", + "freq=1-spb=200": "Freq1SPB200", + "freq=1-spb=100": "Freq1SPB100", + "freq=1-spb=50": "Freq1SPB50", }) new += "Generator.v" From 912c5587301c9ad54efe4201cf8f42405cfb00d6 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Wed, 17 Jul 2024 20:57:33 -0700 Subject: [PATCH 225/231] tikz plot --- Project.toml | 4 ++ examples/qc/benchmarks/benchmarks.jl | 63 ++++++++++++++++++---------- examples/qc/benchmarks/main.jl | 11 ++++- 3 files changed, 54 insertions(+), 24 deletions(-) diff --git a/Project.toml b/Project.toml index 88478fd0..0bc2bc39 100644 --- a/Project.toml +++ b/Project.toml @@ -9,13 +9,17 @@ Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" DirectedAcyclicGraphs = "1e6dae5e-d6e2-422d-9af3-452e7a3785ee" Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" +Fontconfig = "186bb1d3-e1f7-5a2c-a377-96d770f13627" Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6" IRTools = "7869d1d1-7146-5819-86e3-90919afe41df" Infiltrator = "5903a43b-9cc3-4c30-8d17-598619ec4e9b" Jive = "ba5e3d4b-8524-549f-bc71-e76ad9e9deed" +LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" +PGFPlotsX = "8314cec4-20b6-5062-9cdb-752b83310925" Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a" +PythonPlot = "274fc56d-3b97-40fa-a1cd-1b4a50311bf9" Revise = "295af30f-e4ad-537b-8983-00126c2a3abe" [compat] diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl index 058c7adb..64c583a4 100644 --- a/examples/qc/benchmarks/benchmarks.jl +++ b/examples/qc/benchmarks/benchmarks.jl @@ -235,17 +235,33 @@ mutable struct SamplingEntropyLossMgr <: LossMgr SamplingEntropyLossMgr(p, val, consider) = new(p, val, consider, [], nothing, nothing, nothing) end +using Plots + +pgfplotsx() + function save_areaplot(path, v) mat = mapreduce(permutedims, vcat, v) torow(v) = reshape(v, 1, length(v)) + fontsize=18 areaplot( mat, labels=torow(["$(i)" for i in 0:size(mat, 2)]), - legend=false, # palette=:lightrainbow) - palette=cgrad(:thermal) + palette=cgrad(:thermal), + tickfontsize=fontsize, + legendfontsize=fontsize, + fontfamily="Palatino Roman", + fontsize=fontsize, + xlabel="Epochs", + ylabel="Probability", + # margin=5Plots.mm, + xlabelfontsize=fontsize, + ylabelfontsize=fontsize, + legend=:outertopright, ) - savefig("$(path).svg") + # savefig("$(path).svg") + savefig("$(path).tikz") + savefig("$(path).tex") end function mk_areaplot(path) @@ -322,26 +338,27 @@ function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) m.current_samples = samples end - # samples_path = joinpath(rs.out_dir, "samples.csv") - # dist_path = joinpath(rs.out_dir, "dist.csv") - # if epoch == 1 - # clear_file(samples_path) - # clear_file(dist_path) - # end - # d = pr_mixed(rs.var_vals)(m.val) - # open(dist_path, "a") do f - # println(f, join([d[i] for i in 0:15],"\t")) - # end - # open(samples_path, "a") do f - # println(f, join([ - # count(s -> prob_equals(s, DistUInt{4}(i)) === true, m.current_samples) - # for i in 0:15 - # ], "\t")) - # end - # if epoch == EPOCHS - # mk_areaplot(samples_path) - # mk_areaplot(dist_path) - # end + N = 3 + samples_path = joinpath(rs.out_dir, "samples.csv") + dist_path = joinpath(rs.out_dir, "dist.csv") + if epoch == 1 + clear_file(samples_path) + clear_file(dist_path) + end + d = pr_mixed(rs.var_vals)(m.val) + open(dist_path, "a") do f + println(f, join([d[i] for i in 0:2^N-1],"\t")) + end + open(samples_path, "a") do f + println(f, join([ + count(s -> prob_equals(s, DistUInt{N}(i)) === true, m.current_samples) + for i in 0:2^N-1 + ], "\t")) + end + if epoch == EPOCHS + mk_areaplot(samples_path) + mk_areaplot(dist_path) + end @assert !isnothing(m.current_loss) m.current_loss diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl index 280327f0..41b60a8b 100644 --- a/examples/qc/benchmarks/main.jl +++ b/examples/qc/benchmarks/main.jl @@ -126,7 +126,16 @@ LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ ( [ # BoolsExactEntropy{3}() => lr, - SamplingEntropy{Bools{N}}(resampling_frequency=10, samples_per_batch=100) => lr, + SamplingEntropy{Bools{N}}( + resampling_frequency=1, + samples_per_batch=300, + property=TrueProperty{Bools{N}}(), + eq=:prob_equals, + failure_penalty=0., + forgiveness=0, + rand_forgiveness=true, + keyf=:identity, + ) => lr, ] for lr in LR_LIST ), From 19293c555614191db96283c940a9475a669398fa Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 18 Jul 2024 01:17:10 -0700 Subject: [PATCH 226/231] remove codecov from CI --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf8b56c4..e5d186f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,6 +33,6 @@ jobs: run: julia --project --check-bounds=yes --depwarn=yes -e 'import Pkg; Pkg.test(; coverage=true)' - - name: Codecov Upload - run: - julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder());' + # - name: Codecov Upload + # run: + # julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder());' From 8c8869b0c62df0eaae6602ded3d02aac4f43092d Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 18 Jul 2024 19:42:11 -0700 Subject: [PATCH 227/231] move tours to tests --- examples/qc/examples/tour_2_learning.jl | 198 ------------------ test/autodiff_pr/learned_cheap_dists.jl | 69 +++--- .../qc/examples => test/tours}/tour_1_core.jl | 38 ++-- test/tours/tour_2_learning.jl | 79 +++++++ 4 files changed, 130 insertions(+), 254 deletions(-) delete mode 100644 examples/qc/examples/tour_2_learning.jl rename {examples/qc/examples => test/tours}/tour_1_core.jl (75%) create mode 100644 test/tours/tour_2_learning.jl diff --git a/examples/qc/examples/tour_2_learning.jl b/examples/qc/examples/tour_2_learning.jl deleted file mode 100644 index bcce4477..00000000 --- a/examples/qc/examples/tour_2_learning.jl +++ /dev/null @@ -1,198 +0,0 @@ -# An introduction to using MLE to learn flip probabilities - -################################################################################ -# Maximizing expression probabilities -################################################################################ -using Revise -using Dice - -# What value of θ maximizes `pr(flip(θ) & flip(θ) & !flip(θ))`? - -# Let's check! -θ = Var("θ") -x = flip(θ) & flip(θ) & !flip(θ) -var_vals = Valuation(θ => 0.5) # as we train by GD, we need to provide starting a value -loss = -LogPr(x) -train!(var_vals, loss, epochs=200, learning_rate=0.1) # mutates var_vals -compute_mixed(var_vals, θ) # ~ 2/3 - -# Optional note! -# In practice, we pass learned prs. through sigmoid to bound in [0, 1]. -# The above example becomes: -θ = sigmoid(Var("θ_before_sigmoid")) -x = flip(θ) & flip(θ) & !flip(θ) -var_vals = Valuation(Var("θ_before_sigmoid") => 0) -loss = -LogPr(x) # symbolic version of log(pr(...)) -train!(var_vals, loss, epochs=200, learning_rate=0.1) -compute_mixed(var_vals, θ) # ~ 2/3 - -################################################################################ -# Approximating datasets -################################################################################ - -# Consider the following probabilistic program with holes. What probability -# will cause x to be true 2/3 of the time? -p_before_sigmoid = Var("p_before_sigmoid") -p = sigmoid(p_before_sigmoid) -b = @dice_ite if flip(p) true else flip(0.5) end - -# We can match this dataset... -dataset = [true, true, false] - -# ...by maximizing this value -antiloss = LogPr(prob_equals(b, true)) + LogPr(prob_equals(b, true)) + LogPr(prob_equals(b, false)) - -var_vals = Valuation(p_before_sigmoid => 0) -train!(var_vals, -antiloss; epochs=2000, learning_rate=0.1) -compute_mixed(var_vals, p) # ~ 1/3 - -# Equivalently, we can use `mle_loss`: -loss = mle_loss([prob_equals(b, x) for x in dataset]) -var_vals = Valuation(p_before_sigmoid => 0) -train!(var_vals, loss; epochs=2000, learning_rate=0.1) -compute_mixed(var_vals, p) # ~ 1/3 - -# Two ways to "check our work" by seeing the original progam's probability. -# The program is true 2/3 of the time, as desired! -pr_mixed(var_vals)(b) # true => ~ 2/3 -compute_mixed(var_vals, exp(LogPr(b))) # ~ 2/3 - -# Here's an example for ints. Lets say we build an int whose bits are flips such -# that it has a uniform distribution over 0, 2, 4, ..., 14. -pre_sigmoid_probs = [Var("b$(i)") for i in 1:4] -probs = [sigmoid(psp) for psp in pre_sigmoid_probs] -n = DistUInt{4}([flip(prob) for prob in probs]) - -dataset = [DistUInt{4}(even) for even in 0:2:14] -loss = mle_loss([prob_equals(n, x) for x in dataset]) - -# Train -var_vals = Valuation(psp => 0 for psp in pre_sigmoid_probs) -train!(var_vals, loss; learning_rate=0.1, epochs=2000) - -# Check the desired probabilities -[compute_mixed(var_vals, prob) for prob in probs] # 0.5, 0.5, 0.5, 0.000626043181613181 - -################################################################################ -###################### TODO: update the rest of this file ###################### -################################################################################ - -# ################################################################################ -# # Uniform list lengths -# ################################################################################ - -# # Consider this recursive function which generates lists up to a certain size -# function gen_list(size) -# size == 0 && return DistNil(DistUInt32) - -# @dice_ite if flip_for("?") -# DistNil(DistUInt32) -# else -# # The flips used in the uniform aren't tracked via flip_for, so we -# # don't learn their probabilities. -# DistCons(uniform(DistUInt32, 0, 10), gen_list(size-1)) -# end -# end - -# # What if we want to learn a probability for ? such that the list lengths are -# # uniformly distributed from 0 to 5? - -# # Note that the distribution of gen_list depends on the initial size passed to -# # the top call. Let's choose to pass in 5 to the top call since we don't want to -# # generate lists larger than that. - -# init_size = 5 -# dataset = [DistUInt32(x) for x in 0:init_size] -# generated = len(gen_list(init_size)) - -# # Distribution over lengths before training -# pr(generated) -# # 0 => 0.5 -# # 1 => 0.25 -# # 2 => 0.12500000000000003 -# # 3 => 0.0625 -# # 4 => 0.03125 -# # 5 => 0.03125 - -# bools_to_maximize = AnyBool[prob_equals(generated, x) for x in dataset] -# train_group_probs!(bools_to_maximize) -# get_group_probs() -# # "?" => 0.25 - -# reset_flips!() - -# ################################################################################ -# # Uniform list lengths with dynamic groups -# ################################################################################ - -# # Suppose instead that we can have the flip probability change depend based on -# # the size in the subcall. -# function gen_list(size) -# size == 0 && return DistNil(DistUInt32) - -# # vvvvv changed -# @dice_ite if flip_for(size) -# DistNil(DistUInt32) -# else -# # The flips used in the uniform aren't tracked via flip_for, so we -# # don't learn their probabilities. -# DistCons(uniform(DistUInt32, 0, 10), gen_list(size-1)) -# end -# end - -# generated = len(gen_list(init_size)) -# bools_to_maximize = AnyBool[prob_equals(generated, x) for x in dataset] -# train_group_probs!(bools_to_maximize) -# get_group_probs() -# # 5 => 0.166667 -# # 4 => 0.2 -# # 2 => 0.333333 -# # 3 => 0.25 -# # 1 => 0.5 - -# ################################################################################ -# # Including evidence -# ################################################################################ - -# # So far, we've been passing a list like [x, y, z, ...] to `train_group_probs`. -# # This chooses flip_for probabilities to maximize Pr(x) * Pr(y) * Pr(z) - -# # We can also pass a list of tuples to `train_group_probs`, like: -# # [(x, evid1), (y, evid2), (z, evid3)] -# # This chooses flip_for probabilities to maximize: -# # Pr(x given evid1) * Pr(y given evid2) * Pr(z given evid3) - -# reset_flips!() - -# # Lets say we know that x was sampled an unknown dist. over 1, 2, and 3 -# x = @dice_ite begin -# if flip_for("f1") -# DistUInt32(1) -# elseif flip_for("f2") -# DistUInt32(2) -# else -# DistUInt32(3) -# end -# end - -# # Given that x is odd, what flip probabilities cause x to be uniformly distributed? -# is_odd(x::DistUInt32) = prob_equals(x % DistUInt32(2), DistUInt32(1)) -# evid = is_odd(x) -# pr(x, evidence=evid) # 1 => 0.6667, 3 => 0.3333 - not what we want - -# train_group_probs!( -# [ -# (prob_equals(x, DistUInt32(1)), evid), -# (prob_equals(x, DistUInt32(3)), evid), -# # Datapoints that indicate x is 2 have no effect under an observation -# # that removes these worlds -# (prob_equals(x, DistUInt32(2)), evid), -# (prob_equals(x, DistUInt32(2)), evid), -# ] -# ) -# get_group_probs() - -# pr(x, evidence=evid) # 1 => 0.5, 3 => 0.5 - -# # More realistic examples for this include demo_sortednatlist.jl and -# # demo_bst.jl. diff --git a/test/autodiff_pr/learned_cheap_dists.jl b/test/autodiff_pr/learned_cheap_dists.jl index 82bda9dc..1542be06 100644 --- a/test/autodiff_pr/learned_cheap_dists.jl +++ b/test/autodiff_pr/learned_cheap_dists.jl @@ -1,11 +1,8 @@ using Test using Dice -function dict_approx(d1::AbstractDict, d2::AbstractDict) - issetequal(keys(d1), keys(d2)) && all( - d1[k] ≈ d2[k] - for k in keys(d1) - ) +function Base.isapprox(d1::AbstractDict, d2::AbstractDict) + issetequal(keys(d1), keys(d2)) && all(isapprox(d1[k], d2[k],rtol=0.01) for k in keys(d1)) end @testset "learned_cheap_dists" begin @@ -41,25 +38,20 @@ end i => compute_mixed(wt_var_to_vals, exp(LogPr(prob_equals(int, DistUInt{width}(i))))) for i in 0:2^width-1 ) - @test dict_approx( - wt_var_to_vals, - Dict( - Var("var0_psp") => -3.2837129282982764, - Var("var1_psp") => -1.734139957995633, - Var("var2_psp") => -0.4254578347528184) + @test wt_var_to_vals ≈ Dict( + Var("var0_psp") => -3.2837129282982764, + Var("var1_psp") => -1.734139957995633, + Var("var2_psp") => -0.4254578347528184 ) - @test dict_approx( - wt_dist, - Dict( - 0 => 0.4954604613881238, - 1 => 0.3237688128294564, - 2 => 0.08747452404585239, - 3 => 0.057162024036790764, - 4 => 0.018574220540662965, - 5 => 0.012137705835969861, - 6 => 0.0032793153600291173, - 7 => 0.002142935963114733 - ) + @test wt_dist ≈ Dict( + 0 => 0.4954604613881238, + 1 => 0.3237688128294564, + 2 => 0.08747452404585239, + 3 => 0.057162024036790764, + 4 => 0.018574220540662965, + 5 => 0.012137705835969861, + 6 => 0.0032793153600291173, + 7 => 0.002142935963114733 ) # KL divergence minimization @@ -78,24 +70,19 @@ end i => compute_mixed(kl_var_to_vals, exp(LogPr(prob_equals(int, DistUInt{width}(i))))) for i in 0:2^width-1 ) - @test dict_approx( - kl_var_to_vals, - Dict( - Var("var0_psp") => -3.2837129282982764, - Var("var1_psp") => -1.734139957995633, - Var("var2_psp") => -0.4254578347528184) + @test kl_var_to_vals ≈ Dict( + Var("var0_psp") => -3.2837129282982764, + Var("var1_psp") => -1.734139957995633, + Var("var2_psp") => -0.4254578347528184 ) - @test dict_approx( - kl_dist, - Dict( - 0 => 0.4954604613881238, - 1 => 0.3237688128294564, - 2 => 0.08747452404585239, - 3 => 0.057162024036790764, - 4 => 0.018574220540662965, - 5 => 0.012137705835969861, - 6 => 0.0032793153600291173, - 7 => 0.002142935963114733 - ) + @test kl_dist ≈ Dict( + 0 => 0.4954604613881238, + 1 => 0.3237688128294564, + 2 => 0.08747452404585239, + 3 => 0.057162024036790764, + 4 => 0.018574220540662965, + 5 => 0.012137705835969861, + 6 => 0.0032793153600291173, + 7 => 0.002142935963114733 ) end diff --git a/examples/qc/examples/tour_1_core.jl b/test/tours/tour_1_core.jl similarity index 75% rename from examples/qc/examples/tour_1_core.jl rename to test/tours/tour_1_core.jl index 38c245e7..5bbf8df3 100644 --- a/examples/qc/examples/tour_1_core.jl +++ b/test/tours/tour_1_core.jl @@ -1,11 +1,17 @@ # Tour of Dice.jl by example +# Setup testing +using Test +using Dice +function Base.isapprox(d1::AbstractDict, d2::AbstractDict) + issetequal(keys(d1), keys(d2)) && all(isapprox(d1[k], d2[k],rtol=0.01) for k in keys(d1)) +end +@testset "tour_1_core" begin + ################################################################################ # Basics ################################################################################ -using Dice - # The fundamental datatype in Dice.jl is `Dist{Bool}`, which represents a # distribution over booleans. @@ -14,16 +20,17 @@ x = flip(0.7) # We can use `pr(dist)` on a distribution find the dictionary from possible # values to probabilities. -pr(x) # Dict(false => 0.3, true => 0.7) -pr(x | true) # Dict(true => 1.0) +@test pr(x) ≈ Dict(false => 0.3, true => 0.7) +@test pr(x | true) ≈ Dict(true => 1.0) # We can use &, |, ^, ! to perform computation on DistBools. -pr(flip(0.5) & flip(0.1)) # true => 0.05 +@test pr(flip(0.5) & flip(0.1))[true] ≈ 0.05 # We can find conditional probabilities using the `evidence` keyword arg x = flip(0.5) y = flip(0.1) -pr(x & y, evidence=x) # Pr[X & Y given X] = 0.1 +# Pr[X & Y given X] +@test pr(x & y, evidence=x)[true] ≈ 0.1 # The condition of `if` statements can be Dist{Bool} if written inside of the # @dice_ite macro. @@ -34,8 +41,7 @@ ite_example = @dice_ite begin !flip(0.5) end end -pr(ite_example) # true => 0.95 - +@test pr(ite_example)[true] ≈ 0.95 ################################################################################ # Network Verification @@ -58,14 +64,14 @@ end function network() net = true - for _ in 1:10 + for _ in 1:5 net = diamond(net) end net end net = network() -pr(net) # true: 0.9995 +@test isapprox(pr(net)[true], 0.99975, rtol=0.001) ################################################################################ @@ -80,22 +86,24 @@ dist = pr( DistUInt32(3) end ) -dist # Dict(7 => 0.3, 3 => 0.7) +@test dist ≈ Dict(7 => 0.3, 3 => 0.7) # There is no magic here - DistInts are just a different way to interpret a # joint distribution over multiple bools. We could also write the above as: i = DistUInt{3}([flip(0.3), true, true]) # typed by width # most signif. bit first -pr(i) # Dict(7 => 0.3, 3 => 0.7) +@test pr(i) ≈ Dict(7 => 0.3, 3 => 0.7) # A uniform distribution on integers in [start, stop] x = uniform(DistUInt32, 1, 5) y = uniform(DistUInt32, 1, 5) -pr(x) # Dist(1 => 0.25, 2 => 0.25, 3 => 0.25, 4 => 0.25) +@test pr(x) ≈ Dict(1 => 0.25, 2 => 0.25, 3 => 0.25, 4 => 0.25) # To check for equality, use prob_equals product_4 = prob_equals(x * y, DistUInt32(4)) -pr(product_4) # true => 0.1875 (3/16 cases: (1,4), (2,2), (4,1)) +@test pr(product_4)[true] ≈ 0.1875 # 3/16 cases: (1,4), (2,2), (4,1) is_even(x::DistUInt32) = prob_equals(x % DistUInt32(2), DistUInt32(0)) -pr(product_4, evidence=is_even(x)) # true => 0.25 (2/8 cases: (2,2), (4,1)) +@test pr(product_4, evidence=is_even(x))[true] ≈ 0.25 # 2/8 cases: (2,2), (4,1) + +end diff --git a/test/tours/tour_2_learning.jl b/test/tours/tour_2_learning.jl new file mode 100644 index 00000000..f350c487 --- /dev/null +++ b/test/tours/tour_2_learning.jl @@ -0,0 +1,79 @@ +# An introduction to using MLE to learn flip probabilities + +# Setup testing +using Test +using Dice +@testset "tour_2_learning" begin + +################################################################################ +# Maximizing expression probabilities +################################################################################ + +# What value of θ maximizes `pr(flip(θ) & flip(θ) & !flip(θ))`? + +# Let's check! +θ = Var("θ") +x = flip(θ) & flip(θ) & !flip(θ) +var_vals = Valuation(θ => 0.5) # as we train by GD, we need to provide starting a value +loss = -LogPr(x) +train!(var_vals, loss, epochs=200, learning_rate=0.1) # mutates var_vals +@test compute_mixed(var_vals, θ) ≈ 2/3 + +# Optional note! +# In practice, we pass learned prs. through sigmoid to bound in [0, 1]. +# The above example becomes: +θ = sigmoid(Var("θ_before_sigmoid")) +x = flip(θ) & flip(θ) & !flip(θ) +var_vals = Valuation(Var("θ_before_sigmoid") => 0) +loss = -LogPr(x) # symbolic version of log(pr(...)) +train!(var_vals, loss, epochs=2000, learning_rate=0.1) +@test compute_mixed(var_vals, θ) ≈ 2/3 + +################################################################################ +# Approximating datasets +################################################################################ + +# Consider the following probabilistic program with holes. What probability +# will cause x to be true 2/3 of the time? +p_before_sigmoid = Var("p_before_sigmoid") +p = sigmoid(p_before_sigmoid) +b = @dice_ite if flip(p) true else flip(0.5) end + +# We can match this dataset... +dataset = [true, true, false] + +# ...by maximizing this value +antiloss = LogPr(prob_equals(b, true)) + LogPr(prob_equals(b, true)) + LogPr(prob_equals(b, false)) + +var_vals = Valuation(p_before_sigmoid => 0) +train!(var_vals, -antiloss; epochs=2000, learning_rate=0.1) +@test compute_mixed(var_vals, p) ≈ 1/3 + +# Equivalently, we can use `mle_loss`: +loss = mle_loss([prob_equals(b, x) for x in dataset]) +var_vals = Valuation(p_before_sigmoid => 0) +train!(var_vals, loss; epochs=2000, learning_rate=0.1) +@test compute_mixed(var_vals, p) ≈ 1/3 + +# Two ways to "check our work" by seeing the original progam's probability. +# The program is true 2/3 of the time, as desired! +pr_mixed(var_vals)(b) # true => ~ 2/3 +@test compute_mixed(var_vals, exp(LogPr(b))) ≈ 2/3 + +# Here's an example for ints. Lets say we build an int whose bits are flips such +# that it has a uniform distribution over 0, 2, 4, ..., 14. +pre_sigmoid_probs = [Var("b$(i)") for i in 1:4] +probs = [sigmoid(psp) for psp in pre_sigmoid_probs] +n = DistUInt{4}([flip(prob) for prob in probs]) + +dataset = [DistUInt{4}(even) for even in 0:2:14] +loss = mle_loss([prob_equals(n, x) for x in dataset]) + +# Train +var_vals = Valuation(psp => 0 for psp in pre_sigmoid_probs) +train!(var_vals, loss; learning_rate=0.1, epochs=2000) + +# Check the desired probabilities +@test [compute_mixed(var_vals, prob) for prob in probs] ≈ [0.5, 0.5, 0.5, 0.000626043181613181] + +end From 62bbd1c4f1631481a452d1762d38762d2ec2fb49 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 18 Jul 2024 19:49:35 -0700 Subject: [PATCH 228/231] remove packages --- Project.toml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Project.toml b/Project.toml index 0bc2bc39..8a967150 100644 --- a/Project.toml +++ b/Project.toml @@ -5,22 +5,14 @@ version = "0.1.0" [deps] CUDD = "345a2cc7-28d8-58b2-abdf-cff77ea7d7f1" -Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" DirectedAcyclicGraphs = "1e6dae5e-d6e2-422d-9af3-452e7a3785ee" Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" -Fontconfig = "186bb1d3-e1f7-5a2c-a377-96d770f13627" Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6" IRTools = "7869d1d1-7146-5819-86e3-90919afe41df" -Infiltrator = "5903a43b-9cc3-4c30-8d17-598619ec4e9b" Jive = "ba5e3d4b-8524-549f-bc71-e76ad9e9deed" -LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -PGFPlotsX = "8314cec4-20b6-5062-9cdb-752b83310925" -Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a" -PythonPlot = "274fc56d-3b97-40fa-a1cd-1b4a50311bf9" -Revise = "295af30f-e4ad-537b-8983-00126c2a3abe" [compat] CUDD = "0.3" From e2df3c0d4686679686935c86b269fc0ff5020cb5 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 18 Jul 2024 19:50:32 -0700 Subject: [PATCH 229/231] remove qc folder --- examples/qc/README.md | 19 - examples/qc/benchmarks/README.md | 3 - examples/qc/benchmarks/benchmarks.jl | 1933 ----------------- examples/qc/benchmarks/dump_loss_graph.jl | 50 - examples/qc/benchmarks/lib/be.jl | 132 -- examples/qc/benchmarks/lib/bst/dist.jl | 47 - examples/qc/benchmarks/lib/bst/generator.jl | 91 - examples/qc/benchmarks/lib/bst/to_coq.jl | 264 --- examples/qc/benchmarks/lib/ifc/dist.jl | 123 -- examples/qc/benchmarks/lib/lang.jl | 903 -------- examples/qc/benchmarks/lib/lib.jl | 31 - examples/qc/benchmarks/lib/lruset/dist.jl | 13 - .../qc/benchmarks/lib/lruset/generator.jl | 17 - examples/qc/benchmarks/lib/rbt/dist.jl | 118 - examples/qc/benchmarks/lib/rbt/generator.jl | 44 - examples/qc/benchmarks/lib/rbt/to_coq.jl | 178 -- examples/qc/benchmarks/lib/stlc/dist.jl | 667 ------ examples/qc/benchmarks/lib/stlc/generator.jl | 157 -- examples/qc/benchmarks/lib/stlc/to_coq.jl | 165 -- examples/qc/benchmarks/lib/stlc/to_coq_tb.jl | 116 - examples/qc/benchmarks/lib/util.jl | 879 -------- examples/qc/benchmarks/lib/visit.jl | 108 - examples/qc/benchmarks/main.jl | 165 -- examples/qc/benchmarks/test.jl | 62 - examples/qc/benchmarks/tool.jl | 216 -- examples/qc/examples/demo_bst.jl | 118 - examples/qc/examples/demo_natlist.jl | 70 - examples/qc/examples/demo_sortednatlist.jl | 115 - examples/qc/examples/demo_utlc.jl | 105 - examples/qc/examples/lib/dist_tree.jl | 29 - examples/qc/examples/lib/dist_utlc.jl | 56 - examples/qc/examples/samples/bst.txt | 393 ---- examples/qc/examples/samples/utlc.txt | 52 - 33 files changed, 7439 deletions(-) delete mode 100644 examples/qc/README.md delete mode 100644 examples/qc/benchmarks/README.md delete mode 100644 examples/qc/benchmarks/benchmarks.jl delete mode 100644 examples/qc/benchmarks/dump_loss_graph.jl delete mode 100644 examples/qc/benchmarks/lib/be.jl delete mode 100644 examples/qc/benchmarks/lib/bst/dist.jl delete mode 100644 examples/qc/benchmarks/lib/bst/generator.jl delete mode 100644 examples/qc/benchmarks/lib/bst/to_coq.jl delete mode 100644 examples/qc/benchmarks/lib/ifc/dist.jl delete mode 100644 examples/qc/benchmarks/lib/lang.jl delete mode 100644 examples/qc/benchmarks/lib/lib.jl delete mode 100644 examples/qc/benchmarks/lib/lruset/dist.jl delete mode 100644 examples/qc/benchmarks/lib/lruset/generator.jl delete mode 100644 examples/qc/benchmarks/lib/rbt/dist.jl delete mode 100644 examples/qc/benchmarks/lib/rbt/generator.jl delete mode 100644 examples/qc/benchmarks/lib/rbt/to_coq.jl delete mode 100644 examples/qc/benchmarks/lib/stlc/dist.jl delete mode 100644 examples/qc/benchmarks/lib/stlc/generator.jl delete mode 100644 examples/qc/benchmarks/lib/stlc/to_coq.jl delete mode 100644 examples/qc/benchmarks/lib/stlc/to_coq_tb.jl delete mode 100644 examples/qc/benchmarks/lib/util.jl delete mode 100644 examples/qc/benchmarks/lib/visit.jl delete mode 100644 examples/qc/benchmarks/main.jl delete mode 100644 examples/qc/benchmarks/test.jl delete mode 100644 examples/qc/benchmarks/tool.jl delete mode 100644 examples/qc/examples/demo_bst.jl delete mode 100644 examples/qc/examples/demo_natlist.jl delete mode 100644 examples/qc/examples/demo_sortednatlist.jl delete mode 100644 examples/qc/examples/demo_utlc.jl delete mode 100644 examples/qc/examples/lib/dist_tree.jl delete mode 100644 examples/qc/examples/lib/dist_utlc.jl delete mode 100644 examples/qc/examples/samples/bst.txt delete mode 100644 examples/qc/examples/samples/utlc.txt diff --git a/examples/qc/README.md b/examples/qc/README.md deleted file mode 100644 index 09fd118b..00000000 --- a/examples/qc/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# Learning generator probabilities in Dice - -Once the installation ([`../../README.md`](../../README.md)) is complete, see [`examples/tour_1_core.jl`](examples/tour_1_core.jl) for a quick start to Dice.jl. Then, see [`examples/tour_2_learning.jl`](examples/tour_2_learning.jl) for an introduction to learning probabilities with MLE in Dice.jl. - -The following related programs are included. The expected output of each is in a comment at the bottom of the file. -- Generator for nat lists ([`examples/demo_natlist.jl`](examples/demo_natlist.jl)) - - Given a generator for nat lists with a hole dependent on size, chooses probabilities such that the list has uniform length. -- Generator for sorted nat lists ([`examples/demo_sortednatlist.jl`](examples/demo_sortednatlist.jl)) - - Given a generator for sorted nat lists with a hole dependent on size, chooses probabilities such that the list has uniform length. -- Generator for binary search trees ([`examples/demo_bst.jl`](examples/demo_bst.jl)) - - Given a generator for binary search trees with a hole dependent on size, chooses probabilities such that the tree has uniform depth. - - 50 example generated BSTs are visible at [`examples/samples/bst.txt`](examples/samples/bst.txt) -- Generator for closed untyped lambda calculus expressions ([`examples/demo_utlc.jl`](examples/demo_utlc.jl)) - - Given a generator for UTLC exprs with a hole dependent on size, chooses probabilities such that the AST has near uniform depth - - 50 example generated expressions are visible at [`examples/samples/utlc.txt`](examples/samples/utlc.txt). -- Generator for well-typed, simply-typed lambda calculus expressions ([`benchmarks`](benchmarks)) - - Configure and run [`benchmarks/main.jl`](benchmarks/main.jl) - -Beware that the programs expected to run on this version of Dice.jl are the examples listed above and the tests. Other examples are known to be broken. diff --git a/examples/qc/benchmarks/README.md b/examples/qc/benchmarks/README.md deleted file mode 100644 index 80a05fc4..00000000 --- a/examples/qc/benchmarks/README.md +++ /dev/null @@ -1,3 +0,0 @@ -To train an STLC generator to have some property (term size or num apps) match a specific distribution (linear or uniform), configure and run [`main.jl`](main.jl). - -For broader context, see the QuickChick-related README at [`../README.md`](../README.md). \ No newline at end of file diff --git a/examples/qc/benchmarks/benchmarks.jl b/examples/qc/benchmarks/benchmarks.jl deleted file mode 100644 index 64c583a4..00000000 --- a/examples/qc/benchmarks/benchmarks.jl +++ /dev/null @@ -1,1933 +0,0 @@ -abstract type GenerationParams{T} end -include("lib/lib.jl") - -using Plots -using Random - -ENV["GKSwstype"] = "100" # prevent plots from displaying - -abstract type Benchmark end -abstract type LossConfig{T} end -abstract type LossMgr end - -abstract type Generation{T} end - -abstract type Property{T} end - -function workload_of(::Type{<:GenerationParams{T}}) where T - T -end - -function run_benchmark( - rs::RunState, - generation_params::GenerationParams{T}, - loss_config_weight_pairs::AbstractVector{<:Pair{<:LossConfig{T}, <:Real}}, - epochs::Integer, - bound::Real, -) where T - println_flush(rs.io, "Building generation computation graph...") - time_build_generation = @elapsed generation = generate(rs, generation_params) - println_flush(rs.io, " $(time_build_generation) seconds") - println_flush(rs.io) - - generation_emit_stats(rs, generation, "test") - - loss_configs, loss_weights = zip(loss_config_weight_pairs...) - loss_mgrs = [ - create_loss_manager(rs, loss_config, generation) - for loss_config in loss_configs - ] - curves = [[] for _ in loss_configs] - al_curves = [[] for _ in loss_configs] - - function emit_stats(s::String) - print_adnodes_of_interest(rs, s) - - println_flush(rs.io, "Parameter values ($(s)):") - showln(rs.io, rs.var_vals) - - generation_emit_stats(rs, generation, s) - generation_params_emit_stats(rs, generation_params, s) - - for (i, (p, lr)) in enumerate(loss_config_weight_pairs) - if p isa MLELossConfig - println_flush(rs.io, "Saving $(s) distribution...") - metric = compute_metric(p.metric, generation) - time_infer = @elapsed metric_dist = pr_mixed(rs.var_vals)(metric) - println(rs.io, " $(time_infer) seconds") - save_metric_dist(joinpath(rs.out_dir, "loss$(i)_dist_$(name(p.metric))_$(s).csv"), metric_dist; rs.io) - println(rs.io) - end - end - - # if T == STLC - # bespoke = generation_params isa LangBespokeSTLCGenerator - # samples_to_take = 10_000 - # println_flush(rs.io, "Taking $(samples_to_take) metric samples $(bespoke)...") - - # metrics = [NumApps(), TermSize()] - # metric_to_cts = Dict(metric => Dict() for metric in metrics) - - # a = ADComputer(rs.var_vals) - # time_sample = @elapsed with_concrete_ad_flips(rs.var_vals, value(generation)) do - # for _ in 1:samples_to_take - # sample = sample_as_dist(rs.rng, a, value(generation)) - # is_valid = check_property(STLCWellTyped(), sample) - # @assert !bespoke || is_valid - # for (metric, cts) in metric_to_cts - # key = ( - # is_valid, - # Dice.frombits( - # compute_metric(metric, STLCGeneration(sample,[])), - # Dict()) - # ) - # get!(cts, key, 0) - # cts[key] += 1 - # end - # end - # end - # println_loud(rs, " $(time_sample) seconds") - # println_loud(rs, metric_to_cts) - - # for (metric, cts) in metric_to_cts - # filename = joinpath(rs.out_dir, "sampled_$(samples_to_take)_dist_$(name(metric))_$(s).csv") - # open(filename, "w") do file - # min_metric_val = minimum( - # metric_val - # for (valid, metric_val) in keys(cts) - # ) - # @assert min_metric_val >= 0 - # max_metric_val = maximum( - # metric_val - # for (valid, metric_val) in keys(cts) - # ) - - # valids = if bespoke - # [true] else [true, false] end - # println(file, join([ - # if valid "$(metric_val)" else "$(metric_val)!" end - # for metric_val in 0:max_metric_val - # for valid in valids - - # ], "\t")) - # println(file, join([ - # get(cts, (valid, metric_val), 0) - # for metric_val in 0:max_metric_val - # for valid in valids - # ], "\t")) - # end - # end - # end - - println(rs.io) - end - - emit_stats("initial") - - for epoch in 1:epochs - losses = [produce_loss(rs, m, epoch) for m in loss_mgrs] - function update_curves(vals) - for (i, loss) in enumerate(losses) - push!(curves[i], vals[loss]) - end - end - - vals, derivs = differentiate( - rs.var_vals, - Derivs(loss => w for (loss, w) in zip(losses, loss_weights)) - ) - update_curves(vals) - - for (i, m) in enumerate(loss_mgrs) - if m isa SamplingEntropyLossMgr - a = ADComputer(Valuation()) - a.vals = vals - al_val = compute(a, m.current_actual_loss) - push!(al_curves[i], al_val) - end - end - - if any(isinf(vals[loss]) || isnan(vals[loss]) for loss in losses) - break - end - - # update vars - for (adnode, d) in derivs - if adnode isa Var - rs.var_vals[adnode] = clamp( - rs.var_vals[adnode] - d, - inverse_sigmoid(bound), - inverse_sigmoid(1 - bound), - ) - # println(rs.io, "$(adnode) $(-d)") - end - end - - # append last loss - epoch == epochs && update_curves(compute(rs.var_vals, losses)) - end - - emit_stats("trained") - - for (loss_config, curve) in zip(loss_configs, curves) - save_learning_curve(rs.out_dir, curve, join(to_subpath(loss_config), "_")) - end - - for (al_curve, loss_config, m) in zip(al_curves, loss_configs, loss_mgrs) - if m isa SamplingEntropyLossMgr - save_learning_curve(out_dir, al_curve, "actual_loss_" * join(to_subpath(loss_config), "_")) - save_learning_curve(out_dir, m.num_meeting, "meets_invariant_" * join(to_subpath(loss_config), "_")) - end - end -end - -function generation_params_emit_stats(rs::RunState, generation_params, s) - println_flush(rs.io, "Default generation_params_emit_stats") - println_flush(rs.io) -end - -struct SimpleLossMgr <: LossMgr - loss::ADNode - val - function SimpleLossMgr(loss::ADNode, val) - # TODO: share an expander? - l = Dice.LogPrExpander(WMC(BDDCompiler(Dice.bool_roots([loss])))) - loss = Dice.expand_logprs(l, loss) - new(loss, val) - end -end -function produce_loss(rs::RunState, m::SimpleLossMgr, epoch::Integer) - dist_path = joinpath(rs.out_dir, "dist.csv") - if epoch == 1 - clear_file(dist_path) - end - d = pr_mixed(rs.var_vals)(m.val) - open(dist_path, "a") do f - println(f, join([d[i] for i in 0:7],"\t")) - end - if epoch == EPOCHS - mk_areaplot(dist_path) - end - - m.loss -end - - -struct SamplingEntropy{T} <: LossConfig{T} - resampling_frequency::Integer - samples_per_batch::Integer - property::Property{T} - eq::Symbol - failure_penalty::Real - forgiveness::Real - rand_forgiveness::Bool - keyf::Symbol -end - -mutable struct SamplingEntropyLossMgr <: LossMgr - p::SamplingEntropy - val - consider - num_meeting - current_loss::Union{Nothing,ADNode} - current_actual_loss::Union{Nothing,ADNode} - current_samples - SamplingEntropyLossMgr(p, val, consider) = new(p, val, consider, [], nothing, nothing, nothing) -end - -using Plots - -pgfplotsx() - -function save_areaplot(path, v) - mat = mapreduce(permutedims, vcat, v) - torow(v) = reshape(v, 1, length(v)) - fontsize=18 - areaplot( - mat, - labels=torow(["$(i)" for i in 0:size(mat, 2)]), - # palette=:lightrainbow) - palette=cgrad(:thermal), - tickfontsize=fontsize, - legendfontsize=fontsize, - fontfamily="Palatino Roman", - fontsize=fontsize, - xlabel="Epochs", - ylabel="Probability", - # margin=5Plots.mm, - xlabelfontsize=fontsize, - ylabelfontsize=fontsize, - legend=:outertopright, - ) - # savefig("$(path).svg") - savefig("$(path).tikz") - savefig("$(path).tex") -end - -function mk_areaplot(path) - open(path, "r") do f - v = [[parse(Float64, s) for s in split(line,"\t")] for line in readlines(f)] - save_areaplot(path, v) - end -end - -clear_file(path) = open(path, "w") do f end -function produce_loss(rs::RunState, m::SamplingEntropyLossMgr, epoch::Integer) - if (epoch - 1) % m.p.resampling_frequency == 0 - a = ADComputer(rs.var_vals) - samples = with_concrete_ad_flips(rs.var_vals, m.val) do - [sample_as_dist(rs.rng, a, m.val) for _ in 1:m.p.samples_per_batch] - end - - l = Dice.LogPrExpander(WMC(BDDCompiler([ - prob_equals(m.val,sample) - for sample in samples - ]))) - - num_meeting = 0 - f_eq = if m.p.eq == :eq_num_apps eq_num_apps - elseif m.p.eq == :eq_has_app eq_has_app - elseif m.p.eq == :sat1_eq_num_apps begin (x, y) -> sat_eq_num_apps(x, y, 1) end - elseif m.p.eq == :sat2_eq_num_apps begin (x, y) -> sat_eq_num_apps(x, y, 2) end - elseif m.p.eq == :eq_except_numbers eq_except_numbers - elseif m.p.eq == :eq_structure eq_structure - elseif m.p.eq == :prob_equals prob_equals - else error() end - - keyf = if m.p.keyf == :identity identity - elseif m.p.keyf == :num_apps num_apps - else error() end - - loss, actual_loss = sum( - begin - lpr_eq = LogPr(f_eq(m.val, sample)) - lpr_eq_expanded = Dice.expand_logprs(l, lpr_eq) - # diff_test_typecheck(sample, Dice.frombits(sample, Dict())) - meets = m.consider(sample) - # @assert meets - meets && (num_meeting += 1) - - loss_here, actual_loss_here = if meets || (m.p.rand_forgiveness && rand(rs.rng) < m.p.forgiveness) - ( - lpr_eq_expanded * compute(a, lpr_eq_expanded), - lpr_eq_expanded - ) - elseif !meets && !m.p.rand_forgiveness - ( - Dice.Constant(m.p.forgiveness) * lpr_eq_expanded * compute(a, lpr_eq_expanded), - Dice.Constant(m.p.forgiveness) * lpr_eq_expanded - ) - else - Dice.Constant(0), Dice.Constant(0) - end - - if !meets - loss_here += Dice.Constant(m.p.failure_penalty) - actual_loss_here += Dice.Constant(m.p.failure_penalty) - end - - [loss_here, actual_loss_here] - end - for sample in samples - ) - push!(m.num_meeting, num_meeting / length(samples)) - - loss = Dice.expand_logprs(l, loss) / length(samples) - m.current_loss = loss - m.current_actual_loss = actual_loss - m.current_samples = samples - end - - N = 3 - samples_path = joinpath(rs.out_dir, "samples.csv") - dist_path = joinpath(rs.out_dir, "dist.csv") - if epoch == 1 - clear_file(samples_path) - clear_file(dist_path) - end - d = pr_mixed(rs.var_vals)(m.val) - open(dist_path, "a") do f - println(f, join([d[i] for i in 0:2^N-1],"\t")) - end - open(samples_path, "a") do f - println(f, join([ - count(s -> prob_equals(s, DistUInt{N}(i)) === true, m.current_samples) - for i in 0:2^N-1 - ], "\t")) - end - if epoch == EPOCHS - mk_areaplot(samples_path) - mk_areaplot(dist_path) - end - - @assert !isnothing(m.current_loss) - m.current_loss -end - -function save_learning_curve(out_dir, learning_curve, name) - open(joinpath(out_dir, "$(name).csv"), "w") do file - xs = 0:length(learning_curve)-1 - for (epoch, logpr) in zip(xs, learning_curve) - println(file, "$(epoch)\t$(logpr)") - end - plot(xs, learning_curve) - savefig(joinpath(out_dir, "$(name).svg")) - end -end - -abstract type Bools{W} <: Benchmark end -struct BoolsGeneration{W} <: Generation{Bools{W}} - v::DistUInt{W} -end -value(g::BoolsGeneration) = g.v -function generation_emit_stats(rs::RunState, g::BoolsGeneration, s::String) -end - -struct Flips{W} <: GenerationParams{Bools{W}} end -function to_subpath(::Flips) - ["flips"] -end -function generate(rs::RunState, ::Flips{W}) where W - BoolsGeneration(DistUInt{W}([ - flip(register_weight!(rs, "f$(i)", random_value=true)) - for i in 1:W - ])) -end - -struct BoolsExactEntropy{W} <: LossConfig{Bools{W}} end -to_subpath(::BoolsExactEntropy) = ["exact_entropy"] -function create_loss_manager(rs::RunState, p::BoolsExactEntropy{W}, generation) where W - println_flush(rs.io, "Building computation graph for $(p)...") - time_build_loss = @elapsed loss = - neg_entropy(generation.v, [DistUInt{W}(i) for i in 0:2^W-1]) - println(rs.io, " $(time_build_loss) seconds") - println(rs.io) - SimpleLossMgr(loss, generation.v) -end - -################################## -# LRUSetTestcase Generation -################################## -abstract type LRUSetTestcase <: Benchmark end -struct LRUSetTestcaseGeneration <: Generation{LRUSetTestcase} - v::LRUS.Program -end -value(g::LRUSetTestcaseGeneration) = g.v -function generation_emit_stats(rs::RunState, g::LRUSetTestcaseGeneration, s::String) - p = pr_mixed(rs.var_vals)(prob_equals( - g.v, - LRUS.vec_to_program([ - LRUS.Insert(DistInt32(0)), - LRUS.Insert(DistInt32(1)), - LRUS.Insert(DistInt32(0)), - LRUS.PopStale(), - LRUS.Contains(DistInt32(1)), - ]), - ))[true] - # 3 p 2 * 2 c 1 = 12 ways to make programs like the above - println(rs.io, "Pr of finding bug: $(12 * p)") - println() -end - -struct BespokeLRUSetTestcaseGenerator <: GenerationParams{LRUSetTestcase} - size -end -function to_subpath(::BespokeLRUSetTestcaseGenerator) - ["BespokeLRUSetTestcaseGenerator"] -end -function generate(rs::RunState, p::BespokeLRUSetTestcaseGenerator) - LRUSetTestcaseGeneration( - bespoke_gen_lrusp(rs, p.size) - ) -end - -################################## -# STLC generation -################################## - -abstract type STLC <: Benchmark end -function sandwich(::Type{STLC}) - ( - "From QuickChick Require Import QuickChick. Import QcNotation. -From Coq Require Import Bool ZArith List. Import ListNotations. -From ExtLib Require Import Monad. -From ExtLib.Data.Monads Require Import OptionMonad. -Import MonadNotation. - -From STLC Require Import Impl Spec.", -"Definition test_prop_SinglePreserve := -forAll gSized (fun (e: Expr) => - prop_SinglePreserve e). - -(*! QuickChick test_prop_SinglePreserve. *) - -Definition test_prop_MultiPreserve := -forAll gSized (fun (e: Expr) => - prop_MultiPreserve e). - -(*! QuickChick test_prop_MultiPreserve. *) - " - ) -end -function sandwichmaybestlc() - ( - "From QuickChick Require Import QuickChick. Import QcNotation. -From Coq Require Import Bool ZArith List. Import ListNotations. -From ExtLib Require Import Monad. -From ExtLib.Data.Monads Require Import OptionMonad. -Import MonadNotation. - -From STLC Require Import Impl Spec.", -"Definition test_prop_SinglePreserve := -forAllMaybe gSized (fun (e: Expr) => - prop_SinglePreserve e). - -(*! QuickChick test_prop_SinglePreserve. *) - -Definition test_prop_MultiPreserve := -forAllMaybe gSized (fun (e: Expr) => - prop_MultiPreserve e). - -(*! QuickChick test_prop_MultiPreserve. *) - " - ) -end - - -struct STLCGeneration <: Generation{STLC} - e::OptExpr.t - constructors_overapproximation::Vector{OptExpr.t} -end -function generation_emit_stats(rs::RunState, g::STLCGeneration, s::String) - # println_flush(rs.io, "Saving samples...") - # time_sample = @elapsed with_concrete_ad_flips(rs.var_vals, g.e) do - # save_samples(rs, joinpath(rs.out_dir, "terms_$(s).txt"), g.e) - # end - # println(rs.io, " $(time_sample) seconds") - # println(rs.io) -end -value(g::STLCGeneration) = g.e - -################################## -# DerivedGenerator -################################## - -struct DerivedGenerator{T} <: GenerationParams{T} - root_ty::Type - ty_sizes::Vector{Pair{Type, Integer}} - stack_size::Integer - intwidth::Integer -end -DerivedGenerator{T}(; root_ty, ty_sizes, stack_size, intwidth) where T = - DerivedGenerator{T}(root_ty, ty_sizes, stack_size, intwidth) -function to_subpath(p::DerivedGenerator{T}) where T - [ - lowercase(string(T)), - "derived", - "root_ty=$(p.root_ty)", - "ty-sizes=$(join(["$(ty)-$(size)" for (ty, size) in p.ty_sizes],"-"))", - "stack_size=$(p.stack_size)", - "intwidth=$(p.intwidth)", - ] -end -function generate(rs::RunState, p::DerivedGenerator{T}) where T - constructors_overapproximation = [] - function add_ctor(v::OptExpr.t) - push!(constructors_overapproximation, v) - v - end - e = generate(rs, p, add_ctor) - if T == STLC - STLCGeneration(OptExpr.Some(e), [OptExpr.Some(x) for x in constructors_overapproximation]) - elseif T == BST - BSTGeneration(e, constructors_overapproximation) - elseif T == RBT - RBTGeneration(e) - else - error() - end -end -function generation_params_emit_stats(rs::RunState, p::DerivedGenerator, s) - save_coq_generator(rs, p, s, derived_to_coq) -end - -function save_coq_generator(rs, p, s, f) - path = joinpath(rs.out_dir, "$(s)_Generator.v") - open(path, "w") do file - vals = compute(rs.var_vals, values(rs.adnodes_of_interest)) - adnodes_vals = Dict(s => vals[adnode] for (s, adnode) in rs.adnodes_of_interest) - println(file, f(p, adnodes_vals, rs.io)) - end - println_flush(rs.io, "Saved Coq generator to $(path)") -end - - - -struct LangDerivedGenerator{T} <: GenerationParams{T} - root_ty::Type - ty_sizes::Vector{Pair{Type, Integer}} - stack_size::Integer - intwidth::Integer - arbitrary_prims::Bool -end -LangDerivedGenerator{T}(; root_ty, ty_sizes, stack_size, intwidth, arbitrary_prims) where T = - LangDerivedGenerator{T}(root_ty, ty_sizes, stack_size, intwidth, arbitrary_prims) -function to_subpath(p::LangDerivedGenerator{T}) where T - [ - lowercase(string(T)), - "langderived", - "root_ty=$(p.root_ty)", - "ty-sizes=$(join(["$(ty)-$(size)" for (ty, size) in p.ty_sizes],"-"))", - "stack_size=$(p.stack_size)", - "intwidth=$(p.intwidth)", - "arbitrary_prims=$(p.arbitrary_prims)", - ] -end -function generate(rs::RunState, p::LangDerivedGenerator{T}) where T - prog = derive_lang_generator(p) - res, prim_map, function_results = interp(rs, prog) - constructors_overapproximation = [] - if T == STLC - STLCGeneration(OptExpr.Some(res), [OptExpr.Some(e) for e in function_results["genExpr"]]) - elseif T == BST - BSTGeneration(res, function_results["genTree"]) - elseif T == RBT - RBTGeneration(res) #, function_results["genTree"]) - else - error() - end -end -function generation_params_emit_stats(rs::RunState, p::LangDerivedGenerator, s) - prog = derive_lang_generator(p) - - path = joinpath(rs.out_dir, "$(s)_Generator.v") - open(path, "w") do file - println(file, to_coq(rs, p, prog)) - end - println_flush(rs.io, "Saved Coq generator to $(path)") - println_flush(rs.io) -end - - -struct LangSiblingDerivedGenerator{T} <: GenerationParams{T} - root_ty::Type - ty_sizes::Vector{Pair{Type, Integer}} - stack_size::Integer - intwidth::Integer -end -LangSiblingDerivedGenerator{T}(; root_ty, ty_sizes, stack_size, intwidth) where T = - LangSiblingDerivedGenerator{T}(root_ty, ty_sizes, stack_size, intwidth) -function to_subpath(p::LangSiblingDerivedGenerator{T}) where T - [ - lowercase(string(T)), - "langsiblingderived", - "root_ty=$(p.root_ty)", - "ty-sizes=$(join(["$(ty)-$(size)" for (ty, size) in p.ty_sizes],"-"))", - "stack_size=$(p.stack_size)", - "intwidth=$(p.intwidth)", - ] -end -function generate(rs::RunState, p::LangSiblingDerivedGenerator{T}) where T - prog = derive_lang_sibling_generator(p) - res, prim_map, function_results = interp(rs, prog) - constructors_overapproximation = [] - if T == STLC - STLCGeneration(OptExpr.Some(res), [OptExpr.Some(e) for e in function_results["genExpr"]]) - elseif T == BST - BSTGeneration(res, function_results["genTree"]) - elseif T == RBT - RBTGeneration(res) #, function_results["genTree"]) - else - error() - end -end -function generation_params_emit_stats(rs::RunState, p::LangSiblingDerivedGenerator, s) - prog = derive_lang_sibling_generator(p) - - path = joinpath(rs.out_dir, "$(s)_Generator.v") - open(path, "w") do file - println(file, to_coq(rs, p, prog)) - end - println_flush(rs.io, "Saved Coq generator to $(path)") - println_flush(rs.io) -end - - -function save_coq_generator(rs, p, s, f) - path = joinpath(rs.out_dir, "$(s)_Generator.v") - open(path, "w") do file - vals = compute(rs.var_vals, values(rs.adnodes_of_interest)) - adnodes_vals = Dict(s => vals[adnode] for (s, adnode) in rs.adnodes_of_interest) - println(file, f(p, adnodes_vals, rs.io)) - end - println_flush(rs.io, "Saved Coq generator to $(path)") -end - -function derive_lang_generator(p::LangDerivedGenerator{T}) where T - stack_vars = [Symbol("stack$(i)") for i in 1:p.stack_size] - - functions = [] - - tys, type_ctor_parami_to_id = collect_types(p.root_ty) - - dependents() = vcat( - [L.Var(:size)], - [L.Var(x) for x in stack_vars] - ) - - function gen(ty, zero_case) - freq_branches = [] - for (varianti, (ctor, params)) in enumerate(variants(ty)) - if zero_case && ty in params - continue - end - freq_branch = L.ReturnGen(L.Construct( - ctor, [ - L.Var(Symbol("p$(i)")) - for i in 1:length(params) - ] - )) - for (parami, param) in reverse(collect(enumerate(params))) - freq_branch = L.BindGen( - if param in tys - L.Call("gen$(to_coq(param))", vcat( - [ - if param == ty - L.Var(:size1) - else - L.Nat(Dict(p.ty_sizes)[param]) - end - ], - [ L.Var(stack_vars[i]) for i in 2:p.stack_size ], - [L.Loc()], - )) - elseif param == Nat.t - if p.arbitrary_prims - L.ArbitraryNat() - else - L.GenNat(dependents(), p.intwidth) - end - elseif param == DistInt32 - if p.arbitrary_prims - L.ArbitraryZ() - else - L.GenZ(dependents(), p.intwidth) - end - elseif param == AnyBool - if p.arbitrary_prims - L.ArbitraryBool() - else - L.GenBool(dependents()) - end - else - error("bad param type $(param)") - end, - Symbol("p$(parami)"), - freq_branch - ) - end - push!(freq_branches, - "$(ctor)" => freq_branch - ) - end - L.Frequency( dependents(), freq_branches) - end - - for ty in tys - recursive = any(ty in params for (ctor, params) in variants(ty)) - func = L.Function( - "gen$(to_coq(ty))", - vcat( - [L.Param(:size, Nat.t)], - [L.Param(stack_var, Nat.t) for stack_var in stack_vars], - ), - L.G{ty}, - if recursive - L.Match(L.Var(:size), [ - (:O, []) => gen(ty, true), - (:S, [:size1]) => gen(ty, false), - ]) - else - gen(ty, true) - end - ) - push!(functions, func) - end - - L.Program( - [], - functions, - L.Call( - "gen$(to_coq(p.root_ty))", - vcat( - [L.Nat(Dict(p.ty_sizes)[p.root_ty])], - [L.Nat(0) for _ in 1:p.stack_size] - ) - ) - ) -end - -unctor = Dict() - -module LeafCtorKVTree - using Dice - @inductive t LeafCtorKVTree_E() -end -to_coq(::Type{LeafCtorKVTree.t}) = "LeafCtorKVTree" -unctor[LeafCtorKVTree.LeafCtorKVTree_E] = KVTree.E -module CtorKVTree - using Dice - @inductive t CtorKVTree_E() CtorKVTree_T() -end -to_coq(::Type{CtorKVTree.t}) = "CtorKVTree" -unctor[CtorKVTree.CtorKVTree_T] = KVTree.T -unctor[CtorKVTree.CtorKVTree_E] = KVTree.E -ctor_tys(::Type{KVTree.t}) = [CtorKVTree.t, LeafCtorKVTree.t] - -module LeafCtorColorKVTree - using Dice - @inductive t LeafCtorColorKVTree_E() -end -to_coq(::Type{LeafCtorColorKVTree.t}) = "LeafCtorColorKVTree" -unctor[LeafCtorColorKVTree.LeafCtorColorKVTree_E] = ColorKVTree.E -module CtorColorKVTree - using Dice - @inductive t CtorColorKVTree_E() CtorColorKVTree_T() -end -to_coq(::Type{CtorColorKVTree.t}) = "CtorColorKVTree" -unctor[CtorColorKVTree.CtorColorKVTree_T] = ColorKVTree.T -unctor[CtorColorKVTree.CtorColorKVTree_E] = ColorKVTree.E -ctor_tys(::Type{ColorKVTree.t}) = [CtorColorKVTree.t, LeafCtorColorKVTree.t] - -module LeafCtorColor - using Dice - @inductive t LeafCtorColor_R() LeafCtorColor_B() -end -to_coq(::Type{LeafCtorColor.t}) = "LeafCtorColor" -unctor[LeafCtorColor.LeafCtorColor_R] = Color.R -unctor[LeafCtorColor.LeafCtorColor_B] = Color.B -module CtorColor - using Dice - @inductive t CtorColor_R() CtorColor_B() -end -to_coq(::Type{CtorColor.t}) = "CtorColor" -ctor_tys(::Type{Color.t}) = [CtorColor.t, LeafCtorColor.t] -unctor[CtorColor.CtorColor_R] = Color.R -unctor[CtorColor.CtorColor_B] = Color.B - -module LeafCtorTyp - using Dice - @inductive t LeafCtorTyp_TBool() -end -to_coq(::Type{LeafCtorTyp.t}) = "LeafCtorTyp" -unctor[LeafCtorTyp.LeafCtorTyp_TBool] = Typ.TBool -module CtorTyp - using Dice - @inductive t CtorTyp_TBool() CtorTyp_TFun() -end -to_coq(::Type{CtorTyp.t}) = "CtorTyp" -unctor[CtorTyp.CtorTyp_TBool] = Typ.TBool -unctor[CtorTyp.CtorTyp_TFun] = Typ.TFun -ctor_tys(::Type{Typ.t}) = [CtorTyp.t, LeafCtorTyp.t] - -module LeafCtorExpr - using Dice - @inductive t LeafCtorExpr_Var() LeafCtorExpr_Bool() -end -to_coq(::Type{LeafCtorExpr.t}) = "LeafCtorExpr" -unctor[LeafCtorExpr.LeafCtorExpr_Var] = Expr.Var -unctor[LeafCtorExpr.LeafCtorExpr_Bool] = Expr.Bool -module CtorExpr - using Dice - @inductive t CtorExpr_Var() CtorExpr_Bool() CtorExpr_Abs() CtorExpr_App() -end -to_coq(::Type{CtorExpr.t}) = "CtorExpr" -unctor[CtorExpr.CtorExpr_Var] = Expr.Var -unctor[CtorExpr.CtorExpr_Bool] = Expr.Bool -unctor[CtorExpr.CtorExpr_Abs] = Expr.Abs -unctor[CtorExpr.CtorExpr_App] = Expr.App -ctor_tys(::Type{Expr.t}) = [CtorExpr.t, LeafCtorExpr.t] - -function ctor_ty(ty, leaf) - inner_ctor_ty, leaf_ctor_ty = ctor_tys(ty) - if leaf leaf_ctor_ty else inner_ctor_ty end -end - - -function module_of_func(f) - @assert all(m.module == methods(f)[1].module for m in methods(f)) "$(f) $(methods(f))" - methods(f)[1].module -end - -function ctor_to_params(f) - m = module_of_func(f) - for (ctor, params) in variants(m.t) - if f == ctor - return params - end - end - error("ctor_to_params failed $(f) $(m)") -end - -ty_is_recursive(ty) = any(ty in params for (ctor, params) in variants(ty)) - -function derive_lang_sibling_generator(p::LangSiblingDerivedGenerator{T}) where T - stack_vars = [Symbol("stack$(i)") for i in 1:p.stack_size] - - functions = [] - - tys, type_ctor_parami_to_id = collect_types(p.root_ty) - - dependents(leaf, zero_case) = collect(vcat( - if !leaf && !zero_case() - [L.Var(:size)] - else - [] - end, - [L.Var(x) for x in stack_vars] - )) - - function gen(ty, leaf, _zero_case) - zero_case() = if leaf - error("don't check zero_case() if leaf") - else - _zero_case - end - - - chosen_ctor_branches = [] - for (chosen_ctor_id, chosen_ctor_id_params) in variants(ctor_ty(ty, leaf)) - @assert isempty(chosen_ctor_id_params) - - chosen_ctor = unctor[chosen_ctor_id] - chosen_ctor_params = ctor_to_params(chosen_ctor) - - sub_ctors_tys = [ - ctor_ty(param, !ty_is_recursive(param) || param == ty && zero_case()) - for param in chosen_ctor_params - if param ∈ tys - ] - - j = 0 - i_to_j = Dict() - i_to_is_leaf = Dict() - for (i, param) in enumerate(chosen_ctor_params) - if param ∈ tys - j += 1 - i_to_j[i] = j - i_to_is_leaf[i] = !ty_is_recursive(param) || param == ty && zero_case() - end - end - - temp = vec(collect(Iterators.product([ - [ctor for (ctor, _) in variants(sub_ctor_ty)] - for sub_ctor_ty in sub_ctors_tys - ]...))) - - res = L.ReturnGen(L.Construct( - chosen_ctor, [ - L.Var(Symbol("p$(i)")) - for i in 1:length(chosen_ctor_params) - ] - )) - for (ccpi, chosen_ctor_param) in reverse(collect(enumerate(chosen_ctor_params))) - res = L.BindGen( - if chosen_ctor_param in tys - chosen_ctor_param_is_leaf = !ty_is_recursive(chosen_ctor_param) || chosen_ctor_param == ty && !leaf && zero_case() - subres = L.Call( - if chosen_ctor_param_is_leaf - "genLeaf$(to_coq(chosen_ctor_param))" - else - "gen$(to_coq(chosen_ctor_param))" - end, - vcat( - if chosen_ctor_param_is_leaf - [] - elseif chosen_ctor_param == ty - [ L.Var(:size1) ] - else - [L.Nat(Dict(p.ty_sizes)[chosen_ctor_param] - 1) ] - end, - if haskey(i_to_j, ccpi) - [L.Var(Symbol("ctor$(i_to_j[ccpi])"))] - else - [] - end, - [L.Var(stack_vars[i]) for i in 2:p.stack_size ], - [L.Loc()], - ) - ) - elseif chosen_ctor_param == Nat.t - L.GenNat(dependents(leaf, zero_case), p.intwidth) - elseif chosen_ctor_param == DistInt32 - L.GenZ(dependents(leaf, zero_case), p.intwidth) - elseif chosen_ctor_param == AnyBool - L.GenBool(dependents(leaf, zero_case)) - else - error("bad param type $(chosen_ctor_param)") - end, - Symbol("p$(ccpi)"), - res - ) - end - - res = if isempty(sub_ctors_tys) - res - else - L.BindGen( - L.Frequency(dependents(leaf, zero_case), [ - "$(i)" => L.ReturnGen(L.Tuple( - sub_ctors_tys, - [L.Construct(ctor, []) for ctor in x], - )) - for (i, x) in enumerate(temp) - ]), - :param_variantis, - L.UnpackTuple(L.Var(:param_variantis), - [L.Param(Symbol("ctor$(i)"), sub_ctor_ty) for (i,sub_ctor_ty) in enumerate(sub_ctors_tys)], - res - ) - ) - end - push!(chosen_ctor_branches, (Symbol(nameof(chosen_ctor_id)), []) => res) - end - L.Match(L.Var(:chosen_ctor), chosen_ctor_branches) - end - - for ty in tys - leaffunc = L.Function( - "genLeaf$(to_coq(ty))", - vcat( - [L.Param(:chosen_ctor, ctor_ty(ty, true))], - [L.Param(stack_var, Nat.t) for stack_var in stack_vars], - ), - L.G{ty}, - gen(ty, true, nothing) - ) - push!(functions, leaffunc) - - if ty_is_recursive(ty) - func = L.Function( - "gen$(to_coq(ty))", - vcat( - [L.Param(:size, Nat.t)], - [L.Param(:chosen_ctor, ctor_ty(ty, false))], - [L.Param(stack_var, Nat.t) for stack_var in stack_vars], - ), - L.G{ty}, - L.Match(L.Var(:size), [ - (:O, []) => gen(ty, false, true), - (:S, [:size1]) => gen(ty, false, false), - ]) - ) - push!(functions, func) - end - end - - L.Program( - collect(Iterators.flatten([ - [module_of_func(ctor_ty) for ctor_ty in ctor_tys(ty)] - for ty in keys(Dict(p.ty_sizes)) - ])), - functions, - L.BindGen( - L.Frequency([], [ - "$(i)" => L.ReturnGen(L.Construct(ctor, [])) - for (i, (ctor, _)) in enumerate(variants(ctor_ty(p.root_ty, false))) - ]), - :init_ctor, - L.Call( - "gen$(to_coq(p.root_ty))", - vcat( - [L.Nat(Dict(p.ty_sizes)[p.root_ty] - 1)], - [L.Var(:init_ctor)], - [L.Nat(0) for _ in 1:p.stack_size] - ) - ) - ) - ) -end - - - -################################## -# Bespoke STLC generator -################################## - -struct BespokeSTLCGenerator <: GenerationParams{STLC} - param_vars_by_size::Bool - size::Integer - ty_size::Integer -end -BespokeSTLCGenerator(;param_vars_by_size, size, ty_size) = BespokeSTLCGenerator(param_vars_by_size, size, ty_size) -function to_subpath(p::BespokeSTLCGenerator) - [ - "stlc", - "bespoke", - if p.param_vars_by_size "by_sz" else "not_by_sz" end, - "sz=$(p.size)-tysz=$(p.ty_size)", - ] -end -function generate(rs::RunState, p::BespokeSTLCGenerator) - constructors_overapproximation = [] - function add_ctor(v::OptExpr.t) - push!(constructors_overapproximation, v) - v - end - e = gen_expr( - rs, - DistNil(Typ), - gen_type(rs, p.ty_size, p.param_vars_by_size), - p.size, - p.ty_size, - p.param_vars_by_size, - add_ctor, - ) - STLCGeneration(e, constructors_overapproximation) -end - -function save_coq_generator(rs, p, s, f) - path = joinpath(rs.out_dir, "$(s)_Generator.v") - open(path, "w") do file - vals = compute(rs.var_vals, values(rs.adnodes_of_interest)) - adnodes_vals = Dict(s => vals[adnode] for (s, adnode) in rs.adnodes_of_interest) - println(file, f(p, adnodes_vals, rs.io)) - end - println_flush(rs.io, "Saved Coq generator to $(path)") -end - -function generation_params_emit_stats(rs::RunState, p::BespokeSTLCGenerator, s) - path = joinpath(rs.out_dir, "$(s)_Generator.v") - if p == BespokeSTLCGenerator(param_vars_by_size=true,size=5,ty_size=2) - save_coq_generator(rs, p, s, bespoke_stlc_to_coq) - else - println_flush(rs.io, "Translation back to Coq not defined") - end - println_flush(rs.io) -end - -################################## -# Bespoke STLC generator using Lang -################################## - -struct LangBespokeSTLCGenerator <: GenerationParams{STLC} - expr_size::Integer - typ_size::Integer -end -LangBespokeSTLCGenerator(; expr_size, typ_size) = - LangBespokeSTLCGenerator(expr_size, typ_size) -function to_subpath(p::LangBespokeSTLCGenerator) - [ - "stlc", - "langbespoke", - "expr_sz=$(p.expr_size)-typ_sz=$(p.typ_size)", - ] -end -function generate(rs::RunState, p::LangBespokeSTLCGenerator) - prog = gen_expr_lang(p.expr_size, p.typ_size) - res, prim_map, function_results = interp(rs, prog) - STLCGeneration(res, [ - interp(rs, gen_expr_lang(size, p.typ_size))[1] - for size in 0:p.expr_size - ]) - # STLCGeneration(res, function_results["genExpr"]) -end - -function generation_params_emit_stats(rs::RunState, p::LangBespokeSTLCGenerator, s) - prog = gen_expr_lang(p.expr_size, p.typ_size) - - path = joinpath(rs.out_dir, "$(s)_Generator.v") - open(path, "w") do file - println(file, to_coq(rs, p, prog)) - end - println_flush(rs.io, "Saved Coq generator to $(path)") - println_flush(rs.io) -end - - -################################## -# Type-based STLC generator -################################## - -struct TypeBasedSTLCGenerator <: GenerationParams{STLC} - size::Integer - ty_size::Integer - dependents::Vector{Symbol} - ty_dependents::Vector{Symbol} - stack_size::Integer - intwidth::Integer -end -TypeBasedSTLCGenerator(; size, ty_size, dependents, ty_dependents, stack_size, intwidth) = - TypeBasedSTLCGenerator(size, ty_size, dependents, ty_dependents, stack_size, intwidth) -function to_subpath(p::TypeBasedSTLCGenerator) - [ - "stlc", - "typebased", - "sz=$(p.size)-tysz=$(p.ty_size)", - "dependents=$(join(Base.map(string, p.dependents),"-"))", - "ty_dependents=$(join(Base.map(string, p.ty_dependents),"-"))", - "stack_size=$(p.stack_size)", - "intwidth=$(p.intwidth)", - ] -end -function generate(rs::RunState, p::TypeBasedSTLCGenerator) - constructors_overapproximation = [] - function add_ctor(v::Expr.t) - push!(constructors_overapproximation, OptExpr.Some(v)) - v - end - e = tb_gen_expr(rs, p, p.size, empty_stack(p), add_ctor) - STLCGeneration(OptExpr.Some(e), constructors_overapproximation) -end -function generation_params_emit_stats(rs::RunState, p::TypeBasedSTLCGenerator, s) - save_coq_generator(rs, p, s, typebased_stlc_to_coq) -end - -################################## -# Approx STLC constructor entropy loss -################################## - -struct ApproxSTLCConstructorEntropy <: LossConfig{STLC} end -to_subpath(::ApproxSTLCConstructorEntropy) = ["approx_entropy"] -function create_loss_manager(rs::RunState, p::ApproxSTLCConstructorEntropy, generation) - println_flush(rs.io, "Building computation graph for $(p)...") - @assert length(generation.constructors_overapproximation) == rs.p.expr_size + 1 - time_build_loss = @elapsed loss = sum( - neg_entropy(opt_ctor_to_id(ctor), values(stlc_ctor_to_id), ignore_non_support=true) - for ctor in generation.constructors_overapproximation - ) - println(rs.io, " $(time_build_loss) seconds") - println(rs.io) - SimpleLossMgr(loss, nothing) -end - -################################## -# Sampling STLC constructor entropy loss -################################## - -struct SamplingSTLCConstructorEntropy <: LossConfig{STLC} - resampling_frequency::Integer - samples_per_batch::Integer -end -function SamplingSTLCConstructorEntropy(; resampling_frequency, samples_per_batch) - SamplingSTLCConstructorEntropy(resampling_frequency, samples_per_batch) -end -to_subpath(p::SamplingSTLCConstructorEntropy) = ["sampling_ctor_entropy", "freq=$(p.resampling_frequency)-spb=$(p.samples_per_batch)"] -function create_loss_manager(rs::RunState, p::SamplingSTLCConstructorEntropy, g::STLCGeneration) - println_flush(rs.io, "Building random_ctor graph...") - time_build_random_ctor = @elapsed random_ctor = match(g.e, [ - "Some" => e -> choice(collect_constructors(e)), - "None" => () -> DistInt32(-1), - ]) - println(rs.io, " $(time_build_random_ctor) seconds") - - SamplingEntropyLossMgr(p, random_ctor, - s->any(prob_equals(s, x)===true for x in values(stlc_ctor_to_id)), - s->prob_equals(s, DistInt32(-1))===true) -end - -################################## -# Exact STLC constructor entropy loss -################################## - -struct STLCConstructorEntropy <: LossConfig{STLC} end -to_subpath(::STLCConstructorEntropy) = ["ctor_entropy"] -function create_loss_manager(rs::RunState, p::STLCConstructorEntropy, generation::STLCGeneration) - println_flush(rs.io, "Building computation graph for $(p)...") - time_build_loss = @elapsed begin - random_term = match(generation.e, [ - "Some" => e -> DistSome(choice(collect_constructors(e))), - "None" => () -> DistNone(DistInt32), - ]) - loss = neg_entropy(random_term, Set([DistSome(i) for i in values(stlc_ctor_to_id)])) - end - println(rs.io, " $(time_build_loss) seconds") - println(rs.io) - - SimpleLossMgr(loss, nothing) -end - -################################## -# BST generation -################################## - -abstract type BST <: Benchmark end -function sandwich(::Type{BST}) - ( - "From QuickChick Require Import QuickChick. Import QcNotation. -From Coq Require Import List. Import ListNotations. -From Coq Require Import ZArith. -From ExtLib Require Import Monad. -Import MonadNotation. - -From BST Require Import Impl. -From BST Require Import Spec.", -"Definition manual_shrink_tree := -fun x : Tree => -let - fix aux_shrink (x' : Tree) : list Tree := - match x' with - | E => [] - | T p0 p1 p2 p3 => - ([p0] ++ - map (fun shrunk : Tree => T shrunk p1 p2 p3) (aux_shrink p0) ++ - []) ++ - (map (fun shrunk : nat => T p0 shrunk p2 p3) (shrink p1) ++ []) ++ - (map (fun shrunk : nat => T p0 p1 shrunk p3) (shrink p2) ++ []) ++ - ([p3] ++ - map (fun shrunk : Tree => T p0 p1 p2 shrunk) (aux_shrink p3) ++ - []) ++ [] - end in -aux_shrink x. - - -#[global] -Instance shrTree : Shrink (Tree) := -{| shrink x := manual_shrink_tree x |}. - -Definition test_prop_InsertValid := -forAll gSized (fun (t: Tree) => -forAll arbitrary (fun (k: nat) => -forAll arbitrary (fun (v: nat) => -prop_InsertValid t k v))) -. - -(*! QuickChick test_prop_InsertValid. *) - -Definition test_prop_DeleteValid := -forAll gSized (fun (t: Tree) => -forAll arbitrary (fun (k: nat) => -prop_DeleteValid t k)) -. - -(*! QuickChick test_prop_DeleteValid. *) - - -Definition test_prop_UnionValid := -forAll gSized (fun (t1: Tree) => -forAll gSized (fun (t2: Tree) => -prop_UnionValid t1 t2)) -. - -(*! QuickChick test_prop_UnionValid. *) - -Definition test_prop_InsertPost := -forAll gSized (fun (t: Tree) => -forAll arbitrary (fun (k: nat) => -forAll arbitrary (fun (k': nat) => -forAll arbitrary (fun (v: nat) => -prop_InsertPost t k k' v)))) -. - -(*! QuickChick test_prop_InsertPost. *) - -Definition test_prop_DeletePost := -forAll gSized (fun (t: Tree) => -forAll arbitrary (fun (k: nat) => -forAll arbitrary (fun (k': nat) => -prop_DeletePost t k k'))) -. - -(*! QuickChick test_prop_DeletePost. *) - -Definition test_prop_UnionPost := -forAll gSized (fun (t: Tree) => -forAll gSized (fun (t': Tree) => -forAll arbitrary (fun (k: nat) => -prop_UnionPost t t' k))) -. - -(*! QuickChick test_prop_UnionPost. *) - -Definition test_prop_InsertModel := -forAll gSized (fun (t: Tree) => -forAll arbitrary (fun (k: nat) => -forAll arbitrary (fun (v: nat) => -prop_InsertModel t k v))) -. - -(*! QuickChick test_prop_InsertModel. *) - -Definition test_prop_DeleteModel := -forAll gSized (fun (t: Tree) => -forAll arbitrary (fun (k: nat) => -prop_DeleteModel t k)) -. - -(*! QuickChick test_prop_DeleteModel. *) - -Definition test_prop_UnionModel := -forAll gSized (fun (t: Tree) => -forAll gSized (fun (t': Tree) => -prop_UnionModel t t')) -. - -(*! QuickChick test_prop_UnionModel. *) - -Definition test_prop_InsertInsert := -forAll gSized (fun (t: Tree) => -forAll arbitrary (fun (k: nat) => -forAll arbitrary (fun (k': nat) => -forAll arbitrary (fun (v: nat) => -forAll arbitrary (fun (v': nat) => -prop_InsertInsert t k k' v v'))))) -. - -(*! QuickChick test_prop_InsertInsert. *) - -Definition test_prop_InsertDelete := -forAll gSized (fun (t: Tree) => -forAll arbitrary (fun (k: nat) => -forAll arbitrary (fun (k': nat) => -forAll arbitrary (fun (v: nat) => -prop_InsertDelete t k k' v)))) -. - -(*! QuickChick test_prop_InsertDelete. *) - -Definition test_prop_InsertUnion := -forAll gSized (fun (t: Tree) => -forAll gSized (fun (t': Tree) => -forAll arbitrary (fun (k: nat) => -forAll arbitrary (fun (v: nat) => -prop_InsertUnion t t' k v)))) -. - -(*! QuickChick test_prop_InsertUnion. *) - -Definition test_prop_DeleteInsert := -forAll gSized (fun (t: Tree) => -forAll arbitrary (fun (k: nat) => -forAll arbitrary (fun (k': nat) => -forAll arbitrary (fun (v': nat) => -prop_DeleteInsert t k k' v')))) -. - -(*! QuickChick test_prop_DeleteInsert. *) - -Definition test_prop_DeleteDelete := -forAllShrink gSized shrink (fun (t: Tree) => -forAllShrink arbitrary shrink (fun (k: nat) => -forAllShrink arbitrary shrink (fun (k': nat) => -whenFail' (fun tt => show (t, k, k', delete k t, delete k' t, delete k (delete k' t), delete k' (delete k t))) -(prop_DeleteDelete t k k')))) -. - -(*! QuickChick test_prop_DeleteDelete. *) - -Definition test_prop_DeleteUnion := -forAll gSized (fun (t: Tree) => -forAll gSized (fun (t': Tree) => -forAll arbitrary (fun (k: nat) => -prop_DeleteUnion t t' k))) -. - -(*! QuickChick test_prop_DeleteUnion. *) - -Definition test_prop_UnionDeleteInsert := -forAll gSized (fun (t :Tree) => -forAll gSized (fun (t': Tree) => -forAll arbitrary (fun (k: nat) => -forAll arbitrary (fun (v: nat) => -prop_UnionDeleteInsert t t' k v)))) -. - -(*! QuickChick test_prop_UnionDeleteInsert. *) - -Definition test_prop_UnionUnionIdem := -forAll gSized (fun (t: Tree) => -prop_UnionUnionIdem t) -. - -(*! QuickChick test_prop_UnionUnionIdem. *) - -Definition test_prop_UnionUnionAssoc := -forAll gSized (fun (t1: Tree) => -forAll gSized (fun (t2: Tree) => -forAll gSized (fun (t3: Tree) => -prop_UnionUnionAssoc t1 t2 t3))) -. - -(*! QuickChick test_prop_UnionUnionAssoc. *) - " - ) -end - - -struct BSTGeneration <: Generation{BST} - t::KVTree.t - constructors_overapproximation::Vector{KVTree.t} -end -function generation_emit_stats(rs::RunState, g::BSTGeneration, s::String) -end -value(g::BSTGeneration) = g.t - -################################## -# Bespoke BST generator -################################## - -@enum BSTValues BSTActualVals BSTDummyVals BSTApproxVals -function str(x::BSTValues) - if x == BSTActualVals - "actual" - elseif x == BSTDummyVals - "dummy" - elseif x == BSTApproxVals - "approx" - else - error("") - end -end - -struct BespokeBSTGenerator <: GenerationParams{BST} - size::Integer - vals::BSTValues -end -BespokeBSTGenerator(; size, vals) = BespokeBSTGenerator(size, vals) -function to_subpath(p::BespokeBSTGenerator) - [ - "bst", - "bespoke", - str(p.vals), - "sz=$(p.size)", - ] -end -function generate(rs::RunState, p::BespokeBSTGenerator) - constructors_overapproximation = [] - function add_ctor(v::KVTree.t) - push!(constructors_overapproximation, v) - v - end - t = if p.vals == BSTDummyVals - gen_tree_dummy_vals(rs, p.size, add_ctor) - elseif p.vals == BSTApproxVals - gen_tree(rs, p.size, DistNat(0), DistNat(40), true, add_ctor) - elseif p.vals == BSTActualVals - gen_tree(rs, p.size, DistNat(0), DistNat(40), false, add_ctor) - else - error() - end - - BSTGeneration(t, constructors_overapproximation) -end - -################################## -# Type-based BST generator -################################## - -struct TypeBasedBSTGenerator <: GenerationParams{BST} - size::Integer - leaf_dependents::Vector{Symbol} - num_dependents::Vector{Symbol} - intwidth::Integer -end -TypeBasedBSTGenerator(; size, leaf_dependents, num_dependents, intwidth) = - TypeBasedBSTGenerator(size, leaf_dependents, num_dependents, intwidth) -function to_subpath(p::TypeBasedBSTGenerator) - [ - "bst", - "typebased", - "sz=$(p.size)", - "leaf_dependents=$(join(Base.map(string, p.leaf_dependents),"-"))", - "num_dependents=$(join(Base.map(string, p.num_dependents),"-"))", - "intwidth=$(p.intwidth)", - ] -end -function generate(rs::RunState, p::TypeBasedBSTGenerator) - constructors_overapproximation = [] - function add_ctor(v::KVTree.t) - push!(constructors_overapproximation, v) - v - end - t = typebased_gen_tree(rs, p, p.size, 20, add_ctor) - BSTGeneration(t, constructors_overapproximation) -end -function generation_params_emit_stats(rs::RunState, p::TypeBasedBSTGenerator, s) - save_coq_generator(rs, p, s, typebased_bst_to_coq) -end - -################################## -# Approx BST constructor entropy loss -################################## - -struct ApproxBSTConstructorEntropy <: LossConfig{BST} end -to_subpath(::ApproxBSTConstructorEntropy) = ["approx_ctor_entropy"] -function create_loss_manager(rs::RunState, p::ApproxBSTConstructorEntropy, generation::BSTGeneration) - println_flush(rs.io, "Building computation graph for $(p)...") - time_build_loss = @elapsed loss = sum( - neg_entropy(ctor_to_id(ctor), values(bst_ctor_to_id), ignore_non_support=true) - for ctor in generation.constructors_overapproximation - ) - println(rs.io, " $(time_build_loss) seconds") - println(rs.io) - create_simple_loss_manager(rs, loss) -end - -################################## -# RBT generation -################################## - -abstract type RBT <: Benchmark end -function sandwich(::Type{RBT}) - ( - "Require Import ZArith. -From QuickChick Require Import QuickChick. -From ExtLib Require Import Monad. -From ExtLib.Data.Monads Require Import OptionMonad. -Import QcNotation. -Import MonadNotation. -From Coq Require Import List. -Import ListNotations. - -From RBT Require Import Impl Spec.", -"(* --------------------- Tests --------------------- *) - -Definition test_prop_InsertValid := - forAll gSized (fun t => - forAll arbitrary (fun k => - forAll arbitrary (fun v => - (prop_InsertValid t k v)))). - -(*! QuickChick test_prop_InsertValid. *) - -Definition test_prop_DeleteValid := - forAll gSized (fun t => - forAll arbitrary (fun k => - prop_DeleteValid t k)). - -(*! QuickChick test_prop_DeleteValid. *) - -Definition test_prop_InsertPost := - forAll gSized (fun t => - forAll arbitrary (fun k => - forAll arbitrary (fun k' => - forAll arbitrary (fun v => - prop_InsertPost t k k' v)))). - -(*! QuickChick test_prop_InsertPost. *) - -Definition test_prop_DeletePost := - forAll gSized (fun t => - forAll arbitrary (fun k => - forAll arbitrary (fun k' => - prop_DeletePost t k k'))). - -(*! QuickChick test_prop_DeletePost. *) - -Definition test_prop_InsertModel := - forAll gSized (fun t => - forAll arbitrary (fun k => - forAll arbitrary (fun v => - prop_InsertModel t k v))). - -(*! QuickChick test_prop_InsertModel. *) - -Definition test_prop_DeleteModel := - forAll gSized (fun t => - forAll arbitrary (fun k => - prop_DeleteModel t k)). - -(*! QuickChick test_prop_DeleteModel. *) - -Definition test_prop_InsertInsert := - forAll gSized (fun t => - forAll arbitrary (fun k => - forAll arbitrary (fun k' => - forAll arbitrary (fun v => - forAll arbitrary (fun v' => - prop_InsertInsert t k k' v v'))))). - -(*! QuickChick test_prop_InsertInsert. *) - -Definition test_prop_InsertDelete := - forAll gSized (fun t => - forAll arbitrary (fun k => - forAll arbitrary (fun k' => - forAll arbitrary (fun v => - prop_InsertDelete t k k' v)))). - -(*! QuickChick test_prop_InsertDelete. *) - -Definition test_prop_DeleteInsert := - forAll gSized (fun t => - forAll arbitrary (fun k => - forAll arbitrary (fun k' => - forAll arbitrary (fun v' => - prop_DeleteInsert t k k' v')))). - -(*! QuickChick test_prop_DeleteInsert. *) - -Definition test_prop_DeleteDelete := - forAll gSized (fun t => - forAll arbitrary (fun k => - forAll arbitrary (fun k' => - prop_DeleteDelete t k k'))). - -(*! QuickChick test_prop_DeleteDelete. *) - " - ) -end - - -struct RBTGeneration <: Generation{RBT} - t::ColorKVTree.t -end -function generation_emit_stats(::RunState, g::RBTGeneration, s::String) -end -value(g::RBTGeneration) = g.t - -################################## -# Type-based RBT generator -################################## - -struct TypeBasedRBTGenerator <: GenerationParams{RBT} - size::Integer - leaf_dependents::Vector{Symbol} - red_dependents::Vector{Symbol} - num_dependents::Vector{Symbol} - stack_size::Integer - intwidth::Integer -end -TypeBasedRBTGenerator(; size, leaf_dependents, red_dependents, num_dependents, stack_size, intwidth) = - TypeBasedRBTGenerator(size, leaf_dependents, red_dependents, num_dependents, stack_size, intwidth) -function to_subpath(p::TypeBasedRBTGenerator) - [ - "rbt", - "typebased", - "sz=$(p.size)", - "leaf_dependents=$(join(Base.map(string, p.leaf_dependents),"-"))", - "red_dependents=$(join(Base.map(string, p.red_dependents),"-"))", - "num_dependents=$(join(Base.map(string, p.num_dependents),"-"))", - "stack_size=$(p.stack_size)", - "intwidth=$(p.intwidth)", - ] -end -function generate(rs::RunState, p::TypeBasedRBTGenerator) - RBTGeneration(tb_gen_rbt(rs, p, p.size, Color.Black(), empty_stack(p))) -end -function generation_params_emit_stats(rs::RunState, p::TypeBasedRBTGenerator, s) - save_coq_generator(rs, p, s, typebased_rbt_to_coq) -end - -################################## -# Property loss -################################## - -struct SatisfyPropertyLoss{T} <: LossConfig{T} - property::Property{T} -end -to_subpath(p::SatisfyPropertyLoss) = [name(p.property)] -function create_loss_manager(rs::RunState, p::SatisfyPropertyLoss, generation) - println_flush(rs.io, "Building computation graph for $(p)...") - time_build_loss = @elapsed begin - meets_property = check_property(p.property, value(generation)) - loss = -LogPr(meets_property) - end - println(rs.io, " $(time_build_loss) seconds") - println(rs.io) - - SimpleLossMgr(loss, nothing) - - # TODO: fix - # # Also print probability that property is met - # function f_emit′(tag) - # println_flush(rs.io, "Checking pr property met...") - # time_infer = @elapsed p_meets = pr_mixed(rs.var_vals)(meets_property)[true] - # println(rs.io, " $(time_infer) seconds") - - # println_flush(rs.io, "Pr meets property: $(p_meets)") - # println_flush(rs.io) - - # emit_stats(mgr, tag) - # end -end - -struct STLCWellTyped <: Property{STLC} end -function check_property(::STLCWellTyped, e::OptExpr.t) - @assert isdeterministic(e) - @match e [ - Some(e) -> (@match typecheck(e) [ - Some(_) -> true, - None() -> false, - ]), - None() -> false, - ] -end -name(::STLCWellTyped) = "stlcwelltyped" - -struct STLCMightType <: Property{STLC} end -function check_property(::STLCMightType, e::OptExpr.t) - @assert isdeterministic(e) - meets = might_typecheck(e) - # assert this this is strictly weaker than full welltyped - @assert !check_property(STLCWellTyped(), e) || meets "$(opt_stlc_str(Dice.frombits(e, Dict())))" - meets -end -name(::STLCMightType) = "stlcmighttype" - - -struct STLCMayType <: Property{STLC} end -function check_property(::STLCMayType, e::OptExpr.t) - @assert isdeterministic(e) - meets = may_typecheck(e) - # assert this this is strictly weaker than might type - @assert !check_property(STLCMightType(), e) || meets "$(opt_stlc_str(Dice.frombits(e, Dict())))" - @assert check_property(STLCMightType(), rem_num_bools(e)) == meets "eq to might rem $(opt_stlc_str(Dice.frombits(e, Dict())))" - - # only applies when arbitrary_prims = true - # @assert check_property(STLCMightType(), e) == meets "eq to might rem $(opt_stlc_str(Dice.frombits(e, Dict())))" - meets -end -name(::STLCMayType) = "stlcmaytype" - -struct STLCVarNumbers <: Property{STLC} end -function check_property(::STLCVarNumbers, e::OptExpr.t) - @assert isdeterministic(e) - meets = var_numberings_good(e) - # assert this this is strictly weaker than mighttype - @assert !check_property(STLCMightType(), e) || meets "$(opt_stlc_str(Dice.frombits(e, Dict())))" - meets -end -name(::STLCVarNumbers) = "stlcvarnumbers" - - - -struct BSTOrderInvariant <: Property{BST} end -check_property(::BSTOrderInvariant, t::KVTree.t) = - satisfies_order_invariant(t) -name(::BSTOrderInvariant) = "order" - - - -struct BookkeepingInvariant <: Property{RBT} end -check_property(::BookkeepingInvariant, t::ColorKVTree.t) = - satisfies_bookkeeping_invariant(t) -name(::BookkeepingInvariant) = "bookkeeping" - -struct BalanceInvariant <: Property{RBT} end -check_property(::BalanceInvariant, t::ColorKVTree.t) = - satisfies_balance_invariant(t) -name(::BalanceInvariant) = "balance" - -struct BlackRootInvariant <: Property{RBT} end -check_property(::BlackRootInvariant, t::ColorKVTree.t) = - satisfies_black_root_invariant(t) -name(::BlackRootInvariant) = "blackroot" - -struct OrderInvariant <: Property{RBT} end -check_property(::OrderInvariant, t::ColorKVTree.t) = - satisfies_order_invariant(t) -name(::OrderInvariant) = "order" - -struct MultipleInvariants{T} <: Property{T} - properties::Vector{<:Property{T}} -end -check_property(p::MultipleInvariants{T}, t) where T = - reduce(&, [ - check_property(property, t) - for property in p.properties - ]) -name(p::MultipleInvariants{T}) where T = - join([name(property) for property in p.properties], "AND") - -struct TrueProperty{T} <: Property{T} -end -check_property(::TrueProperty{T}, _) where T = true -name(::TrueProperty{T}) where T = "trueproperty" - -################################## -# Sampling STLC entropy loss -################################## - -function SamplingEntropy{T}(; resampling_frequency, samples_per_batch, property, eq, failure_penalty, forgiveness, rand_forgiveness, keyf) where T - SamplingEntropy{T}(resampling_frequency, samples_per_batch, property, eq, failure_penalty, forgiveness, rand_forgiveness, keyf) -end - -to_subpath(p::SamplingEntropy) = [ - "reinforce_sampling_entropy", - "freq=$(p.resampling_frequency)-spb=$(p.samples_per_batch)", - "eq=$(string(p.eq))", - "prop=$(name(p.property))", - "failure_penalty=$(p.failure_penalty)", - "forgiveness=$(p.forgiveness)", - "rand_forgiveness=$(p.rand_forgiveness)", - "keyf=$(p.keyf)", -] -function create_loss_manager(::RunState, p::SamplingEntropy{T}, g::Generation{T}) where T - function consider(sample) - c = check_property(p.property, sample) - @assert c isa Bool - c - end - SamplingEntropyLossMgr(p, value(g), consider) -end - -################################## -# MLE loss -################################## - -abstract type Metric{T} end -abstract type TargetDist end - -struct MLELossConfig{T} <: LossConfig{T} - metric::Metric{T} - target_dist::TargetDist -end -MLELossConfig(; metric::Metric{T}, target_dist) where T = MLELossConfig{T}(metric, target_dist) -to_subpath(p::MLELossConfig) = [name(p.metric), name(p.target_dist)] -function create_loss_manager(rs::RunState, p::MLELossConfig, generation) - println_flush(rs.io, "Building computation graph for $(p)...") - time_build_loss = @elapsed begin - metric = compute_metric(p.metric, generation) - loss = metric_loss(metric, p.target_dist) - end - println(rs.io, " $(time_build_loss) seconds") - println(rs.io) - - SimpleLossMgr(loss, nothing) -end - -struct RBTDepth <: Metric{RBT} end -compute_metric(::RBTDepth, gen::RBTGeneration) = rbt_depth(gen.t) -name(::RBTDepth) = "rbt_depth" - -struct TreeSize <: Metric{BST} end -compute_metric(::TreeSize, gen::BSTGeneration) = tree_size(gen.t) -name(::TreeSize) = "tree_size" - -struct NumApps <: Metric{STLC} end -compute_metric(::NumApps, gen::STLCGeneration) = num_apps(gen.e) -name(::NumApps) = "num_apps" - -struct TermSize <: Metric{STLC} end -compute_metric(::TermSize, gen::STLCGeneration) = term_size(gen.e) -name(::TermSize) = "term_size" - -struct Uniform <: TargetDist end -name(::Uniform) = "uniform" -function metric_loss(metric::Dist, ::Uniform) - mle_loss([ - BoolToMax(prob_equals(metric, DistUInt32(i))) - for i in support_mixed(metric) - ]) -end - -struct Linear <: TargetDist end -name(::Linear) = "linear" -function metric_loss(metric::Dist, ::Linear) - mle_loss([ - BoolToMax(prob_equals(metric, DistUInt32(i)), weight=i) - for i in support_mixed(metric) - ]) -end - -struct Target4321 <: TargetDist end -name(::Target4321) = "target4321" -function metric_loss(metric::Dist, ::Target4321) - mle_loss([ - BoolToMax(prob_equals(metric, DistUInt32(0)), weight=.4), - BoolToMax(prob_equals(metric, DistUInt32(1)), weight=.3), - BoolToMax(prob_equals(metric, DistUInt32(2)), weight=.2), - BoolToMax(prob_equals(metric, DistUInt32(3)), weight=.1), - ]) -end \ No newline at end of file diff --git a/examples/qc/benchmarks/dump_loss_graph.jl b/examples/qc/benchmarks/dump_loss_graph.jl deleted file mode 100644 index d40cf648..00000000 --- a/examples/qc/benchmarks/dump_loss_graph.jl +++ /dev/null @@ -1,50 +0,0 @@ -# run this at the bottom of main.jl to get a graphviz of the loss graph - -bool_roots = Dice.bool_roots -LogPrExpander = Dice.LogPrExpander -expand_logprs = Dice.expand_logprs - -@assert mgr.loss_mgr isa SimpleLossMgr - -loss = mgr.loss_mgr.loss - -l = LogPrExpander(WMC(BDDCompiler(bool_roots([loss])))) -eloss = expand_logprs(l, loss) - -vals, derivs = differentiate(var_vals, Derivs(eloss => 1)) -for (logpr, expanded) in l.cache - vals[logpr] = vals[expanded] - derivs[logpr] = if haskey(derivs, expanded) derivs[expanded] else 0 end -end - -using Graphs -using DirectedAcyclicGraphs: isinner - -function node_to_label(n) - name = if isinner(n) - last(Base.split(string(typeof(n)), ".")) - else - replace(string(n), "\"" => "\\\"") - end - "$(name)\\n$(vals[n])\\n$(derivs[n])" -end - -function dump_graph(path, node) - g, nodes = Dice.to_graph(node) - open(path, "w") do file - println(file, "digraph G {") - for (i, n) in enumerate(nodes) - if n isa Var || n isa LogPr - println(file, " $(i) [fillcolor=lightcyan, style=filled];") - end - println(file, " $(i) [label=\"$(node_to_label(n))\"];") - end - for e in edges(g) - println(file, " $(src(e)) -> $(dst(e));") - end - println(file, "}") - end -end - -dump_graph("loss.dot", loss) -dump_graph("eloss.dot", eloss) \ No newline at end of file diff --git a/examples/qc/benchmarks/lib/be.jl b/examples/qc/benchmarks/lib/be.jl deleted file mode 100644 index 9b0c5c01..00000000 --- a/examples/qc/benchmarks/lib/be.jl +++ /dev/null @@ -1,132 +0,0 @@ -function gen_expr_lang(expr_size, typ_size) - v = L.Var - p = L.Param - - nil_typ() = L.Construct(ListTyp.nil, []) - cons_typ(hd, tl) = L.Construct(ListTyp.cons, [hd, tl]) - - nil_nat() = L.Construct(ListNat.nil, []) - cons_nat(hd, tl) = L.Construct(ListNat.cons, [hd, tl]) - - none_expr() = L.Construct(OptExpr.None, []) - some_expr(x) = L.Construct(OptExpr.Some, [x]) - - app(x, y) = L.Construct(Expr.App, [x, y]) - var(n) = L.Construct(Expr.Var, [n]) - abs(x, y) = L.Construct(Expr.Abs, [x, y]) - bool(b) = L.Construct(Expr.Bool, [b]) - - tfun(x, y) = L.Construct(Typ.TFun, [x, y]) - tbool() = L.Construct(Typ.TBool, []) - - bind_opt_expr(x, sym, body) = L.BindGen(x, :_x, - L.Match(v(:_x), [ - (:None, []) => L.ReturnGen(L.Construct(OptExpr.None, [])), - (:Some, [sym]) => body - ]) - ) - - genVar = L.Function("genVar'", - [p(:ctx, Ctx.t), p(:t, Typ.t), p(:p, Nat.t), p(:r, ListNat.t)], ListNat.t, - L.Match(v(:ctx), [ - (:nil, []) => v(:r), - (:cons, [:t1, :ctx1]) => L.If( - L.Eq(v(:t), v(:t1)), - L.Call("genVar'", [v(:ctx1), v(:t), L.NatAdd([v(:p), L.Nat(1)]), cons_nat(v(:p), v(:r))]), - L.Call("genVar'", [v(:ctx1), v(:t), L.NatAdd([v(:p), L.Nat(1)]), v(:r)]), - ) - ]) - ) - - - genZero = L.Function("genZero", [p(:env, Ctx.t), p(:tau, Typ.t)], L.G{OptExpr.t}, - L.Match(v(:tau), [ - (:TBool, []) => L.BindGen( - L.GenBool([]), - :b, - L.ReturnGen(some_expr(bool(v(:b)))) - ), - (:TFun, [:T1, :T2]) => bind_opt_expr( - L.Call("genZero", [cons_typ(v(:T1), v(:env)), v(:T2)]), - :e, L.ReturnGen(some_expr(abs(v(:T1), v(:e)))) - ) - ]) - ) - - genTyp = L.Function("genTyp", [p(:size, Nat.t)], L.G{Typ.t}, - L.Match(L.Var(:size), [ - (:O, []) => L.ReturnGen(tbool()), - (:S, [:size1]) => L.Frequency([v(:size)], [ - "tbool" => L.ReturnGen(tbool()), - "tfun" => L.BindGen( - L.Call("genTyp", [v(:size1)]), - :T1, - L.BindGen( - L.Call("genTyp", [v(:size1)]), - :T2, - L.ReturnGen(tfun(v(:T1), v(:T2))) - ) - ), - ]) - ]) - ) - - genExpr = L.Function("genExpr", - [p(:env, ListTyp.t), p(:tau, Typ.t), p(:size, Nat.t)], L.G{OptExpr.t}, - L.Match(L.Var(:size), [ - (:O, []) => - L.BindGen( - L.Backtrack([v(:size)], none_expr(), [ - "var" => L.OneOf( - L.ReturnGen(none_expr()), - L.Map(ListOptExpr, - L.Lambda([:x], L.ReturnGen(some_expr(var(v(:x))))), - L.Call("genVar'", [v(:env), v(:tau), L.Nat(0), nil_nat()]) - ) - ), - "zero" => L.Call("genZero", [v(:env), v(:tau)]) - ]), - :res, L.ReturnGen(v(:res))), - (:S, [:size1]) => - L.BindGen( - L.Backtrack([v(:size)], none_expr(), [ - "var" => L.OneOf( - L.ReturnGen(none_expr()), - L.Map(ListOptExpr, - L.Lambda([:x], L.ReturnGen(some_expr(var(v(:x))))), - L.Call("genVar'", [v(:env), v(:tau), L.Nat(0), nil_nat()]) - ) - ), - "app" => L.BindGen( - L.Call("genTyp", [L.Nat(typ_size)]), :T1, - bind_opt_expr( - L.Call("genExpr", [v(:env), tfun(v(:T1), v(:tau)), v(:size1)]), - :e1, - bind_opt_expr( - L.Call("genExpr", [v(:env), v(:T1), v(:size1)]), - :e2, - L.ReturnGen(some_expr(app(v(:e1), v(:e2)))) - ) - ) - ), - "abs" => L.Match(v(:tau), [ - (:TBool, []) => - L.BindGen(L.GenBool([]), :b, L.ReturnGen(some_expr(bool(v(:b))))), - (:TFun, [:T1, :T2]) => - bind_opt_expr( - L.Call("genExpr", [cons_typ(v(:T1), v(:env)), v(:T2), v(:size1)]), - :e, L.ReturnGen(some_expr(abs(v(:T1), v(:e)))) - ) - ]) - ]), - :res, L.ReturnGen(v(:res))) - ]) - ) - - e = L.BindGen( - L.Call("genTyp", [L.Nat(typ_size)]), - :typ, - L.Call("genExpr", [nil_typ(), v(:typ), L.Nat(expr_size)]) - ) - L.Program([], [genVar, genZero, genTyp, genExpr], e) -end diff --git a/examples/qc/benchmarks/lib/bst/dist.jl b/examples/qc/benchmarks/lib/bst/dist.jl deleted file mode 100644 index 946435d4..00000000 --- a/examples/qc/benchmarks/lib/bst/dist.jl +++ /dev/null @@ -1,47 +0,0 @@ -# Define Tree -module KVTree - using Dice - using Main: DistNat - @inductive t E() T(t, DistNat, DistNat, t) -end -to_coq(::Type{KVTree.t}) = "Tree" - -bst_ctor_to_id = Dict( - :E => DistInt32(0), - :T => DistInt32(1), -) - -function ctor_to_id(ctor::KVTree.t) - match(ctor, [ - :E => () -> bst_ctor_to_id[:E] - :T => (_, _, _, _) -> bst_ctor_to_id[:T] - ]) -end - -function satisfies_order_invariant(t::KVTree.t) - function helper(t, lo, hi) - @match t [ - E() -> true, - T(l, k, v, r) -> begin - (if isnothing(lo) true else lo < k end) & - (if isnothing(hi) true else k < hi end) & - helper(l, lo, k) & - helper(r, k, hi) - end - ] - end - helper(t, nothing, nothing) -end - -function eq_except_numbers(x::KVTree.t, y::KVTree.t) - @match x [ - E() -> (@match y [ - E() -> true, - T(yl, yk, yv, yr) -> false, - ]), - T(xl, xk, xv, xr) -> (@match y [ - E() -> false, - T(yl, yk, yv, yr) -> eq_except_numbers(xl, yl) & eq_except_numbers(xr, yr), - ]), - ] -end diff --git a/examples/qc/benchmarks/lib/bst/generator.jl b/examples/qc/benchmarks/lib/bst/generator.jl deleted file mode 100644 index c6c591f1..00000000 --- a/examples/qc/benchmarks/lib/bst/generator.jl +++ /dev/null @@ -1,91 +0,0 @@ -safedec(x::DistUInt{T}) where T = @dice_ite if prob_equals(x, DistUInt{T}(0)) DistUInt{T}(0) else x - DistUInt{T}(1) end - -function gen_tree(rs, s::Integer, lo::DistNat, hi::DistNat, approx_unif::Bool, track_return) - track_return( - @dice_ite if s == 0 || hi - lo < DistNat(2) - KVTree.E() - else - s′ = s - 1 - if flip(register_weight!(rs, "sz$(s)")) - KVTree.E() - else - k = if approx_unif - unif_approx(lo + DistNat(1), safedec(hi)) - else - unif(lo + DistNat(1), safedec(hi)) - end - v = DistNat(0) # arbitrary - l = gen_tree(rs, s′, lo, k, approx_unif, track_return) - r = gen_tree(rs, s′, k, hi, approx_unif, track_return) - KVTree.T(l, k, v, r) - end - end - ) -end - -function gen_tree_dummy_vals(rs, s::Integer, track_return) - track_return( - @dice_ite if s == 0 - KVTree.E() - else - s′ = s - 1 - if flip(register_weight!(rs, "sz$(s)")) - KVTree.E() - else - k = DistNat(0) - v = DistNat(0) # arbitrary - l = gen_tree_dummy_vals(rs, s′, track_return) - r = gen_tree_dummy_vals(rs, s′, track_return) - KVTree.T(l, k, v, r) - end - end - ) -end - - -function typebased_gen_tree(rs, p, size::Integer, last_callsite, track_return) - function dependent_to_val(dependent) - if dependent == :size size - elseif dependent == :last_callsite last_callsite - else error() end - end - function dependents_to_flip(name, dependents) - if isnothing(dependents) - flip(.5) - else - group = collect(Base.map(dependent_to_val, dependents)) - flip_for(rs, name, group) - end - end - - track_return( - @dice_ite if size == 0 - KVTree.E() - else - s′ = size - 1 - if dependents_to_flip("leaf", p.leaf_dependents) - KVTree.E() - else - l = typebased_gen_tree(rs, p, s′, 10, track_return) - r = typebased_gen_tree(rs, p, s′, 11, track_return) - k = sum( - @dice_ite if dependents_to_flip("num$(n)", p.num_dependents) - DistUInt32(n) - else - DistUInt32(0) - end - for n in twopowers(p.intwidth) - ) - v = DistNat(0) # arbitrary - KVTree.T(l, k, v, r) - end - end - ) -end - -function tree_size(e::KVTree.t) - match(e, [ - :E => () -> DistUInt32(0), - :T => (l, k, v, r) -> DistUInt32(1) + tree_size(l) + tree_size(r), - ]) -end diff --git a/examples/qc/benchmarks/lib/bst/to_coq.jl b/examples/qc/benchmarks/lib/bst/to_coq.jl deleted file mode 100644 index df816d11..00000000 --- a/examples/qc/benchmarks/lib/bst/to_coq.jl +++ /dev/null @@ -1,264 +0,0 @@ -function typebased_bst_to_coq(p, adnodes_vals, io) - expected_matchid(s) = s in ["leaf", ["num$(n)" for n in twopowers(p.intwidth)]...] - - matchid_to_cases = Dict() - for (name, val) in adnodes_vals - matchid, case = split(name, "%%") - @assert expected_matchid(matchid) matchid - case = "(" * join([tocoq(eval(Meta.parse(x))) for x in split(case, "%")], ", ") * ")" - val = thousandths(val) - push!(get!(matchid_to_cases, matchid, []), (case, val)) - end - - function mk_match(dependents, matchid) - cases = matchid_to_cases[matchid] - cases = sort(cases) - if isnothing(dependents) - "500" - else - "match ($(join(map(string, dependents), ","))) with -$(join([" " ^ 9 * "| $(name) => $(w)" for (name, w) in cases], "\n")) - | _ => 500 - end" - end - end - - """ -From QuickChick Require Import QuickChick. Import QcNotation. -From Coq Require Import List. Import ListNotations. -From Coq Require Import ZArith. -From ExtLib Require Import Monad. -Import MonadNotation. - -From BST Require Import Impl. -From BST Require Import Spec. - -Fixpoint manual_gen_tree (size : nat) (last_callsite : nat) : G Tree := - match size with - | 0 => returnGen E - | S size' => - let weight_leaf := $(mk_match(p.leaf_dependents, "leaf")) in - freq [ - (weight_leaf, - returnGen E); - (1000-weight_leaf, - bindGen (manual_gen_tree size' 10) - (fun p0 : Tree => -$( - join( - [" let weight_$(n) := $(mk_match(p.num_dependents, "num$(n)")) in" - for n in twopowers(p.intwidth)], - "\n" - ) -) -$( - join( - [ -"bindGen (freq [ (weight_$(n), returnGen $(n)); (1000-weight_$(n), returnGen 0)]) -(fun n$(n) : nat => " - for n in twopowers(p.intwidth)], - "\n" - ) -) -let p1 := $(join(["n$(n)" for n in twopowers(p.intwidth)], "+")) in - bindGen arbitrary - (fun p2 : nat => - bindGen (manual_gen_tree size' 11) - (fun p3 : Tree => returnGen (T p0 p1 p2 p3))) - $(")" ^ p.intwidth) - ))] - end. - -Definition gSized : G Tree := - manual_gen_tree $(p.size) 20. - -Definition manual_shrink_tree := - fun x : Tree => - let - fix aux_shrink (x' : Tree) : list Tree := - match x' with - | E => [] - | T p0 p1 p2 p3 => - ([p0] ++ - map (fun shrunk : Tree => T shrunk p1 p2 p3) (aux_shrink p0) ++ - []) ++ - (map (fun shrunk : nat => T p0 shrunk p2 p3) (shrink p1) ++ []) ++ - (map (fun shrunk : nat => T p0 p1 shrunk p3) (shrink p2) ++ []) ++ - ([p3] ++ - map (fun shrunk : Tree => T p0 p1 p2 shrunk) (aux_shrink p3) ++ - []) ++ [] - end in - aux_shrink x. - - -#[global] -Instance shrTree : Shrink (Tree) := - {| shrink x := manual_shrink_tree x |}. - -Definition test_prop_InsertValid := - forAll gSized (fun (t: Tree) => - forAll arbitrary (fun (k: nat) => - forAll arbitrary (fun (v: nat) => - prop_InsertValid t k v))) -. - -(*! QuickChick test_prop_InsertValid. *) - -Definition test_prop_DeleteValid := - forAll gSized (fun (t: Tree) => - forAll arbitrary (fun (k: nat) => - prop_DeleteValid t k)) -. - -(*! QuickChick test_prop_DeleteValid. *) - - -Definition test_prop_UnionValid := - forAll gSized (fun (t1: Tree) => - forAll gSized (fun (t2: Tree) => - prop_UnionValid t1 t2)) -. - -(*! QuickChick test_prop_UnionValid. *) - -Definition test_prop_InsertPost := - forAll gSized (fun (t: Tree) => - forAll arbitrary (fun (k: nat) => - forAll arbitrary (fun (k': nat) => - forAll arbitrary (fun (v: nat) => - prop_InsertPost t k k' v)))) -. - -(*! QuickChick test_prop_InsertPost. *) - -Definition test_prop_DeletePost := - forAll gSized (fun (t: Tree) => - forAll arbitrary (fun (k: nat) => - forAll arbitrary (fun (k': nat) => - prop_DeletePost t k k'))) -. - -(*! QuickChick test_prop_DeletePost. *) - -Definition test_prop_UnionPost := - forAll gSized (fun (t: Tree) => - forAll gSized (fun (t': Tree) => - forAll arbitrary (fun (k: nat) => - prop_UnionPost t t' k))) -. - -(*! QuickChick test_prop_UnionPost. *) - -Definition test_prop_InsertModel := - forAll gSized (fun (t: Tree) => - forAll arbitrary (fun (k: nat) => - forAll arbitrary (fun (v: nat) => - prop_InsertModel t k v))) -. - -(*! QuickChick test_prop_InsertModel. *) - -Definition test_prop_DeleteModel := - forAll gSized (fun (t: Tree) => - forAll arbitrary (fun (k: nat) => - prop_DeleteModel t k)) -. - -(*! QuickChick test_prop_DeleteModel. *) - -Definition test_prop_UnionModel := - forAll gSized (fun (t: Tree) => - forAll gSized (fun (t': Tree) => - prop_UnionModel t t')) -. - -(*! QuickChick test_prop_UnionModel. *) - -Definition test_prop_InsertInsert := - forAll gSized (fun (t: Tree) => - forAll arbitrary (fun (k: nat) => - forAll arbitrary (fun (k': nat) => - forAll arbitrary (fun (v: nat) => - forAll arbitrary (fun (v': nat) => - prop_InsertInsert t k k' v v'))))) -. - -(*! QuickChick test_prop_InsertInsert. *) - -Definition test_prop_InsertDelete := - forAll gSized (fun (t: Tree) => - forAll arbitrary (fun (k: nat) => - forAll arbitrary (fun (k': nat) => - forAll arbitrary (fun (v: nat) => - prop_InsertDelete t k k' v)))) -. - -(*! QuickChick test_prop_InsertDelete. *) - -Definition test_prop_InsertUnion := - forAll gSized (fun (t: Tree) => - forAll gSized (fun (t': Tree) => - forAll arbitrary (fun (k: nat) => - forAll arbitrary (fun (v: nat) => - prop_InsertUnion t t' k v)))) -. - -(*! QuickChick test_prop_InsertUnion. *) - -Definition test_prop_DeleteInsert := - forAll gSized (fun (t: Tree) => - forAll arbitrary (fun (k: nat) => - forAll arbitrary (fun (k': nat) => - forAll arbitrary (fun (v': nat) => - prop_DeleteInsert t k k' v')))) -. - -(*! QuickChick test_prop_DeleteInsert. *) - -Definition test_prop_DeleteDelete := - forAllShrink gSized shrink (fun (t: Tree) => - forAllShrink arbitrary shrink (fun (k: nat) => - forAllShrink arbitrary shrink (fun (k': nat) => - whenFail' (fun tt => show (t, k, k', delete k t, delete k' t, delete k (delete k' t), delete k' (delete k t))) - (prop_DeleteDelete t k k')))) -. - -(*! QuickChick test_prop_DeleteDelete. *) - -Definition test_prop_DeleteUnion := - forAll gSized (fun (t: Tree) => - forAll gSized (fun (t': Tree) => - forAll arbitrary (fun (k: nat) => - prop_DeleteUnion t t' k))) -. - -(*! QuickChick test_prop_DeleteUnion. *) - -Definition test_prop_UnionDeleteInsert := - forAll gSized (fun (t :Tree) => - forAll gSized (fun (t': Tree) => - forAll arbitrary (fun (k: nat) => - forAll arbitrary (fun (v: nat) => - prop_UnionDeleteInsert t t' k v)))) -. - -(*! QuickChick test_prop_UnionDeleteInsert. *) - -Definition test_prop_UnionUnionIdem := - forAll gSized (fun (t: Tree) => - prop_UnionUnionIdem t) -. - -(*! QuickChick test_prop_UnionUnionIdem. *) - -Definition test_prop_UnionUnionAssoc := - forAll gSized (fun (t1: Tree) => - forAll gSized (fun (t2: Tree) => - forAll gSized (fun (t3: Tree) => - prop_UnionUnionAssoc t1 t2 t3))) -. - -(*! QuickChick test_prop_UnionUnionAssoc. *) - -""" -end diff --git a/examples/qc/benchmarks/lib/ifc/dist.jl b/examples/qc/benchmarks/lib/ifc/dist.jl deleted file mode 100644 index 44ee90ea..00000000 --- a/examples/qc/benchmarks/lib/ifc/dist.jl +++ /dev/null @@ -1,123 +0,0 @@ -using Dice - -@inductive Label L() M1() M2() H() -all_labels = [L(), M1(), M2(), H()] -bot = L() -@inductive BinOpT BAdd() BMult() BJoin() BFlowsTo() Beq() - -RegId = DistInt32 -@inductive Instr [ - # basic instructions - Put(DistInt32, RegId), - Mov(RegId, RegId), - Load(RegId, RegId), - Store(RegId, RegId), - Write(RegId, RegId), - BinOp(BinOpT, RegId, RegId, RegId), - Nop(), - Halt(), - Jump(RegId), - BNZ(DistInt32, RegId), - BCall(RegId, RegId, RegId), - BRet(), - - # public first-class labels - Lab(RegId, RegId), - PcLab(RegId), - PutLab(Label, RegId), - - # dynamic memory allocation - Alloc(RegId, RegId, RegId), - PGetOff(RegId, RegId), - PSetOff(RegId, RegId, RegId), - MSize(RegId, RegId), - MLab(RegId, RegId), -] - -@inductive OpCode [ - OpPut(), - OpMov(), - OpLoad(), - OpStore(), - OpWrite(), - OpBinOp(), - OpNop(), - OpJump(), - OpBNZ(), - OpBCall(), - OpBRet(), - # missing for Halt - OpLab(), - OpPcLab(), - OpPutLab(), - OpAlloc(), - OpPGetOff(), - OpPSetOff(), - OpMSize(), - OpMLab(), -] - -opCodes = [ - OpPut(), - OpMov(), - OpLoad(), - OpStore(), - OpWrite(), - OpBinOp(), - OpNop(), - OpJump(), - OpBNZ(), - OpBCall(), - OpBRet(), - OpLab(), - OpPcLab(), - OpPutLab(), - OpAlloc(), - OpPGetOff(), - OpPSetOff(), - OpMSize(), - OpMLab(), -] - - -Mframe = Block = Tuple{DistInt32, Label} -Imem = List{Instr} - -@inductive Pointer Ptr_(Mframe, DistInt32) - -@inductive Value Vint(DistInt32) Vptr(Pointer) Vlab(Label) -@inductive Atom Atm(Value, Label) - -@inductive PtrAtom PAtm(DistInt32, Label) - -Register = Atom -RegSet = List{Register} - -@inductive StackFrame SF(PtrAtom, RegSet, RegId, Label) -@inductive Stack ST(List{StackFrame}) - -@inductive Memframe{A} Fr(Label, List{A}) -# Definition mem A := Map.t (list (memframe A)). -# Definition memory := mem Atom. -# (* Specialize the Memory frame declaration *) -# Definition frame := memframe Atom. - -@inductive SState St(Imem, Memory, Stack, RegSet, PtrAtom) - -@inductive Variation{A} Var_(Label, A, A) - -@inductive Map{K,V} - -# Variation{SState} - -Info = Tuple{Mframe, DistInt32, List{Tuple{Mframe, DistInt32}}, DistInt32} - -function gen_BinOpT(rs) - frequency_for(rs, "BinOpT_weights", [ - BAdd(), BMult(), BJoin(), BFlowsTo(), Beq(), - ]) -end - -function gen_label(rs) - frequency_for(rs, "label_weights", all_labels) -end \ No newline at end of file diff --git a/examples/qc/benchmarks/lib/lang.jl b/examples/qc/benchmarks/lib/lang.jl deleted file mode 100644 index bd86913b..00000000 --- a/examples/qc/benchmarks/lib/lang.jl +++ /dev/null @@ -1,903 +0,0 @@ -using DataStructures - -module L - using Dice: InductiveType - # using DirectedAcyclicGraphs: Leaf, Inner - import DirectedAcyclicGraphs: NodeType, DAG, children, Leaf, Inner - - abstract type Expr <: DAG end - - abstract type G{T} end - - struct Param - name::Symbol - ty::Type - end - - mutable struct Loc <: Expr - end - NodeType(::Type{Loc}) = Leaf() - - # Basic operations - mutable struct Var <: Expr - s::Symbol - end - NodeType(::Type{Var}) = Leaf() - - mutable struct Nat <: Expr - x::Integer - function Nat(x) - @assert x >= 0 - new(x) - end - end - NodeType(::Type{Nat}) = Leaf() - - mutable struct Z <: Expr - x::Integer - end - NodeType(::Type{Z}) = Leaf() - - mutable struct Bool <: Expr - x::Base.Bool - end - NodeType(::Type{Bool}) = Leaf() - - mutable struct NatAdd <: Expr - xs::Vector{Expr} - end - NodeType(::Type{NatAdd}) = Inner() - children(x::NatAdd) = x.xs - - mutable struct ZAdd <: Expr - xs::Vector{Expr} - end - NodeType(::Type{ZAdd}) = Inner() - children(x::ZAdd) = x.xs - - mutable struct Eq <: Expr - x::Expr - y::Expr - end - NodeType(::Type{Eq}) = Inner() - children(x::Eq) = [x.x, x.y] - - mutable struct If <: Expr - c::Expr - t::Expr - e::Expr - end - NodeType(::Type{If}) = Inner() - children(x::If) = [x.c, x.t, x.e] - - mutable struct Construct <: Expr - ctor::Main.Function - args::Vector{Expr} - end - NodeType(::Type{Construct}) = Inner() - children(x::Construct) = x.args - - mutable struct Match <: Expr - scrutinee::Expr - branches::Vector{Pair{Main.Tuple{Symbol,Vector{Symbol}},Expr}} - end - NodeType(::Type{Match}) = Inner() - children(x::Match) = vcat([x.scrutinee], [ - body - for ((ctor, args), body) in x.branches - ]) - - mutable struct Call <: Expr - f::String - args::Vector{Expr} - end - NodeType(::Type{Call}) = Inner() - children(x::Call) = x.args - - mutable struct Tuple <: Expr - tys::Vector{Type} - components::Vector{Expr} - end - NodeType(::Type{Tuple}) = Inner() - children(x::Tuple) = x.components - - mutable struct UnpackTuple <: Expr - e::Expr - bindings::Vector{Param} - body::Expr - end - NodeType(::Type{UnpackTuple}) = Inner() - children(x::UnpackTuple) = [x.e, x.body] - - # Not first-class (doesn't subtype Expr). - # They can capture values, so it'd be extra work to implement closures. - mutable struct Lambda <: DAG - params::Vector{Symbol} - body::Expr - end - NodeType(::Type{Lambda}) = Inner() - children(x::Lambda) = [x.body] - - mutable struct Map <: Expr - dest_module::Module - f::Lambda - l::Expr # must be a dist that defines map, like ListExpr.t - end - NodeType(::Type{Map}) = Inner() - children(x::Map) = [x.f, x.l] - - # Randomness - mutable struct BindGen <: Expr - gen::Expr - var::Symbol - body::Expr - end - NodeType(::Type{BindGen}) = Inner() - children(x::BindGen) = [x.gen, x.body] - - mutable struct ReturnGen <: Expr - x::Expr - end - NodeType(::Type{ReturnGen}) = Inner() - children(x::ReturnGen) = [x.x] - - mutable struct OneOf <: Expr - default::Expr - x::Expr # must be a dist that defines map, like ListExpr.t - end - NodeType(::Type{OneOf}) = Inner() - children(x::OneOf) = [x.default, x.x] - - mutable struct Frequency <: Expr - dependents::Vector{Expr} - branches::Vector{Pair{String,Expr}} - end - NodeType(::Type{Frequency}) = Inner() - children(x::Frequency) = vcat(x.dependents, [body for (name, body) in x.branches]) - - mutable struct Backtrack <: Expr - dependents::Vector{Expr} - none::Expr - branches::Vector{Pair{String,Expr}} - end - NodeType(::Type{Backtrack}) = Inner() - children(x::Backtrack) = vcat(x.dependents, [x.none], [body for (name, body) in x.branches]) - - mutable struct GenNat <: Expr - dependents::Vector{Expr} - width::Unsigned - end - NodeType(::Type{GenNat}) = Inner() - children(x::GenNat) = x.dependents - - mutable struct GenZ <: Expr - dependents::Vector{Expr} - width::Unsigned - end - NodeType(::Type{GenZ}) = Inner() - children(x::GenZ) = x.dependents - - mutable struct GenBool <: Expr - dependents::Vector{Expr} - end - NodeType(::Type{GenBool}) = Inner() - children(x::GenBool) = x.dependents - - mutable struct ArbitraryBool <: Expr end - NodeType(::Type{ArbitraryBool}) = Leaf() - - mutable struct ArbitraryNat <: Expr end - NodeType(::Type{ArbitraryNat}) = Leaf() - - mutable struct ArbitraryZ <: Expr end - NodeType(::Type{ArbitraryZ}) = Leaf() - - # Functions - mutable struct Function <: DAG - name::String - params::Vector{Param} - ret_ty::Type - body::Expr - end - NodeType(::Type{Function}) = Inner() - children(x::Function) = [x.body] - - mutable struct Program <: DAG - type_modules::Vector{Module} - functions::Vector{Function} - res::Expr - end - NodeType(::Type{Program}) = Inner() - children(x::Program) = vcat(x.functions, [x.res]) -end - -function for_between(f, f_between, xs) - for (i, x) in enumerate(xs) - f(x) - if i < length(xs) - f_between() - end - end -end - -function Base.show(io::IO, x::Union{L.Program,L.Function,L.Expr,L.Lambda}) - ty = typeof(x) - show(io, ty) - print(io, "(") - for_between(() -> print(io, ", "), fieldnames(ty)) do field - show(io, getfield(x, field)) - end - print(io, ")") -end - -using DirectedAcyclicGraphs: children, isinner -dumbprint(x) = [getfield(x, field) for field in fieldnames(typeof(x))] -function check_tree(prog) - prim_map = Dict() - loc_map = Dict() - tuple_tys = Set() - - prim_cts = Dict( - L.Frequency => 0, - L.Backtrack => 0, - L.GenNat => 0, - L.GenZ => 0, - L.GenBool => 0, - ) - - parent_of = Dict() - seen = Set{Any}([prog]) - to_visit = Deque{Any}() - push!(to_visit, prog) - while !isempty(to_visit) - x = popfirst!(to_visit) - - xty = typeof(x) - if haskey(prim_cts, xty) - prim_cts[xty] += 1 - prim_map[x] = "$(nameof(xty))$(prim_cts[xty])" - end - - if x isa L.Loc - loc_map[x] = length(loc_map) + 1 - end - - if x isa L.Tuple - tys = Tuple(x.tys) - push!(tuple_tys, tys) - end - - - if isinner(x) - for y in children(x) - if y in seen - println("====") - println("duplicate: $(y) $(dumbprint(y))") - println("second parent: $(x) $(dumbprint(x))") - println("first parent: $(parent_of[y]) $(dumbprint(parent_of[y]))") - error() - end - push!(seen, y) - parent_of[y] = x - push!(to_visit, y) - end - end - end - - prim_map, loc_map, tuple_tys -end - -Env = Dict{Symbol, Any} - -# Interpret to a Dice dist -function interp(rs::RunState, prog::L.Program) - prim_map, loc_map, tuple_tys = check_tree(prog) - - function with_binding(env, from, to) - env2 = copy(env) - env2[from] = to - env2 - end - - functions = Dict( - f.name => f - for f in prog.functions - ) - - function_results = Dict( - f.name => [] - for f in prog.functions - ) - - function interp(env::Env, x::L.Var) - env[x.s] - end - - function interp(env::Env, x::L.Loc) - DistUInt32(loc_map[x]) - end - - function interp(env::Env, x::L.Nat) - DistUInt32(x.x) - end - - function interp(env::Env, x::L.Z) - DistInt32(x.x) - end - - function interp(env::Env, x::L.Bool) - x.x - end - - function interp(env::Env, x::L.NatAdd) - sum( - interp(env, y) - for y in x.xs - ) - end - - function interp(env::Env, x::L.ZAdd) - sum( - interp(env, y) - for y in x.xs - ) - end - - function interp(env::Env, x::L.Eq) - prob_equals( - interp(env, x.x), - interp(env, x.y), - ) - end - - function interp(env::Env, x::L.If) - @dice_ite if interp(env, x.c) - interp(env, x.t) - else - interp(env, x.e) - end - end - - function interp(env::Env, x::L.Construct) - x.ctor([interp(env, arg) for arg in x.args]...) - end - - function interp(env::Env, x::L.Tuple) - Tuple([interp(env, component) for component in x.components]) - end - - function interp(env::Env, x::L.UnpackTuple) - tup = interp(env, x.e) - env1 = copy(env) - @assert length(x.bindings) == length(tup) - for (param, v) in zip(x.bindings, tup) - env1[param.name] = v - end - - interp(env1, x.body) - end - - function interp(env::Env, x::L.Match) - Dice.match(interp(env, x.scrutinee), [ - ctor => (args...) -> begin - @assert length(args) == length(vars) - env1 = copy(env) - for (var, arg) in zip(vars, args) - env1[var] = arg - end - interp(env1, body) - end - for ((ctor, vars), body) in x.branches - ]) - end - - function interp(env::Env, x::L.Call) - f = functions[x.f] - @assert length(f.params) == length(x.args) - res = interp( - Env( - param.name => interp(env, arg) - for (param, arg) in zip(f.params, x.args) - ), - f.body - ) - push!(function_results[x.f], res) - res - end - - function interp(env::Env, x::L.Lambda) - error("Lambdas should be interped by Map.") - end - - function interp(env::Env, x::L.Map) - @assert length(x.f.params) == 1 - prob_map( - x.dest_module, - y -> begin - interp(with_binding(env, x.f.params[1], y), x.f.body) - end, - interp(env, x.l) - ) - end - - function interp(env::Env, x::L.BindGen) - # we're always in the monad. this is just a let - interp( - with_binding(env, x.var, interp(env, x.gen)), - x.body - ) - end - - function interp(env::Env, x::L.ReturnGen) - # always already in the monad - interp(env, x.x) - end - - function interp(env::Env, x::L.OneOf) - one_of( - interp(env, x.default), - interp(env, x.x), - ) - end - - function interp(env::Env, x::L.Frequency) - dependents = [interp(env, dependent) for dependent in x.dependents] - frequency_for(rs, prim_map[x], dependents, [ - name => interp(env, body) - for (name, body) in x.branches - ]) - end - - function interp(env::Env, x::L.Backtrack) - dependents = [interp(env, dependent) for dependent in x.dependents] - backtrack_for(rs, prim_map[x], dependents, [ - name => interp(env, body) - for (name, body) in x.branches - ], - interp(env, x.none) - ) - end - - function interp(env::Env, x::L.GenNat) - name = prim_map[x] - dependents = [interp(env, dependent) for dependent in x.dependents] - sum( - @dice_ite if flip_for(rs, "$(name)_num$(n)", dependents) - DistUInt32(n) - else - DistUInt32(0) - end - for n in twopowers(x.width) - ) - end - - function interp(env::Env, x::L.GenZ) - name = prim_map[x] - dependents = [interp(env, dependent) for dependent in x.dependents] - sum( - @dice_ite if flip_for(rs, "$(name)_num$(n)", dependents) - DistInt32(n) - else - DistInt32(0) - end - for n in twopowers(x.width) - ) - end - - function interp(env::Env, x::L.GenBool) - name = prim_map[x] - dependents = [interp(env, dependent) for dependent in x.dependents] - flip_for(rs, "$(name)_true", dependents) - end - - function interp(env::Env, x::L.ArbitraryBool) - true - end - - function interp(env::Env, x::L.ArbitraryNat) - DistUInt32(0) - end - - function interp(env::Env, x::L.ArbitraryZ) - DistInt32(0) - end - - res = interp(Env(), prog.res) - - res, prim_map, function_results -end - -to_coq(::Type{L.G{T}}) where T = "G ($(to_coq(T)))" - -# Translate to a Coq program -function to_coq(rs::RunState, p::GenerationParams{T}, prog::L.Program)::String where T - prim_map, loc_map, tuple_tys = check_tree(prog) - - vals = compute(rs.var_vals, values(rs.adnodes_of_interest)) - adnodes_vals = Dict(s => vals[adnode] for (s, adnode) in rs.adnodes_of_interest) - - matchid_to_cases = Dict() - for (name, val) in adnodes_vals - matchid, case = split(name, "%%") - case = if case == "" "tt" else "(" * join([tocoq(eval(Meta.parse(x))) for x in split(case, "%")], ", ") * ")" end - val = hundredths(val) - push!(get!(matchid_to_cases, matchid, []), (case, val)) - end - - before, after = if p isa LangBespokeSTLCGenerator - sandwichmaybestlc() - else - sandwich(T) - end - - segments = [] - # Emit line - indent = 0 - function e!(s=""; indent_=nothing) - if isnothing(indent_) - indent_ = indent - end - segment = if s == "" - # don't indent empty line - "" - else - " " ^ indent_ * s - end - push!(segments, segment) - end - # Emit with outer indent - o!(s) = e!(s, indent_=indent-1) - # Append to last line - function a!(s) - @assert !isempty(segments) - # if starting a new line, include indent - if segments[end] == "" || segments[end][end] == '\n' - s = " " ^ indent * s - end - segments[end] = segments[end] * s - end - - function for_indent(f, iter) - indent += 1 - map(f, iter) - indent -= 1 - end - - space() = a!(" ") - - function for_between_indent(f, f_between, xs) - indent += 1 - for_between(f, f_between, xs) - indent -= 1 - end - - - function with_indent(f) - indent += 1 - res = f() - indent -= 1 - return res - end - - function visit(x::L.Var) - a!(string(x.s)) - end - - function visit(x::L.Loc) - a!(string(loc_map[x])) - end - - function visit(x::L.Nat) - a!("$(x.x)") - end - - function visit(x::L.Z) - a!("$(x.x)%Z") - end - - function visit(x::L.Bool) - a!("$(x.x)") - end - - function visit(x::L.NatAdd) - a!("(") - for_between(() -> a!(" + "), x.xs) do x - visit(x) - end - a!(")") - end - - function visit(x::L.ZAdd) - a!("(") - for_between(() -> a!(" + "), x.xs) do x - visit(x) - end - a!(")%Z") - end - - function visit(x::L.Eq) - visit(x.x) - a!(" = ") - visit(x.y) - a!("?") - end - - function visit(x::L.If) - e!("if ") - visit(x.c) - a!(" then\n") - with_indent() do - visit(x.t) - end - e!("else\n") - with_indent() do - visit(x.e) - end - end - - function visit(x::L.Construct) - a!("($(nameof(x.ctor)) ") - for_between(space, x.args) do arg - visit(arg) - end - a!(")") - end - - function visit(x::L.Match) - a!("match ") - visit(x.scrutinee) - a!(" with") - for_indent(x.branches) do ((ctor, args), body) - o!("| $(ctor) $(join([string(arg) for arg in args], " ")) => ") - visit(body) - end - e!("end") - end - - tuple_to_struct(tys) = "Mk$(join([to_coq(ty) for ty in tys]))" - - function visit(x::L.Tuple) - tys = Tuple(x.tys) - a!("($(tuple_to_struct(tys)) ") - for_between(() -> a!(" "), x.components) do component - visit(component) - end - a!(")") - - end - - function visit(x::L.UnpackTuple) - tys = Tuple(param.ty for param in x.bindings) - a!("(let '($(tuple_to_struct(tys)) $(join([param.name for param in x.bindings], " "))) := ") - visit(x.e) - a!(" in\n") - visit(x.body) - a!(")") - end - - function visit(x::L.Call) - a!("($(x.f) ") - for_between(space, x.args) do arg - visit(arg) - end - a!(")") - end - - function visit(x::L.Lambda) - e!("(fun $(join([string(param) for param in x.params], " ")) => ") - with_indent() do - visit(x.body) - end - a!(")") - end - - function visit(x::L.Map) - e!("(map ") - visit(x.f) - space() - visit(x.l) - a!(")") - end - - function visit(x::L.BindGen) - e!("(bindGen ") - visit(x.gen) - space() - visit(L.Lambda([x.var], x.body)) - a!(")") - end - - function visit(x::L.ReturnGen) - e!("(returnGen ") - visit(x.x) - a!(")") - end - - function visit(x::L.OneOf) - e!("(oneOf_ ") - visit(x.default) - space() - visit(x.x) - a!(")") - end - - coq_tuple(names) = if isempty(names) - "tt" - else - "($(join(names, ", ")))" - end - - function ematch!(name, dependents) - a!("match (") - if isempty(dependents) - a!("tt") - else - for_between(() -> a!(", "), dependents) do dep - visit(dep) - end - end - a!(") with") - - if haskey(matchid_to_cases, name) - cases = matchid_to_cases[name] - cases = sort(cases) - for (name, w) in cases - e!("| $(name) => $(w)") - end - if !isempty(dependents) - e!("| _ => 500") - end - else - e!("(* This match is dead code *) | _ => 500") - end - e!("end") - end - - function visit(x::L.Frequency) - name = prim_map[x] - if length(x.branches) == 1 - e!("(* $(name) (single-branch) *) ") - visit(x.branches[1][2]) - else - e!("(* $(name) *) (freq [") - for_between_indent(() -> a!("; "), x.branches) do (brname, body) - e!("(* $(brname) *) (") - ematch!("$(name)_$(brname)", x.dependents) - a!(",") - visit(body) - a!(")") - end - a!("])") - end - end - - function visit(x::L.Backtrack) - name = prim_map[x] - e!("(* $(name) *) (backtrack [") - for_between_indent(() -> a!("; "), x.branches) do (brname, body) - e!("((* $(brname) *)") - ematch!("$(prim_map[x])_$(brname)", x.dependents) - a!(",") - visit(body) - a!(")") - end - a!("])") - end - - function visit(x::L.GenNat) - name = prim_map[x] - e!("(* $(name) *)") - for n in twopowers(x.width) - e!("(let _weight_$(n) := ") - ematch!("$(name)_num$(n)", x.dependents) - e!("in") - e!("bindGen (freq [") - e!(" (_weight_$(n), returnGen $(n));") - e!(" (100-_weight_$(n), returnGen 0)") - e!("]) (fun n$(n) =>") - end - e!(" returnGen ($(join(["n$(n)" for n in twopowers(x.width)], " + ")))") - e!(")" ^ (x.width * 2)) - end - - function visit(x::L.GenZ) - name = prim_map[x] - e!("(* $(name) *)") - for n in twopowers(x.width) - e!("(let _weight_$(n) := ") - ematch!("$(name)_num$(n)", x.dependents) - e!("in") - e!("bindGen (freq [") - e!(" (_weight_$(n), returnGen $(n)%Z);") - e!(" (100-_weight_$(n), returnGen 0%Z)") - e!("]) (fun n$(n) =>") - end - e!(" returnGen ($(join(["n$(n)" for n in twopowers(x.width)], " + ")))%Z") - e!(")" ^ (x.width * 2)) - end - - function visit(x::L.GenBool) - name = prim_map[x] - e!("(* $(name) *) (let _weight_true := ") - ematch!("$(name)_true", x.dependents) - e!("in") - e!("freq [") - e!(" (_weight_true, returnGen true);") - e!(" (100-_weight_true, returnGen false)") - e!("])") - end - - function visit(x::L.ArbitraryBool) - e!("arbitrary") - end - - function visit(x::L.ArbitraryNat) - e!("arbitrary") - end - - function visit(x::L.ArbitraryZ) - e!("arbitrary") - end - - function visit(x::L.Function) - recursive = any((y -> y isa L.Call && y.f == x.name), x) - if recursive - e!("Fixpoint $(x.name) ") - else - e!("Definition $(x.name) ") - end - for_between(() -> a!(" "), x.params) do param - a!("($(param.name) : $(to_coq(param.ty)))") - end - a!(" : $(to_coq(x.ret_ty)) :=\n") - with_indent() do - visit(x.body) - end - a!(".") - e!() - end - - function visit(x::L.Program) - for f in x.functions - visit(f) - end - e!("Definition gSized :=\n") - with_indent() do - visit(x.res) - end - a!(".") - e!() - end - - e!(before) - e!() - - for type_module in prog.type_modules - e!("Inductive $(nameof(type_module)) :=") - for_indent(variants(type_module.t)) do (ctor, params) - @assert isempty(params) "params not supported yet" - e!("| $(nameof(ctor))") - end - a!(".") - e!() - end - - for tys in tuple_tys - s = join([to_coq(ty) for ty in tys]) - e!("Inductive Tup$(s) :=") - with_indent() do - e!("| Mk$(s) : ") - for ty in tys - a!("$(to_coq(ty)) -> ") - end - a!("Tup$(s).\n") - end - end - - - visit(prog) - - e!(after) - - join(segments, "\n") -end diff --git a/examples/qc/benchmarks/lib/lib.jl b/examples/qc/benchmarks/lib/lib.jl deleted file mode 100644 index 34759f00..00000000 --- a/examples/qc/benchmarks/lib/lib.jl +++ /dev/null @@ -1,31 +0,0 @@ -using Dice -using Dates -using Random - -DistNat = DistUInt32 - -struct RunState - var_vals::Valuation - adnodes_of_interest::Dict{String,ADNode} - io::IO - out_dir::String - rng::AbstractRNG - prim_map - p -end - -include("lang.jl") -include("util.jl") -include("lruset/dist.jl") -include("lruset/generator.jl") -include("stlc/dist.jl") -include("stlc/generator.jl") -include("stlc/to_coq.jl") -include("stlc/to_coq_tb.jl") -include("bst/dist.jl") -include("bst/generator.jl") -include("bst/to_coq.jl") -include("rbt/dist.jl") -include("rbt/generator.jl") -include("rbt/to_coq.jl") -include("be.jl") diff --git a/examples/qc/benchmarks/lib/lruset/dist.jl b/examples/qc/benchmarks/lib/lruset/dist.jl deleted file mode 100644 index 03f646a1..00000000 --- a/examples/qc/benchmarks/lib/lruset/dist.jl +++ /dev/null @@ -1,13 +0,0 @@ -module LRUS - using Dice - @inductive Statement Insert(DistInt32) Contains(DistInt32) PopStale() - @inductive Program Nil() Cons(Statement, Program) - - function vec_to_program(v) - if isempty(v) - Nil() - else - Cons(v[1], vec_to_program(v[2:end])) - end - end -end diff --git a/examples/qc/benchmarks/lib/lruset/generator.jl b/examples/qc/benchmarks/lib/lruset/generator.jl deleted file mode 100644 index fdfdf825..00000000 --- a/examples/qc/benchmarks/lib/lruset/generator.jl +++ /dev/null @@ -1,17 +0,0 @@ -function bespoke_gen_lrusp(rs, sz) - @dice_ite if sz == 0 || flip(register_weight!(rs, "nil$(sz)")) - LRUS.Nil() - else - LRUS.Cons( - frequency([ - register_weight!(rs, "insert$(sz)") => - LRUS.Insert(uniform(DistInt32, 0, 3)), - register_weight!(rs, "contains$(sz)") => - LRUS.Contains(uniform(DistInt32, 0, 3)), - register_weight!(rs, "popstale$(sz)") => - LRUS.PopStale(), - ]), - bespoke_gen_lrusp(rs, sz - 1) - ) - end -end \ No newline at end of file diff --git a/examples/qc/benchmarks/lib/rbt/dist.jl b/examples/qc/benchmarks/lib/rbt/dist.jl deleted file mode 100644 index 1c29802a..00000000 --- a/examples/qc/benchmarks/lib/rbt/dist.jl +++ /dev/null @@ -1,118 +0,0 @@ - -# Define RBTree -using Dice - -module Color - using Dice - @inductive t R() B() -end -function Base.string(c::Color.t) - @assert isdeterministic(c) - @match c [ - R() -> "Color.R()", - B() -> "Color.B()", - ] -end -to_coq(::Type{Color.t}) = "Color" - -module ColorKVTree - using Dice - using Main: DistNat, Color - @inductive t E() T(Color.t, t, DistInt32, DistInt32, t) -end -to_coq(::Type{ColorKVTree.t}) = "Tree" - -function tree_size(e::ColorKVTree.t) - @match e [ - E() -> DistUInt32(0), - T(c, l, k, v, r) -> DistUInt32(1) + tree_size(l) + tree_size(r), - ] -end - -function rbt_depth(e::ColorKVTree.t) - @match e [ - E() -> DistUInt32(0), - T(c, l, k, v, r) -> begin - ldepth = rbt_depth(l) - rdepth = rbt_depth(r) - DistUInt32(1) + @dice_ite if ldepth > rdepth ldepth else rdepth end - end - ] -end - -is_red(c::Color.t) = matches(c, :R) - -# Check that all paths through the tree have the same number of black nodes -function satisfies_bookkeeping_invariant(e::ColorKVTree.t) - function black_height_and_valid(t::ColorKVTree.t) - @match t [ - E() -> (DistUInt32(1), true), - T(c, l, k, v, r) -> begin - left_black_height, left_valid = black_height_and_valid(l) - right_black_height, right_valid = black_height_and_valid(r) - @dice_ite if left_valid & right_valid & prob_equals(left_black_height, right_black_height) - left_black_height + if is_red(c) DistUInt32(0) else DistUInt32(1) end, true - else - DistUInt32(0), false - end - end, - ] - end - _black_height, valid = black_height_and_valid(e) - valid -end - -# Check that all red nodes have black children -function satisfies_balance_invariant(e::ColorKVTree.t) - function color_and_valid(t::ColorKVTree.t) - @match t [ - E() -> (Color.B(), true), - T(c, l, k, v, r) -> begin - left_color, left_valid = color_and_valid(l) - right_color, right_valid = color_and_valid(r) - @dice_ite if left_valid & right_valid & !(is_red(c) & (is_red(left_color) | is_red(right_color))) - c, true - else - c, false - end - end, - ] - end - _color, valid = color_and_valid(e) - valid -end - -function satisfies_black_root_invariant(t::ColorKVTree.t) - @match t [ - E() -> true, - T(c, l, k, v, r) -> !is_red(c) - ] -end - -function satisfies_order_invariant(t::ColorKVTree.t) - function helper(t, lo, hi) - @match t [ - E() -> true, - T(c, l, k, v, r) -> begin - (if isnothing(lo) true else lo < k end) & - (if isnothing(hi) true else k < hi end) & - helper(l, lo, k) & - helper(r, k, hi) - end - ] - end - helper(t, nothing, nothing) -end - -function eq_except_numbers(x::ColorKVTree.t, y::ColorKVTree.t) - @match x [ - E() -> (@match y [ - E() -> true, - T(yc, yl, yk, yv, yr) -> false, - ]), - T(xc, xl, xk, xv, xr) -> (@match y [ - E() -> false, - T(yc, yl, yk, yv, yr) -> prob_equals(xc, yc) & eq_except_numbers(xl, yl) & eq_except_numbers(xr, yr), - ]), - ] -end diff --git a/examples/qc/benchmarks/lib/rbt/generator.jl b/examples/qc/benchmarks/lib/rbt/generator.jl deleted file mode 100644 index b2a0af1c..00000000 --- a/examples/qc/benchmarks/lib/rbt/generator.jl +++ /dev/null @@ -1,44 +0,0 @@ -function twopowers(n) - [2^(i-1) for i in 1:n] -end - -function tb_gen_rbt(rs, p, sz, parent_color, stack_tail) - function get_dependent_dist(dependent) - if dependent == :size sz - elseif dependent == :parent_color parent_color - elseif dependent == :stack_tail stack_tail - else error() end - end - function dependents_to_flip(name, dependents) - if isnothing(dependents) - flip(.5) - else - group = collect(Base.map(get_dependent_dist, dependents)) - flip_for(rs, name, group) - end - end - - if sz == 0 - ColorKVTree.Leaf() - else - flip_leaf = dependents_to_flip("leaf", p.leaf_dependents) - @dice_ite if flip_leaf - ColorKVTree.Leaf() - else - flip_red = dependents_to_flip("red", p.red_dependents) - color = @dice_ite if flip_red Color.Red() else Color.Black() end - k = sum( - @dice_ite if dependents_to_flip("num$(n)", p.num_dependents) - DistInt32(n) - else - DistInt32(0) - end - for n in twopowers(p.intwidth) - ) - v = DistInt32(0) - l = tb_gen_rbt(rs, p, sz - 1, color, update_stack_tail(p, stack_tail, 10)) - r = tb_gen_rbt(rs, p, sz - 1, color, update_stack_tail(p, stack_tail, 11)) - ColorKVTree.Node(color, l, k, v, r) - end - end -end \ No newline at end of file diff --git a/examples/qc/benchmarks/lib/rbt/to_coq.jl b/examples/qc/benchmarks/lib/rbt/to_coq.jl deleted file mode 100644 index 64778b21..00000000 --- a/examples/qc/benchmarks/lib/rbt/to_coq.jl +++ /dev/null @@ -1,178 +0,0 @@ -flatten = Iterators.flatten - -function tocoq(c::Color.t) - @match c [ - Red() -> "R", - Black() -> "B", - ] -end - -function typebased_rbt_to_coq(p, adnodes_vals, io) - expected_matchid(s) = s in ["leaf", "red", ["num$(n)" for n in twopowers(p.intwidth)]...] - - matchid_to_cases = Dict() - for (name, val) in adnodes_vals - matchid, case = split(name, "%%") - @assert expected_matchid(matchid) - case = "(" * join([tocoq(eval(Meta.parse(x))) for x in split(case, "%")], ", ") * ")" - val = thousandths(val) - push!(get!(matchid_to_cases, matchid, []), (case, val)) - end - - function dependent_to_code(sym) - if sym == :stack_tail - "($(join(["stack$(i)" for i in 1:p.stack_size], ", ")))" - else - string(sym) - end - end - - function mk_match(dependents, matchid) - cases = matchid_to_cases[matchid] - cases = sort(cases) - if isnothing(dependents) - "500" - else - "match ($(join(map(dependent_to_code, dependents), ","))) with -$(join([" " ^ 9 * "| $(name) => $(w)" for (name, w) in cases], "\n")) - | _ => 500 - end" - end - end - - stack_vars = ["(stack$(i) : nat)" for i in 1:p.stack_size] - update_stack_vars(loc) = join(stack_vars[2:end], " ") * " $(loc)" - - """ -Require Import ZArith. -From QuickChick Require Import QuickChick. -From ExtLib Require Import Monad. -From ExtLib.Data.Monads Require Import OptionMonad. -Import QcNotation. -Import MonadNotation. -From Coq Require Import List. -Import ListNotations. - -From RBT Require Import Impl Spec. - -Fixpoint manual_gen_tree (size : nat) (parent_color : Color) $(join(stack_vars, " ")) := - let weight_red := $(mk_match(p.red_dependents, "red")) in - let weight_leaf := $(mk_match(p.leaf_dependents, "leaf")) in - match size with - | 0 => returnGen E - | S size' => - freq [ (weight_leaf, returnGen E); - (1000 - weight_leaf, - bindGen (freq [ (weight_red, returnGen R); (1000-weight_red, returnGen B)]) - (fun p0 : Color => - bindGen (manual_gen_tree size' p0 $(update_stack_vars(10))) - (fun p1 : Tree => -$( - join( - [" let weight_$(n) := $(mk_match(p.num_dependents, "num$(n)")) in - bindGen (freq [ (weight_$(n), returnGen ($(n)%Z)); (1000-weight_$(n), returnGen 0%Z)]) - (fun n$(n) : Z => " - for n in twopowers(p.intwidth)], - "\n" - ) -) -let p2 := ($(join(["n$(n)" for n in twopowers(p.intwidth)], "+")))%Z in - bindGen arbitrary - (fun p3 : Z => - bindGen (manual_gen_tree size' p0 $(update_stack_vars(11))) - (fun p4 : Tree => returnGen (T p0 p1 p2 p3 p4)) - $(")" ^ p.intwidth) - ))))] - end. - -#[global] -Instance genTree : GenSized (Tree) := - {| arbitrarySized n := manual_gen_tree $(p.size) B$(" 0" ^ p.stack_size) |}. - -(* --------------------- Tests --------------------- *) - -Definition test_prop_InsertValid := - forAll arbitrary (fun t => - forAll arbitrary (fun k => - forAll arbitrary (fun v => - (prop_InsertValid t k v)))). - -(*! QuickChick test_prop_InsertValid. *) - -Definition test_prop_DeleteValid := - forAll arbitrary (fun t => - forAll arbitrary (fun k => - prop_DeleteValid t k)). - -(*! QuickChick test_prop_DeleteValid. *) - -Definition test_prop_InsertPost := - forAll arbitrary (fun t => - forAll arbitrary (fun k => - forAll arbitrary (fun k' => - forAll arbitrary (fun v => - prop_InsertPost t k k' v)))). - -(*! QuickChick test_prop_InsertPost. *) - -Definition test_prop_DeletePost := - forAll arbitrary (fun t => - forAll arbitrary (fun k => - forAll arbitrary (fun k' => - prop_DeletePost t k k'))). - -(*! QuickChick test_prop_DeletePost. *) - -Definition test_prop_InsertModel := - forAll arbitrary (fun t => - forAll arbitrary (fun k => - forAll arbitrary (fun v => - prop_InsertModel t k v))). - -(*! QuickChick test_prop_InsertModel. *) - -Definition test_prop_DeleteModel := - forAll arbitrary (fun t => - forAll arbitrary (fun k => - prop_DeleteModel t k)). - -(*! QuickChick test_prop_DeleteModel. *) - -Definition test_prop_InsertInsert := - forAll arbitrary (fun t => - forAll arbitrary (fun k => - forAll arbitrary (fun k' => - forAll arbitrary (fun v => - forAll arbitrary (fun v' => - prop_InsertInsert t k k' v v'))))). - -(*! QuickChick test_prop_InsertInsert. *) - -Definition test_prop_InsertDelete := - forAll arbitrary (fun t => - forAll arbitrary (fun k => - forAll arbitrary (fun k' => - forAll arbitrary (fun v => - prop_InsertDelete t k k' v)))). - -(*! QuickChick test_prop_InsertDelete. *) - -Definition test_prop_DeleteInsert := - forAll arbitrary (fun t => - forAll arbitrary (fun k => - forAll arbitrary (fun k' => - forAll arbitrary (fun v' => - prop_DeleteInsert t k k' v')))). - -(*! QuickChick test_prop_DeleteInsert. *) - -Definition test_prop_DeleteDelete := - forAll arbitrary (fun t => - forAll arbitrary (fun k => - forAll arbitrary (fun k' => - prop_DeleteDelete t k k'))). - -(*! QuickChick test_prop_DeleteDelete. *) - -""" -end diff --git a/examples/qc/benchmarks/lib/stlc/dist.jl b/examples/qc/benchmarks/lib/stlc/dist.jl deleted file mode 100644 index f9602f13..00000000 --- a/examples/qc/benchmarks/lib/stlc/dist.jl +++ /dev/null @@ -1,667 +0,0 @@ -# Define DistSTLC - -module Typ - using Dice - @inductive t TBool() TFun(t, t) -end -to_coq(::Type{Typ.t}) = "Typ" - -module Expr - using Dice - using Main: DistNat, Typ - @inductive t Var(DistNat) Bool(AnyBool) Abs(Typ.t, t) App(t, t) -end -to_coq(::Type{Expr.t}) = "Expr" - -module OptExpr - using Dice - using Main: Expr - @inductive t None() Some(Expr.t) -end -to_coq(::Type{OptExpr.t}) = "option Expr" - -module ListTyp - using Dice - using Main: Typ - @inductive t nil() cons(Typ.t, t) -end -to_coq(::Type{ListTyp.t}) = "list Typ" - -module ListNat - using Dice - @inductive t nil() cons(DistUInt32, t) -end -to_coq(::Type{ListNat.t}) = "list nat" - -function prob_map(dest_module, f, l::ListNat.t) - @match l [ - nil() -> dest_module.nil(), - cons(hd, tl) -> dest_module.cons(f(hd), prob_map(dest_module, f, tl)) - ] -end - -module ListOptExpr - using Dice - using Main: OptExpr - @inductive t nil() cons(OptExpr.t, t) -end -to_coq(::Type{ListOptExpr.t}) = "list option Expr" - -module Nat - using Dice - t = DistUInt32 -end -to_coq(::Type{Nat.t}) = "nat" - -module Ctx - using Dice - using Main: Typ - @inductive t nil() cons(Typ.t, t) -end -to_coq(::Type{Ctx.t}) = "Ctx" - -function Base.length(l::ListOptExpr.t) - @match l [ - nil() -> DistUInt32(0), - cons(x, xs) -> DistUInt32(1) + length(xs), - ] -end - -function one_of(default::OptExpr.t, l::ListOptExpr.t)::OptExpr.t - @match l [ - nil() -> default, - cons(x, xs) -> @dice_ite if flip_reciprocal(length(l)) - x - else - one_of(default, xs) - end - ] -end - -function term_size(e::Expr.t) - match(e, [ - :Var => (i) -> DistUInt32(1), - :Bool => (b) -> DistUInt32(1), - :App => (f, x) -> DistUInt32(1) + term_size(f) + term_size(x), - :Abs => (ty, e′) -> DistUInt32(1) + term_size(e′), - ]) -end - -function term_size(e::OptExpr.t) - match(e, [ - :Some => e -> term_size(e), - :None => () -> DistUInt32(1024), - ]) -end - -function num_apps(e::OptExpr.t) - match(e, [ - :Some => x -> num_apps(x), - :None => () -> DistUInt32(1024), - ]) -end - -function num_apps(e::Expr.t) - match(e, [ - :Var => (i) -> DistUInt32(0), - :Bool => (b) -> DistUInt32(0), - :App => (f, x) -> DistUInt32(1) + num_apps(f) + num_apps(x), - :Abs => (ty, e′) -> num_apps(e′), - ]) -end - -stlc_ctor_to_id = Dict( - :Var => DistInt32(0), - :Bool => DistInt32(1), - :App => DistInt32(2), - :Abs => DistInt32(3), -) - -function ctor_to_id(ctor::Expr.t) - match(ctor, [ - :Var => _ -> stlc_ctor_to_id[:Var] - :Bool => _ -> stlc_ctor_to_id[:Bool] - :App => (_, _) -> stlc_ctor_to_id[:App] - :Abs => (_, _) -> stlc_ctor_to_id[:Abs] - ]) -end - -function opt_ctor_to_id(opt_ctor::OptExpr.t) - match(opt_ctor, [ - :Some => ctor_to_id, - :None => () -> DistInt32(-1), - ]) -end - -function collect_constructors(e) - match(e, [ - :Var => (i) -> DistVector([stlc_ctor_to_id[:Var]]), - :Bool => (b) -> DistVector([stlc_ctor_to_id[:Bool]]), - :App => (f, x) -> prob_append(prob_extend(collect_constructors(f), collect_constructors(x)), stlc_ctor_to_id[:App]), - :Abs => (ty, e′) -> prob_append(collect_constructors(e′), stlc_ctor_to_id[:Abs]), - ]) -end - -# https://stackoverflow.com/questions/59338968/printing-lambda-expressions-in-haskell - -parens(b, s) = if b "($(s))" else s end - -@enum StrfyCtx free=0 fun=1 arg=2 - -function ty_str(ty, free=true) - name, children = ty - if name == :TBool - "Bool" - else - t1, t2 = children - parens( - !free, - "$(ty_str(t1, false)) -> $(ty_str(t2, true))" - ) - end -end - -function var_str(i) - i += 1 # 1-idx - vars = ["x", "y", "z", "w"] - if i <= 0 - "badvar_$(i)" - elseif i <= length(vars) - vars[i] - else - string('a' + i - length(vars) - 1) - end -end - -function stlc_str(ast, depth=0, p=free) - name, children = ast - if name == :Var - i, = children - i isa Integer || (i = nat_ast_to_int(i)) - # i is the number of steps from the *top* of the env, see gen_var - var_depth = depth - i - 1 - var_str(var_depth) - elseif name == :Bool - v, = children - string(v) - elseif name == :Abs - ty, e = children - parens(p > free, "λ$(var_str(depth)):$(ty_str(ty)). $(stlc_str(e, depth + 1, free))") - elseif name == :App - e1, e2 = children - parens( - p > fun, - "$(stlc_str(e1, depth, fun)) $(stlc_str(e2, depth, arg))" - ) - else - error("Bad node $(name)") - end -end - -# ironic abuse of types -function error_ty(ty) - ty isa AbstractString -end - -function get_error(ty) - ty -end - -function opt_map(f, x::Tuple) - name, children = x - if name == :Some - e, = children - f(e) - elseif name == :None - nothing - else - error() - end -end - -function opt_map(f, x::Opt.T) - @match x [ - None() -> nothing, - Some(x) -> f(x), - ] -end - -function diff_test_typecheck(expr_dist, expr) - @assert isdeterministic(expr_dist) - opt_map(expr_dist) do expr_dist - opt_map(expr) do expr - ty1 = typecheck(expr) - ty2_dist = pr(typecheck(expr_dist)) - @assert length(ty2_dist) == 1 - ty2 = first(keys(ty2_dist)) - if error_ty(ty1) - @assert ty2 == (:None, []) - else - @assert ty2 == (:Some, [ty1]) "$ty1 $ty2" - end - end - end -end - -function to_int(x::DistUInt32) - dist = pr(x) - @assert length(dist) == 1 - first(keys(dist)) -end - -function typecheck(ast::Expr.t, gamma, depth=0)::Opt.T{Typ.t} - @match ast [ - Var(i) -> begin - var_depth = depth - to_int(i) - 1 - haskey(gamma, var_depth) || return Opt.None(Typ.t) - Opt.Some(gamma[var_depth]) - end, - Bool(_) -> Opt.Some(Typ.TBool()), - Abs(t_in, e) -> begin - gamma′ = copy(gamma) - gamma′[depth] = t_in - Opt.map(Typ.t, typecheck(e, gamma′, depth + 1)) do t_out - Typ.TFun(t_in, t_out) - end - end, - App(e1, e2) -> begin - Opt.bind(Typ.t, typecheck(e1, gamma, depth)) do t1 - @match t1 [ - TBool() -> Opt.None(Typ.t), - TFun(t1_in, t1_out) -> Opt.bind(Typ.t, typecheck(e2, gamma, depth)) do t2 - if prob_equals(t1_in, t2) - Opt.Some(t1_out) - else - Opt.None(Typ.t) - end - end, - ] - end - end, - ] -end - -function typecheck_opt(ast) - name, children = ast - if name == :Some - e, = children - ty = typecheck(e) - if error_ty(ty) - println("Failed to typecheck $(stlc_str(e))") - println(get_error(ty)) - println() - end - elseif name == :None - # do nothing - else - error("Bad node $(name)") - end -end - -typecheck(ast) = typecheck(ast, Dict()) - -function typecheck(ast::Tuple, gamma, depth=0) - name, children = ast - if name == :Var - i, = children - i isa Integer || (i = nat_ast_to_int(i)) - var_depth = depth - i - 1 - if !haskey(gamma, var_depth) - return "Unknown var $(var_str(var_depth))" - end - gamma[var_depth] - elseif name == :Bool - (:TBool, []) - elseif name == :Abs - t_in, e = children - gamma′ = copy(gamma) - gamma′[depth] = t_in - t_out = typecheck(e, gamma′, depth + 1) - error_ty(t_out) && return t_out - (:TFun, [t_in, t_out]) - elseif name == :App - e1, e2 = children - t1 = typecheck(e1, gamma, depth) - error_ty(t1) && return t1 - if t1[1] != :TFun - return "\"$(stlc_str(e1, depth))\" typechecked to $(ty_str(t1)), expected function" - end - t2 = typecheck(e2, gamma, depth) - error_ty(t2) && return t2 - t1_in, t1_out = t1[2] - if t1_in != t2 - return "Expected \"$(stlc_str(e2, depth))\" to be $(ty_str(t1_in)), got $(ty_str(t2))" - end - t1_out - else - error("Bad node $(name)") - end -end - - -function eq_except_numbers(x::Typ.t, y::Typ.t) - @match x [ - TBool() -> (@match y [ - TBool() -> true, - TFun(_, _) -> false, - ]), - TFun(a1, b1) -> (@match y [ - TBool() -> false, - TFun(a2, b2) -> eq_except_numbers(a1, a2) & eq_except_numbers(b1, b2), - ]), - ] -end - -function eq_except_numbers(x::Expr.t, y::Expr.t) - @match x [ - Var(_) -> (@match y [ - Var(_) -> true, - Bool(_) -> false, - App(_, _) -> false, - Abs(_, _) -> false, - ]), - Bool(_) -> (@match y [ - Var(_) -> false, - Bool(_) -> true, - App(_, _) -> false, - Abs(_, _) -> false, - ]), - App(f1, x1) -> (@match y [ - Var(_) -> false, - Bool(_) -> false, - App(f2, x2) -> eq_except_numbers(f1, f2) & eq_except_numbers(x1, x2), - Abs(_, _) -> false, - ]), - Abs(ty1, e1) -> (@match y [ - Var(_) -> false, - Bool(_) -> false, - App(_, _) -> false, - Abs(ty2, e2) -> eq_except_numbers(ty1, ty2) & eq_except_numbers(e1, e2), - ]), - ] -end - -function has_app(x::Expr.t) - @match x [ - Var(_) -> false, - Bool(_) -> false, - App(_, _) -> true, - Abs(_, e) -> has_app(e), - ] -end - -function eq_structure(x::Expr.t, y::Expr.t) - @match x [ - Var(_) -> (@match y [ - Var(_) -> true, - Bool(_) -> false, - App(_, _) -> false, - Abs(_, _) -> false, - ]), - Bool(_) -> (@match y [ - Var(_) -> false, - Bool(_) -> true, - App(_, _) -> false, - Abs(_, _) -> false, - ]), - App(f1, x1) -> (@match y [ - Var(_) -> false, - Bool(_) -> false, - App(f2, x2) -> eq_structure(f1, f2) & eq_structure(x1, x2), - Abs(_, _) -> false, - ]), - Abs(_, e1) -> (@match y [ - Var(_) -> false, - Bool(_) -> false, - App(_, _) -> false, - Abs(_, e2) -> eq_structure(e1, e2), - ]), - ] -end - -function eq_except_numbers(x::OptExpr.t, y::OptExpr.t) - @match x [ - Some(xv) -> (@match y [ - Some(yv) -> eq_except_numbers(xv, yv), - None() -> false, - ]), - None() -> (@match y [ - Some(_) -> false, - None() -> true, - ]) - ] -end - -function eq_structure(x::OptExpr.t, y::OptExpr.t) - @match x [ - Some(xv) -> (@match y [ - Some(yv) -> eq_structure(xv, yv), - None() -> false, - ]), - None() -> (@match y [ - Some(_) -> false, - None() -> true, - ]) - ] -end - -function eq_num_apps(x::Opt.T{T}, y::Opt.T{T}) where T - @match x [ - Some(xv) -> (@match y [ - Some(yv) -> prob_equals(num_apps(xv), num_apps(yv)), - None() -> false, - ]), - None() -> (@match y [ - Some(_) -> false, - None() -> true, - ]) - ] -end - -function sat_num_apps(e::Expr.t, k::DistUInt32) - @match e [ - Var(_) -> DistUInt32(0), - Bool(_) -> DistUInt32(0), - App(f, x) -> min(min(DistUInt32(1), k) + sat_num_apps(f, k) + sat_num_apps(x, k), k), - Abs(_, e′) -> sat_num_apps(e′, k), - ] -end - -# TODO: why is saturating at 1 different than eq_has_app? -function sat_eq_num_apps(x::Opt.T{T}, y::Opt.T{T}, k::Integer) where T - @match x [ - Some(xv) -> (@match y [ - Some(yv) -> prob_equals(sat_num_apps(xv, DistUInt32(k)), sat_num_apps(yv, DistUInt32(k))), - None() -> false, - ]), - None() -> (@match y [ - Some(_) -> false, - None() -> true, - ]) - ] -end - -function eq_has_app(x::Opt.T{T}, y::Opt.T{T}) where T - @match x [ - Some(xv) -> (@match y [ - Some(yv) -> prob_equals(has_app(xv), has_app(yv)), - None() -> false, - ]), - None() -> (@match y [ - Some(_) -> false, - None() -> true, - ]) - ] -end - -function rem_num_bools(x::Expr.t) - @match x [ - Var(_) -> Expr.Var(DistUInt32(0)), - Bool(_) -> Expr.Bool(true), - App(e1, e2) -> Expr.App(rem_num_bools(e1), rem_num_bools(e2)), - Abs(t_in, e) -> Expr.Abs(t_in, rem_num_bools(e)), - ] -end - -function rem_num_bools(x::OptExpr.t) - @match x [ - None() -> OptExpr.None(), - Some(xv) -> OptExpr.Some(rem_num_bools(xv)), - ] -end - -function may_typecheck(x::Expr.t, under_abs) - @match x [ - Var(i) -> begin - if !under_abs - return :Error - end - :TypeVar # we leniently let this take any type it needs to - end, - Bool(_) -> :TBool, - App(e1, e2) -> begin - t1 = may_typecheck(e1, under_abs) - if t1 == :Error || t1 == :TBool - return :Error - end - if !(t1 in [:TFun, :TypeVar]) - return :Error - end - # Really, should check that t2 matches function input ty of t1 - t2 = may_typecheck(e2, under_abs) - if t2 == :Error - return :Error - end - :TypeVar - end, - Abs(t_in, e) -> begin - t1 = may_typecheck(e, true) - if t1 == :Error - return :Error - end - :TFun - end, - ] -end - -function may_typecheck(x::OptExpr.t) - @match x [ - None() -> false, - Some(xv) -> may_typecheck(xv, false) != :Error - ] -end - -function might_typecheck(x::Expr.t, gamma, depth) - @match x [ - Var(i) -> begin - i = Dice.frombits(i, Dict()) - var_depth = depth - i - 1 - if !haskey(gamma, var_depth) - return :Error - end - # note that gamma is wrong! because we put dists in it - # gamma[var_depth] - :TypeVar # we leniently let this take any type it needs to - end, - Bool(_) -> :TBool, - App(e1, e2) -> begin - t1 = might_typecheck(e1, gamma, depth) - if t1 == :Error || t1 == :TBool - return :Error - end - if !(t1 in [:TFun, :TypeVar]) - return :Error - end - # Really, should check that t2 matches function input ty of t1 - t2 = might_typecheck(e2, gamma, depth) - if t2 == :Error - return :Error - end - :TypeVar - end, - Abs(t_in, e) -> begin - gamma′ = copy(gamma) - gamma′[depth] = t_in - t1 = might_typecheck(e, gamma′, depth + 1) - if t1 == :Error - return :Error - end - :TFun - end, - ] -end - -function might_typecheck(x::OptExpr.t) - @match x [ - None() -> false, - Some(xv) -> might_typecheck(xv, Dict(), 0) != :Error - ] -end - -function var_numberings_good(x::Expr.t, gamma, depth) - @match x [ - Var(i) -> begin - i = Dice.frombits(i, Dict()) - var_depth = depth - i - 1 - haskey(gamma, var_depth) - end, - Bool(_) -> true, - App(e1, e2) -> begin - var_numberings_good(e1, gamma, depth) & var_numberings_good(e2, gamma, depth) - end, - Abs(t_in, e) -> begin - gamma′ = copy(gamma) - gamma′[depth] = t_in - var_numberings_good(e, gamma′, depth + 1) - end, - ] -end - -function var_numberings_good(x::OptExpr.t) - @match x [ - None() -> false, - Some(xv) -> var_numberings_good(xv, Dict(), 0), - ] -end - -# right now mayer = might -function mayer_typecheck(x::Expr.t, under_abs) - @match x [ - Var(i) -> begin - if !under_abs - return :Error - end - :TypeVar # we leniently let this take any type it needs to - end, - Bool(_) -> :TBool, - App(e1, e2) -> begin - t1 = mayer_typecheck(e1, under_abs) - if t1 == :Error || t1 == :TBool - return :Error - end - if !(t1 in [:TFun, :TypeVar]) - return :Error - end - # Really, should check that t2 matches function input ty of t1 - t2 = mayer_typecheck(e2, under_abs) - if t2 == :Error - return :Error - end - :TypeVar - end, - Abs(t_in, e) -> begin - t1 = mayer_typecheck(e, true) - if t1 == :Error - return :Error - end - :TFun - end, - ] -end - -function mayer_typecheck(x::OptExpr.t) - @match x [ - None() -> false, - Some(xv) -> mayer_typecheck(xv, false) != :Error - ] -end \ No newline at end of file diff --git a/examples/qc/benchmarks/lib/stlc/generator.jl b/examples/qc/benchmarks/lib/stlc/generator.jl deleted file mode 100644 index 7c7f8056..00000000 --- a/examples/qc/benchmarks/lib/stlc/generator.jl +++ /dev/null @@ -1,157 +0,0 @@ -# Based on -# https://github.com/jwshi21/etna/blob/main/bench-suite/Coq/STLC/Methods/BespokeGenerator.v - - - -function gen_var(ctx::Ctx.t, t::Typ.t, p::DistNat, r::List{DistNat})::List{DistNat} - match(ctx, [ - :nil => () -> r, - :cons => (t′, ctx′) -> @dice_ite if prob_equals(t, t′) - gen_var(ctx′, t, p + DistNat(1), DistCons(p, r)) - else - gen_var(ctx′, t, p + DistNat(1), r) - end - ]) -end - -function bind_opt(f, ma::Opt.T{T})::Opt.T{<:Any} where T - match(ma, [ - :None => () -> DistNone(T) # TODO: should be DistNone(return type of f) - :Some => f - ]) -end - -# TODO: try returning expr instead of opt extr? what does env do? -function gen_zero(env::Ctx.t, tau::Typ.t) - match(tau, [ - :TBool => () -> DistSome(DistBoolean(flip(0.5))), # TODO: should this be constant for just learning structure? - :TFun => (T1, T2) -> bind_opt(gen_zero(DistCons(T1, env), T2)) do e - DistSome(DistAbs(T1, e)) - end - ]) -end - -function gen_type(rs, sz, by_sz) - group = if by_sz "tysz$(sz)_" else "" end * "gen_type_tbool" - @dice_ite if sz == 0 || flip(register_weight!(rs, group)) - DistTBool() - else - DistTFun(gen_type(rs, sz - 1, by_sz), gen_type(rs, sz - 1, by_sz)) - end -end - -function gen_bool() - DistBoolean(flip(0.5)) -end - -function gen_expr(rs::RunState, env::Ctx.t, tau::Typ.t, sz::Integer, gen_typ_sz::Integer, by_sz, track_return)::OptExpr.t - track_return( - begin - for_prefix = if by_sz "sz$(sz)_" else "" end - if sz == 0 - backtrack_for(rs, for_prefix * "zero", [ - one_of( - map(Expr.t)( - DistVar, - gen_var(env, tau, zero(DistNat), DistNil(DistNat)) - ) - ), - gen_zero(env, tau) - ]) - else - sz′ = sz - 1 - backtrack_for(rs, for_prefix * "succ", [ - # Var - one_of( - map(Expr)( - DistVar, - gen_var(env, tau, zero(DistNat), DistNil(DistNat)) - ) - ), - # App - begin - T1 = gen_type(rs, gen_typ_sz, by_sz) - bind_opt(gen_expr(rs, env, DistTFun(T1, tau), sz′, gen_typ_sz, by_sz, track_return)) do e1 - bind_opt(gen_expr(rs, env, T1, sz′, gen_typ_sz, by_sz, track_return)) do e2 - DistSome(DistApp(e1, e2)) - end - end - end, - # Value - match(tau, [ - :TBool => () -> DistSome(gen_bool()), - :TFun => (T1, T2) -> - bind_opt(gen_expr(rs, DistCons(T1, env), T2, sz′, gen_typ_sz, by_sz, track_return)) do e - DistSome(DistAbs(T1, e)) - end - ]), - ]) - end - end - ) -end - -function tb_gen_expr(rs::RunState, p, size::Integer, stack_tail, track_return) - function get_dependent_dist(dependent) - if dependent == :size size - elseif dependent == :stack_tail stack_tail - else error() end - end - dependent_dists = [get_dependent_dist(d) for d in p.dependents] - track_return( - if size == 0 - @dice_ite if flip_for(rs, "pvar", dependent_dists) - Expr.Var(DistNat(0)) # really, this is arbitrary - else - Expr.Bool(true) # really, this is arbitrary - end - else - sz′ = size - 1 - frequency_for(rs, "freq", dependent_dists, [ - "var" => begin - n = sum( - @dice_ite if flip_for(rs, "num$(n)", dependent_dists) - DistUInt32(n) - else - DistUInt32(0) - end - for n in twopowers(p.intwidth) - ) - Expr.Var(n) - end, - "bool" => Expr.Bool(flip_for(rs, "ptrue", dependent_dists)), - "abs" => begin - typ = tb_gen_type(rs, p, p.ty_size, update_stack_tail(p, stack_tail, 10)) - e = tb_gen_expr(rs, p, sz′, update_stack_tail(p, stack_tail, 11), track_return) - Expr.Abs(typ, e) - end, - "app" => begin - e1 = tb_gen_expr(rs, p, sz′, update_stack_tail(p, stack_tail, 12), track_return) - e2 = tb_gen_expr(rs, p, sz′, update_stack_tail(p, stack_tail, 13), track_return) - Expr.App(e1, e2) - end, - ]) - end - ) -end - -function tb_gen_type(rs::RunState, p, size::Integer, stack_tail) - function get_dependent_dist(dependent) - if dependent == :size size - elseif dependent == :stack_tail stack_tail - else error() end - end - dependent_dists = [get_dependent_dist(d) for d in p.ty_dependents] - if size == 0 - Typ.TBool() - else - sz′ = size - 1 - @dice_ite if flip_for(rs, "ptbool", dependent_dists) - Typ.TBool() - else - ty1 = tb_gen_type(rs, p, sz′, update_stack_tail(p, stack_tail, 14)) - ty2 = tb_gen_type(rs, p, sz′, update_stack_tail(p, stack_tail, 15)) - Typ.TFun(ty1, ty2) - end - end -end \ No newline at end of file diff --git a/examples/qc/benchmarks/lib/stlc/to_coq.jl b/examples/qc/benchmarks/lib/stlc/to_coq.jl deleted file mode 100644 index 5375fdb6..00000000 --- a/examples/qc/benchmarks/lib/stlc/to_coq.jl +++ /dev/null @@ -1,165 +0,0 @@ -function bespoke_stlc_to_coq(_p, adnodes_of_interest, _io) - @assert issetequal(keys(adnodes_of_interest), ["sz1_succ_abs", "tysz2_gen_type_tbool", "sz3_succ_abs", "sz4_succ_var", "sz3_succ_app", "sz5_succ_app", "tysz1_gen_type_tbool", "sz0_zero_pr_var2", "sz2_succ_app", "sz4_succ_abs", "sz5_succ_var", "sz4_succ_app", "sz2_succ_abs", "sz5_succ_abs", "sz3_succ_var", "sz2_succ_var", "sz1_succ_var", "sz1_succ_app"]) - w(s) = thousandths(adnodes_of_interest[s]) - """ -From QuickChick Require Import QuickChick. Import QcNotation. -From Coq Require Import Bool ZArith List. Import ListNotations. -From ExtLib Require Import Monad. -From ExtLib.Data.Monads Require Import OptionMonad. -Import MonadNotation. - -From STLC Require Import Impl Spec. - -Derive (Arbitrary) for Typ. -Derive (Arbitrary) for Expr. - -Inductive bind : Ctx -> nat -> Typ -> Prop := -| BindNow : forall tau env, bind (tau :: env) 0 tau -| BindLater : forall tau tau' x env, - bind env x tau -> bind (tau' :: env) (S x) tau. - -Inductive typing (G : Ctx) : Expr -> Typ -> Prop := -| TyVar : - forall x T, - bind G x T -> - typing G (Var x) T -| TyBool : - forall b, - typing G (Bool b) TBool -| TyAbs : - forall e T1 T2, - typing (T1 :: G) e T2 -> - typing G (Abs T1 e) (TFun T1 T2) -| TyApp : - forall e1 e2 T1 T2, - typing G e1 (TFun T1 T2) -> - typing G e2 T1 -> - typing G (App e1 e2) T2. - - -(* Look up in list of backtrack weights *) -Fixpoint get {a: Type} (l : list (nat * a)) (target_key : nat) (default : a): a := - match l with - | [] => - (* This branch should never return *) - default - | (key, value) :: l' => - if Nat.eqb key target_key then - value - else get l' target_key default - end. - - -#[export] Instance dec_type (t1 t2 : Typ) : Dec (t1 = t2). -Proof. dec_eq. Defined. -Derive Arbitrary for Typ. - -Fixpoint genVar' (ctx: Ctx) (t: Typ) (p: nat) (r: list nat) : list nat := - match ctx with - | nil => r - | t'::ctx' => - if t = t'? then genVar' ctx' t (p + 1) (p :: r) - else genVar' ctx' t (p + 1) r - end. - -Fixpoint genZero env tau : G (option Expr) := - match tau with - | TBool => - bindGen arbitrary - (fun b : bool => - returnGen (Some (Bool b))) - | TFun T1 T2 => - bindOpt - (genZero (T1 :: env) T2) - (fun e : Expr => - returnGen (Some (Abs T1 e))) - end. - -Fixpoint genTyp (s: nat) : G Typ := - match s with - | 0 => ret TBool - | S s' => - let '(boolWeight, funWeight) := - get - [ - (1, ($(w("tysz1_gen_type_tbool")), 1000-$(w("tysz1_gen_type_tbool")))); - (2, ($(w("tysz2_gen_type_tbool")), 1000-$(w("tysz2_gen_type_tbool")))) - ] - s - (0, 0) in - freq [ - (boolWeight, ret (TBool)) - ; - (funWeight, - t1 <- genTyp s';; - t2 <- genTyp s';; - ret (TFun t1 t2)) - ] - end. - -Fixpoint genExpr env tau (sz: nat) : G (option Expr) := - match sz with - | 0 => - let '(var_weight, zero_weight) := ($(w("sz0_zero_pr_var2")), 1000-$(w("sz0_zero_pr_var2"))) in - backtrack - [(var_weight, oneOf_ (ret None) (map (fun x => returnGen (Some (Var x))) (genVar' env tau 0 []))) - ;(zero_weight, genZero env tau)] - | S sz' => - let '(val_weight, app_weight, var_weight) := - get - [ - (1, ($(w("sz1_succ_abs")), $(w("sz1_succ_app")), $(w("sz1_succ_var")))); - (2, ($(w("sz2_succ_abs")), $(w("sz2_succ_app")), $(w("sz2_succ_var")))); - (3, ($(w("sz3_succ_abs")), $(w("sz3_succ_app")), $(w("sz3_succ_var")))); - (4, ($(w("sz4_succ_abs")), $(w("sz4_succ_app")), $(w("sz4_succ_var")))); - (5, ($(w("sz5_succ_abs")), $(w("sz5_succ_app")), $(w("sz5_succ_var")))) - ] - sz - (0, 0 ,0) in - backtrack - [(var_weight, oneOf_ (ret None) (map (fun x => returnGen (Some (Var x))) (genVar' env tau 0 []))) - ; - (app_weight, - bindGen (genTyp 2) - (fun T1 : Typ => - bindOpt - (genExpr env (TFun T1 tau) sz') - (fun e1 : Expr => - bindOpt - (genExpr env T1 sz') - (fun e2 : Expr => - returnGen (Some (App e1 e2)))))) - ; - (val_weight, - match tau with - | TBool => - bindGen arbitrary - (fun b : bool => - returnGen (Some (Bool b))) - | TFun T1 T2 => - bindOpt - (genExpr (T1 :: env) T2 sz') - (fun e : Expr => - returnGen (Some (Abs T1 e))) - end)] - end. - -Definition gSized := - typ <- arbitrary ;; - genExpr [] typ 5. - - -Definition test_prop_SinglePreserve := - forAllMaybe gSized (fun (e: Expr) => - prop_SinglePreserve e). - -(*! QuickChick test_prop_SinglePreserve. *) - -Definition test_prop_MultiPreserve := - forAllMaybe gSized (fun (e: Expr) => - prop_MultiPreserve e). - -(*! QuickChick test_prop_MultiPreserve. *) - -""" -end diff --git a/examples/qc/benchmarks/lib/stlc/to_coq_tb.jl b/examples/qc/benchmarks/lib/stlc/to_coq_tb.jl deleted file mode 100644 index 5e56f846..00000000 --- a/examples/qc/benchmarks/lib/stlc/to_coq_tb.jl +++ /dev/null @@ -1,116 +0,0 @@ -function typebased_stlc_to_coq(p, adnodes_vals, io) - expected_matchid(s) = s in ["pvar", "ptbool", "freq_var", "freq_bool", "freq_abs", "freq_app", "ptrue", ["num$(n)" for n in twopowers(p.intwidth)]...] - - matchid_to_cases = Dict() - for (name, val) in adnodes_vals - matchid, case = split(name, "%%") - @assert expected_matchid(matchid) - case = "(" * join([tocoq(eval(Meta.parse(x))) for x in split(case, "%")], ", ") * ")" - val = thousandths(val) - push!(get!(matchid_to_cases, matchid, []), (case, val)) - end - - function dependent_to_code(sym) - if sym == :stack_tail - "($(join(["stack$(i)" for i in 1:p.stack_size], ", ")))" - else - string(sym) - end - end - - function mk_match(dependents, matchid) - cases = matchid_to_cases[matchid] - cases = sort(cases) - if isnothing(dependents) - "500" - else - "match ($(join(map(dependent_to_code, dependents), ","))) with -$(join([" " ^ 9 * "| $(name) => $(w)" for (name, w) in cases], "\n")) - | _ => 500 - end" - end - end - - stack_vars = ["(stack$(i) : nat)" for i in 1:p.stack_size] - update_stack_vars(loc) = join(stack_vars[2:end], " ") * " $(loc)" - """ -From QuickChick Require Import QuickChick. Import QcNotation. -From Coq Require Import Bool ZArith List. Import ListNotations. -From ExtLib Require Import Monad. -From ExtLib.Data.Monads Require Import OptionMonad. -Import MonadNotation. - -From STLC Require Import Impl Spec. - -Fixpoint manual_gen_typ (size : nat) $(join(stack_vars, " ")) : G Typ := - match size with - | 0 => returnGen TBool - | S size' => - let weight_tbool := $(mk_match(p.ty_dependents, "ptbool")) in - freq [ (weight_tbool, returnGen TBool); - (1000 - weight_tbool, - bindGen (manual_gen_typ size' $(update_stack_vars(14))) - (fun p0 : Typ => - bindGen (manual_gen_typ size' $(update_stack_vars(15))) - (fun p1 : Typ => returnGen (TFun p0 p1))))] - end. - -Fixpoint manual_gen_expr (size : nat) $(join(stack_vars, " ")) : G Expr := - match size with - | 0 => - let weight_var := $(mk_match(p.dependents, "pvar")) in - freq [ (weight_var, bindGen arbitrary (fun p0 : nat => returnGen (Var p0))); - (1000 - weight_var, bindGen arbitrary (fun p0 : bool => returnGen (Bool p0)))] - | S size' => - let weight_var := $(mk_match(p.dependents, "freq_var")) in - let weight_bool := $(mk_match(p.dependents, "freq_bool")) in - let weight_abs := $(mk_match(p.dependents, "freq_abs")) in - let weight_app := $(mk_match(p.dependents, "freq_app")) in - freq [ - (weight_var, - -$( - join( - [" let weight_$(n) := $(mk_match(p.dependents, "num$(n)")) in - bindGen (freq [ (weight_$(n), returnGen $(n)); (1000-weight_$(n), returnGen 0)]) - (fun n$(n) : nat => " - for n in twopowers(p.intwidth)], - "\n" - ) -) - let p1 := $(join(["n$(n)" for n in twopowers(p.intwidth)], "+")) in - returnGen (Var p1)) - $(")" ^ p.intwidth); - (weight_bool, - let weight_true := $(mk_match(p.dependents, "ptrue")) in - freq [ (weight_true, returnGen (Bool true)); (1000 - weight_true, returnGen (Bool false))] - ); - (weight_abs, - bindGen (manual_gen_typ $(p.ty_size) $(update_stack_vars(10))) - (fun p0 : Typ => - bindGen (manual_gen_expr size' $(update_stack_vars(11))) - (fun p1 : Expr => returnGen (Abs p0 p1)))); - (weight_app, - bindGen (manual_gen_expr size' $(update_stack_vars(12))) - (fun p0 : Expr => - bindGen (manual_gen_expr size' $(update_stack_vars(13))) - (fun p1 : Expr => returnGen (App p0 p1))))] - end. - -Definition gSized := - manual_gen_expr $(p.size)$(" 0" ^ p.stack_size). - -Definition test_prop_SinglePreserve := - forAll gSized (fun (e: Expr) => - prop_SinglePreserve e). - -(*! QuickChick test_prop_SinglePreserve. *) - -Definition test_prop_MultiPreserve := - forAll gSized (fun (e: Expr) => - prop_MultiPreserve e). - -(*! QuickChick test_prop_MultiPreserve. *) - -""" -end diff --git a/examples/qc/benchmarks/lib/util.jl b/examples/qc/benchmarks/lib/util.jl deleted file mode 100644 index 56e908da..00000000 --- a/examples/qc/benchmarks/lib/util.jl +++ /dev/null @@ -1,879 +0,0 @@ -using Combinatorics: permutations - -function empty_stack(p) - Tuple(0 for _ in 1:p.stack_size) -end - -function update_stack_tail(p, stack_tail, loc) - @assert loc != 0 - Tuple( - if i == p.stack_size - loc - else - stack_tail[i + 1] - end - for i in 1:p.stack_size - ) -end - -function backtrack_for(rs, name, opts::Vector{Opt.T{T}})::Opt.T{T} where T - first_some(T, shuffle_for(rs, name, opts)) -end - -function shuffle_for(rs, name, xs) - # Hand-build shuffle for lengths 2 and 3 - @dice_ite if length(xs) == 2 - pr_var2 = register_weight!(rs, "$(name)_pr_var2") - if flip(pr_var2) - [xs[1], xs[2]] - else - [xs[2], xs[1]] - end - elseif length(xs) == 3 - var = register_weight!(rs, "$(name)_var") - app = register_weight!(rs, "$(name)_app") - val = register_weight!(rs, "$(name)_abs") - if flip(var / (var + app + val)) - # var is first - if flip(app / (app + val)) - [xs[1], xs[2], xs[3]] # var app val - else - [xs[1], xs[3], xs[2]] # var val app - end - elseif flip(app / (app + val)) - # app is first - if flip(var / (var + val)) - [xs[2], xs[1], xs[3]] # app var val - else - [xs[2], xs[3], xs[1]] # app val var - end - else - # val is first - if flip(var / (var + app)) - [xs[3], xs[1], xs[2]] # val var app - else - [xs[3], xs[2], xs[1]] # val app var - end - end - else - error("todo: generic shuffle") - end -end - -# function frequency(xs) -# sample_from(xs) -# end - -# function backtrack(xs) -# isempty(xs) && return DistNone() -# x = sample_from(xs) -# remove!(xs, x) -# backtrack(xs) -# end - -# give a weight to the permutation -function weight_of(weights_xs) - function helper(weights_xs) - weight, x = weights_xs[1] - if length(weights_xs) == 1 - Dice.Constant(1), weight - else - rest = @view weights_xs[2:end] - w, rolling_sum = helper(rest) - - rolling_sum += weight - w *= weight / rolling_sum - - w, rolling_sum - end - end - w, _ = helper(weights_xs) - w -end - -function shuffle(weights_xs) - weights, xs = [], [] - for (weight, x) in weights_xs - push!(weights, weight) - push!(xs,x) - end - - frequency( - (weight_of(perm), [x for (weight, x) in perm]) - for perm in permutations(weights_xs) - ) -end - -function backtrack(default, weights_xs) - first_some(default, shuffle(weights_xs)) -end - -function first_some(default, xs) - isempty(xs) && return default - x, rest = xs[1], @view xs[2:end] - @dice_ite if Dice.matches(x, :Some) - x - else - first_some(default, rest) - end -end - - -function first_some(::Type{T}, xs) where T - isempty(xs) && return DistNone(T) - x, rest = xs[1], @view xs[2:end] - @dice_ite if matches(x, "Some") - x - else - first_some(T, rest) - end -end - -# Manually curry so we can have type be first arg and use "do" -function map_(::Type{RetT}) where RetT - function inner(f, l::List{T}) where T - match(l, [ - "Nil" => () -> DistNil(RetT), - "Cons" => (x, xs) -> DistCons(f(x), map_(RetT)(f, xs)) - ]) - end -end - -function freq_flips(weights) - weight_sum = last(weights) - flips = Vector(undef, length(weights)) - for i in length(weights) - 1 : -1 : 1 - weight_sum += weights[i] - flips[i] = flip(weights[i] / weight_sum) - end - flips -end - -function freq_choose(xs, flips) - res = last(xs) - for i in length(xs) - 1 : -1 : 1 - res = @dice_ite if flips[i] - xs[i] - else - res - end - end - res -end - -function frequency(weights_xs) - weights, xs = [], [] - for (weight, x) in weights_xs - push!(weights, weight) - push!(xs,x) - end - freq_choose(xs, freq_flips(weights)) -end - -function frequency_for(rs, name, xs) - weights = [register_weight!(rs, "$(name)_$(i)") for i in 1:length(xs)] - frequency(collect(zip(weights, xs))) -end - -function opt_stlc_str(ast) - name, children = ast - if name == :None - "None" - elseif name == :Some - ast′, = children - stlc_str(ast′) - else - error("Bad node $(name)") - end -end - -function save_metric_dist(filename, dist; io) - open(filename, "w") do file - println(file, "val\tprobability") - for i in key_range(dist) - println(file, "$(i)\t$(dist[i])") - end - end - println(io, "Saved metric dist to $(filename).") -end - -key_range(d) = minimum(keys(d)):maximum(keys(d)) - -function preview_distribution(e; full_dist) - if full_dist - println("Getting distribution of all exprs") - @time dist = pr(e) - for (k, pr) in dist - println("pr: $(pr)") - println(opt_stlc_str(k)) - println() - end - else - println("A few sampled exprs:") - for _ in 1:20 - expr = sample(e) - println(opt_stlc_str(expr)) - end - end -end - -function save_samples(rs, filename, e; n_samples=200) - open(filename, "w") do file - a = ADComputer(rs.var_vals) - for _ in 1:n_samples - expr_dist = sample_as_dist(rs.rng, a, e) - expr = Dice.frombits(expr_dist, Dict()) - # diff_test_typecheck(expr_dist, expr) - println(file, opt_stlc_str(expr)) - # typecheck_opt(expr) - end - end - println(rs.io, "Saved samples to $(filename).") -end - -function println_flush(io, args...) - println(io, args...) - flush(io) -end - -function showln(io::IO, v) - show(io, v) - println(io) - println(io) - flush(io) -end - -function cmd_out(cmd) - io = IOBuffer() - run(pipeline(cmd, stdout=io)) - String(take!(io)) -end - -thousandths(n) = if isnan(n) "nan" else Integer(round(n, digits=3) * 1000) end -hundredths(n) = if isnan(n) "nan" else Integer(round(n * 100)) end - -global _soft_assert_ever_triggered = Ref(false) - -function to_unquoted(e) - io = IOBuffer() - Base.show_unquoted(io, e) - String(take!(io)) -end - -macro soft_assert(io, b, msg) - src = "$(__source__.file):$(__source__.line)" - b_s = to_unquoted(b) - quote - if !$(esc(b)) - global _soft_assert_ever_triggered[] = true - for io in Set([$(esc(io)), stdout]) - println(io, "Assertion failed at $($src)") - println(io, $b_s) - println(io, $(esc(msg))) - end - end - end -end -atexit() do - if _soft_assert_ever_triggered[] - println("WARNING: this program failed soft assertion(s)") - exit(1) - end -end - -function register_weight!(rs, s; random_value=false) - var = Var("$(s)_before_sigmoid") - if !haskey(rs.var_vals, var) || rs.var_vals[var] == 0 - rs.var_vals[var] = 0 - else - println("WARNING: not registering fresh weight for $(s)") - end - if random_value - rs.var_vals[var] = inverse_sigmoid(rand(rs.rng)) - end - weight = sigmoid(var) - rs.adnodes_of_interest[s] = weight - weight -end - -function print_adnodes_of_interest(rs::RunState, s::String) - println_flush(rs.io, "ADNodes of interest ($(s)):") - vals = compute(rs.var_vals, values(rs.adnodes_of_interest)) - d = Dict(s => vals[adnode] for (s, adnode) in rs.adnodes_of_interest) - showln(rs.io, d) -end - -function println_loud(rs::RunState, x) - for io in Set([rs.io, stdout]) - println_flush(io, x) - end -end - -println_loud(rs) = println_loud(rs, "") - -function flip_for(rs, name, dependents) - res = nothing - support = support_mixed(dependents; as_dist=true) - @assert !isempty(support) - for dependents_vals in support - t = join([string(x) for x in dependents_vals], "%") - v = flip(register_weight!(rs, "$(name)%%$(t)")) - if isnothing(res) - res = v - else - res = @dice_ite if prob_equals(dependents, dependents_vals) - v - else - res - end - end - end - res -end - -function backtrack_for(rs, name, dependents, casenames_xs, default) - casenames = [] - xs = [] - for (casename, x) in casenames_xs - push!(casenames, casename) - push!(xs, x) - end - - res = nothing - support = support_mixed(dependents; as_dist=true) - @assert !isempty(support) - for dependents_vals in support - t = join([string(x) for x in dependents_vals], "%") - weights = [ - register_weight!(rs, "$(name)_$(casename)%%$(t)") - for casename in casenames - ] - v = backtrack(default, collect(zip(weights, xs))) - if isnothing(res) - res = v - else - res = @dice_ite if prob_equals(dependents, dependents_vals) - v - else - res - end - end - end - res -end - -function frequency_for(rs, name, dependents, casenames_xs) - casenames = [] - xs = [] - for (casename, x) in casenames_xs - push!(casenames, casename) - push!(xs, x) - end - - res = nothing - support = support_mixed(dependents; as_dist=true) - @assert !isempty(support) - for dependents_vals in support - t = join([string(x) for x in dependents_vals], "%") - weights = [ - register_weight!(rs, "$(name)_$(casename)%%$(t)") - for casename in casenames - ] - v = frequency(collect(zip(weights, xs))) - if isnothing(res) - res = v - else - res = @dice_ite if prob_equals(dependents, dependents_vals) - v - else - res - end - end - end - res -end - -function tocoq(i::Integer) - "$(i)" -end - -function tocoq(i::DistUInt32) - Dice.frombits(i, Dict()) -end - -function tocoq(v::Tuple) - if v == () - "tt" - else - "($(join([tocoq(x) for x in v], ", ")))" - end -end - - -function collect_types(root_ty) - to_visit = [root_ty] - seen = Set([root_ty]) - tys = [root_ty] - while !isempty(to_visit) - ty = pop!(to_visit) - for (ctor, params) in variants(ty) - for param in params - if param ∉ seen && hasmethod(variants, (Type{param},)) - push!(seen, param) - push!(to_visit, param) - push!(tys, param) - end - end - end - end - reverse!(tys) # top order - - type_ctor_parami_to_id = Dict() - for ty in tys - for (ctor, params) in variants(ty) - for (parami, param) in enumerate(params) - if param in tys - type_ctor_parami_to_id[(ty, ctor, parami)] = length(type_ctor_parami_to_id) + 1 - end - end - end - end - - tys, type_ctor_parami_to_id -end - -variants2(ty, exclude_recursive) = if exclude_recursive - [ - (ctor, params) - for (ctor, params) in variants(ty) - if !(ty in params) - ] -else - variants(ty) -end - -function generate(rs::RunState, p, track_return) - tys, type_ctor_parami_to_id = collect_types(p.root_ty) - type_to_gen = Dict() - for ty in tys - type_to_gen[ty] = (leaf::Bool, chosen_varianti::DistUInt32, size, stack_tail) -> begin - @assert !leaf || size == -1 - prefix = if leaf "leaf_" elseif size == 0 "0_" else "" end - dependents = if leaf stack_tail else (size, stack_tail) end - zero_case()::Bool = if leaf - error("don't check zero_case() if leaf") - else - size == 0 - end - - res = nothing - for (varianti, (ctor, params)) in enumerate(variants(ty)) - if leaf && ty in params - continue - end - param_variantis = frequency_for(rs, "$(prefix)_$(ty)_$(ctor)_variantis", dependents, [ - "$(x)" => [DistUInt32(j) for j in x] - for x in Iterators.product([ - [ - j - for (j, (_, param_params)) in enumerate(variants(param)) - if !(param == ty && zero_case() && ty in param_params) - ] - for param in params - if param ∈ tys - ]...) - ]) - param_variantis_idx = 0 - alt = ctor([ - if param ∈ tys - param_variantis_idx += 1 - type_to_gen[param]( - # leaf - param == ty && zero_case(), - # chosen variant - param_variantis[param_variantis_idx], - # size - if param == ty - if zero_case() - (-1) - else - size - 1 - end - else - Dict(p.ty_sizes)[param] - end, - # todo: include leaf/zero_case in call location - update_stack_tail(p, stack_tail, type_ctor_parami_to_id[(ty, ctor, parami)]) - ) - elseif param == AnyBool - flip_for(rs, "$(prefix)$(ty)_$(ctor)_$(parami)_true", dependents) - elseif param in [DistUInt32, DistInt32] - sum( - @dice_ite if flip_for(rs, "$(prefix)$(ty)_$(ctor)_$(parami)_num$(n)", dependents) - param(n) - else - param(0) - end - for n in twopowers(p.intwidth) - ) - else - error() - end - for (parami, param) in enumerate(params) - ]...) - if isnothing(res) - res = alt - else - res = @dice_ite if prob_equals(DistUInt32(varianti), chosen_varianti) - alt - else - res - end - end - end - res - end - end - init_varianti = frequency_for(rs, "init_$(p.root_ty)_varianti", ((),), [ - "$(i)" => DistUInt32(i) - for i in 1:length(variants(p.root_ty)) - ]) - type_to_gen[p.root_ty](false, init_varianti, Dict(p.ty_sizes)[p.root_ty], empty_stack(p)) -end - -to_coq(::Type{DistUInt32}) = "nat" -to_coq(::Type{DistInt32}) = "Z" -to_coq(::Type{AnyBool}) = "bool" - -function sandwichjoin(pairs; middle, sep) - ls = [] - rs = [] - for (l, r) in pairs - push!(ls, l) - push!(rs, r) - end - reverse!(rs) - join( - Iterators.flatten([ - ls, [middle], rs - ]), sep - ) -end - -function derived_to_coq(p, adnodes_vals, io) - matchid_to_cases = Dict() - for (name, val) in adnodes_vals - matchid, case = split(name, "%%") - case = if case == "" "tt" else "(" * join([tocoq(eval(Meta.parse(x))) for x in split(case, "%")], ", ") * ")" end - val = hundredths(val) - push!(get!(matchid_to_cases, matchid, []), (case, val)) - end - - tys, type_ctor_parami_to_id = collect_types(p.root_ty) - - workload = workload_of(typeof(p)) - - stack_vars = ["(stack$(i) : nat)" for i in 1:p.stack_size] - - update_stack_vars(loc) = if p.stack_size == 0 - "" - else - join(stack_vars[2:end], " ") * " $(loc)" - end - - segments = [] - # Emit line - indent = 0 - function e!(s=""; indent_=nothing) - if isnothing(indent_) - indent_ = indent - end - segment = if s == "" - # don't indent empty line - "" - else - " " ^ indent_ * s - end - push!(segments, segment) - end - # Emit with outer indent - o!(s) = e!(s, indent_=indent-1) - # Append to last line - function a!(s) - @assert !isempty(segments) - segments[end] = segments[end] * s - end - - before, after = sandwich(workload) - e!(before) - e!() - - function for_indent(f, iter) - indent += 1 - map(f, iter) - indent -= 1 - end - - coq_tuple(names) = if isempty(names) - "tt" - else - "($(join(names, ", ")))" - end - - function ematch!(matchid, leaf) - cases = matchid_to_cases[matchid] - cases = sort(cases) - if leaf - e!("match $(coq_tuple(stack_vars)) with ") - else - e!("match (size, $(coq_tuple(stack_vars))) with ") - end - for (name, w) in cases - e!("| $(name) => $(w)") - end - if !(leaf && isempty(stack_vars)) - e!("| _ => 500") - end - e!("end") - end - - for_indent(tys) do ty - o!("Inductive $(to_coq(ty))_leaf_ctor :=") - for (ctor, params) in variants(ty) - if !(ty in params) - e!("| Ctor_leaf_$(ctor)") - end - end - a!(".") - e!() - end - sif(c, s) = if c s else "" end - - for_indent(tys) do ty - o!("Inductive $(to_coq(ty))_ctor :=") - for (ctor, _) in variants(ty) - e!("| Ctor_$(ctor)") - end - a!(".") - e!() - end - - variantis_types_placeholder = "(* VARIANTIS TYPES GO HERE *)" - e!(variantis_types_placeholder) - variantis_types_needed = Set() - - join2(it, sep) = join(it, sep) * sep - - for leaf in [true, false] - leaf_prefix = if leaf "leaf_" else "" end - for_indent(tys) do ty - if leaf - o!("Definition") - else - o!("Fixpoint") - end - a!(" gen_$(leaf_prefix)$(to_coq(ty)) ") - leaf || a!("(size : nat) ") - a!("(chosen_ctor : $(to_coq(ty))_$(leaf_prefix)ctor) ") - a!(join2(stack_vars, " ")) - a!(": G $(to_coq(ty)) :=") - - ty_variants = [ - (ctor, params) - for (ctor, params) in variants(ty) - if !(leaf && ty in params) - ] - need_freq = length(ty_variants) > 1 - - leaf || e!("match size with") - zero_cases = if leaf begin [true] end else [true, false] end - for _zero_case in zero_cases - zero_case() = if leaf - error("don't check zero_case() if leaf") - else - _zero_case - end - - prefix = if leaf "leaf_" elseif zero_case() "0_" else "" end - if !leaf - indent += 1 - if zero_case() - o!("| 0 =>") - else - o!("| S size' =>") - end - end - - e!("match chosen_ctor with") - for_indent(variants2(ty, leaf)) do (ctor, params) - o!("| Ctor_$(leaf_prefix)$(ctor) =>") - rparens_needed = 0 - need_variantis = any( - param in tys - for param in params - ) - variantis_types = [ - "$(to_coq(param))_$(if param == ty && zero_case() "leaf_" else "" end)ctor" - for param in params - if param in tys - ] - if length(variantis_types) > 1 - push!(variantis_types_needed, variantis_types) - end - variantis_struct = join(variantis_types, "_") - variantis_struct_ctor = if length(variantis_types) > 1 - "Mk$(variantis_struct) " - else - "" - end - - variantis_options = Iterators.product([ - [ - # If were generating ourself, and we have zero fuel, then don't choose another recursive constructor - (j, "Ctor_$(if param == ty && zero_case() "leaf_" else "" end)$(param_ctor)") - for (j, (param_ctor, param_params)) in enumerate(variants(param)) - if !(param == ty && zero_case() && ty in param_params) - ] - for param in params - if param in tys - ]...) - if need_variantis - e!("bindGen (freq [") - for_indent(enumerate(variantis_options)) do (j, param_ctor_is_and_param_ctors) - param_ctor_is = [] - param_ctors = [] - for (a, b) in param_ctor_is_and_param_ctors - push!(param_ctor_is, a) - push!(param_ctors, b) - end - - if length(variantis_options) == 1 - e!("(* no alternatives, so lets just put this again *)") - e!("(") - indent += 1 - ematch!("$(prefix)_$(ty)_$(ctor)_variantis_$(Tuple(param_ctor_is))", leaf) - a!(",") - e!("returnGen ($(variantis_struct_ctor)$(join(param_ctors, " ")))") - indent -= 1 - e!(");") - end - - e!("(") - indent += 1 - ematch!("$(prefix)_$(ty)_$(ctor)_variantis_$(Tuple(param_ctor_is))", leaf) - a!(",") - e!("returnGen ($(variantis_struct_ctor)$(join(param_ctors, " ")))") - indent -= 1 - if j < length(variantis_options) - e!(");") - else - e!(")") - end - end - e!("]) (fun param_variantis =>") - rparens_needed += 1 - - e!("let '($(variantis_struct_ctor)$(join(["param$(parami)_ctor" for (parami, param) in enumerate(params) if param in tys], " "))) := param_variantis in") - end - for (parami, param) in enumerate(params) - if param == ty - e!("bindGen (gen_$(if zero_case() "leaf_" else "" end)$(to_coq(param))") - zero_case() || a!(" size'") - a!(" param$(parami)_ctor") - a!(" $(update_stack_vars(type_ctor_parami_to_id[(ty, ctor, parami)])))") - e!("(fun p$(parami) : $(to_coq(param)) =>") - rparens_needed += 1 - elseif param ∈ tys - e!("bindGen (gen_$(to_coq(param))") - a!(" $(Dict(p.ty_sizes)[param])") - a!(" param$(parami)_ctor") - a!(" $(update_stack_vars(type_ctor_parami_to_id[(ty, ctor, parami)])))") - e!("(fun p$(parami) : $(to_coq(param)) =>") - rparens_needed += 1 - elseif param == AnyBool - e!("let weight_true :=") - ematch!("$(prefix)$(ty)_$(ctor)_$(parami)_true", leaf) - e!("in") - e!("bindGen (freq [") - e!(" (weight_true, returnGen true);") - e!(" (100-weight_true, returnGen false)") - e!("]) (fun p$(parami) : $(to_coq(param)) =>") - rparens_needed += 1 - elseif param in [DistUInt32, DistInt32] - for n in twopowers(p.intwidth) - e!("let weight_$(n) :=") - ematch!("$(prefix)$(ty)_$(ctor)_$(parami)_num$(n)", leaf) - e!("in") - e!("bindGen (freq [") - if param == DistUInt32 - e!(" (weight_$(n), returnGen $(n));") - e!(" (100-weight_$(n), returnGen 0)") - else - e!(" (weight_$(n), returnGen $(n)%Z);") - e!(" (100-weight_$(n), returnGen 0%Z)") - end - e!("]) (fun n$(n) =>") - rparens_needed += 1 - end - if param == DistUInt32 - e!("let p$(parami) := $(join(["n$(n)" for n in twopowers(p.intwidth)], " + ")) in ") - else - e!("let p$(parami) := ($(join(["n$(n)" for n in twopowers(p.intwidth)], " + ")))%Z in ") - end - else - error() - end - end - e!("returnGen ($(ctor) $(join(["p$(parami)" for parami in 1:length(params)], " ")))") - a!(")" ^ rparens_needed) - end - - if !leaf - indent -= 1 - end - e!("end") - end - if !leaf - e!("end") - end - a!(".") - e!() - end - end - - e!("Definition gSized :=") - indent += 1 - e!("bindGen (freq [") - indent += 1 - for_indent(enumerate(variants(p.root_ty))) do (i, (ctor, params)) - o!("(") - matchid = "init_$(p.root_ty)_varianti_$(i)" - cases = matchid_to_cases[matchid] - @assert length(cases) == 1 - for (name, w) in cases - e!("$(w)") - end - a!(",") - e!("returnGen Ctor_$(ctor)") - o!(")") - if i < length(variants(p.root_ty)) - a!(";") - end - end - indent -= 1 - e!("]) (fun init_ctor =>") - e!("gen_$(to_coq(p.root_ty)) $(Dict(p.ty_sizes)[p.root_ty]) init_ctor$(" 0" ^ p.stack_size)") - a!(").") - indent -= 1 - e!() - e!(after) - result = join(segments, "\n") - replace(result, "$(variantis_types_placeholder)" => join([ - begin - variantis_struct = join(variantis_types,"_") - "Inductive $(variantis_struct) := - | Mk$(variantis_struct) : $(join(variantis_types," -> ")) -> $(variantis_struct)." - end - for variantis_types in variantis_types_needed - ], "\n")) -end diff --git a/examples/qc/benchmarks/lib/visit.jl b/examples/qc/benchmarks/lib/visit.jl deleted file mode 100644 index be8dae05..00000000 --- a/examples/qc/benchmarks/lib/visit.jl +++ /dev/null @@ -1,108 +0,0 @@ - function visit(x::L.Var) - end - - function visit(x::L.Nat) - end - - function visit(x::L.Z) - end - - function visit(x::L.Bool) - end - - function visit(x::L.NatAdd) - for x in x.xs - visit(x) - end - end - - function visit(x::L.ZAdd) - for x in x.xs - visit(x) - end - end - - function visit(x::L.Eq) - visit(x.x) - visit(x.y) - end - - function visit(x::L.If) - visit(x.c) - visit(x.t) - visit(x.e) - end - - function visit(x::L.Construct) - for arg in x.args - visit(arg) - end - end - - function visit(x::L.Match) - visit(x.scrutinee) - for ((ctor, args), body) in x.branches - visit(body) - end - end - - function visit(x::L.Call) - for arg in x.args - visit(arg) - end - end - - function visit(x::L.Lambda) - visit(x.body) - end - - function visit(x::L.Map) - visit(x.f) - visit(x.l) - end - - function visit(x::L.BindGen) - visit(x.gen) - visit(x.body) - end - - function visit(x::L.ReturnGen) - visit(x.x) - end - - function visit(x::L.OneOf) - visit(x.default) - visit(x.x) - end - - function visit(x::L.Frequency) - for (name, body) in x.branches - visit(body) - end - end - - function visit(x::L.Backtrack) - for (name, body) in x.branches - visit(body) - end - end - - function visit(x::L.GenNat) - end - - function visit(x::L.GenZ) - end - - function visit(x::L.GenBool) - end - - function visit(x::L.Function) - visit(x.body) - end - - function visit(x::L.Program) - for f in x.functions - visit(f) - end - visit(x.res) - end \ No newline at end of file diff --git a/examples/qc/benchmarks/main.jl b/examples/qc/benchmarks/main.jl deleted file mode 100644 index 41b60a8b..00000000 --- a/examples/qc/benchmarks/main.jl +++ /dev/null @@ -1,165 +0,0 @@ -include("benchmarks.jl") - -GENERATION_PARAMS_LIST = [ - # LangBespokeSTLCGenerator( - # expr_size=5, - # typ_size=2, - # ), - LangSiblingDerivedGenerator{STLC}( - root_ty=Expr.t, - ty_sizes=[Expr.t=>5, Typ.t=>2], - stack_size=1, - intwidth=3, - ) - # LangSiblingDerivedGenerator{RBT}( - # root_ty=ColorKVTree.t, - # ty_sizes=[ColorKVTree.t=>4, Color.t=>0], - # stack_size=2, - # intwidth=3, - # ) -# LangSiblingDerivedGenerator{BST}( -# root_ty=KVTree.t, -# ty_sizes=[KVTree.t=>4], -# stack_size=2, -# intwidth=3, -# ), -] -# LR_LIST = [0.3] -LR_LIST = [0.01, 0.03, 0.1, 0.3] -FP_LIST = [0.] -FORIGIVENESS_LIST = [0] -RAND_FORIGIVENESS_LIST = [true] -RESAMPLING_FREQUENCY_LIST = [1,2,5] -PROPERTY_LIST = [STLCWellTyped()] -# PROPERTY_LIST = [MultipleInvariants([ -# BookkeepingInvariant(), -# BalanceInvariant(), -# OrderInvariant(), -# ]), -# TrueProperty{RBT}()] - -# PROPERTY_LIST = [nothing] - -SAMPLES_PER_BATCH_LIST = [50] -EPOCHS_LIST = [500] - -# SAMPLES_PER_BATCH_LIST = [nothing] -BOUND_LIST = [0.1] - -EQ_LIST = [:prob_equals] - -n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, FP_LIST, FORIGIVENESS_LIST, RAND_FORIGIVENESS_LIST, PROPERTY_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST, EQ_LIST, BOUND_LIST])) -println(n_runs) -@assert n_runs <= 12 - -@show GENERATION_PARAMS_LIST -@show LR_LIST -@show FP_LIST -@show FORIGIVENESS_LIST -@show RAND_FORIGIVENESS_LIST -@show PROPERTY_LIST -@show RESAMPLING_FREQUENCY_LIST -@show SAMPLES_PER_BATCH_LIST -@show EPOCHS_LIST -@show EQ_LIST -@show BOUND_LIST -println() - -LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ - ( - [ - # ApproxSTLCConstructorEntropy() => lr, - # SatisfyPropertyLoss{RBT}(MultipleInvariants([ - # BookkeepingInvariant(), - # BalanceInvariant(), - # OrderInvariant(), - # ])) => lr, - # MLELossConfig{RBT}(RBTDepth(), Uniform()) => lr, - SamplingEntropy{STLC}( - resampling_frequency=resampling_frequency, - samples_per_batch=samples_per_batch, - property=property, - eq=eq, - failure_penalty=fp, - forgiveness=forgiveness, - rand_forgiveness=rand_forgiveness, - keyf=:identity, - ) => lr, - # SamplingEntropy{BST}( - # resampling_frequency=resampling_frequency, - # samples_per_batch=samples_per_batch, - # property=BSTOrderInvariant(), - # eq=eq, - # failure_penalty=fp, - # ) => lr, - # SamplingEntropy{RBT}( - # resampling_frequency=resampling_frequency, - # samples_per_batch=samples_per_batch, - # property=MultipleInvariants([ - # BookkeepingInvariant(), - # BalanceInvariant(), - # OrderInvariant(), - # ]), - # eq=eq, - # failure_penalty=fp, - # forgiveness=forgiveness, - # rand_forgiveness=rand_forgiveness, - # ) => lr, - ] - for lr in LR_LIST - for fp in FP_LIST - for forgiveness in FORIGIVENESS_LIST - for rand_forgiveness in RAND_FORIGIVENESS_LIST - for property in PROPERTY_LIST - for resampling_frequency in RESAMPLING_FREQUENCY_LIST - for samples_per_batch in SAMPLES_PER_BATCH_LIST - for eq in EQ_LIST - ), -])) - - -N = 3 -GENERATION_PARAMS_LIST = [Flips{N}()] -# LR_LIST = [0.0001, 0.0003, 0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1, 3, 10, 30, 100, 300] -LR_LIST = [0.0001, 0.0002, 0.0005, 0.001, 0.002, 0.005, 0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 3, 10, 30, 100] -LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([ - ( - [ - # BoolsExactEntropy{3}() => lr, - SamplingEntropy{Bools{N}}( - resampling_frequency=1, - samples_per_batch=300, - property=TrueProperty{Bools{N}}(), - eq=:prob_equals, - failure_penalty=0., - forgiveness=0, - rand_forgiveness=true, - keyf=:identity, - ) => lr, - ] - for lr in LR_LIST - ), -])) -EPOCHS_LIST = [100] - -TOOL_PATH = "examples/qc/benchmarks/tool.jl" - -@sync for (p, lcws, epochs, bound) in Base.product(GENERATION_PARAMS_LIST, LOSS_CONFIG_WEIGHT_PAIRS_LIST, EPOCHS_LIST, BOUND_LIST) - flags = join([s for s in ARGS if startswith(s, "-")], " ") - lcws_s = replace(string(lcws), " "=>"") - p_s = replace(string(p), " "=>"") - s = "julia --project $(TOOL_PATH) $(flags) $(p_s) $(lcws_s) $(epochs) $(bound)" - cmd = Cmd(Cmd(convert(Vector{String}, split(s))), ignorestatus=true) - println(s) - out = IOBuffer() - @async begin - proc = run(pipeline(cmd; stdout=out, stderr=stdout),) - if proc.exitcode != 0 - println() - println(proc.exitcode) - so = String(take!(out)) - println("FAILED: $(s)\nSTDOUT ===\n$(so)\n\n") - end - end -end - diff --git a/examples/qc/benchmarks/test.jl b/examples/qc/benchmarks/test.jl deleted file mode 100644 index 7ad4aae0..00000000 --- a/examples/qc/benchmarks/test.jl +++ /dev/null @@ -1,62 +0,0 @@ -using Dates -include("benchmarks.jl") - -function main() - for (lr, samples_per_batch) in Base.product( - [0.0001, 0.0003, 0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1.], - [100, 1000, 10000], - ) - test(samples_per_batch, lr) - end -end - -function test(samples_per_batch, lr) - SEED = 0 - - out_dir = "tmp/out_dir$(Dates.format(now(), dateformat"yyyy-mm-ddTHH_MM_SS"))-lr$(lr)-spb$(samples_per_batch)" - println(out_dir) - mkdir(out_dir) - - log_path = "tmp/log" - rs = RunState(Valuation(), Dict{String,ADNode}(), open(log_path, "w"), out_dir, MersenneTwister(SEED), nothing) - - v = flip(register_weight!(rs, "v"; random_value=true)) - - curve = [] - dists = [] - - for epoch in 1:1000 - samples = with_concrete_ad_flips(rs.var_vals, v) do - [sample_as_dist(rs.rng, Valuation(), v) for _ in 1:samples_per_batch] - end - - loss = sum( - LogPr(prob_equals(v, sample)) - for sample in samples - ) - l = Dice.LogPrExpander(WMC(BDDCompiler(Dice.bool_roots([loss])))) - loss = Dice.expand_logprs(l, loss) / samples_per_batch - vals, derivs = differentiate( - rs.var_vals, - Derivs(loss => lr) - ) - push!(curve, vals[loss]) - d = pr_mixed(rs.var_vals)(v) - push!(dists, [d[false], d[true]]) - - if isinf(vals[loss]) || isnan(vals[loss]) - break - end - - for (adnode, d) in derivs - if adnode isa Var - rs.var_vals[adnode] -= d - end - end - end - - save_learning_curve(rs.out_dir, curve, "loss.csv") - save_areaplot(joinpath(rs.out_dir, "dist.svg"), dists) -end - -main() \ No newline at end of file diff --git a/examples/qc/benchmarks/tool.jl b/examples/qc/benchmarks/tool.jl deleted file mode 100644 index 040a641f..00000000 --- a/examples/qc/benchmarks/tool.jl +++ /dev/null @@ -1,216 +0,0 @@ -include("benchmarks.jl") - -TAG = "v45_stlcmayarb" -TAG = "v46_tbmay" -TAG = "v48_bst_lang" -TAG = "v49_stlcmaythin" -TAG = "v50_stlcbound" -TAG = "v51_rbtbound" -TAG = "v52_stlcace_w_bounds" -TAG = "v53_stlc_well_bounds" -TAG = "v54_rbt_bigger" -TAG = "v55_stlc_faster" -TAG = "v56_rbt_thin" -TAG = "v57_bst_small" -TAG = "v58_stlc_bespoke_se" -TAG = "v60_stlc_bespoke_se" -TAG = "v61_stlc_51_ace" -TAG = "v61_stlc_bespoke_se_force_meets" -TAG = "v62_ex_unif_stlc" -TAG = "v63_ex_unif_stlc_entropy" -TAG = "v64_fig_rbt" -TAG = "v65_simpler_ace" -TAG = "v66_fig2_rbt" -TAG = "v67_rbt_unif_apps" -TAG = "v68_rbt_spec" -TAG = "v69_attempt_stlctb_faster" -TAG = "v70_bools_fig" -# TAG = "v59_repro" -OUT_TOP_DIR = "/space2/tjoa/tuning-output" - -## PARSE ARGS -if isempty(ARGS) - TAG = "test2" - as = ["-f"] - # g_p = TypeBasedBSTGenerator( - # size=5, - # leaf_dependents=[:size,:last_callsite], - # num_dependents=[:size,:last_callsite], - # intwidth=6, - # ) - # g_p = DerivedGenerator{RBT}( - # root_ty=ColorKVTree.t, - # ty_sizes=Dict(ColorKVTree.t=>4, Color.t=>0), - # stack_size=1, - # intwidth=6, - # ) - # g_p = TypeBasedSTLCGenerator( - # size=2, - # ty_size=1, - # dependents=[:size,:stack_tail], - # ty_dependents=[:size,:stack_tail], - # stack_size=2, - # intwidth=6, - # ) - g_p = TypeBasedRBTGenerator( - size=3, - leaf_dependents=[:size,:parent_color,:stack_tail], - red_dependents=[:size,:parent_color,:stack_tail], - num_dependents=[:size,:parent_color,:stack_tail], - stack_size=2, - intwidth=6, - ) - lr = 0.5 - fp = 0 - # g_p = LangDerivedGenerator{BST}( - # root_ty=KVTree.t, - # ty_sizes=[KVTree.t=>5], - # stack_size=2, - # intwidth=6, - # arbitrary_prims=false, - # ) - g_p = LangBespokeSTLCGenerator( - expr_size=2, - typ_size=1, - ) - l_p = [ - # SamplingEntropy{STLC}( - # resampling_frequency=1, - # samples_per_batch=50, - # property=STLCMightType(), - # eq=:eq_structure, - # failure_penalty=fp, - # forgiveness=0, - # rand_forgiveness=true, - # ) => lr, - # SamplingEntropy{STLC}( - # resampling_frequency=1, - # samples_per_batch=50, - # property=STLCWellTyped(), - # eq=:eq_structure, - # failure_penalty=fp, - # forgiveness=0, - # rand_forgiveness=true, - # keyf=:identity, - # ) => lr, - # MLELossConfig{STLC}(NumApps(), Linear()) => lr, - - # Apps entropy - # SamplingEntropy{STLC}( - # resampling_frequency=1, - # samples_per_batch=50, - # property=TrueProperty{STLC}(), - # eq=:prob_equals, - # failure_penalty=fp, - # forgiveness=0, - # rand_forgiveness=true, - # keyf=:num_apps, - # ) => lr, - - ApproxSTLCConstructorEntropy() => lr, - # MLELossConfig{STLC}(NumApps(), Linear()) => lr, - ] - - - # g_p = LangSiblingDerivedGenerator{RBT}( - # root_ty=ColorKVTree.t, - # ty_sizes=[ColorKVTree.t=>2, Color.t=>0], - # stack_size=2, - # intwidth=6, - # ) - # l_p = [ - # SamplingEntropy{RBT}( - # resampling_frequency=1, - # samples_per_batch=50, - # property=MultipleInvariants([ - # BookkeepingInvariant(), - # BalanceInvariant(), - # OrderInvariant(), - # ]), - # eq=:prob_equals, - # failure_penalty=fp, - # forgiveness=0.1, - # rand_forgiveness=false, - # ) => lr, - # ] - - - - push!(as, replace(string(g_p), " "=>"")) - push!(as, replace(string(l_p), " "=>"")) - push!(as, string(10)) - push!(as, string(0.1)) - empty!(ARGS) - append!(ARGS, as) -end - -expected_types = [GenerationParams, AbstractVector{<:Pair{<:LossConfig, <:Real}}, Integer, Real] - -args = ARGS -allow_overwrite = "-f" ∈ args -args = filter(a -> a != "-f", args) -if length(args) != length(expected_types) - println("Expected $(length(expected_types)) positional args, got $(length(args))") - exit(1) -end -evaled_args = [] -for (i, (arg, expected_type)) in enumerate(zip(args, expected_types)) - evaled_arg = eval(Meta.parse(arg)) - if !(evaled_arg isa expected_type) - println("Expected arg $(i) to be $(expected_type), got $(typeof(evaled_arg))") - exit(1) - end - push!(evaled_args, evaled_arg) -end -generation_params, loss_config_weight_pairs, epochs, bound = evaled_args -EPOCHS = epochs -SEED = 0 - -out_dir = joinpath( - vcat( - [OUT_TOP_DIR], - [TAG], - to_subpath(generation_params), - vcat([ - vcat(to_subpath(c), ["$(w)"]) - for (c, w) in loss_config_weight_pairs - ]...), - ["epochs=$(epochs)"], - ["bound=$(bound)"], - ) -) -log_path = joinpath(out_dir, "log.log") -if isfile(log_path) && !allow_overwrite - println("Error: Log already exists at the following path:") - println(log_path) - println() - exit(1) -end -mkpath(out_dir) -rs = RunState(Valuation(), Dict{String,ADNode}(), open(log_path, "w"), out_dir, MersenneTwister(SEED), nothing,generation_params) - -println(stderr, "Logging to $(log_path)\n") - -commit = strip(cmd_out(`git rev-parse --short HEAD`)) -t = now() -println_loud(rs, "$(t) $(commit) $(ARGS)") -println_loud(rs, "== Config ==") -println_loud(rs, "TAG: $(TAG)") -println_loud(rs, generation_params) -println_loud(rs, loss_config_weight_pairs) -println_loud(rs, "Epochs: $(epochs)") -println_loud(rs, "Bound: $(bound)") -println_loud(rs, "DistNat: $(DistNat)") -println_loud(rs, "SEED: $(SEED)") -println_loud(rs) -println("Logging to $(log_path)") -println() - -run_benchmark(rs, generation_params, loss_config_weight_pairs, epochs, bound) -t′ = now() - -println_loud(rs, t′) -println_loud(rs, "Total time elapsed: $(canonicalize(t′ - t))") - -println(stderr, log_path) -# include("dump_loss_graph.jl") diff --git a/examples/qc/examples/demo_bst.jl b/examples/qc/examples/demo_bst.jl deleted file mode 100644 index 5f3e3268..00000000 --- a/examples/qc/examples/demo_bst.jl +++ /dev/null @@ -1,118 +0,0 @@ -# Demo of using BDD MLE to learn flip probs for a BST of uniform depth - -using Dice -include("lib/dist_tree.jl") # DistLeaf, DistBranch, depth - -var_vals = Valuation() -adnodes_of_interest = Dict{String, ADNode}() -function register_weight!(s) - var = Var("$(s)_before_sigmoid") - var_vals[var] = 0 - weight = sigmoid(var) - adnodes_of_interest[s] = weight - weight -end - -# Return tree -function gen_bst(size, lo, hi) - # Try changing the parameter to flip_for to a constant, which would force - # all sizes to use the same probability. - @dice_ite if size == 0 || flip(register_weight!("sz$(size)")) - DistLeaf(DistUInt32) - else - # The flips used in the uniform aren't tracked via flip_for, so we - # don't learn their probabilities (this is on purpose - we could). - x = unif(lo, hi) - DistBranch(x, gen_bst(size-1, lo, x), gen_bst(size-1, x, hi)) - end -end - -# Top-level size/fuel. For gen_bst, this is the max depth. -INIT_SIZE = 3 - -# Dataset over the desired property to match. Below is a uniform distribution -# over sizes. -DATASET = [DistUInt32(x) for x in 0:INIT_SIZE] - -# Use Dice to build computation graph -tree = gen_bst( - INIT_SIZE, - DistUInt32(1), - DistUInt32(2 * INIT_SIZE), -) -tree_depth = depth(tree) - -println("Distribution before training:") -display(pr_mixed(var_vals)(tree_depth)) -println() - -train!(var_vals, mle_loss([prob_equals(tree_depth, x) for x in DATASET]), epochs=1000, learning_rate=0.3) - -# Done! -println("Learned flip probability for each size:") -vals = compute(var_vals, values(adnodes_of_interest)) -show(Dict(s => vals[adnode] for (s, adnode) in adnodes_of_interest)) -println() -println() - -println("Distribution over depths after training:") -display(pr_mixed(var_vals)(tree_depth)) -println() - -println("A few sampled trees:") -with_concrete_ad_flips(var_vals, tree) do - for _ in 1:3 - print_tree(sample(tree)) - println() - end -end - -#== -Distribution before training: - 0 => 0.49999999999999994 - 3 => 0.30468750000000006 - 1 => 0.12499999999999997 - 2 => 0.0703125 - -Learned flip probability for each size: - 1 => 0.7522142306508817 - 2 => 0.5773502691896257 - 3 => 0.25 - -Distribution over depths after training: - 0 => 0.2500000000000004 - 1 => 0.24999999999999994 - 2 => 0.24999999999999994 - 3 => 0.24999999999999994 - -A few sampled trees: -Branch -├── 2 -├── Branch -│ ├── 2 -│ ├── Leaf -│ └── Leaf -└── Branch - ├── 5 - ├── Leaf - └── Branch - ├── 6 - ├── Leaf - └── Leaf - -Branch -├── 3 -├── Leaf -└── Branch - ├── 3 - ├── Leaf - └── Branch - ├── 3 - ├── Leaf - └── Leaf - -Branch -├── 2 -├── Leaf -└── Leaf -==# diff --git a/examples/qc/examples/demo_natlist.jl b/examples/qc/examples/demo_natlist.jl deleted file mode 100644 index 6ffd7f94..00000000 --- a/examples/qc/examples/demo_natlist.jl +++ /dev/null @@ -1,70 +0,0 @@ -# Demo of using BDD MLE to learn flip probs for nat list of uniform length. - -using Dice - -function gen_list(size) - size == 0 && return DistNil(DistUInt32) - - # Try changing the parameter to flip_for to a constant, which would force - # all sizes to use the same probability. - @dice_ite if flip(sigmoid(Var(size))) - DistNil(DistUInt32) - else - # The flips used in the uniform aren't tracked via flip_for, so we - # don't learn their probabilities (this is on purpose - we could). - DistCons(uniform(DistUInt32, 0, 10), gen_list(size-1)) - end -end - -# Top-level size/fuel. For gen_list, this is the max length. -INIT_SIZE = 5 - -# Dataset over the desired property to match. Below is a uniform distribution -# over sizes. -DATASET = [DistUInt32(x) for x in 0:INIT_SIZE] - -# Use Dice to build computation graph -list = gen_list(INIT_SIZE) -list_len = length(list) - -var_vals = Valuation(Var(size) => 0 for size in 1:INIT_SIZE) - -println("Distribution before training:") -display(pr_mixed(var_vals)(list_len)) -println() - -loss = mle_loss([prob_equals(list_len, x) for x in DATASET]) -train!(var_vals, loss, epochs=1000, learning_rate=0.3) - -# Done! -println("Learned flip probability for each size:") -display(Dict(size => compute(var_vals, sigmoid(Var(size))) for size in 1:INIT_SIZE)) -println() - -println("Distribution over lengths after training:") -display(pr_mixed(var_vals)(list_len)) - -#== -Distribution before training: - 0 => 0.5 - 1 => 0.25 - 2 => 0.12500000000000003 - 3 => 0.0625 - 4 => 0.03125 - 5 => 0.03125 - -Learned flip probability for each size: - 1 => 0.5 - 2 => 0.33333333333333337 - 3 => 0.25000000000000006 - 4 => 0.20000000000000007 - 5 => 0.16666666666666669 - -Distribution over lengths after training: - 1 => 0.1666666666666667 - 0 => 0.16666666666666669 - 2 => 0.16666666666666669 - 3 => 0.16666666666666669 - 4 => 0.1666666666666666 - 5 => 0.1666666666666666 -==# diff --git a/examples/qc/examples/demo_sortednatlist.jl b/examples/qc/examples/demo_sortednatlist.jl deleted file mode 100644 index c3d13f35..00000000 --- a/examples/qc/examples/demo_sortednatlist.jl +++ /dev/null @@ -1,115 +0,0 @@ -# TODO: update this example - -# # Demo of using BDD MLE to learn flip probs for a sorted nat list of uniform length. - -# using Dice - -# # Return a List -# function gen_sorted_list(size, lo, hi) -# size == 0 && return DistNil(DistUInt32) - -# # The flips used in the uniform aren't tracked via flip_for, so we -# # don't learn their probabilities (this is on purpose - we could). -# @dice_ite if flip_for(size) -# DistNil(DistUInt32) -# else -# # Try changing the parameter to flip_for to a constant, which would force -# # all sizes to use the same probability. -# x = unif(lo, hi) -# DistCons(x, gen_sorted_list(size-1, x, hi)) -# end - -# end - -# # Top-level size/fuel. For gen_list, this is the max length. -# INIT_SIZE = 5 - -# # Dataset over the desired property to match. Below is a uniform distribution -# # over sizes. -# DATASET = [DistUInt32(x) for x in 0:INIT_SIZE] - -# # Use Dice to build computation graph -# list = gen_sorted_list( -# INIT_SIZE, -# DistUInt32(1), -# DistUInt32(INIT_SIZE), -# ) -# list_len = length(list) - -# println("Distribution before training:") -# display(pr(list_len)) -# println() - -# bools_to_maximize = [prob_equals(list_len, x) for x in DATASET] -# train_group_probs!(bools_to_maximize, 1000, 0.3) # epochs and lr - -# # Done! -# println("Learned flip probability for each size:") -# display(get_group_probs()) -# println() - -# println("Distribution over lengths after training:") -# display(pr(list_len)) -# println() - -# println("A few sampled lists:") -# for _ in 1:3 -# print_tree(sample(list)) -# println() -# end - -# #== -# Distribution before training: -# 0 => 0.49999999999999994 -# 1 => 0.24999999999999972 -# 2 => 0.12499999999999986 -# 3 => 0.062499999999999924 -# 4 => 0.03124999999999996 -# 5 => 0.03124999999999996 - -# Learned flip probability for each size: -# 1 => 0.5 -# 2 => 0.33333333333333337 -# 3 => 0.25000000000000006 -# 4 => 0.19999999999999996 -# 5 => 0.16666666666666663 - -# Distribution over lengths after training: -# 2 => 0.1666666666666666 -# 3 => 0.1666666666666666 -# 0 => 0.16666666666666646 -# 1 => 0.16666666666666646 -# 4 => 0.16666666666666646 -# 5 => 0.16666666666666646 - -# A few sampled lists: -# Cons -# ├── 1 -# └── Cons -# ├── 2 -# └── Cons -# ├── 3 -# └── Cons -# ├── 3 -# └── Cons -# ├── 4 -# └── Nil - -# Cons -# ├── 3 -# └── Cons -# ├── 3 -# └── Cons -# ├── 3 -# └── Cons -# ├── 3 -# └── Cons -# ├── 5 -# └── Nil - -# Cons -# ├── 3 -# └── Cons -# ├── 5 -# └── Nil -# ==# diff --git a/examples/qc/examples/demo_utlc.jl b/examples/qc/examples/demo_utlc.jl deleted file mode 100644 index 81bd3e7f..00000000 --- a/examples/qc/examples/demo_utlc.jl +++ /dev/null @@ -1,105 +0,0 @@ -# TODO: update this example - -# # Using BDD MLE to learn flip probs for closed UTLC exprs of uniform AST depth - -# using Dice -# include("lib/dist_utlc.jl") # DistVar, DistApp, DistAbs, utlc_str - -# function gen_name() -# @dice_ite if flip(1/3) -# DistString("a") -# elseif flip(1/2) -# DistString("b") -# else -# DistString("c") -# end -# end - -# # Return ast, evid pair -# function gen_utlc(size, in_scope) -# # Generate Var arg -# name = choice(in_scope) - -# # Fuel check -# size == 0 && return DistVar(name) - -# @dice_ite if flip_for(size) & (in_scope.len > DistUInt32(0)) -# DistVar(name) -# # Fix weight between Abs and App. We must also always choose Abs if -# # size=1 and the scope is empty so far. -# elseif flip(2/3) | (size==1 & prob_equals(in_scope.len, DistUInt32(0))) -# fresh = gen_name() -# DistAbs( -# fresh, -# gen_utlc(size-1, prob_append(in_scope, fresh)) -# ) -# else -# DistApp(gen_utlc(size-1, in_scope), gen_utlc(size-1, in_scope)) -# end -# end - -# # Top-level size/fuel. For gen_bst, this is the max depth. -# INIT_SIZE = 4 - -# # Dataset over the desired property to match. Below is a uniform distribution -# # over sizes. -# DATASET = [DistUInt32(x) for x in 0:INIT_SIZE] - -# # Use Dice to build computation graph -# e = gen_utlc(INIT_SIZE, DistVector{DistString}()) -# e_depth = ast_depth(e) - -# println("Distribution before training:") -# display(pr(e_depth)) -# println() - -# bools_to_maximize = [prob_equals(e_depth, x) for x in DATASET] -# train_group_probs!(bools_to_maximize, 1000, 0.3) # epochs and lr - -# # Done! -# println("Learned flip probability for each size:") -# display(get_group_probs()) -# println() - -# println("Distribution over depths after training:") -# display(pr(e_depth)) -# println() - -# println("A few sampled exprs:") -# for _ in 1:10 -# expr = sample(e) -# println(utlc_str(expr)) -# # println(print_tree(expr)) # concrete AST -# end - -# #== -# Distribution before training: -# 4 => 0.3670624714220393 -# 1 => 0.3333333333333333 -# 2 => 0.1759259259259259 -# 3 => 0.12367826931870127 - -# Learned flip probability for each size: -# 1 => 0.7709384509910406 -# 2 => 0.5673658539871177 -# 4 => 0.5 -# 3 => 0.3749999999999999 - -# Distribution over depths after training: -# 2 => 0.2500000000000001 -# 4 => 0.25000000000000006 -# 1 => 0.2499999999999999 -# 3 => 0.24999999999999983 - -# A few sampled exprs: -# λc.λb.b b -# λb.λa.λc.a b -# (λa.a) (λa.a) -# λb.(λa.λc.c) (b b) -# λb.b -# λb.b -# (λc.c) (λa.λc.λc.c) -# (λb.b) (λb.λc.c b) -# λb.b -# λa.λb.λb.λb.b -# ==# diff --git a/examples/qc/examples/lib/dist_tree.jl b/examples/qc/examples/lib/dist_tree.jl deleted file mode 100644 index 11f91371..00000000 --- a/examples/qc/examples/lib/dist_tree.jl +++ /dev/null @@ -1,29 +0,0 @@ -# Define Tree -import Dice: param_lists - -struct Tree{T} <: InductiveType end - -function param_lists(::Type{Tree{T}})::Vector{Pair{String,Vector{Type}}} where T <: Union{Dist, AnyBool} - [ - "Leaf" => [], - "Branch" => [T, Tree{T}, Tree{T}], - ] -end - -DistLeaf(T) = construct(Tree{T}, "Leaf", []) -DistBranch(x::T, l::Tree{T}, r::Tree{T}) where T = - construct(Tree{T}, "Branch", [x, l, r]) - -function depth(l::Tree{T}) where T - match(l, [ - "Leaf" => () -> DistUInt32(0), - "Branch" => (x, l, r) -> begin - dl, dr = depth(l), depth(r) - @dice_ite if dl > dr - DistUInt32(1) + dl - else - DistUInt32(1) + dr - end - end - ]) -end diff --git a/examples/qc/examples/lib/dist_utlc.jl b/examples/qc/examples/lib/dist_utlc.jl deleted file mode 100644 index a388f44b..00000000 --- a/examples/qc/examples/lib/dist_utlc.jl +++ /dev/null @@ -1,56 +0,0 @@ -# Define DistUTLC -import Dice: param_lists - -struct DistUTLC <: InductiveType end - -function param_lists(::Type{DistUTLC})::Vector{Pair{String,Vector{Type}}} - [ - "Var" => [DistString], - "App" => [DistUTLC, DistUTLC], - "Abs" => [DistString, DistUTLC], - ] -end - -DistVar(s) = construct(DistUTLC, "Var", [s,]) -DistApp(e1, e2) = construct(DistUTLC, "App", [e1, e2]) -DistAbs(s, e) = construct(DistUTLC, "Abs", [s, e]) - -function ast_depth(l::DistUTLC) - match(l, [ - "Var" => (s) -> DistUInt32(0), - "App" => (e1, e2) -> begin - d1, d2 = ast_depth(e1), ast_depth(e2) - @dice_ite if d1 > d2 - DistUInt32(1) + d1 - else - DistUInt32(1) + d2 - end - end, - "Abs" => (s, e) -> DistUInt32(1) + ast_depth(e), - ]) -end - -# https://stackoverflow.com/questions/59338968/printing-lambda-expressions-in-haskell - -parens(b, s) = if b "($(s))" else s end - -@enum Ctx free=0 fun=1 arg=2 - -function utlc_str(ast, p=free) - name, children = ast - if name == "Var" - s, = children - s - elseif name == "Abs" - s, e = children - parens(p > free, "λ$(s).$(utlc_str(e, free))") - elseif name == "App" - e1, e2 = children - parens( - p > fun, - "$(utlc_str(e1, fun)) $(utlc_str(e2, arg))" - ) - else - error("Bad node $(name)") - end -end diff --git a/examples/qc/examples/samples/bst.txt b/examples/qc/examples/samples/bst.txt deleted file mode 100644 index 87e87441..00000000 --- a/examples/qc/examples/samples/bst.txt +++ /dev/null @@ -1,393 +0,0 @@ -# Generated by examples/qc/demo_bst.jl - -Branch -├── 2 -├── Branch -│ ├── 1 -│ ├── Leaf -│ └── Leaf -└── Branch - ├── 5 - ├── Leaf - └── Leaf - -Branch -├── 4 -├── Leaf -└── Leaf - -Branch -├── 5 -├── Leaf -└── Leaf - - -Branch -├── 2 -├── Leaf -└── Leaf - -Branch -├── 4 -├── Branch -│ ├── 2 -│ ├── Leaf -│ └── Branch -│ ├── 2 -│ ├── Leaf -│ └── Leaf -└── Branch - ├── 4 - ├── Branch - │ ├── 4 - │ ├── Leaf - │ └── Leaf - └── Leaf - -Branch -├── 4 -├── Leaf -└── Branch - ├── 6 - ├── Leaf - └── Leaf - -Branch -├── 5 -├── Leaf -└── Leaf - -Branch -├── 4 -├── Branch -│ ├── 3 -│ ├── Leaf -│ └── Leaf -└── Leaf - -Branch -├── 3 -├── Branch -│ ├── 1 -│ ├── Leaf -│ └── Branch -│ ├── 3 -│ ├── Leaf -│ └── Leaf -└── Leaf - -Leaf - -Branch -├── 2 -├── Branch -│ ├── 2 -│ ├── Leaf -│ └── Leaf -└── Branch - ├── 6 - ├── Branch - │ ├── 6 - │ ├── Leaf - │ └── Leaf - └── Branch - ├── 6 - ├── Leaf - └── Leaf - -Branch -├── 2 -├── Branch -│ ├── 2 -│ ├── Leaf -│ └── Leaf -└── Leaf - -Branch -├── 6 -├── Leaf -└── Leaf - - -Branch -├── 4 -├── Leaf -└── Leaf - -Branch -├── 5 -├── Leaf -└── Leaf - -Branch -├── 3 -├── Leaf -└── Leaf - -Branch -├── 3 -├── Leaf -└── Leaf - -Branch -├── 4 -├── Branch -│ ├── 3 -│ ├── Branch -│ │ ├── 2 -│ │ ├── Leaf -│ │ └── Leaf -│ └── Leaf -└── Leaf - -Branch -├── 3 -├── Branch -│ ├── 2 -│ ├── Leaf -│ └── Branch -│ ├── 2 -│ ├── Leaf -│ └── Leaf -└── Leaf - -Branch -├── 4 -├── Branch -│ ├── 4 -│ ├── Leaf -│ └── Leaf -└── Leaf - -Branch -├── 5 -├── Branch -│ ├── 5 -│ ├── Leaf -│ └── Branch -│ ├── 5 -│ ├── Leaf -│ └── Leaf -└── Branch - ├── 5 - ├── Leaf - └── Leaf - -Branch -├── 5 -├── Branch -│ ├── 4 -│ ├── Branch -│ │ ├── 2 -│ │ ├── Leaf -│ │ └── Leaf -│ └── Leaf -└── Leaf - -Branch -├── 4 -├── Leaf -└── Leaf - -Branch -├── 2 -├── Branch -│ ├── 1 -│ ├── Leaf -│ └── Branch -│ ├── 2 -│ ├── Leaf -│ └── Leaf -└── Branch - ├── 5 - ├── Leaf - └── Leaf - -Branch -├── 2 -├── Leaf -└── Leaf - -Branch -├── 6 -├── Branch -│ ├── 1 -│ ├── Leaf -│ └── Leaf -└── Leaf - -Branch -├── 5 -├── Branch -│ ├── 4 -│ ├── Leaf -│ └── Branch -│ ├── 4 -│ ├── Leaf -│ └── Leaf -└── Branch - ├── 6 - ├── Branch - │ ├── 6 - │ ├── Leaf - │ └── Leaf - └── Leaf - - -Branch -├── 5 -├── Branch -│ ├── 4 -│ ├── Branch -│ │ ├── 4 -│ │ ├── Leaf -│ │ └── Leaf -│ └── Leaf -└── Leaf - -Leaf - -Branch -├── 5 -├── Leaf -└── Leaf - -Leaf - -Leaf - -Branch -├── 6 -├── Branch -│ ├── 5 -│ ├── Leaf -│ └── Branch -│ ├── 5 -│ ├── Leaf -│ └── Leaf -└── Leaf - -Leaf - - -Leaf - -Branch -├── 3 -├── Leaf -└── Leaf - -Branch -├── 4 -├── Branch -│ ├── 4 -│ ├── Leaf -│ └── Branch -│ ├── 4 -│ ├── Leaf -│ └── Leaf -└── Branch - ├── 5 - ├── Leaf - └── Branch - ├── 6 - ├── Leaf - └── Leaf - -Branch -├── 3 -├── Branch -│ ├── 1 -│ ├── Leaf -│ └── Leaf -└── Branch - ├── 3 - ├── Leaf - └── Leaf - -Branch -├── 4 -├── Branch -│ ├── 2 -│ ├── Leaf -│ └── Leaf -└── Leaf - -Branch -├── 3 -├── Leaf -└── Branch - ├── 5 - ├── Leaf - └── Leaf - -Branch -├── 5 -├── Branch -│ ├── 5 -│ ├── Leaf -│ └── Leaf -└── Leaf - -Leaf - -Branch -├── 4 -├── Leaf -└── Branch - ├── 5 - ├── Branch - │ ├── 4 - │ ├── Leaf - │ └── Leaf - └── Branch - ├── 6 - ├── Leaf - └── Leaf - -Branch -├── 5 -├── Leaf -└── Leaf - -Branch -├── 5 -├── Leaf -└── Branch - ├── 6 - ├── Leaf - └── Leaf - -Branch -├── 4 -├── Leaf -└── Leaf - -Branch -├── 3 -├── Leaf -└── Leaf - -Leaf - -Branch -├── 2 -├── Branch -│ ├── 1 -│ ├── Leaf -│ └── Leaf -└── Leaf - -Branch -├── 4 -├── Branch -│ ├── 4 -│ ├── Branch -│ │ ├── 3 -│ │ ├── Leaf -│ │ └── Leaf -│ └── Leaf -└── Branch - ├── 6 - ├── Leaf - └── Leaf diff --git a/examples/qc/examples/samples/utlc.txt b/examples/qc/examples/samples/utlc.txt deleted file mode 100644 index b884f4ab..00000000 --- a/examples/qc/examples/samples/utlc.txt +++ /dev/null @@ -1,52 +0,0 @@ -# Generated by examples/qc/demo_utlc.jl - -(λb.b) (λc.c) -(λb.b (b b)) ((λb.b) (λa.a) ((λb.b) (λc.c))) -(λa.a) ((λa.a) (λb.b)) -λc.λb.b -λb.b -λb.λa.a -(λb.b b b) (λa.λb.b) -λb.λb.b -(λa.a) (λb.b) ((λb.b) (λa.a)) -λb.(λc.c) b b -λa.λb.b -λa.λb.b -λa.a -(λc.c) (λa.a) (λb.λa.λb.a) -λa.λc.λb.λc.a -(λc.c) ((λb.b) (λb.b)) ((λb.b) (λb.b)) -λc.c c -λb.b -(λb.b) (λa.a) ((λc.c) (λb.b)) (λa.λb.a) -λb.b b -λb.b -(λa.a) ((λa.a) ((λc.c) (λa.a))) -λc.(λc.c) (λc.λc.c) -λa.a -λc.λc.c -(λb.b) ((λb.b) (λa.a) (λb.b)) -(λa.a) ((λc.c) (λb.b)) (λa.a) -λa.λc.a -(λa.a) (λa.a) (λb.b) -λa.λb.λb.b -λc.c -(λc.λa.a) (λc.λb.b) -λb.λb.b -λc.c c -(λc.c) (λc.c c) -λc.λb.λc.b c -(λb.b) (λa.a) ((λa.a) (λa.a)) ((λa.a) (λb.b) ((λa.a) (λc.c))) -λa.a -λa.a a -λc.λc.c -λc.λb.b -λa.λb.λc.a -(λc.λc.c) (λc.c) ((λa.a a) ((λb.b) (λb.b))) -λb.λb.λc.b -λa.λc.c -(λb.b) (λc.λa.a) (λa.λb.a) -(λc.c) (λc.c) (λa.a a) (λc.c) -λa.a -λc.λb.b -(λb.b) ((λc.c) (λa.a) (λb.b)) From 3bdd3893138f8e8aae51b93edfb2e7d3a24e760b Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 18 Jul 2024 19:52:56 -0700 Subject: [PATCH 230/231] remove stats and other files --- e | 0 eval.sh | 4 - qcbench.sh | 1 - stats/.gitignore | 3 - stats/cformat.py | 19 --- stats/renamer.py | 126 ------------------- stats/stats.py | 313 ----------------------------------------------- 7 files changed, 466 deletions(-) delete mode 100644 e delete mode 100644 eval.sh delete mode 100755 qcbench.sh delete mode 100644 stats/.gitignore delete mode 100644 stats/cformat.py delete mode 100755 stats/renamer.py delete mode 100755 stats/stats.py diff --git a/e b/e deleted file mode 100644 index e69de29b..00000000 diff --git a/eval.sh b/eval.sh deleted file mode 100644 index 0b62f24c..00000000 --- a/eval.sh +++ /dev/null @@ -1,4 +0,0 @@ -julia --project $TOOL -f "LangSiblingDerivedGenerator{BST}(Main.KVTree.t,Pair{Type,Integer}[Main.KVTree.t=>4],2,3)" "Pair{SamplingEntropy{BST},Float64}[SamplingEntropy{BST}(2,200,BSTOrderInvariant(),:prob_equals,0.0,0,true)=>0.3]" "2000" "0.1" -julia --project $TOOL -f "LangSiblingDerivedGenerator{RBT}(Main.ColorKVTree.t,Pair{Type,Integer}[Main.ColorKVTree.t=>4,Main.Color.t=>0],2,3)" "Pair{SamplingEntropy{RBT},Float64}[SamplingEntropy{RBT}(2,200,MultipleInvariants{RBT}(Property{RBT}[BookkeepingInvariant(),BalanceInvariant(),OrderInvariant()]),:prob_equals,0.0,0,true)=>0.3]" "2000" "0.1" -julia --project $TOOL -f "LangSiblingDerivedGenerator{STLC}(Main.Expr.t,Pair{Type,Integer}[Main.Expr.t=>5,Main.Typ.t=>2],2,3)" "Pair{SamplingEntropy{STLC},Float64}[SamplingEntropy{STLC}(2,200,STLCWellTyped(),:prob_equals,0.0,0,true)=>0.3]" "2000" "0.1" -julia --project $TOOL -f "LangBespokeSTLCGenerator(5,2)" "[ApproxSTLCConstructorEntropy()=>0.03]" "2000" "0.1" diff --git a/qcbench.sh b/qcbench.sh deleted file mode 100755 index e133534f..00000000 --- a/qcbench.sh +++ /dev/null @@ -1 +0,0 @@ -julia --project examples/qc/benchmarks/main.jl $@ \ No newline at end of file diff --git a/stats/.gitignore b/stats/.gitignore deleted file mode 100644 index f5b2ea2a..00000000 --- a/stats/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -STLC/ -BST/ -RBT/ \ No newline at end of file diff --git a/stats/cformat.py b/stats/cformat.py deleted file mode 100644 index deaf1b8f..00000000 --- a/stats/cformat.py +++ /dev/null @@ -1,19 +0,0 @@ -def num_to_col(i): - l, r = divmod(i, 26) - l = '' if l == 0 else chr(ord('A') + l - 1) - r = chr(ord('A') + r) - return l + r - -i = 1 -green_cols = [] -red_cols = [] -while True: - col = num_to_col(i) - cols = green_cols if i % 2 == 1 else red_cols - cols.append(f"{col}2:{col}1000") - if col == "GU": - break - i += 1 - -print(','.join(green_cols)) -print(','.join(red_cols)) diff --git a/stats/renamer.py b/stats/renamer.py deleted file mode 100755 index 6ed891d8..00000000 --- a/stats/renamer.py +++ /dev/null @@ -1,126 +0,0 @@ -#!/usr/bin/env python -rootdir = "/space/tjoa/tuning-output/v56_rbt_thin" -# rootdir = "/space/tjoa/tuning-output/v55_stlc_faster" - -rootdir = "/space2/tjoa/tuning-output/v66_fig2_rbt" -rootdir = "/space2/tjoa/tuning-output/v69_attempt_stlctb_faster" - -import os -import shutil - -def get_label(segments, segment_labels): - res = None - for segment, label in segment_labels.items(): - if segment in segments: - assert res is None, f"multiple {segments} {segment_labels}" - res = label - assert res is not None, f"none {segments} {segment_labels}" - - if isinstance(res, tuple): - lbl, rest = res - for x in rest: - lbl += get_label(segments, x) - return lbl - else: - assert isinstance(res, str) - return res - -filename_to_dir: dict[str, str] = {} -for root, subdirs, files in os.walk(rootdir): - if "trained_Generator.v" in files: - assert root[:len(rootdir)] == rootdir - segments = root[len(rootdir):].split("/") - - new = "" - new += get_label(segments, { - "rbt": "R", - "stlc": "S", - "bst": "B", - }) - new += get_label(segments, { - "langbespoke": "Bespoke", - "langderived": ("LD", [ - { - "stack_size=2": "", - }, - { - "intwidth=3": "Thin", - "intwidth=6": "", - }, - ]), - "langsiblingderived": ("LSD", [ - { - "stack_size=2": "", - "stack_size=1": "Stack1", - }, - { - "intwidth=3": "Thin", - "intwidth=6": "", - }, - ]), - }) - new += get_label(segments, { - "reinforce_sampling_entropy": ("", [ - { - "eq=eq_except_numbers": "Except", - "eq=eq_structure": "Structure", - "eq=prob_equals": "Eq", - }, - { - "prop=bookkeepingANDbalanceANDorder": "Valid", - "prop=order": "", - "prop=stlcwelltyped": "Well", - "prop=trueproperty": "", - # todo: May, Might - }, - {"failure_penalty=0.0": ""}, - {"forgiveness=0": ""}, - {"rand_forgiveness=true": ""}, - ]), - "approx_entropy": "ACE", - }) - new += get_label(segments, { - "0.3": "LR30", - "0.1": "LR10", - "0.03": "LR03", - "0.01": "LR01", - }) - # new += get_label(segments, { - # "ty-sizes=Main.ColorKVTree.t-6-Main.Color.t-0": "Sz6", - # "ty-sizes=Main.ColorKVTree.t-8-Main.Color.t-0": "Sz8", - # }) - new += get_label(segments, { - "epochs=2000": "Epochs2000", - "epochs=700": "Epochs700", - "epochs=500": "Epochs500", - }) - new += get_label(segments, { - "bound=0.0": "", - "bound=0.05": "Bound05", - "bound=0.1": "Bound10", - "bound=0.2": "Bound20", - }) - new += get_label(segments, { - "freq=5-spb=200": "Freq5SPB200", - "freq=5-spb=100": "Freq5SPB100", - "freq=5-spb=50": "Freq5SPB50", - "freq=2-spb=200": "Freq2SPB200", - "freq=2-spb=100": "Freq2SPB100", - "freq=2-spb=50": "Freq2SPB50", - "freq=1-spb=200": "Freq1SPB200", - "freq=1-spb=100": "Freq1SPB100", - "freq=1-spb=50": "Freq1SPB50", - }) - new += "Generator.v" - - assert new not in filename_to_dir, f"{new}\n{root}\n{filename_to_dir[new]}" - filename_to_dir[new] = root - -for new, root in filename_to_dir.items(): - src = os.path.join(root, "trained_Generator.v") - dst = os.path.join(root, new) - shutil.copyfile(src, dst) - print(dst) -print() -for new, root in filename_to_dir.items(): - print(f"\"{new[:-2]}\",") diff --git a/stats/stats.py b/stats/stats.py deleted file mode 100755 index c11dac98..00000000 --- a/stats/stats.py +++ /dev/null @@ -1,313 +0,0 @@ -#!/usr/bin/env python -import subprocess -import math -import sys -import os -from datetime import datetime -from collections import Counter, defaultdict -from dataclasses import dataclass, field -from typing import List, Callable - -WORKLOAD = "RBT" -ORDER_ONLY = True -ORDER: List[str] = { # Put rows in this order and also assert that these generators exist - "STLC": [ - # # class: bespoke - # "BespokeGenerator", - # "LBespokeGenerator", - # "LBespokeACEGenerator", - # "LBespokeApproxConstructorEntropyGenerator", - # # class: type-based - # "TypeBasedGenerator", - # "LDGenerator", - # "LDEqMightGenerator", - # "LDEqVarGenerator", - # "LDEqWellGenerator", - # "LDStructureMightGenerator", - # "LDStructureVarGenerator", - # "LDStructureWellGenerator", - # "LSDGenerator", - # "LSDStructureMightGenerator", - # "LSDStructureWellGenerator", - # "LSDGenerator", - # "LSDStructureMayGenerator", - # "LSDEqMayGenerator", - # "LDStructureMayGenerator", - # "LDEqMayGenerator", - # "LDMayStructureArb_Freq5_SPB50_LR10Generator", - # "LDMayStructureArb_Freq5_SPB50_LR30Generator", - # "LDMayStructureArb_Freq5_SPB50_LR50Generator", - # "TBMay10Generator", - # "TBMay30Generator", - # "TBMay50Generator", - # "ReproTBMightGenerator", -# "LDMayStructureArb_Freq2_SPB200_LR10Generator", -# "LDMayStructureArb_Freq2_SPB200_LR30Generator", -# "LDMayStructureArb_Freq2_SPB200_LR50Generator", -# "LDMayStructureArb_Freq2_SPB50_LR10Generator", -# "LDMayStructureArb_Freq2_SPB50_LR30Generator", -# "LDMayStructureArb_Freq2_SPB50_LR50Generator", -# "LDMayStructureArb_Freq5_SPB200_LR10Generator", - "LDThinInitGenerator", - # "LDThinMayEqGenerator", - # "LDThinMayStructureGenerator", - # "LDThinMayStructureGenerator", - # "LDThinMayStructure2Generator", - ] + [ - f"{template}May{eq}Bound{bound}Generator" - for template in ["LD", "LSD"] - for eq in ["Structure", "Eq"] - for bound in ["05", "10"] - ], - - "RBT": [ - "SpecGenerator", - "SpecBoundGenerator", - # "TypeBasedGenerator", - # "LSDEqGenerator", - # "LSDExceptNumsGenerator", - # "LSDEq2Generator", - # "LSDExcept2Generator", - # "LSDGenerator", - ], - - "BST": [ - "TypeBasedGenerator", - "LEqGenerator", - "LExceptGenerator", - "TBEqGenerator", - "TBExceptGenerator", - ] -}[WORKLOAD] - -STRAT_DIR = f"/scratch/tjoa/etna/workloads/Coq/{WORKLOAD}/Strategies/" -OUT_DIR = f"/scratch/tjoa/Dice.jl/stats/{WORKLOAD}" -COQ_PROJECT_DIR = f"/scratch/tjoa/etna/workloads/Coq/{WORKLOAD}" -NUM_TESTS = 100_000 - -@dataclass -class Workload: - type: str - generator: Callable[[str],str] - invariant_check: str - metrics: List[str] - extra_definitions: str - is_failing_generator: Callable[[str],bool] - -WORKLOADS = { - "STLC": Workload( - type="Expr", - generator=lambda _:"gSized", - invariant_check="isJust (mt %s)", - metrics=["sizeSTLC", "num_apps"], - extra_definitions=""" - Fixpoint num_apps (e: Expr) : nat := - match e with - | (Abs _ e) => num_apps e - | (App e1 e2) => 1 + num_apps e1 + num_apps e2 - | _ => 0 - end.""", - is_failing_generator=lambda filename: "Bespoke" in filename, - ), - "BST": Workload( - type="Tree", - generator=lambda _:"gSized", - invariant_check="isBST %s", - metrics=["size", "height"], - extra_definitions=""" - Fixpoint height (t: Tree) : nat := - match t with - | E => 0 - | T l k v r => 1 + max (height l) (height r) - end.""", - is_failing_generator=lambda filename: False, - ), - "RBT": Workload( - type="Tree", - generator=lambda filename: "arbitrary" if "typebased" in filename.lower() else "gSized", - invariant_check="isRBT %s", - metrics=["size", "height"], - extra_definitions=""" - Fixpoint height (t: Tree) : nat := - match t with - | E => 0 - | T c l k v r => 1 + max (height l) (height r) - end.""", - is_failing_generator=lambda filename: filename == "BespokeGenerator.v", - ), -} - - -workload = WORKLOADS[WORKLOAD] - -ORDER = [ - f"{s}.v" - for s in ORDER -] - -def main(): - # List generators - generators = [ - filename - for filename in os.listdir(STRAT_DIR) - if filename.endswith("Generator.v") - and not (ORDER_ONLY and filename not in ORDER) - ] - for generator in ORDER: - assert generator in generators, generator - def key(generator): - if generator in ORDER: - return ORDER.index(generator) - else: - return math.inf - generators.sort(key=key) - - # Collect stats - metric_to_generator_to_counts = defaultdict(lambda: defaultdict(dict)) - for generator in generators: - path = os.path.join(STRAT_DIR, generator) - print(f"Collecting stats for {generator}") - collect_stats(path, generator, metric_to_generator_to_counts) - - # Output stats - os.makedirs(OUT_DIR, exist_ok=True) - for metric, generator_to_counts in metric_to_generator_to_counts.items(): - max_val = max( - n - for counts in generator_to_counts.values() - for n, valid in counts.keys() - ) - min_val = min( - n - for counts in generator_to_counts.values() - for n, valid in counts.keys() - ) - assert min_val >= 0 - file_path = os.path.join(OUT_DIR, f"{metric}.csv") - with open(file_path, "w") as file: - val_names, vals = zip(*[ - (f"{v}" if valid else f"{v}!", (v, valid)) - for v in range(0, max_val + 1) - for valid in (True, False) - ]) - file.write(metric + '\t' + '\t'.join(val_names) + '\n') - for generator in generators: - counts = generator_to_counts[generator] - tokens = [generator] - for val in vals: - tokens.append( - str(counts.get(val, 0) / NUM_TESTS) - ) - file.write('\t'.join(tokens) + "\n") - print(f"Write to {file_path}") - -def read(path): - with open(path) as f: - return f.read() - -def lines_between(s, start, end): - active = False - for line in s.split('\n'): - if line.startswith(start): - active = True - continue - elif active and line.startswith(end): - break - elif active: - yield line - else: - if active: - raise f"Did not find {end} after {start}" - else: - raise f"Did not find {start}" - -def collect_stats(path, filename, metric_to_generator_to_counts): - pgrm = read(path) - pgrm += workload.extra_definitions - may_fail = workload.is_failing_generator(filename) - if may_fail: - pgrm += """ - Definition collect {A : Type} `{_ : Show A} (f : """ + workload.type + """ -> A) : Checker := - forAll """ + workload.generator(filename) + """ (fun (t : option """ + workload.type + """) => - match t with - | Some t => - if """ + (workload.invariant_check % "t") + """ then - collect (append "valid " (show (f t))) true - else - collect (append "invalid " (show (f t))) true - | None => - collect (append "failure" "") true - end).""" - else: - pgrm += """ - Definition collect {A : Type} `{_ : Show A} (f : """ + workload.type + """ -> A) : Checker := - forAll """ + workload.generator(filename) + """ (fun (t : """ + workload.type + """) => - if """ + (workload.invariant_check % "t") + """ then - collect (append "valid " (show (f t))) true - else - collect (append "invalid " (show (f t))) true - ). - """ - - pgrm += f"""\nExtract Constant Test.defNumTests => "{NUM_TESTS}".\n""" - for metric in workload.metrics: - pgrm += f"QuickChick (collect {metric}).\n" - - os.chdir(COQ_PROJECT_DIR) - cmd = ["coqtop", "-Q", ".", WORKLOAD] - p = subprocess.run( - cmd, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - input=pgrm, - encoding="ascii", - ) - - # Check for errors - def remove_junk(s): - return s.replace("Coq < ","").replace("dec_type < ","") - if any( - remove_junk(s).strip() - for s in p.stderr.split('\n') - ): - now = datetime.now().strftime("%Y_%m_%d__%H_%M_%S") - pgrm_dump = f"/tmp/program{now}.v" - with open(pgrm_dump, "w") as file: - file.write(pgrm) - print(f"Wrote program to {pgrm_dump}") - - print("STDERR =====") - last_line_blank = False - for s in p.stderr.split('\n'): - s = remove_junk(s) - # no double newlines - line_blank = len(s.strip()) == 0 - if not (line_blank and last_line_blank): - print(s) - last_line_blank = line_blank - - # exit(1) - - - assert p.returncode == 0 - for metric in workload.metrics: - cts = {} - for line in lines_between(p.stdout, f"QuickChecking (collect {metric})", "+++"): - tokens = line.split(' ') - if "None" in tokens: - cts["failure"] += 1 - raise NotImplementedError() - else: - valid = '"valid' in tokens - invalid = '"invalid' in tokens - assert valid ^ invalid, line - def stripquotes(s): - if s.startswith('"') and s.endswith('"'): - return s[1:-1] - assert s.endswith('"') - return s[:-1] - cts[int(stripquotes(tokens[-1])), valid] = int(tokens[0]) - metric_to_generator_to_counts[metric][filename] = cts - -if __name__ == "__main__": - main() From 38da216c1de8cfe63ce17d04aadc5ed4d1c4a844 Mon Sep 17 00:00:00 2001 From: Ryan Tjoa Date: Thu, 18 Jul 2024 19:58:41 -0700 Subject: [PATCH 231/231] remove mkeval.sh --- mkeval.sh | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 mkeval.sh diff --git a/mkeval.sh b/mkeval.sh deleted file mode 100644 index 942a5b8c..00000000 --- a/mkeval.sh +++ /dev/null @@ -1,6 +0,0 @@ -TO=/space2/tjoa/tuning-output -cat "$(dirname $(find $TO -name *BSmallTrainedGenerator*))/log.log" | head -n 1 -cat "$(dirname $(find $TO -name *RLSDThinSmallGenerator*))/log.log" | head -n 1 -cat "$(dirname $(find $TO -name *SLSDThinEqWellLR30Bound10Generator*))/log.log" | head -n 1 -cat "$(dirname $(find $TO -name *SBespokeACELR03Bound10Generator*))/log.log" | head -n 1 -