Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
AVANZINI Martin
ecoimp
Commits
9dfc0411
Commit
9dfc0411
authored
May 15, 2020
by
AVANZINI Martin
Browse files
nest-1; tabelle kleiner
parent
ab59b3a5
Changes
3
Hide whitespace changes
Inline
Side-by-side
examples/oopsla/nest-1.absynth
0 → 100644
View file @
9dfc0411
def seq ():
var n, x1, r
x1 = n
while x1 > 0:
x1 = x1 + unif(-2,1)
tick 1
examples/oopsla/nest-1.pwhile
0 → 100644
View file @
9dfc0411
def seq ():
var n, x1, r
x1 = n
while x1 > 0:
r = unif(-2,1)
x1 = x1 + r
tick 1
src/PWhile/InferEt.hs
View file @
9dfc0411
...
...
@@ -346,6 +346,7 @@ extractRanking body i c g f = fmap templateToNorms $ do
<|>
template
"mixed-iteration"
(
pure
(
grdNorm
*
grdNorm
+
grdNorm
))
<|>
template
"shift-max"
(
refine
shiftMax
lin
)
<|>
template
"mixed-lin"
(
pure
(
grdNorm
*
lin
+
lin
))
<|>
template
"double mixed-iteration"
(
pure
(
grdNorm
*
grdNorm
*
grdNorm
+
grdNorm
))
-- <|> template "mixed-square" (pure (grdNorm * grdNorm + lin))
<|>
template
"square-shift-max"
((
\
a
->
lin
*
lin
+
a
)
<$>
refine
shiftMax
lin
)
where
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment