const func_to_jamsd = Dict(
:ceil => (1,1),
:floor => (2,1),
:round => (3,1),
:fmod => (4,1),
:trunc => (5,1),
:sign => (6,1),
:min => (7,2),
:max => (8,2),
# :sqr => (9,1),
:exp => (10,1),
:log => (11,1),
:log10 => (12,1),
:sqrt => (13,1),
:abs => (14,1),
:cos => (15,1),
:sin => (16,1),
:atan => (17,1),
:erf => (18,1),
# (dunfm),
# (dnorm),
:^ => (21,2), #power
# (jdate),
# (jtime),
# (jstart),
# (jnow),
# (error),
# (gyear),
# (gmonth),
# (gday),
# (gdow),
# (gleap),
# (ghour),
# (gminute),
# (gsecond),
# (curseed),
# (timest),
# (timeco),
# (timeex),
# (timecl),
:frac => (40,1),
# (errorl),
# (heaps),
# (fact),
# (unfmi),
# (pi),
# (ncpf),
# (ncpcm),
# (entropy),
# (sigmoid),
:log2 => (50,1),
# (boolnot),
# (booland),
# (boolor),
# (boolxor),
# (boolimp),
# (booleqv),
:(==)   => (57,2),  # (relopeq),
:(>)    => (58,2),  # (relopgt),
:(>=)   => (59,2),  # (relopge),
:(<)    => (60,2),  # (reloplt),
:(<=)   => (61,2),  # (relople),
:(!=)   => (62,2),  # (relopne),
:ifelse => (63,3),  # (ifthen),
#   &_rpower => (64,1),
# (edist),
# (div),
# (div0),
# (sllog10),
# (sqlog10),
# (slexp),
# (sqexp),
# (slrec),
# (sqrec),
# (cvpower),
# (vcpower),
# (centropy),
# (gmillisec),
# (maxerror),
# (timeel),
# (gamma),
# (loggamma),
# (beta),
# (logbeta),
# (gammareg),
# (betareg),
:sinh => (86,1),
:cosh => (87,1),
:tanh => (88,1),
# (mathlastrc),
# (mathlastec),
# (mathoval),
# (signpower),
# (handle),
# (ncpvusin),
# (ncpvupow),
# (binomial),
# (rehandle),
# (gamsver),
# (delhandle),
:tan => (100,1),
:acos => (101,1),
:asin => (102,1),
:atan2 => (103,1),
# (sleep),
# (heapf),
# (cohandle),
# (gamsrel),
# (poly),
# (licensestatus),
# (licenselevel),
# (heaplimit),
# (dummy),
)

const sense_to_jamsd = Dict(
:Min => 0,
:Max => 1,
)

const relation_to_jamsd = Dict(
:multiple => -1,
:<=       => 2,
:>=       => 1,
:(==)     => 0,
'='       => 0,
)

const quad_relation_sense = Dict(
'=' => '=',
'<' => :<=,
'>' => :>=
)

const arithm_ops = Dict(
:+ => 2,
:sum => 2,
:- => 3,
:* => 4,
:/ => 5,
)

const reverse_relation = Dict(
:0 => 0,
:1 => 2,
:2 => 1,
:4 => 4,
)

const nary_functions = Set{Symbol}([
:min,
:max,
# :count,
# :numberof,
# :numberofs,
# :and_n,
# :or_n,
# :alldiff,
])
