--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Attic/bench.prs Mon Feb 03 01:10:16 2020 +0000
@@ -0,0 +1,133 @@
+val bench = List(
+ ArrayDef("mem", 30000),
+ Assign("ptr", Num(15000)),
+ Assign("ptr", Aop("+", Var("ptr"), Num(1))),
+ AssignA("mem", Var("ptr"), Aop("+", Ref("mem", Var("ptr")), Num(2))),
+ While(
+ Bop("!=", Ref("mem", Var("ptr")), Num(0)),
+ List(
+ Assign("ptr", Aop("-", Var("ptr"), Num(1))),
+ AssignA("mem", Var("ptr"), Aop("+", Ref("mem", Var("ptr")), Num(13))),
+ Assign("ptr", Aop("+", Var("ptr"), Num(1))),
+ AssignA("mem", Var("ptr"), Aop("-", Ref("mem", Var("ptr")), Num(1))),
+ Skip
+ )
+ ),
+ Assign("ptr", Aop("-", Var("ptr"), Num(1))),
+ While(
+ Bop("!=", Ref("mem", Var("ptr")), Num(0)),
+ List(
+ While(
+ Bop("!=", Ref("mem", Var("ptr")), Num(0)),
+ List(
+ Assign("ptr", Aop("+", Var("ptr"), Num(1))),
+ AssignA("mem", Var("ptr"), Aop("+", Ref("mem", Var("ptr")), Num(1))),
+ Assign("ptr", Aop("+", Var("ptr"), Num(1))),
+ AssignA("mem", Var("ptr"), Aop("+", Ref("mem", Var("ptr")), Num(1))),
+ Assign("ptr", Aop("-", Var("ptr"), Num(2))),
+ AssignA("mem", Var("ptr"), Aop("-", Ref("mem", Var("ptr")), Num(1))),
+ Skip
+ )
+ ),
+ Assign("ptr", Aop("+", Var("ptr"), Num(1))),
+ While(
+ Bop("!=", Ref("mem", Var("ptr")), Num(0)),
+ List(
+ Assign("ptr", Aop("-", Var("ptr"), Num(1))),
+ AssignA("mem", Var("ptr"), Aop("+", Ref("mem", Var("ptr")), Num(1))),
+ Assign("ptr", Aop("+", Var("ptr"), Num(1))),
+ AssignA("mem", Var("ptr"), Aop("-", Ref("mem", Var("ptr")), Num(1))),
+ Skip
+ )
+ ),
+ AssignA("mem", Var("ptr"), Aop("+", Ref("mem", Var("ptr")), Num(8))),
+ While(
+ Bop("!=", Ref("mem", Var("ptr")), Num(0)),
+ List(
+ Assign("ptr", Aop("+", Var("ptr"), Num(1))),
+ AssignA("mem", Var("ptr"), Aop("+", Ref("mem", Var("ptr")), Num(8))),
+ Assign("ptr", Aop("-", Var("ptr"), Num(1))),
+ AssignA("mem", Var("ptr"), Aop("-", Ref("mem", Var("ptr")), Num(1))),
+ Skip
+ )
+ ),
+ Assign("ptr", Aop("+", Var("ptr"), Num(1))),
+ Assign("x", Ref("mem", Var("ptr"))),
+ Write("x"),
+ AssignA("mem", Var("ptr"), Num(0)),
+ Assign("ptr", Aop("-", Var("ptr"), Num(2))),
+ Assign("ptr", Aop("+", Var("ptr"), Num(1))),
+ AssignA("mem", Var("ptr"), Aop("+", Ref("mem", Var("ptr")), Num(10))),
+ While(
+ Bop("!=", Ref("mem", Var("ptr")), Num(0)),
+ List(
+ Assign("ptr", Aop("+", Var("ptr"), Num(1))),
+ AssignA("mem", Var("ptr"), Aop("+", Ref("mem", Var("ptr")), Num(10))),
+ While(
+ Bop("!=", Ref("mem", Var("ptr")), Num(0)),
+ List(
+ Assign("ptr", Aop("+", Var("ptr"), Num(1))),
+ AssignA("mem", Var("ptr"), Aop("+", Ref("mem", Var("ptr")), Num(2))),
+ AssignA("mem", Var("ptr"), Aop("+", Ref("mem", Var("ptr")), Num(8))),
+ While(
+ Bop("!=", Ref("mem", Var("ptr")), Num(0)),
+ List(
+ Assign("ptr", Aop("+", Var("ptr"), Num(1))),
+ AssignA("mem", Var("ptr"), Aop("+", Ref("mem", Var("ptr")), Num(10))),
+ While(
+ Bop("!=", Ref("mem", Var("ptr")), Num(0)),
+ List(
+ Assign("ptr", Aop("+", Var("ptr"), Num(1))),
+ AssignA("mem", Var("ptr"), Aop("+", Ref("mem", Var("ptr")), Num(10))),
+ While(
+ Bop("!=", Ref("mem", Var("ptr")), Num(0)),
+ List(
+ Assign("ptr", Aop("+", Var("ptr"), Num(1))),
+ AssignA("mem", Var("ptr"), Aop("+", Ref("mem", Var("ptr")), Num(10))),
+ While(
+ Bop("!=", Ref("mem", Var("ptr")), Num(0)),
+ List(
+ Assign("ptr", Aop("+", Var("ptr"), Num(1))),
+ AssignA("mem", Var("ptr"), Aop("+", Ref("mem", Var("ptr")), Num(1))),
+ AssignA("mem", Var("ptr"), Aop("+", Ref("mem", Var("ptr")), Num(9))),
+ AssignA("mem", Var("ptr"), Num(0)),
+ Assign("ptr", Aop("-", Var("ptr"), Num(1))),
+ AssignA("mem", Var("ptr"), Aop("-", Ref("mem", Var("ptr")), Num(1))),
+ Skip
+ )
+ ),
+ Assign("ptr", Aop("-", Var("ptr"), Num(1))),
+ AssignA("mem", Var("ptr"), Aop("-", Ref("mem", Var("ptr")), Num(1))),
+ Skip
+ )
+ ),
+ Assign("ptr", Aop("-", Var("ptr"), Num(1))),
+ AssignA("mem", Var("ptr"), Aop("-", Ref("mem", Var("ptr")), Num(1))),
+ Skip
+ )
+ ),
+ Assign("ptr", Aop("-", Var("ptr"), Num(1))),
+ AssignA("mem", Var("ptr"), Aop("-", Ref("mem", Var("ptr")), Num(1))),
+ Skip
+ )
+ ),
+ Assign("ptr", Aop("-", Var("ptr"), Num(1))),
+ AssignA("mem", Var("ptr"), Aop("-", Ref("mem", Var("ptr")), Num(1))),
+ Skip
+ )
+ ),
+ Assign("ptr", Aop("-", Var("ptr"), Num(1))),
+ AssignA("mem", Var("ptr"), Aop("-", Ref("mem", Var("ptr")), Num(1))),
+ Skip
+ )
+ ),
+ Assign("ptr", Aop("-", Var("ptr"), Num(1))),
+ AssignA("mem", Var("ptr"), Aop("-", Ref("mem", Var("ptr")), Num(1))),
+ Skip
+ )
+ ),
+ AssignA("mem", Var("ptr"), Aop("+", Ref("mem", Var("ptr")), Num(10))),
+ Assign("x", Ref("mem", Var("ptr"))),
+ Write("x"),
+ Skip
+)
\ No newline at end of file