summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data_structures_correct/INTEGRAL_f.js24
-rw-r--r--data_structures_correct/INTEGRAL_m.js29
-rw-r--r--data_structures_correct/INTMUL.js29
-rw-r--r--data_structures_correct/INVBLK.js23
-rw-r--r--data_structures_correct/ISELECT_m.js35
-rw-r--r--data_structures_correct/Inductor.js34
-rw-r--r--data_structures_correct/LOGBLK_f.js25
-rw-r--r--data_structures_correct/LOGICAL_OP.js26
-rw-r--r--data_structures_correct/LOOKUP_f.js21
-rw-r--r--data_structures_correct/MATBKSL.js35
-rw-r--r--data_structures_correct/MATCATH.js35
-rw-r--r--data_structures_correct/M_SWITCH.js26
12 files changed, 342 insertions, 0 deletions
diff --git a/data_structures_correct/INTEGRAL_f.js b/data_structures_correct/INTEGRAL_f.js
new file mode 100644
index 0000000..2bd0b45
--- /dev/null
+++ b/data_structures_correct/INTEGRAL_f.js
@@ -0,0 +1,24 @@
+function INTEGRAL_f() {
+
+ INTEGRAL_f.prototype.define = function INTEGRAL_f() {
+ this.x0 = 0;
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["integr"]);
+ model.in = new ScilabDouble([1]);
+ model.out = new ScilabDouble([1]);
+ model.state = new ScilabDouble([this.x0]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([false, true]);
+
+ var exprs = new ScilabString([sci2exp(this.x0)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"INTEGRAL_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ INTEGRAL_f.prototype.details = function INTEGRAL_f() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/INTEGRAL_m.js b/data_structures_correct/INTEGRAL_m.js
new file mode 100644
index 0000000..042d5ff
--- /dev/null
+++ b/data_structures_correct/INTEGRAL_m.js
@@ -0,0 +1,29 @@
+function INTEGRAL_m() {
+
+ INTEGRAL_m.prototype.define = function INTEGRAL_m() {
+ this.maxp = 1;
+ this.minp = -1;
+ this.rpar = [];
+
+ var model = scicos_model();
+ model.state = new ScilabDouble([0]);
+ model.sim = list(new ScilabString(["integral_func"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([1]);
+ model.out = new ScilabDouble([1]);
+ model.in2 = new ScilabDouble([1]);
+ model.out2 = new ScilabDouble([1]);
+ model.rpar = new ScilabDouble();
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([false, true]);
+
+ var exprs = new ScilabString([0], [0], [0], [this.maxp], [this.minp]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"INTEGRAL_m\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ INTEGRAL_m.prototype.details = function INTEGRAL_m() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/INTMUL.js b/data_structures_correct/INTMUL.js
new file mode 100644
index 0000000..e24c496
--- /dev/null
+++ b/data_structures_correct/INTMUL.js
@@ -0,0 +1,29 @@
+function INTMUL() {
+
+ INTMUL.prototype.define = function INTMUL() {
+ this.sgn = 0;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["matmul_i32"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([-1], [-2]);
+ model.out = new ScilabDouble([-1]);
+ model.in2 = new ScilabDouble([-2], [-3]);
+ model.out2 = new ScilabDouble([-3]);
+ model.intyp = new ScilabDouble([3, 3]);
+ model.outtyp = new ScilabDouble([3]);
+ model.rpar = new ScilabDouble();
+ model.ipar = new ScilabDouble([this.sgn]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([sci2exp(3)], [sci2exp(0)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"INTMUL\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ INTMUL.prototype.details = function INTMUL() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/INVBLK.js b/data_structures_correct/INVBLK.js
new file mode 100644
index 0000000..34da523
--- /dev/null
+++ b/data_structures_correct/INVBLK.js
@@ -0,0 +1,23 @@
+function INVBLK() {
+
+ INVBLK.prototype.define = function INVBLK() {
+ this.in1 = -1;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["invblk4"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([this.in1]);
+ model.out = new ScilabDouble([this.in1]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([" "]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"INVBLK\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ INVBLK.prototype.details = function INVBLK() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/ISELECT_m.js b/data_structures_correct/ISELECT_m.js
new file mode 100644
index 0000000..e2f2c10
--- /dev/null
+++ b/data_structures_correct/ISELECT_m.js
@@ -0,0 +1,35 @@
+function ISELECT_m() {
+
+ ISELECT_m.prototype.define = function ISELECT_m() {
+ this.z0 = 1;
+ this.nout = 2;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["selector_m"]), new ScilabDouble([4]));
+ model.out = new ScilabDouble([-1], [-1]);
+ model.out2 = new ScilabDouble([-2], [-2]);
+ model.outtyp = new ScilabDouble([1]);
+ model.in = new ScilabDouble([-1]);
+ model.in2 = new ScilabDouble([-2]);
+ model.intyp = new ScilabDouble([1]);
+ model.evtout = new ScilabDouble();
+ model.state = new ScilabDouble();
+ model.rpar = new ScilabDouble();
+ model.ipar = new ScilabDouble();
+ model.firing = new ScilabDouble();
+ model.evtin = new ScilabDouble(...ones(this.nout, 1));
+ model.dstate = new ScilabDouble([this.z0]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([sci2exp(1)], [sci2exp(this.nout)], [sci2exp(this.z0)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"ISELECT_m\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ ISELECT_m.prototype.details = function ISELECT_m() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/Inductor.js b/data_structures_correct/Inductor.js
new file mode 100644
index 0000000..851a005
--- /dev/null
+++ b/data_structures_correct/Inductor.js
@@ -0,0 +1,34 @@
+function Inductor() {
+
+ Inductor.prototype.define = function Inductor() {
+ this.L = 1.0E-5;
+
+ var model = scicos_model();
+ model.in = new ScilabDouble([1]);
+ model.out = new ScilabDouble([1]);
+ model.rpar = new ScilabDouble([this.L.toExponential(1)]);
+ model.sim = new ScilabString(["Inductor"]);
+
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var mo = modelica();
+ mo.model = new ScilabString(["Inductor"]);
+ mo.inputs = new ScilabString(["p"]);
+ mo.outputs = new ScilabString(["n"]);
+ mo.parameters = list(new ScilabString(["L"]), list(new ScilabDouble([this.L.toExponential(1)])));
+ model.equations = mo;
+
+ var exprs = new ScilabString([this.L]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"Inductor\",sz(1),sz(2));"]);
+ this.x = standard_define([2, 0.9], model, exprs, list(gr_i, 0));
+ this.x.graphics.in_implicit = new ScilabString(["I"]);
+ this.x.graphics.out_implicit = new ScilabString(["I"]);
+ return new BasicBlock(this.x);
+ }
+ Inductor.prototype.details = function Inductor() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/LOGBLK_f.js b/data_structures_correct/LOGBLK_f.js
new file mode 100644
index 0000000..07f70f9
--- /dev/null
+++ b/data_structures_correct/LOGBLK_f.js
@@ -0,0 +1,25 @@
+function LOGBLK_f() {
+
+ LOGBLK_f.prototype.define = function LOGBLK_f() {
+ this.in1 = 1;
+ this.a = Math.E;
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["logblk"]);
+ model.in = new ScilabDouble([-1]);
+ model.out = new ScilabDouble([-1]);
+ model.rpar = new ScilabDouble([this.a]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString(["%e"]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"LOGBLK_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ LOGBLK_f.prototype.details = function LOGBLK_f() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/LOGICAL_OP.js b/data_structures_correct/LOGICAL_OP.js
new file mode 100644
index 0000000..c7ccea1
--- /dev/null
+++ b/data_structures_correct/LOGICAL_OP.js
@@ -0,0 +1,26 @@
+function LOGICAL_OP() {
+
+ LOGICAL_OP.prototype.define = function LOGICAL_OP() {
+ this.in1 = [[-1], [-1]];
+ this.ipar = 0;
+ this.nin = 2;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["logicalop"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble(...this.in1);
+ model.out = new ScilabDouble([-1]);
+ model.ipar = new ScilabDouble([this.ipar]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([this.nin], [this.ipar]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"LOGICAL_OP\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ LOGICAL_OP.prototype.details = function LOGICAL_OP() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/LOOKUP_f.js b/data_structures_correct/LOOKUP_f.js
new file mode 100644
index 0000000..bce7f4c
--- /dev/null
+++ b/data_structures_correct/LOOKUP_f.js
@@ -0,0 +1,21 @@
+function LOOKUP_f() {
+
+ LOOKUP_f.prototype.define = function LOOKUP_f() {
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["lookup"]);
+ model.in = new ScilabDouble([1]);
+ model.out = new ScilabDouble([1]);
+ model.rpar = new ScilabDouble([-2], [-1], [1], [2], [-1], [1], [-1], [1]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"LOOKUP_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, [], gr_i);
+ return new BasicBlock(this.x);
+ }
+ LOOKUP_f.prototype.details = function LOOKUP_f() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/MATBKSL.js b/data_structures_correct/MATBKSL.js
new file mode 100644
index 0000000..22a873c
--- /dev/null
+++ b/data_structures_correct/MATBKSL.js
@@ -0,0 +1,35 @@
+function MATBKSL() {
+
+ MATBKSL.prototype.define = function MATBKSL() {
+ this.function_name = "mat_bksl";
+ this.funtyp = 4;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString([this.function_name]), new ScilabDouble([this.funtyp]));
+ model.in = new ScilabDouble([-1], [-1]);
+ model.in2 = new ScilabDouble([-2], [-3]);
+ model.intyp = new ScilabDouble([1, 1]);
+ model.out = new ScilabDouble([-2]);
+ model.out2 = new ScilabDouble([-3]);
+ model.outtyp = new ScilabDouble([1]);
+ model.evtin = new ScilabDouble();
+ model.evtout = new ScilabDouble();
+ model.state = new ScilabDouble();
+ model.dstate = new ScilabDouble();
+ model.rpar = new ScilabDouble();
+ model.ipar = new ScilabDouble();
+ model.blocktype = new ScilabString(["c"]);
+ model.firing = new ScilabDouble();
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var label = new ScilabString([sci2exp(1)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MATBKSL\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+ MATBKSL.prototype.details = function MATBKSL() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/MATCATH.js b/data_structures_correct/MATCATH.js
new file mode 100644
index 0000000..b1dc096
--- /dev/null
+++ b/data_structures_correct/MATCATH.js
@@ -0,0 +1,35 @@
+function MATCATH() {
+
+ MATCATH.prototype.define = function MATCATH() {
+ this.funtyp = 4;
+ this.function_name = "mat_cath";
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString([this.function_name]), new ScilabDouble([this.funtyp]));
+ model.in = new ScilabDouble([-1], [-1]);
+ model.in2 = new ScilabDouble([-2], [-3]);
+ model.intyp = new ScilabDouble([1, 1]);
+ model.out = new ScilabDouble([-1]);
+ model.out2 = new ScilabDouble([0]);
+ model.outtyp = new ScilabDouble([-1]);
+ model.evtin = new ScilabDouble();
+ model.evtout = new ScilabDouble();
+ model.state = new ScilabDouble();
+ model.dstate = new ScilabDouble();
+ model.rpar = new ScilabDouble();
+ model.ipar = new ScilabDouble();
+ model.blocktype = new ScilabString(["c"]);
+ model.firing = new ScilabDouble();
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var label = new ScilabString([sci2exp(2)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MATCATH\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 3]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+ MATCATH.prototype.details = function MATCATH() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/M_SWITCH.js b/data_structures_correct/M_SWITCH.js
new file mode 100644
index 0000000..ec04419
--- /dev/null
+++ b/data_structures_correct/M_SWITCH.js
@@ -0,0 +1,26 @@
+function M_SWITCH() {
+
+ M_SWITCH.prototype.define = function M_SWITCH() {
+ this.in1 = [[1], [-1], [-1]];
+ this.ipar = [[1], [3]];
+ this.nin = 2;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["mswitch"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble(...this.in1);
+ model.out = new ScilabDouble([-1]);
+ model.ipar = new ScilabDouble(...this.ipar);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([this.nin], ...this.ipar);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"M_SWITCH\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2.5, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ M_SWITCH.prototype.details = function M_SWITCH() {
+ return this.x;
+ }
+}
+