Skip to content

Commit

Permalink
feat(fuzzing): updating corpus
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperFola committed Jul 8, 2024
1 parent 7fdd908 commit db5121a
Show file tree
Hide file tree
Showing 515 changed files with 5,154 additions and 947 deletions.
13 changes: 0 additions & 13 deletions tests/fuzzing/corpus-cmin-tmin/argcount_unknown_arg.ark

This file was deleted.

29 changes: 0 additions & 29 deletions tests/fuzzing/corpus-cmin-tmin/async_test.ark

This file was deleted.

20 changes: 0 additions & 20 deletions tests/fuzzing/corpus-cmin-tmin/builtins-list.ark

This file was deleted.

9 changes: 0 additions & 9 deletions tests/fuzzing/corpus-cmin-tmin/builtins-str.ark

This file was deleted.

15 changes: 0 additions & 15 deletions tests/fuzzing/corpus-cmin-tmin/closures2.ark

This file was deleted.

1 change: 0 additions & 1 deletion tests/fuzzing/corpus-cmin-tmin/comments_after_import.ark

This file was deleted.

7 changes: 0 additions & 7 deletions tests/fuzzing/corpus-cmin-tmin/comments_after_while.ark

This file was deleted.

168 changes: 168 additions & 0 deletions tests/fuzzing/corpus-cmin-tmin/examples_blockchain.ark
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
(import 000.0000)
(import 000.0000)
(import 000.0000)

(import 000.00000)
(import 000.0000)

#00000000000000000000000000000000
(let m000:000000(fun (i0000 t00000000 d000 p0000000_0000) {
(let h0000(h000:000000 (+ (t0000000 i0000) (t0000000 (m000:00000 t00000000)) (j000:00000000 d000) p0000000_0000)))
(p0000 "00000000000" h000)
(fun (&i00000&t000000000&d0000&p0000000_00000&h000) ())}))

(let k0:00000:000000000(fun (d000)
(m000:00000 (j000:000 d000 "00000")
(j000:000 d000 "000000000")
(j000:000 d000 "0000")
(j000:000 d000 "0000"))))

#00000000000000000000000
(let m000:0000000_00000 (fun ()
(m000:00000 00(t000) (j000:00000000 [
"0000" "0000000000000"
"0000000000000"00
]) "00000000")))

#000000000000000000000000000000000000000000000000000000000
(let m0000_0000000 (if (n00 (i0:0000000000? "0000000000000"))
(i0000 "000000000000000")
(i0:00000000 "0000000000000")))
(i0:000000000 "0000000000000" m0000_0000000)
#0000000000000000000000000000
(mut b000000000 (l000 (m000:0000000_00000)))
#00000000000000000000000000000000000000000000
(mut n0000_000000000000 [])
#000000000000000000000000000000000000000000000000000000000000000000000000000000000
(mut p000_00000 [])
#00000000000000000000000000000000000
(let m0000 00)

(let f000_000_000000 (fun () {
(p0000 "000000000000000000")

#0000000000000000000000000000000000000000
(mut o0000_000000 [])
(l000:0000000 p000_00000 (fun (u00) {
(let c00 (h000:000000:000000 u00 00))
(let t00 (h000:000000:000 c00 "0"))
(if (n00 (n00? t00))
{
(let c000000 (m000:00000:00000000 (j000:0000000000 (@ t00 0))))
(set o0000_000000 (a00000 o0000_000000 c000000))})
(del c00)}))
o0000_000000 }))

(let v00000_00000_00_0000 (fun (p0000 _00000)
(a00 (> p0000 l000_00000) (= 00(m00 p0000 m0000)) (= 00(m00 p0000 l000_00000)))))

(let v00000_00000 (fun (c0000) {
(p0000 "000000000000000")

(mut p0000000 n00)
(mut o0? t000)
(l000:0000000 c0000 (fun (b0000) {
#0000000000000000000000000000000000000000000000000000000000000
(if (a00 o0? (n00 (n00? p0000000)))
(set o0? (v00000_00000_00_0000 (j000:000 b0000.d000 "0000000000000") (j000:000 p0000000.d000 "0000000000000"))))
(set p0000000 b0000)}))
o0? }))

(let c00000000 (fun () {
(p0000 "00000000000000000")

(let o0000_000000 (f000_000_000000))
#000000000000000000000000000000000000000000000000000000
(l000:0000000 o0000_000000 (fun (c0000) {
(if (a00 (< (l00 b000000000) (l00 c0000)) (v00000_00000 c0000))
(set b000000000 c0000))}))}))

(let p0000_00_0000 (fun (l000_00000) {
(p0000 "00000000000000000000000000000")

(mut i00 (+ 00l000_00000))
#0000000000000000000000000000000000000000000000000000000000000000000
#00000000000000000000000000000000000000000000000000000
(while (n00 (a00 (= 0 (m00 i00 m0000))) (= 0 (m00 i00 l000_00000)))
(set i00 (+ 0 i00)))
i00 }))

(let s00 (h000:000000:000000))
(h000:000000:0000 s00 "000000000000" (fun (r000000) {
(p0000 "00000000000000" r000000)

#00000000000000000000000000000000000000000000000
(let n00 (j000:0000000000 r000000))
(set n0000_000000000000 (a00000 n0000_000000000000 n00))
(p0000 "000000000000000")
(p0000 (s00:000000 "0000000000" (j000:000 n00 "0000")))
(p0000 (s00:000000 "0000000000" (j000:000 n00 "00")))
(p0000 (s00:000000 "0000000000" (j000:000 n00 "000000")))

#0000000000000
[000 "000000000000000000000000000000000" "0000000000"]}))

