Commit c49b6ea4 authored by Guy Watson's avatar Guy Watson
Browse files

Clean up old files that are no longer needed

parent a994938b
#include "emscripten.h"
// Must have a main function or this decorator, or the optimizer will throw everything out
// all the rest of the header gets optimized out
EMSCRIPTEN_KEEPALIVE
int func(int a, int b) {
int d = 32;
int c = a + b;
return c + d;
}
(module
(type (;0;) (func (param i32 i32) (result i32)))
(type (;1;) (func))
(import "env" "__memory_base" (global (;0;) i32))
(func (;0;) (type 0) (param i32 i32) (result i32)
local.get 1
local.get 0
i32.const 32
i32.add
i32.add)
(func (;1;) (type 1)
global.get 0
global.set 1
global.get 1
i32.const 5242880
i32.add
global.set 2)
(global (;1;) (mut i32) (i32.const 0))
(global (;2;) (mut i32) (i32.const 0))
(export "__post_instantiate" (func 1))
(export "_func" (func 0)))
;; --Header
(module
(import "env" "__memory_base" (global (;0;) i32))
;; --End header
(func (;0;) (export "_func") (param i32 i32) (result i32)
local.get 0
local.get 1
i32.add)
;; --Footer
;; The shorthand exports remove the need for counting the number of
;; functions, making the footer (mostly) independent from the rest of the code
(func (;1;) (export "__post_instantiate")
global.get 0
global.set 1
global.get 1
i32.const 5242880
i32.add
global.set 2)
(global (;1;) (mut i32) (i32.const 0))
(global (;2;) (mut i32) (i32.const 0)))
;; -- End footer
;; Using the shorthand notation in order to condense the footer
;;(export "_func" (func 0)))
(module
(import "env" "__memory_base" (global (;0;) i32))
(func (;0;) (result i32)
i32.const 0
i32.const 7
br_if 0
)
(func (;1;)
global.get 0
global.set 1
global.get 1
i32.const 5242880
i32.add
global.set 2)
(global (;1;) (mut i32) (i32.const 0))
(global (;2;) (mut i32) (i32.const 0))
(export "_func" (func 0))
(export "__post_instantiate" (func 1)))
int fib(int x) {
if (x < 1)
return 0;
if (x == 1)
return 1;
return fib(x - 1) + fib(x - 2);
}
int main(number) {
return fib(number);
}
// int main() {
// return 42;
// }
(module
(import "env" "__memory_base" (global (;0;) i32))
(func (;0;) (result i32)
loop (result i32)
i32.const 1
i32.const 1
i32.add
end
)
(func (;1;)
global.get 0
global.set 1
global.get 1
i32.const 5242880
i32.add
global.set 2)
(global (;1;) (mut i32) (i32.const 0))
(global (;2;) (mut i32) (i32.const 0))
(export "_func" (func 0))
(export "__post_instantiate" (func 1)))
;; This is a RANDOMLY GENERATED PROGRAM.
;; Version: xsmith 1.2.0 (5e22c67), in Racket 7.4
;; Options:
;; Seed: 502425038
(module (import "env" "__memory_base" (global i32)) (func
(export "_func")
(result i32)
i32.const
2456
i32.load
1905
0
i32.const
1633
i32.load
9627
3
br_if
0)
(func
(export "__post_instantiate")
global.get
0
global.set
1
global.get
1
i32.const
5242880
i32.add
global.set
2)
(global (mut i32) (i32.const 0))
(global (mut i32) (i32.const 0)))
;; !!! The following output was captured during execution:
;;
;; This is a RANDOMLY GENERATED PROGRAM.
;; Version: xsmith 1.2.0 (5e22c67), in Racket 7.4
;; Options:
;; Seed: 502425038
(module (import "env" "__memory_base" (global i32)) (func
(export "_func")
(result i32)
i32.const 4
i32.load offset=2 align=2
drop
i32.const 4
i32.load
)
(func
(export "__post_instantiate")
global.get
0
global.set
1
global.get
1
i32.const
5242880
i32.add
global.set
2)
(global (mut i32) (i32.const 0))
(global (mut i32) (i32.const 0)))
;; !!! The following output was captured during execution:
;;
!!! Xsmith Error !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Error 004: Error encountered while generating program!
Options:
Version: xsmith 1.2.0 (cea40dd), in Racket 7.4
Options:
Seed: 643162626
Debug Log:
Exception:
RACR exception: "AG evaluator exception;" "Unexpected" _xsmith_effects "cycle."
Program output captured:
!!! Xsmith Error !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Error 003: Error encountered while generating program!
Options:
Version: xsmith 1.2.0 (7ac4597), in Racket 7.4
Options: --max-depth 8 --tree-on-error true --server true
Seed: 883280699
Debug Log:
lifting binding: "lift_1" with type: #<i32>
lifting binding: "lift_2" with type: #<i32>
lifting binding: "lift_3" with type: #<i32>
lifting binding: "lift_4" with type: #<i64>
lifting binding: "lift_5" with type: #<i32>
lifting binding: "lift_1" with type: #<i32>
lifting binding: "lift_2" with type: #<i32>
lifting binding: "lift_3" with type: #<i32>
lifting binding: "lift_4" with type: #<i32>
lifting binding: "lift_1" with type: #<i64>
lifting binding: "lift_2" with type: #<i32>
lifting binding: "lift_3" with type: #<i64>
lifting binding: "lift_4" with type: #<f64>
lifting binding: "lift_5" with type: #<f32>
lifting binding: "lift_6" with type: #<i32>
lifting binding: "lift_7" with type: #<i64>
lifting binding: "lift_8" with type: #<i32>
lifting binding: "lift_1" with type: #<i64>
lifting binding: "lift_2" with type: #<f32>
lifting binding: "lift_3" with type: #<i64>
lifting binding: "lift_4" with type: #<i32>
lifting binding: "lift_1" with type: #<i64>
lifting binding: "lift_2" with type: #<i32>
lifting binding: "lift_3" with type: #<f32>
lifting binding: "lift_4" with type: #<i32>
lifting binding: "lift_5" with type: #<f32>
lifting binding: "lift_6" with type: #<i32>
lifting binding: "lift_7" with type: #<f64>
lifting binding: "lift_1" with type: #<f32>
lifting binding: "lift_2" with type: #<f64>
lifting binding: "lift_3" with type: #<i32>
lifting binding: "lift_1" with type: #<f64>
lifting binding: "lift_2" with type: #<i32>
lifting binding: "lift_3" with type: #<i32>
lifting binding: "lift_4" with type: #<f64>
lifting binding: "lift_5" with type: #<i32>
lifting binding: "lift_6" with type: #<f32>
lifting binding: "lift_1" with type: #<f32>
lifting binding: "lift_2" with type: #<i32>
lifting binding: "lift_3" with type: #<i32>
lifting binding: "lift_4" with type: #<i64>
lifting binding: "lift_5" with type: #<i32>
lifting binding: "lift_6" with type: #<i64>
lifting binding: "lift_7" with type: #<i32>
lifting binding: "lift_8" with type: #<f64>
lifting binding: "lift_9" with type: #<i64>
lifting binding: "lift_10" with type: #<i64>
lifting binding: "lift_11" with type: #<i32>
lifting binding: "lift_1" with type: #<f32>
lifting binding: "lift_2" with type: #<f32>
lifting binding: "lift_3" with type: #<i32>
Error while unifying type for reference.
Type recorded in definition: #<i32>
Type required for reference-unify target: #<type-variable (#<range:#f-#<i64>>)>
Exception:
subtype-unify!: can't unify these types: #<type-variable (#<range:#f-#<i64>>)> and #<i32>
context...:
f529
/Applications/Racket/latest/collects/racket/contract/private/arrow-val-first.rkt:390:18
/Users/GW/Documents/flux/xsmith/xsmith/private/core-properties.rkt:1480:11
/Users/GW/Library/Racket/7.4/pkgs/racr/core.rkt:1183:11
/Users/GW/Documents/flux/xsmith/xsmith/private/core-properties.rkt:1171:0: _xsmith_type-constraint-from-parent-func
/Users/GW/Library/Racket/7.4/pkgs/racr/core.rkt:1183:11
/Users/GW/Documents/flux/xsmith/xsmith/private/core-properties.rkt:1204:0: xsmith_type-info-func
/Users/GW/Library/Racket/7.4/pkgs/racr/core.rkt:1183:11
/Users/GW/Documents/flux/xsmith/xsmith/private/core-properties.rkt:1589:0: can-unify-node-type-with-type?!5
/Users/GW/Documents/flux/xsmith/xsmith/private/core-properties.rkt:960:13: _xsmith_apply-choice-filters method in XsmithBaseNodewebassemblyChoice%
loop
[repeats 2 more times]
/Users/GW/Documents/flux/xsmith/xsmith/private/grammar-macros.rkt:679:2: _xsmith_hole->replacement-function
/Users/GW/Library/Racket/7.4/pkgs/racr/core.rkt:1183:11
/Users/GW/Documents/flux/xsmith/xsmith/private/grammar-macros.rkt:527:11: fill-in
/Applications/Racket/latest/collects/racket/private/list.rkt:115:2: findf
...
Program output captured:
Partially generated program:
(module (import "env" "memory" (memory $mem 1)) (import "env"
"addToCrc"
(func
$addToCrc
(param i32)))
(import "env" "__memory_base" (global $mem_base i32))
(global $lift_1 (mut f32) (<HOLE>))
(global $lift_2 (mut f32) (<HOLE>))
(global $lift_3 (mut i32) (<HOLE>))
(func
(export "_func")
(result i32)
(local i32 i32 i32)
nop
local.get
1
if
(result f32)
global.get
$lift_1
f32.const
945.5196983439608
f32.add
end
i32.reinterpret_f32
global.get
$lift_2
local.get
1
i32.ge_s
i32.ctz
i32.const
702
local.get
2
br_if
0
br
0
i32.add
i32.add
<HOLE>
global.set
$lift_3
<HOLE>
i32.wrap_i64
i32.popcnt
<HOLE>
i32.or
i32.gt_u
<HOLE>
i32.or)
(global $mem_base_internal (mut i32) (i32.const 0))
(global $mem_max_internal (mut i32) (i32.const 0))
(func
(export "__post_instantiate")
global.get
$mem_base
global.set
$mem_base_internal
global.get
$mem_base_internal
i32.const
5242880
i32.add
global.set
$mem_max_internal)
(func
(export "_crc_globals")
global.get
$lift_1
call
$addToCrc
global.get
$lift_2
call
$addToCrc
global.get
$lift_3
call
$addToCrc))
webassembly-sandbox/wasmlike on  types [$!] ✦ (•◡•)/ curl localhost:8080
;; This is a RANDOMLY GENERATED PROGRAM.
;; Version: xsmith 1.2.0 (7ac4597), in Racket 7.4
;; Options: --max-depth 8 --tree-on-error true --server true
;; Seed: 883280700
(module (import "env" "memory" (memory $mem 1)) (import "env"
"addToCrc"
(func
$addToCrc
(param i32)))
(import "env" "__memory_base" (global $mem_base i32))
(global $lift_1 (mut i32) (i32.const -519))
(global $lift_2 (mut i64) (i64.const 887))
(global $lift_3 (mut f64) (f64.const -196.84530473100565))
(global $lift_4 (mut i32) (i32.const -396))
(global $lift_5 (mut f64) (f64.const -83.51880092241582))
(global $lift_6 (mut i32) (i32.const 296))
(func
(export "_func")
(result i32)
(local i32 i32)
loop
(result i32)
local.get
1
local.get
1
i32.rotl
if
(result i32)
local.get
1
local.get
1
i32.and
else
i32.const
-38
i32.load
offset=3538
align=4
end
i32.const
91
i64.const
896
i32.shl
i64.const
-895
i32.const
-553
i64.shr_s
i32.and
i32.lt_u
end
i32.eqz
loop
(result i32)
global.get
$lift_1
end
local.get
1
global.get
$lift_1
i32.shl
i32.sub
local.get
1
i64.const
-343
i32.shl
local.get
1
local.get
1
i32.or
i32.mul
i32.shl
global.get
$lift_2
i32.wrap_i64
i32.const
849
i32.const
756
i32.mul
i32.xor
local.get
0
local.get
1
i32.div_s
global.get
$lift_3
i32.trunc_f64_s
i32.or
i32.gt_u
i32.ge_s
i32.const
560
global.set
$lift_4
loop
(result i32)
global.get
$lift_4
i32.const
1
i32.sub
global.set
$lift_4
global.get
$lift_4
if
(result i32)
i32.const
-15
end
global.get
$lift_4
i32.const
0
i32.ge_s
br_if
0
global.get
$lift_5
f32.demote_f64
f32.const
647.2791882504409
f32.const
72.4983518073934
f32.add
i32.gt_s
i32.rotl
i32.const
380
global.set
$lift_6
loop
(result i32)
global.get
$lift_6
i32.const
1
i32.sub
global.set
$lift_6
local.get
0
local.set
1
local.get
0
global.get
$lift_6
i32.const
0
i32.ge_s
br_if
0
i32.ctz
i32.rotl
i32.shr_s
i32.ne)
(global $mem_base_internal (mut i32) (i32.const 0))
(global $mem_max_internal (mut i32) (i32.const 0))
(func
(export "__post_instantiate")
global.get
$mem_base
global.set
$mem_base_internal
global.get
$mem_base_internal
i32.const
5242880
i32.add
global.set
$mem_max_internal)
(func
(export "_crc_globals")
global.get
$lift_1
call
$addToCrc
global.get
$lift_2
call
$addToCrc
global.get
$lift_3
call
$addToCrc
global.get
$lift_4
call
$addToCrc
global.get
$lift_5
call
$addToCrc
global.get
$lift_6
call
$addToCrc))
(module
(import "env" "__memory_base" (global (;0;) i32))
(global $global_1 (mut i32))
(global $global_2 (mut i32))
(func (;0;) (result i32)
i32.const 4
i32.load offset=2 align=2
drop
i32.const 4
i32.load)
(export "_func" (func 0))
(func (;1;)
global.get 0
global.set 1
global.get 1
i32.const 5242880
i32.add
global.set 2)
(export "__post_instantiate" (func 1))
(global (;1;) (mut i32) (i32.const 0))
(global (;2;) (mut i32) (i32.const 0))
(type (;0;) (func (result i32)))
(type (;1;) (func)))
Here is the error:
!!! Xsmith Error !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Error encountered while generating program!
Options:
Version: xsmith 1.2.0 (b951d0e), in Racket 7.4
Options: --max-depth 4 --s-exp-on-error true -s 883280739
Seed: 883280739
Debug Log:
(Program -i32-
(Func -i32-
(Func -i32-
(root -i32-
(NotEqual -i32-
(l -all-
(Multiplication -all-
(l (LiteralFloatThirtyTwo (v 391.4163827047701)))
(r (LiteralIntSixtyFour (v 34)))))
(r (XsmithAstHoleExpr)))) -all-
(localcount 6)))
(globals ()))
#lang racket/base
(require xsmith xsmith/app racr racket/pretty racket/string racket/port)
(define-spec-component arith)
(add-to-grammar
arith
[Definition #f (name type Expression)
#:prop binder-info (name type definition)]
[Expression #f ()
#:prop may-be-generated #f]
[LetStar Expression ([definitions : Definition *]
[sideEs : Expression * = (random 2)]
Expression)
#:prop strict-child-order? #t]