Skip to content

Commit

Permalink
added benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsbrggr committed Jun 18, 2024
1 parent d215478 commit fce3b4a
Show file tree
Hide file tree
Showing 9 changed files with 103 additions and 0 deletions.
6 changes: 6 additions & 0 deletions benchmarks/defense/defective.prob
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
z = 0
while true:
z = 1-z
x = 2*x+y**2+z
y = 2*y-y**2+2*z
end
8 changes: 8 additions & 0 deletions benchmarks/defense/geometric.prob
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
stop = 0
x = 1
runtime = 1
while stop == 0:
stop = Bernoulli(1/2)
x = 2*x
runtime = runtime + 1
end
14 changes: 14 additions & 0 deletions benchmarks/defense/illustrating.prob
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

toggle, sum, x, y, z = 0, 0, 1, 1, 1
while true:
toggle = 1 - toggle
if toggle == 0:
x = x + 1 {1/2} x + 2
y = y + z + x**2 {1/3} y - z - x
z = z + y {1/4} z - y
end
l, g = Laplace(x + y, 1), Normal(0, 1)
if g < 1/2:
sum = sum + x
end
end
6 changes: 6 additions & 0 deletions benchmarks/defense/multiply.prob
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
z = 0
i = y
while true:
i = i - 1
z = z + x
end
9 changes: 9 additions & 0 deletions benchmarks/defense/non_admissible.prob
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
u,w,x,y,z = 0,1,2,3,4

while true:
z = z+p**2 {1/2} z+p
y = y - 5*p*z
w = 5*w + x**2
x = 5+w+x
u = x+p*z*y
end
10 changes: 10 additions & 0 deletions benchmarks/defense/polar.prob
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
x,y = 1,0
while true:
c1 = Bernoulli(1/2)
c2 = Bernoulli(1/2)
if c1 + c2 < 2:
y = y+1 {1/2} y-2
g = Normal(y,1)
x = x + g**2
end
end
23 changes: 23 additions & 0 deletions benchmarks/defense/turning_vehicle.prob
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
v0 = 10
t = 0.1
q = -0.5
psi = Normal(0, 0.01)
cos_psi = Cos(psi)
sin_psi = Sin(psi)
v = Uniform(6.5, 8.0)
x = Uniform(-.1, .1)
y = Uniform(-.5, -.3)
while true:

w1 = Uniform(-0.1, 0.1)
w2 = Normal(0, 0.01)
cos_w2 = Cos(w2)
sin_w2 = Sin(w2)

x = x + t * v * cos_psi
y = y + t * v * sin_psi

v = v + t*(q*(v - v0) + w1)
psi = psi + w2
cos_psi, sin_psi = cos_psi*cos_w2 - sin_psi*sin_w2, sin_psi*cos_w2 + cos_psi*sin_w2
end
22 changes: 22 additions & 0 deletions benchmarks/defense/turning_vehicle_param.prob
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
t = 0.1
q = -0.5
psi = Normal(0, 0.01)
cos_psi = Cos(psi)
sin_psi = Sin(psi)
v = Uniform(6.5, 8.0)
x = Uniform(-.1, .1)
y = Uniform(-.5, -.3)
while true:

w1 = Uniform(-0.1, 0.1)
w2 = Normal(0, 0.01)
cos_w2 = Cos(w2)
sin_w2 = Sin(w2)

x = x + t * v * cos_psi
y = y + t * v * sin_psi

v = v + t*(q*(v - v0) + w1)
psi = psi + w2
cos_psi, sin_psi = cos_psi*cos_w2 - sin_psi*sin_w2, sin_psi*cos_w2 + cos_psi*sin_w2
end
5 changes: 5 additions & 0 deletions benchmarks/defense/two-rw.prob
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
x,y = 0,0
while true:
x = x+1 {1/2} x-2
y = y-1 {1/2} y+2
end

0 comments on commit fce3b4a

Please sign in to comment.