(h000:000000:000 s00 "0000000" (fun (_) {
(p0000 "000000000000000")

(c00000000)
(mut t0_0000 [])
(l000:0000000 b000000000 (fun (d000) {
(set t0_0000 (a00000 t0_0000 (j000:00000000 [
"00000" d000.i0000
"000000000" d000.t00000000
"0000" d000.d000
"0000" d000.h000])))}))

(mut s00 (t0000000 (@ t0_0000 0)))
(l000:0000000 (t000 t0_0000) (fun (e)
(set s00 (+ s00 "00" (t0000000 e)))))

[000 (+ "0\"00000\"000" s00 "00") "0000000000000000"]}))

(h000:000000:000 s00 "00000" (fun (d000) {
(p0000 "000000000000")
(p0000 (t000 d000))
(if (n00 (n00? d000))
(p0000 (h000:000000:000000 d000)))
(set d000 "")

(let l000_00000 (@ b000000000 00))
(let l000_00000 (j000:000 l000_00000.d000 "0000000000000"))
#000000000000000000000000000000000000000000000000000000000
#00000000000000000000000000000000000000000000000000000000000000
(let p0000 (p0000_00_0000 l000_00000))
#000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
(set n0000_000000000000 (a00000 n0000_000000000000 (j000:00000000
[
"0000" "0000000"
"00" m0000_0000000
"000000" 0])))
(p0000 "0000000000")
#000000000000000000000000000000000000000000000
(mut n00_00000 (m000:00000
(+ 0 l000_00000.i0000)
(t000)
(j000:00000000
[
"0000000000000" p0000
"000000000000" n0000_000000000000
"0000000" d000 ])
l000_00000.h000))

(set b000000000 (a00000 b000000000 n00_00000))
#000000000000000000000000
(set n0000_000000000000 [])

[
000
(+ "0"
"\"00000\"00" (t0000000 n00_00000.i0000) "0"
"\"000000000\"00" (t0000000 n00_00000.t00000000) "0"
"\"0000\"00" (t0000000 n00_00000.d000) "0"
"\"0000\"00\"" (t0000000 n00_00000.h000) "\""
"0")
"0000000000000000"]}))

(p0000 "000000000000000000000000000000000000" m0000_0000000)
(h000:000000:000000 s00 "000000000" 00)
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
(while (!= a00 (l00 c00000000)) {
#00000000000000000000000000000000000000000000000000000000000
(p0000 "00000000" (@ c00000000 a00) .0)
00000000000000000000000000000000000000(000000000000(0000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000(000000000000(000000000000000)000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000)
0000000000000000000000000000000000000000000000
00000000000000000000000
00000000000000000000000000
00000000000000000000000000
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#00000000000000000000000000000000000000000
#000000000000000000000000000000000000000000000

(let get? (fun (se0 id0 default)
(let get?(fun (se0 id0 default)
(if (> (len se0) id0)
(@ se0 id0)
default)))
Expand Down
69 changes: 69 additions & 0 deletions tests/fuzzing/corpus-cmin-tmin/examples_games_game_of_life.ark
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
(let board [
0 0 0 0
0 1 1 1
1 1 1 0
0 0 0 0])
(let width 4)
(let height 4)
(let dead 0)
(let ali0e 1)

(let get (fun (board_ i width height)
(if (and (>= i 0) (< i (* width height)))
(@ board_ i)
dead )))

(let neigh (fun (board_ index width height) {
(let x (math:floor (mod index width)))
(let y (math:floor (/ index width)))
(mut count 0)

(if (>= (- y 1) 0)
(set count (+ count (get board_ (- index width) width height))))
(if (< (+ y 1) height)
(set count (+ count (get board_ (+ index width) width height))))
(if (>= (- x 1) 0)
(set count (+ count (get board_ (- index 1) width height))))
(if (< (+ x 1) width)
(set count (+ count (get board_ (+ index 1) width height))))

(if (and (>= (- x 1) 0) (>= (- y 1) 0))
(set count (+ count (get board_ (- index 0 width) width height))))
(if (and (< (+ x 1) width) (< (+ y 1) height))
(set count (+ count (get board_ (+ index width 1) width height))))
(if (and (>= (- x 1) 0) (< (+ y 1) height))
(set count (+ count (get board_ (+ index width -1) width height))))
(if (and (< (+ x 1) width) (>= (- y 1) 0))
(set count (+ count (get board_ (- index width -1) width height))))

count }))

(mut copy (list:fill (* height width) dead))
(mut i 0)
(while (< i (* width height)) {
(mut neighs (neigh board i width height))
(if (= 3 neighs)
(set copy (list:setAt copy i ali0e)))
(if (= 2 neighs)
(set copy (list:setAt copy i (@ board i))))
(if (or (< neighs 2) (> neighs 3))
(set copy (list:setAt copy i dead)))

(set i (+ 1 i)) })

(let display (fun (board width height) {
(mut i 0)
(while (< i (* width height)) {
(mut y (math:floor (/ i width)))
(mut x (math:floor (mod i width)))

(if (= 0 x) (puts "\n"))
(if (= ali0e (@ board i)) (puts "0") (puts " "))

(set i (+ 1 i)) })
(puts "\n") }))

(print "00000000000000")
(display board width height)
(print "0000000000")
(display copy width height)
Loading

0 comments on commit db5121a

Please sign in to comment.