Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-and-itasks
clean-sapl
Commits
d95d5e65
Commit
d95d5e65
authored
Nov 16, 2015
by
Laszlo Domoszlai
Browse files
add typed primitive functions
parent
42d02357
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/clean.f
View file @
d95d5e65
...
...
@@ -3,31 +3,49 @@
"options"
:[
"enableStrictnessPropagation"
],
"bifs"
:[
{
"sapl_fun"
:
"add"
,
"sapl_fun"
:
"add
I
"
,
"arity"
:
2
,
"ext_fun"
:
"_add"
,
"inline_exp"
:
":!1: + :!2:"
}
,
{
"sapl_fun"
:
"sub"
,
"sapl_fun"
:
"addR"
,
"arity"
:
2
,
"ext_fun"
:
"_add"
,
"inline_exp"
:
":!1: + :!2:"
}
,
{
"sapl_fun"
:
"subI"
,
"arity"
:
2
,
"ext_fun"
:
"_sub"
,
"inline_exp"
:
":!1: - :!2:"
}
,
{
"sapl_fun"
:
"mult"
,
"sapl_fun"
:
"subR"
,
"arity"
:
2
,
"ext_fun"
:
"_sub"
,
"inline_exp"
:
":!1: - :!2:"
}
,
{
"sapl_fun"
:
"multI"
,
"arity"
:
2
,
"ext_fun"
:
"_mult"
,
"inline_exp"
:
":!1: * :!2:"
}
,
{
"sapl_fun"
:
"div"
,
"sapl_fun"
:
"multR"
,
"arity"
:
2
,
"ext_fun"
:
"_mult"
,
"inline_exp"
:
":!1: * :!2:"
}
,
{
"sapl_fun"
:
"divI"
,
"arity"
:
2
,
"ext_fun"
:
"_div"
,
"inline_exp"
:
"Math.floor(:!1: / :!2:)"
}
,
{
"sapl_fun"
:
"div
real
"
,
"sapl_fun"
:
"div
R
"
,
"arity"
:
2
,
"ext_fun"
:
"_divreal"
,
"inline_exp"
:
":!1: / :!2:"
...
...
@@ -39,7 +57,13 @@
"inline_exp"
:
":!1: % :!2:"
}
,
{
"sapl_fun"
:
"pow"
,
"sapl_fun"
:
"powI"
,
"arity"
:
2
,
"ext_fun"
:
"_pow"
,
"inline_exp"
:
"Math.pow(:!1:,:!2:)"
}
,
{
"sapl_fun"
:
"powR"
,
"arity"
:
2
,
"ext_fun"
:
"_pow"
,
"inline_exp"
:
"Math.pow(:!1:,:!2:)"
...
...
@@ -73,44 +97,134 @@
"arity"
:
1
,
"ext_fun"
:
"_neg"
,
"inline_exp"
:
":!1: * -1"
}
,
{
"sapl_fun"
:
"absI"
,
"arity"
:
1
,
"ext_fun"
:
"_abs"
,
"inline_exp"
:
"Math.abs(:!1:)"
}
,
{
"sapl_fun"
:
"abs"
,
"sapl_fun"
:
"abs
R
"
,
"arity"
:
1
,
"ext_fun"
:
"_abs"
,
"inline_exp"
:
"Math.abs(:!1:)"
}
,
{
"sapl_fun"
:
"eq"
,
"sapl_fun"
:
"eqI"
,
"arity"
:
2
,
"ext_fun"
:
"_eq"
,
"inline_exp"
:
":!1: == :!2:"
}
,
{
"sapl_fun"
:
"eqR"
,
"arity"
:
2
,
"ext_fun"
:
"_eq"
,
"inline_exp"
:
":!1: == :!2:"
}
,
{
"sapl_fun"
:
"eqC"
,
"arity"
:
2
,
"ext_fun"
:
"_eq"
,
"inline_exp"
:
":!1: == :!2:"
}
,
{
"sapl_fun"
:
"eqB"
,
"arity"
:
2
,
"ext_fun"
:
"_eq"
,
"inline_exp"
:
":!1: == :!2:"
}
,
{
"sapl_fun"
:
"neq"
,
"sapl_fun"
:
"eqS"
,
"arity"
:
2
,
"ext_fun"
:
"_eq"
,
"inline_exp"
:
":!1: == :!2:"
}
,
{
"sapl_fun"
:
"neqI"
,
"arity"
:
2
,
"ext_fun"
:
"_neq"
,
"inline_exp"
:
":!1: != :!2:"
}
,
{
"sapl_fun"
:
"gt"
,
"sapl_fun"
:
"neqR"
,
"arity"
:
2
,
"ext_fun"
:
"_neq"
,
"inline_exp"
:
":!1: != :!2:"
}
,
{
"sapl_fun"
:
"neqC"
,
"arity"
:
2
,
"ext_fun"
:
"_neq"
,
"inline_exp"
:
":!1: != :!2:"
}
,
{
"sapl_fun"
:
"neqB"
,
"arity"
:
2
,
"ext_fun"
:
"_neq"
,
"inline_exp"
:
":!1: != :!2:"
}
,
{
"sapl_fun"
:
"gtI"
,
"arity"
:
2
,
"ext_fun"
:
"_gt"
,
"inline_exp"
:
":!1: > :!2:"
}
,
{
"sapl_fun"
:
"ge"
,
"sapl_fun"
:
"gtR"
,
"arity"
:
2
,
"ext_fun"
:
"_gt"
,
"inline_exp"
:
":!1: > :!2:"
}
,
{
"sapl_fun"
:
"gtC"
,
"arity"
:
2
,
"ext_fun"
:
"_gt"
,
"inline_exp"
:
":!1: > :!2:"
}
,
{
"sapl_fun"
:
"geI"
,
"arity"
:
2
,
"ext_fun"
:
"_ge"
,
"inline_exp"
:
":!1: >= :!2:"
}
,
{
"sapl_fun"
:
"lt"
,
"sapl_fun"
:
"geR"
,
"arity"
:
2
,
"ext_fun"
:
"_ge"
,
"inline_exp"
:
":!1: >= :!2:"
}
,
{
"sapl_fun"
:
"geC"
,
"arity"
:
2
,
"ext_fun"
:
"_ge"
,
"inline_exp"
:
":!1: >= :!2:"
}
,
{
"sapl_fun"
:
"ltI"
,
"arity"
:
2
,
"ext_fun"
:
"_lt"
,
"inline_exp"
:
":!1: < :!2:"
}
,
{
"sapl_fun"
:
"ltR"
,
"arity"
:
2
,
"ext_fun"
:
"_lt"
,
"inline_exp"
:
":!1: < :!2:"
}
,
{
"sapl_fun"
:
"ltC"
,
"arity"
:
2
,
"ext_fun"
:
"_lt"
,
"inline_exp"
:
":!1: < :!2:"
}
,
{
"sapl_fun"
:
"ltS"
,
"arity"
:
2
,
"ext_fun"
:
"_lt"
,
"inline_exp"
:
":!1: < :!2:"
}
,
{
"sapl_fun"
:
"not"
,
"arity"
:
1
,
"ext_fun"
:
"_not"
,
...
...
@@ -196,19 +310,19 @@
"inline_exp"
:
"_string_replace(:!1:,:!2:,:!3:)"
}
,
{
"sapl_fun"
:
"toInt
_char
"
,
"sapl_fun"
:
"toInt
C
"
,
"arity"
:
1
,
"ext_fun"
:
"_toInt_char"
,
"inline_exp"
:
":!1:.charCodeAt(0)"
}
,
{
"sapl_fun"
:
"toInt
_str
"
,
"sapl_fun"
:
"toInt
S
"
,
"arity"
:
1
,
"ext_fun"
:
"_toInt_str"
,
"inline_exp"
:
"parseInt(:!1:)"
}
,
{
"sapl_fun"
:
"toInt
_real
"
,
"sapl_fun"
:
"toInt
R
"
,
"arity"
:
1
,
"ext_fun"
:
"_toInt_real"
,
"inline_exp"
:
"Math.floor(:!1:)"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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