diff --git a/CeLEDS/languages/JavaScript.xml b/CeLEDS/languages/JavaScript.xml new file mode 100644 index 0000000..4489393 --- /dev/null +++ b/CeLEDS/languages/JavaScript.xml @@ -0,0 +1,193 @@ + + + + +JavaScript + + + ( + ) + Math.abs(#expr1) + #exprs[&] + Math.acos(#expr1) + acosh(#expr1) + acot(#expr1) + acoth(#expr1) + acsc(#expr1) + acsch(#expr1) + asec(#expr1) + asech(#expr1) + Math.asin(#expr1) + asinh(#expr1) + Math.atan(#expr1) + atanh(#expr1) + Math.ceil(#expr1) + Math.cos(#expr1) + cosh(#expr1) + cot(#expr1) + coth(#expr1) + csc(#expr1) + csch(#expr1) + #lookupDiffVariable + #expr1/#expr2 + #exprs[==] + Math.exp(#expr1) + factorial(#expr1) + (#expr1%#expr2) == 0 + Math.floor(#expr1) + gcd_multi([#exprs[, ]]) + #exprs[>=] + #exprs[>] + ~#expr1 || #expr2 + defint(func#unique1, BOUND, CONSTANTS, RATES, VARIABLES, #bvarIndex)#supplement double func#unique1(double* BOUND, double* CONSTANTS, double* RATES, double* VARIABLES) { return #expr1; } + lcm_multi([#exprs[, ]]) + #exprs[<=] + Math.log(#expr1) + arbitrary_log(#expr1, #logbase) + #exprs[<] + Math.max(#exprs[, ]) + Math.min([#exprs[, ]) + #expr1 - #expr2 + #expr1 != #expr2 + !#expr1 + #exprs[||] + #exprs[+] + Math.pow(#expr1, #expr2) + Math.floor(#expr1 / #expr2) + #expr1 % #expr2 + Math.pow(#expr1, 1.0 ./ #degree) + 1/Math.cos(#expr1) + sech(#expr1) + Math.sin(#expr1) + sinh(#expr1) + Math.tan(#expr1) + tanh(#expr1) + #exprs[*] + - #expr1 + #expr1 * #expr2 + #expr3 + #expr1 * #expr2 + #expr1+#expr2 + xor(#expr1 , #expr2) + (#expr1 ? #expr2 : + #expr1 ? #expr2 : + #expr1) + 0.0/0.0) + Math.PI + 0.577215664901533 + Inf + + + + CONSTANTS[%] + STATES[%] + ALGEBRAIC[%] + RATES[%] + VOI + 0 + <LHS> = <RHS>; + + <LHS> = <RHS>; + + + + + + + // There are a total of + entries in each of the algebraic variable array. + + // There are a total of + entries in each of the rate and state variable arrays. + + // There are a total of + entries in the constant variable array. +// + + ,,initialValues,computeRates,,1e9); + + y = numeric.transpose(sol.y); + t = sol.x; + + workshop.plot([numeric.transpose([t,y[0]])]) + +]]> + function initConsts() { + var STATES = new Array(); + var CONSTANTS = new Array(); + + + return {states:STATES, constants:CONSTANTS}; + } + + + + function computeRates(VOI, STATES) { + var RATES = new Array(); + ALGEBRAIC=computeAlgebraic(CONSTANTS, STATES, VOI); + + + return RATES; +} + + + // Calculate algebraic variables +function computeAlgebraic(CONSTANTS, STATES, VOI) { + var ALGEBRAIC = new Array(); + + + + return ALGEBRAIC; +} + + + + + +/* + + +*/ + + + + + + + + + + + + +