Commit d95d5e65 authored by Laszlo Domoszlai's avatar Laszlo Domoszlai

add typed primitive functions

parent 42d02357
......@@ -3,31 +3,49 @@
"options":["enableStrictnessPropagation"],
"bifs":[
{
"sapl_fun":"add",
"sapl_fun":"addI",
"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":"divreal",
"sapl_fun":"divR",
"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":"absR",
"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":"toIntC",
"arity":1,
"ext_fun":"_toInt_char",
"inline_exp":":!1:.charCodeAt(0)"
},
{
"sapl_fun":"toInt_str",
"sapl_fun":"toIntS",
"arity":1,
"ext_fun":"_toInt_str",
"inline_exp":"parseInt(:!1:)"
},
{
"sapl_fun":"toInt_real",
"sapl_fun":"toIntR",
"arity":1,
"ext_fun":"_toInt_real",
"inline_exp":"Math.floor(:!1:)"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment