From aa60684eba7352afc785c94d035d1c5c4eaca784 Mon Sep 17 00:00:00 2001 From: pramodk Date: Wed, 17 Jul 2024 21:11:51 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20BlueBrai?= =?UTF-8?q?n/nmodl@4f47074140fb810a09847c3879c9566c57e4abd9=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .doctrees/environment.pickle | Bin 148616 -> 148616 bytes .../notebooks/nmodl-kinetic-schemes.ipynb | 56 +-- .../notebooks/nmodl-python-tutorial.ipynb | 160 +++---- .../notebooks/nmodl-sympy-conductance.ipynb | 72 ++-- .../notebooks/nmodl-sympy-solver-cnexp.ipynb | 64 +-- .../nmodl-sympy-solver-derivimplicit.ipynb | 32 +- .../notebooks/nmodl-sympy-solver-sparse.ipynb | 32 +- ...ssnmodl_1_1visitor_1_1_inline_visitor.html | 20 +- ...1visitor_1_1_local_var_rename_visitor.html | 8 +- ...nmodl_1_1visitor_1_1_localize_visitor.html | 8 +- ...visitor_1_1_sympy_conductance_visitor.html | 26 +- .../codegen__cpp__visitor_8cpp_source.html | 2 +- doxygen/diffeq__context_8cpp_source.html | 2 +- doxygen/inline__visitor_8cpp_source.html | 2 +- doxygen/inline__visitor_8hpp.html | 1 + doxygen/inline__visitor_8hpp_source.html | 393 +++++++++--------- ...cal__var__rename__visitor_8cpp_source.html | 6 +- doxygen/local__var__rename__visitor_8hpp.html | 1 + ...cal__var__rename__visitor_8hpp_source.html | 139 ++++--- doxygen/localize__visitor_8cpp_source.html | 4 +- doxygen/localize__visitor_8hpp.html | 1 + doxygen/localize__visitor_8hpp_source.html | 193 ++++----- ...mpy__conductance__visitor_8cpp_source.html | 22 +- doxygen/sympy__conductance__visitor_8hpp.html | 1 + ...mpy__conductance__visitor_8hpp_source.html | 205 ++++----- notebooks/nmodl-kinetic-schemes.ipynb | 56 +-- notebooks/nmodl-python-tutorial.ipynb | 160 +++---- notebooks/nmodl-sympy-conductance.ipynb | 72 ++-- notebooks/nmodl-sympy-solver-cnexp.ipynb | 64 +-- .../nmodl-sympy-solver-derivimplicit.ipynb | 32 +- notebooks/nmodl-sympy-solver-sparse.ipynb | 32 +- 31 files changed, 937 insertions(+), 929 deletions(-) diff --git a/.doctrees/environment.pickle b/.doctrees/environment.pickle index fce9c99fea2499ec19bed8d993c718b36deebda4..29d71157ff3209ab7ed9a67e43b5594bf44556b3 100644 GIT binary patch delta 9126 zcmY+Kd0bUh*T-2Xhyo(0C<-KlLk{4Cs5szIVwjp*j;SDs9D%C>4mn&Ux4vtgv-duGoqhH>lAY5$ zJEwW6X9xuGfU6MH!fI(2XIj1@AwGo_ga*62%`>H>ElG?`PfJWmVB#wlSLqgf&{Xy(C{5N}Fr(lay zVoF^6ay&dSB{eN3DG3h}ZN#UfrG_RXnPOv-QrXhbKz3$NhdCCPq?nY1^q7QrtHo1g z%}ZahM5J3S?usRvQqXU%n*V41(!|unG}97{J1>ckiA%c1C%=ou_Ek%JbVbL@WE-`|ob8R(byGJ7}fK>onC#EB@Pi z?`Q1;1z9 z+U$4I&MI$q#3b#s@(zsKqE$ATV;}wZRiQ1kawB+c`-lBB-SB=`wBm+#((rD)?ln<6 zWq3E8op)$O%B!>mYjw)2Dr(72^^bsa?AQLIn~7_?+1icG4D)3}!~C1)$tx+y0Zh}onSDk-mLooH&!~}bygETkcACMZElK-4_UOrY8fP>N#U*- z>C-$WHBHh8NkhWj*q`CEu=S|}FT({^Fes3{Hs~$pJ2Z%GAMej@4vJ(0hXt|GgC{XI zI*3h33uNC7j$~6t1hHWeZ?Ud}f|$$NKJ0cxB-1f3ddQnBe0UHqjsYL`{g6nueQ*#P zKJ*W^9}|0>_hrk5MY8Yk;BSY$&GruoVl##(LWOKrf7F?|MnxLN* zBV$+qo@LpHI2J!Lh&>;X!2Dkc;_q~XUaVqdB9 z0W9{FH)QQ<9hy2g$hy_~2_ps-+1f>Ql=UO4O$I zo={an?Gj3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XG886=*@gTLMwXYb}ZRNFsnQ0Y3%&33O1PBY{8# zf(QgF(3wCN1zsTVq5|DfGhwW~6bYp!eHG|OAWQ)H2|1j=ARWlr4;Gdv&9x!qen|(? z9j#m1aB`0lKs@%0iyzQ31lgdO<;in3kfV%Umgu$4fuK^y{djB+A-Rg($= z`xVF`a8QAT1P&>%m_Vrl%Lp7+AeTV70;W|&Y>J5524_>Lz&ZkU1sH)U1vV3?RzTD{ z*vAP4iU^!iU^js}xg&A`N{G~}CI<*KDsYIvM+#U8d?LVc7yLPk8jky!4&+9Cp%dQo(gyoFtrloqznGECelU+ zayba&D%Er8t5Deyc2g8+@9gAf8;bs#%1y{Ma7ck=gAAe2B~1^N*P zQy`qcAOWhx7?A{q>OhY1l5S~HLCV|8dasLY<15H-`S>#VuKqHW@Kn8(%3S<(u zC~%X&Z3XTSxF@QE zKuZEX3iS3R;-`o|fes3EBoHV8pY%0;XQ<>KehppRD{&r$WWq zhhIZb^T)~zz5oF|oSKpMn7pVJ{y)czEc_=A{O63&tobPxy#A@<0{r@M0fIaJBL;jT ze*O?Y@B;ok5Lz?)o(tgO;wFwca~Ga_2)el7r#gP&BECr1^QRZ_<-d{l`W8P-i5m-> z;6IIY@t`ku_{ss5(3O{ei?5I6Jm3axbIPj9#DupM{$J2Q4;0$ z;!6 -

Definition at line 130 of file inline_visitor.hpp.

+

Definition at line 131 of file inline_visitor.hpp.

#include <inline_visitor.hpp>

@@ -1034,7 +1034,7 @@

Definition at line 133 of file inline_visitor.hpp.

+

Definition at line 134 of file inline_visitor.hpp.

@@ -1060,7 +1060,7 @@

Definition at line 136 of file inline_visitor.hpp.

+

Definition at line 137 of file inline_visitor.hpp.

@@ -1086,7 +1086,7 @@

Definition at line 153 of file inline_visitor.hpp.

+

Definition at line 154 of file inline_visitor.hpp.

@@ -1112,7 +1112,7 @@

Definition at line 159 of file inline_visitor.hpp.

+

Definition at line 160 of file inline_visitor.hpp.

@@ -1138,7 +1138,7 @@

Definition at line 139 of file inline_visitor.hpp.

+

Definition at line 140 of file inline_visitor.hpp.

@@ -1164,7 +1164,7 @@

Definition at line 156 of file inline_visitor.hpp.

+

Definition at line 157 of file inline_visitor.hpp.

@@ -1190,7 +1190,7 @@

Definition at line 148 of file inline_visitor.hpp.

+

Definition at line 149 of file inline_visitor.hpp.

@@ -1216,7 +1216,7 @@

Definition at line 145 of file inline_visitor.hpp.

+

Definition at line 146 of file inline_visitor.hpp.

@@ -1242,7 +1242,7 @@

Definition at line 142 of file inline_visitor.hpp.

+

Definition at line 143 of file inline_visitor.hpp.

diff --git a/doxygen/classnmodl_1_1visitor_1_1_local_var_rename_visitor.html b/doxygen/classnmodl_1_1visitor_1_1_local_var_rename_visitor.html index 0f0fd2c4ed..19a924d185 100644 --- a/doxygen/classnmodl_1_1visitor_1_1_local_var_rename_visitor.html +++ b/doxygen/classnmodl_1_1visitor_1_1_local_var_rename_visitor.html @@ -123,7 +123,7 @@ -

Definition at line 62 of file local_var_rename_visitor.hpp.

+

Definition at line 63 of file local_var_rename_visitor.hpp.

#include <local_var_rename_visitor.hpp>

@@ -613,7 +613,7 @@

Definition at line 71 of file local_var_rename_visitor.hpp.

+

Definition at line 72 of file local_var_rename_visitor.hpp.

@@ -639,7 +639,7 @@

Definition at line 65 of file local_var_rename_visitor.hpp.

+

Definition at line 66 of file local_var_rename_visitor.hpp.

@@ -665,7 +665,7 @@

Definition at line 68 of file local_var_rename_visitor.hpp.

+

Definition at line 69 of file local_var_rename_visitor.hpp.

diff --git a/doxygen/classnmodl_1_1visitor_1_1_localize_visitor.html b/doxygen/classnmodl_1_1visitor_1_1_localize_visitor.html index 373327a747..e0cb451bd9 100644 --- a/doxygen/classnmodl_1_1visitor_1_1_localize_visitor.html +++ b/doxygen/classnmodl_1_1visitor_1_1_localize_visitor.html @@ -138,7 +138,7 @@ -

Definition at line 83 of file localize_visitor.hpp.

+

Definition at line 84 of file localize_visitor.hpp.

#include <localize_visitor.hpp>

@@ -599,7 +599,7 @@

-

Definition at line 99 of file localize_visitor.hpp.

+

Definition at line 100 of file localize_visitor.hpp.

@@ -751,7 +751,7 @@

Definition at line 86 of file localize_visitor.hpp.

+

Definition at line 87 of file localize_visitor.hpp.

@@ -775,7 +775,7 @@

-

Definition at line 88 of file localize_visitor.hpp.

+

Definition at line 89 of file localize_visitor.hpp.

diff --git a/doxygen/classnmodl_1_1visitor_1_1_sympy_conductance_visitor.html b/doxygen/classnmodl_1_1visitor_1_1_sympy_conductance_visitor.html index df516ab6e2..86861b645c 100644 --- a/doxygen/classnmodl_1_1visitor_1_1_sympy_conductance_visitor.html +++ b/doxygen/classnmodl_1_1visitor_1_1_sympy_conductance_visitor.html @@ -113,7 +113,7 @@
g_unique = [dI/dV expression]

If an ion channel already has a CONDUCTANCE statement then it does not modify it.

-

Definition at line 54 of file sympy_conductance_visitor.hpp.

+

Definition at line 55 of file sympy_conductance_visitor.hpp.

#include <sympy_conductance_visitor.hpp>

@@ -588,7 +588,7 @@

-

Definition at line 55 of file sympy_conductance_visitor.hpp.

+

Definition at line 56 of file sympy_conductance_visitor.hpp.

@@ -612,7 +612,7 @@

-

Definition at line 56 of file sympy_conductance_visitor.hpp.

+

Definition at line 57 of file sympy_conductance_visitor.hpp.

@@ -904,7 +904,7 @@

Definition at line 63 of file sympy_conductance_visitor.hpp.

+

Definition at line 64 of file sympy_conductance_visitor.hpp.

@@ -930,7 +930,7 @@

Definition at line 80 of file sympy_conductance_visitor.hpp.

+

Definition at line 81 of file sympy_conductance_visitor.hpp.

@@ -956,7 +956,7 @@

Definition at line 66 of file sympy_conductance_visitor.hpp.

+

Definition at line 67 of file sympy_conductance_visitor.hpp.

@@ -982,7 +982,7 @@

Definition at line 69 of file sympy_conductance_visitor.hpp.

+

Definition at line 70 of file sympy_conductance_visitor.hpp.

@@ -1006,7 +1006,7 @@

-

Definition at line 71 of file sympy_conductance_visitor.hpp.

+

Definition at line 72 of file sympy_conductance_visitor.hpp.

@@ -1032,7 +1032,7 @@

Definition at line 86 of file sympy_conductance_visitor.hpp.

+

Definition at line 87 of file sympy_conductance_visitor.hpp.

@@ -1058,7 +1058,7 @@

Definition at line 74 of file sympy_conductance_visitor.hpp.

+

Definition at line 75 of file sympy_conductance_visitor.hpp.

@@ -1084,7 +1084,7 @@

Definition at line 77 of file sympy_conductance_visitor.hpp.

+

Definition at line 78 of file sympy_conductance_visitor.hpp.

@@ -1110,7 +1110,7 @@

Definition at line 60 of file sympy_conductance_visitor.hpp.

+

Definition at line 61 of file sympy_conductance_visitor.hpp.

@@ -1136,7 +1136,7 @@

Definition at line 83 of file sympy_conductance_visitor.hpp.

+

Definition at line 84 of file sympy_conductance_visitor.hpp.

diff --git a/doxygen/codegen__cpp__visitor_8cpp_source.html b/doxygen/codegen__cpp__visitor_8cpp_source.html index 93641fb8b9..c96bc8c398 100644 --- a/doxygen/codegen__cpp__visitor_8cpp_source.html +++ b/doxygen/codegen__cpp__visitor_8cpp_source.html @@ -1449,7 +1449,7 @@
1353  info.mod_file = mod_filename;
1354 
1355  if (info.mod_suffix == "") {
-
1356  info.mod_suffix = std::filesystem::path(mod_filename).stem();
+
1356  info.mod_suffix = std::filesystem::path(mod_filename).stem().string();
1357  }
1358  info.rsuffix = info.point_process ? "" : "_" + info.mod_suffix;
1359 
diff --git a/doxygen/diffeq__context_8cpp_source.html b/doxygen/diffeq__context_8cpp_source.html index f54fe43e40..4d26834317 100644 --- a/doxygen/diffeq__context_8cpp_source.html +++ b/doxygen/diffeq__context_8cpp_source.html @@ -247,7 +247,7 @@
151  std::string result;
152  if (!deriv_invalid) {
153  result = get_cvode_linear_diffeq();
-
154  } else if (deriv_invalid and eqn_invalid) {
+
154  } else if (deriv_invalid && eqn_invalid) {
155  result = get_cvode_nonlinear_diffeq();
156  } else {
157  throw std::runtime_error("Error in differential equation solver with non-cnexp");
diff --git a/doxygen/inline__visitor_8cpp_source.html b/doxygen/inline__visitor_8cpp_source.html index 75edd38429..4d2d4928d3 100644 --- a/doxygen/inline__visitor_8cpp_source.html +++ b/doxygen/inline__visitor_8cpp_source.html @@ -482,7 +482,7 @@
void visit_statement_block(ast::StatementBlock &node) override
rename name conflicting variables in the statement block and it's all children
virtual const ArgumentVector & get_parameters() const
Definition: block.hpp:50
Represents binary expression in the NMODL.
-
Visitor to rename local variables conflicting with global scope
+
Visitor to rename local variables conflicting with global scope
Represent token returned by scanner.
Definition: modtoken.hpp:50
virtual std::string get_node_name() const
Return name of of the node.
Definition: ast.cpp:28
Represents a string.
Definition: string.hpp:52
diff --git a/doxygen/inline__visitor_8hpp.html b/doxygen/inline__visitor_8hpp.html index de2f91b66b..7aa4fd2f92 100644 --- a/doxygen/inline__visitor_8hpp.html +++ b/doxygen/inline__visitor_8hpp.html @@ -106,6 +106,7 @@

Definition in file inline_visitor.hpp.

#include <map>
#include <stack>
+#include <string>
#include "symtab/decl.hpp"
#include "visitors/ast_visitor.hpp"
diff --git a/doxygen/inline__visitor_8hpp_source.html b/doxygen/inline__visitor_8hpp_source.html index f2a623e49b..2b7bc5aac7 100644 --- a/doxygen/inline__visitor_8hpp_source.html +++ b/doxygen/inline__visitor_8hpp_source.html @@ -110,222 +110,223 @@
14 
15 #include <map>
16 #include <stack>
-
17 
-
18 #include "symtab/decl.hpp"
-
19 #include "visitors/ast_visitor.hpp"
-
20 
-
21 namespace nmodl {
-
22 namespace visitor {
-
23 
-
24 /**
-
25  * \addtogroup visitor_classes
-
26  * \{
-
27  */
-
28 
-
29 /**
-
30  * \class InlineVisitor
-
31  * \brief %Visitor to inline local procedure and function calls
-
32  *
-
33  * Motivation: Mod files often have function and procedure calls. Procedure
-
34  * typically has use of range variables like:
-
35  *
-
36  * \code{.mod}
-
37  * NEURON {
-
38  * RANGE tau, alpha, beta
-
39  * }
-
40  *
-
41  * DERIVATIVE states() {
-
42  * ...
-
43  * rates()
-
44  * alpha = tau + beta
-
45  * }
-
46  *
-
47  * PROCEDURE rates() {
-
48  * tau = xx * 0.12 * some_var
-
49  * beta = yy * 0.11
-
50  * }
-
51  * \endcode
-
52  *
-
53  * One can reduce the memory bandwidth pressure by inlining rates() and then
-
54  * replacing tau and beta with local variables. Many mod files from BlueBrain
-
55  * and other open source projects could be hugely benefited by inlining pass.
-
56  * The goal of this pass is to implement procedure and function inlining in
-
57  * the nmodl programs. After inlining we should be able to translate AST back
-
58  * to "transformed" nmodl program which can be compiled and run by NEURON or
-
59  * CoreNEURON simulator.
-
60  *
-
61  * Implementation Notes:
-
62  * - We start with iterating statements in the statement block
-
63  * - Function or procedure calls are treated in same way
-
64  * - We visit the childrens of a statement and "trap" function calls
-
65  * - New ast node WrappedExpression has been added to YAML specification
-
66  * to facilitate easily "capturing" function calls. For example, function
-
67  * call can appear in argument, condition, binary expression, unary expression
-
68  * etc. When inlining happens, we have to replace FunctionCall node with new
-
69  * variable name. As visitor receives the pointer to function call, we can't
-
70  * replace the node. Hence WrappedExpression node has added. With this we
-
71  * can just override visit function of a single node and then can easily
-
72  * replace the expression to whatever the result will be
-
73  * - In case of lag and table statement inlining is disabled (haven't carefully
-
74  * looked into side effects)
-
75  * - Inlining pass needs to be run after symbol table pass
-
76  * - Inlining is done in recursive way i.e. if A() calls B() then first B()
-
77  * is checked for function calls/inlining and so on. This is dony by looking
-
78  * ast node of B() in symbol table and visiting it recursively
-
79  * - Procedure calls are typically standalone statements i.e. expression statements.
-
80  * But note that the nmodl grammar allows procedures to appear as part of expression.
-
81  * Procedures always return 0
-
82  * - Standalone procedure or function calls are replaced with the procedure/function body
-
83  *
-
84  * Examples:
-
85  *
-
86  * \code{.mod}
-
87  * PROCEDURE rates_1() {
-
88  * LOCAL x
-
89  * rates_2(23.1)
-
90  * }
-
91  *
-
92  * PROCEDURE rates_2(y) {
-
93  * LOCAL x
-
94  * x = 21.1*v+y
-
95  * }
-
96  * \endcode
-
97  *
-
98  * The result of inlining :
-
99  *
-
100  * \code{.mod}
-
101  * PROCEDURE rates_1() {
-
102  * LOCAL x, rates_2_in_0
-
103  * {
-
104  * LOCAL x, y_in_0
-
105  * y_in_0 = 23.1
-
106  * x = 21.1*v+y_in_0
-
107  * rates_2_in_0 = 0
-
108  * }
-
109  * }
-
110  *
-
111  * PROCEDURE rates_2(y) {
-
112  * LOCAL x
-
113  * x = 21.1*v+y
-
114  * }
-
115  * \endcode
-
116  *
-
117  * - Arguments for function call are copied into local variables
-
118  * - Local statement gets added to callee block (if doesn't exist)
-
119  * - Procedure body gets appended with extra assignment statement with variable
-
120  * used for returning value.
-
121  *
-
122  * \todo
-
123  * - Recursive function calls are not supported and need to add checks to avoid stack explosion
-
124  * - Currently we rename variables more than necessary, this could be improved [low priority]
-
125  * - Function calls as part of an argument of function call itself are not completely inlined [low
-
126  * priority]
-
127  * - Symbol table pass needs to be re-run in order to update the definitions/usage
-
128  * - Location of symbol/nodes after inlining still points to old nodes
-
129  */
-
130 class InlineVisitor: public AstVisitor {
-
131  private:
-
132  /// statement block containing current function call
- -
134 
-
135  /// statement containing current function call
-
136  std::shared_ptr<ast::Statement> caller_statement;
-
137 
-
138  /// symbol table for program node
- -
140 
-
141  /// statement blocks in call hierarchy
-
142  std::stack<ast::StatementBlock*> statementblock_stack;
-
143 
-
144  /// statements being executed in call hierarchy
-
145  std::stack<std::shared_ptr<ast::Statement>> statement_stack;
-
146 
-
147  /// map to track the statements being replaces (typically for procedure calls)
-
148  std::map<std::shared_ptr<ast::Statement>, ast::ExpressionStatement*> replaced_statements;
-
149 
-
150  /// map to track statements being prepended before function call (typically for function calls)
-
151  std::map<std::shared_ptr<ast::Statement>,
-
152  std::vector<std::shared_ptr<ast::ExpressionStatement>>>
- -
154 
-
155  /// map to track replaced function calls (typically for function calls)
-
156  std::map<ast::FunctionCall*, std::string> replaced_fun_calls;
-
157 
-
158  /// variables currently being renamed and their count (for renaming)
-
159  std::map<std::string, int> inlined_variables;
-
160 
-
161  /// true if given statement block can be inlined
-
162  static bool can_inline_block(const ast::StatementBlock& block);
-
163 
-
164  /// true if statement can be replaced with inlined body
-
165  /// this is possible for standalone function/procedure call as statement
-
166  bool can_replace_statement(const std::shared_ptr<ast::Statement>& statement);
-
167 
-
168  /**
-
169  * inline function/procedure into caller block
-
170  * @param callee : ast node representing function/procedure definition being called
-
171  * @param node : function/procedure call node
-
172  * @param caller : statement block containing function call
-
173  */
-
174  bool inline_function_call(ast::Block& callee,
-
175  ast::FunctionCall& node,
-
176  ast::StatementBlock& caller);
-
177 
-
178  /// add assignment statements into given statement block to inline arguments
-
179  void inline_arguments(ast::StatementBlock& inlined_block,
-
180  const ast::ArgumentVector& callee_parameters,
-
181  const ast::ExpressionVector& caller_expressions);
-
182 
-
183  /// add assignment statement at end of block (to use as a return statement
-
184  /// in case of procedure blocks)
-
185  static void add_return_variable(ast::StatementBlock& block, std::string& varname);
-
186 
-
187  public:
-
188  InlineVisitor() = default;
-
189 
-
190  void visit_function_call(ast::FunctionCall& node) override;
-
191 
-
192  void visit_statement_block(ast::StatementBlock& node) override;
-
193 
- -
195 
-
196  void visit_program(ast::Program& node) override;
-
197 };
-
198 
-
199 /** \} */ // end of visitor_classes
-
200 
-
201 } // namespace visitor
-
202 } // namespace nmodl
+
17 #include <string>
+
18 
+
19 #include "symtab/decl.hpp"
+
20 #include "visitors/ast_visitor.hpp"
+
21 
+
22 namespace nmodl {
+
23 namespace visitor {
+
24 
+
25 /**
+
26  * \addtogroup visitor_classes
+
27  * \{
+
28  */
+
29 
+
30 /**
+
31  * \class InlineVisitor
+
32  * \brief %Visitor to inline local procedure and function calls
+
33  *
+
34  * Motivation: Mod files often have function and procedure calls. Procedure
+
35  * typically has use of range variables like:
+
36  *
+
37  * \code{.mod}
+
38  * NEURON {
+
39  * RANGE tau, alpha, beta
+
40  * }
+
41  *
+
42  * DERIVATIVE states() {
+
43  * ...
+
44  * rates()
+
45  * alpha = tau + beta
+
46  * }
+
47  *
+
48  * PROCEDURE rates() {
+
49  * tau = xx * 0.12 * some_var
+
50  * beta = yy * 0.11
+
51  * }
+
52  * \endcode
+
53  *
+
54  * One can reduce the memory bandwidth pressure by inlining rates() and then
+
55  * replacing tau and beta with local variables. Many mod files from BlueBrain
+
56  * and other open source projects could be hugely benefited by inlining pass.
+
57  * The goal of this pass is to implement procedure and function inlining in
+
58  * the nmodl programs. After inlining we should be able to translate AST back
+
59  * to "transformed" nmodl program which can be compiled and run by NEURON or
+
60  * CoreNEURON simulator.
+
61  *
+
62  * Implementation Notes:
+
63  * - We start with iterating statements in the statement block
+
64  * - Function or procedure calls are treated in same way
+
65  * - We visit the childrens of a statement and "trap" function calls
+
66  * - New ast node WrappedExpression has been added to YAML specification
+
67  * to facilitate easily "capturing" function calls. For example, function
+
68  * call can appear in argument, condition, binary expression, unary expression
+
69  * etc. When inlining happens, we have to replace FunctionCall node with new
+
70  * variable name. As visitor receives the pointer to function call, we can't
+
71  * replace the node. Hence WrappedExpression node has added. With this we
+
72  * can just override visit function of a single node and then can easily
+
73  * replace the expression to whatever the result will be
+
74  * - In case of lag and table statement inlining is disabled (haven't carefully
+
75  * looked into side effects)
+
76  * - Inlining pass needs to be run after symbol table pass
+
77  * - Inlining is done in recursive way i.e. if A() calls B() then first B()
+
78  * is checked for function calls/inlining and so on. This is dony by looking
+
79  * ast node of B() in symbol table and visiting it recursively
+
80  * - Procedure calls are typically standalone statements i.e. expression statements.
+
81  * But note that the nmodl grammar allows procedures to appear as part of expression.
+
82  * Procedures always return 0
+
83  * - Standalone procedure or function calls are replaced with the procedure/function body
+
84  *
+
85  * Examples:
+
86  *
+
87  * \code{.mod}
+
88  * PROCEDURE rates_1() {
+
89  * LOCAL x
+
90  * rates_2(23.1)
+
91  * }
+
92  *
+
93  * PROCEDURE rates_2(y) {
+
94  * LOCAL x
+
95  * x = 21.1*v+y
+
96  * }
+
97  * \endcode
+
98  *
+
99  * The result of inlining :
+
100  *
+
101  * \code{.mod}
+
102  * PROCEDURE rates_1() {
+
103  * LOCAL x, rates_2_in_0
+
104  * {
+
105  * LOCAL x, y_in_0
+
106  * y_in_0 = 23.1
+
107  * x = 21.1*v+y_in_0
+
108  * rates_2_in_0 = 0
+
109  * }
+
110  * }
+
111  *
+
112  * PROCEDURE rates_2(y) {
+
113  * LOCAL x
+
114  * x = 21.1*v+y
+
115  * }
+
116  * \endcode
+
117  *
+
118  * - Arguments for function call are copied into local variables
+
119  * - Local statement gets added to callee block (if doesn't exist)
+
120  * - Procedure body gets appended with extra assignment statement with variable
+
121  * used for returning value.
+
122  *
+
123  * \todo
+
124  * - Recursive function calls are not supported and need to add checks to avoid stack explosion
+
125  * - Currently we rename variables more than necessary, this could be improved [low priority]
+
126  * - Function calls as part of an argument of function call itself are not completely inlined [low
+
127  * priority]
+
128  * - Symbol table pass needs to be re-run in order to update the definitions/usage
+
129  * - Location of symbol/nodes after inlining still points to old nodes
+
130  */
+
131 class InlineVisitor: public AstVisitor {
+
132  private:
+
133  /// statement block containing current function call
+ +
135 
+
136  /// statement containing current function call
+
137  std::shared_ptr<ast::Statement> caller_statement;
+
138 
+
139  /// symbol table for program node
+ +
141 
+
142  /// statement blocks in call hierarchy
+
143  std::stack<ast::StatementBlock*> statementblock_stack;
+
144 
+
145  /// statements being executed in call hierarchy
+
146  std::stack<std::shared_ptr<ast::Statement>> statement_stack;
+
147 
+
148  /// map to track the statements being replaces (typically for procedure calls)
+
149  std::map<std::shared_ptr<ast::Statement>, ast::ExpressionStatement*> replaced_statements;
+
150 
+
151  /// map to track statements being prepended before function call (typically for function calls)
+
152  std::map<std::shared_ptr<ast::Statement>,
+
153  std::vector<std::shared_ptr<ast::ExpressionStatement>>>
+ +
155 
+
156  /// map to track replaced function calls (typically for function calls)
+
157  std::map<ast::FunctionCall*, std::string> replaced_fun_calls;
+
158 
+
159  /// variables currently being renamed and their count (for renaming)
+
160  std::map<std::string, int> inlined_variables;
+
161 
+
162  /// true if given statement block can be inlined
+
163  static bool can_inline_block(const ast::StatementBlock& block);
+
164 
+
165  /// true if statement can be replaced with inlined body
+
166  /// this is possible for standalone function/procedure call as statement
+
167  bool can_replace_statement(const std::shared_ptr<ast::Statement>& statement);
+
168 
+
169  /**
+
170  * inline function/procedure into caller block
+
171  * @param callee : ast node representing function/procedure definition being called
+
172  * @param node : function/procedure call node
+
173  * @param caller : statement block containing function call
+
174  */
+
175  bool inline_function_call(ast::Block& callee,
+
176  ast::FunctionCall& node,
+
177  ast::StatementBlock& caller);
+
178 
+
179  /// add assignment statements into given statement block to inline arguments
+
180  void inline_arguments(ast::StatementBlock& inlined_block,
+
181  const ast::ArgumentVector& callee_parameters,
+
182  const ast::ExpressionVector& caller_expressions);
+
183 
+
184  /// add assignment statement at end of block (to use as a return statement
+
185  /// in case of procedure blocks)
+
186  static void add_return_variable(ast::StatementBlock& block, std::string& varname);
+
187 
+
188  public:
+
189  InlineVisitor() = default;
+
190 
+
191  void visit_function_call(ast::FunctionCall& node) override;
+
192 
+
193  void visit_statement_block(ast::StatementBlock& node) override;
+
194 
+ +
196 
+
197  void visit_program(ast::Program& node) override;
+
198 };
+
199 
+
200 /** \} */ // end of visitor_classes
+
201 
+
202 } // namespace visitor
+
203 } // namespace nmodl
void inline_arguments(ast::StatementBlock &inlined_block, const ast::ArgumentVector &callee_parameters, const ast::ExpressionVector &caller_expressions)
add assignment statements into given statement block to inline arguments
-
std::map< std::shared_ptr< ast::Statement >, std::vector< std::shared_ptr< ast::ExpressionStatement > > > inlined_statements
map to track statements being prepended before function call (typically for function calls)
-
std::map< std::string, int > inlined_variables
variables currently being renamed and their count (for renaming)
+
std::map< std::shared_ptr< ast::Statement >, std::vector< std::shared_ptr< ast::ExpressionStatement > > > inlined_statements
map to track statements being prepended before function call (typically for function calls)
+
std::map< std::string, int > inlined_variables
variables currently being renamed and their count (for renaming)
encapsulates code generation backend implementations
Definition: ast_common.hpp:26
-
ast::StatementBlock * caller_block
statement block containing current function call
+
ast::StatementBlock * caller_block
statement block containing current function call
bool can_replace_statement(const std::shared_ptr< ast::Statement > &statement)
true if statement can be replaced with inlined body this is possible for standalone function/procedur...
-
std::stack< ast::StatementBlock * > statementblock_stack
statement blocks in call hierarchy
+
std::stack< ast::StatementBlock * > statementblock_stack
statement blocks in call hierarchy
bool inline_function_call(ast::Block &callee, ast::FunctionCall &node, ast::StatementBlock &caller)
inline function/procedure into caller block
static bool can_inline_block(const ast::StatementBlock &block)
true if given statement block can be inlined
Base class for all block scoped nodes.
Definition: block.hpp:41
-
std::map< std::shared_ptr< ast::Statement >, ast::ExpressionStatement * > replaced_statements
map to track the statements being replaces (typically for procedure calls)
+
std::map< std::shared_ptr< ast::Statement >, ast::ExpressionStatement * > replaced_statements
map to track the statements being replaces (typically for procedure calls)
void visit_function_call(ast::FunctionCall &node) override
visit node of type ast::FunctionCall
std::vector< std::shared_ptr< Argument > > ArgumentVector
Definition: ast_decl.hpp:312
-
Visitor to inline local procedure and function calls
+
Visitor to inline local procedure and function calls
void visit_program(ast::Program &node) override
visit node of type ast::Program
Concrete visitor for all AST classes.
Definition: ast_visitor.hpp:37
-
std::stack< std::shared_ptr< ast::Statement > > statement_stack
statements being executed in call hierarchy
+
std::stack< std::shared_ptr< ast::Statement > > statement_stack
statements being executed in call hierarchy
Represent symbol table for a NMODL block.
Represents block encapsulating list of statements.
std::vector< std::shared_ptr< Expression > > ExpressionVector
Definition: ast_decl.hpp:299
static void add_return_variable(ast::StatementBlock &block, std::string &varname)
add assignment statement at end of block (to use as a return statement in case of procedure blocks)
void visit_wrapped_expression(ast::WrappedExpression &node) override
Visit all wrapped expressions which can contain function calls.
-
symtab::SymbolTable const * program_symtab
symbol table for program node
-
std::shared_ptr< ast::Statement > caller_statement
statement containing current function call
-
std::map< ast::FunctionCall *, std::string > replaced_fun_calls
map to track replaced function calls (typically for function calls)
+
symtab::SymbolTable const * program_symtab
symbol table for program node
+
std::shared_ptr< ast::Statement > caller_statement
statement containing current function call
+
std::map< ast::FunctionCall *, std::string > replaced_fun_calls
map to track replaced function calls (typically for function calls)
Represents top level AST node for whole NMODL input.
Definition: program.hpp:39
Forward declarations of symbols in namespace nmodl::symtab.
Wrap any other expression type.
diff --git a/doxygen/local__var__rename__visitor_8cpp_source.html b/doxygen/local__var__rename__visitor_8cpp_source.html index b3626cac53..45d17c0840 100644 --- a/doxygen/local__var__rename__visitor_8cpp_source.html +++ b/doxygen/local__var__rename__visitor_8cpp_source.html @@ -183,15 +183,15 @@
Auto generated AST classes declaration.
const StatementVector & get_statements() const noexcept
Getter for member variable StatementBlock::statements.
Utility functions for visitors implementation.
-
const symtab::SymbolTable * symtab
non-null symbol table in the scope hierarchy
+
const symtab::SymbolTable * symtab
non-null symbol table in the scope hierarchy
Auto generated AST classes declaration.
symtab::SymbolTable * get_symbol_table() const override
Return associated symbol table for the current ast node.
Visitor to rename local variables conflicting with global scope
Blindly rename given variable to new name
Represent symbol table for a NMODL block.
void set(const std::string &old_name, std::string new_name)
-
std::map< std::string, int > renamed_variables
variables currently being renamed and their count
-
std::stack< const symtab::SymbolTable * > symtab_stack
symbol tables in case of nested blocks
+
std::map< std::string, int > renamed_variables
variables currently being renamed and their count
+
std::stack< const symtab::SymbolTable * > symtab_stack
symbol tables in case of nested blocks
std::string get_new_name(const std::string &name, const std::string &suffix, std::map< std::string, int > &variables)
Return new name variable by appending _suffix_COUNT where COUNT is number of times the given variable...
Represents block encapsulating list of statements.
Blindly rename given variable to new name
diff --git a/doxygen/local__var__rename__visitor_8hpp.html b/doxygen/local__var__rename__visitor_8hpp.html index cda6f3ed4d..a91fc70f8d 100644 --- a/doxygen/local__var__rename__visitor_8hpp.html +++ b/doxygen/local__var__rename__visitor_8hpp.html @@ -106,6 +106,7 @@

Definition in file local_var_rename_visitor.hpp.

#include <map>
#include <stack>
+#include <string>
#include "symtab/decl.hpp"
#include "visitors/ast_visitor.hpp"
diff --git a/doxygen/local__var__rename__visitor_8hpp_source.html b/doxygen/local__var__rename__visitor_8hpp_source.html index e49c47bf10..b54be9bda3 100644 --- a/doxygen/local__var__rename__visitor_8hpp_source.html +++ b/doxygen/local__var__rename__visitor_8hpp_source.html @@ -110,83 +110,84 @@
14 
15 #include <map>
16 #include <stack>
-
17 
-
18 #include "symtab/decl.hpp"
-
19 #include "visitors/ast_visitor.hpp"
-
20 
-
21 namespace nmodl {
-
22 namespace visitor {
-
23 
-
24 /**
-
25  * \addtogroup visitor_classes
-
26  * \{
-
27  */
-
28 
-
29 /**
-
30  * \class LocalVarRenameVisitor
-
31  * \brief %Visitor to rename local variables conflicting with global scope
-
32  *
-
33  * Motivation: During inlining we have to do data-flow-analysis. Consider
-
34  * below example:
-
35  *
-
36  * \code{.mod}
-
37  * NEURON {
-
38  * RANGE tau, beta
-
39  * }
-
40  *
-
41  * DERIVATIVE states() {
-
42  * LOCAL tau
-
43  * ...
-
44  * rates()
-
45  * }
-
46  *
-
47  * PROCEDURE rates() {
-
48  * tau = beta * 0.12 * some_var
-
49  * }
-
50  * \endcode
-
51  *
-
52  * When rates() will be inlined into states(), local definition of tau will
-
53  * conflict with range variable tau. Hence we can't just copy the statements.
-
54  * Dataflow analysis could be done at the time of inlining. Other way is to run
-
55  * this pass before inlining and pre-rename any local-global variable conflicts.
-
56  * As we are renaming local variables only, it's safe and there are no side effects.
-
57  *
-
58  * \todo
-
59  * - Currently we are renaming variables even if there is no inlining candidates.
-
60  * In this case ideally we should not rename.
-
61  */
- -
63  private:
-
64  /// non-null symbol table in the scope hierarchy
-
65  const symtab::SymbolTable* symtab = nullptr;
-
66 
-
67  /// symbol tables in case of nested blocks
-
68  std::stack<const symtab::SymbolTable*> symtab_stack;
-
69 
-
70  /// variables currently being renamed and their count
-
71  std::map<std::string, int> renamed_variables;
-
72 
-
73  public:
-
74  LocalVarRenameVisitor() = default;
-
75  void visit_statement_block(ast::StatementBlock& node) override;
-
76 };
-
77 
-
78 /** \} */ // end of visitor_classes
-
79 
-
80 } // namespace visitor
-
81 } // namespace nmodl
+
17 #include <string>
+
18 
+
19 #include "symtab/decl.hpp"
+
20 #include "visitors/ast_visitor.hpp"
+
21 
+
22 namespace nmodl {
+
23 namespace visitor {
+
24 
+
25 /**
+
26  * \addtogroup visitor_classes
+
27  * \{
+
28  */
+
29 
+
30 /**
+
31  * \class LocalVarRenameVisitor
+
32  * \brief %Visitor to rename local variables conflicting with global scope
+
33  *
+
34  * Motivation: During inlining we have to do data-flow-analysis. Consider
+
35  * below example:
+
36  *
+
37  * \code{.mod}
+
38  * NEURON {
+
39  * RANGE tau, beta
+
40  * }
+
41  *
+
42  * DERIVATIVE states() {
+
43  * LOCAL tau
+
44  * ...
+
45  * rates()
+
46  * }
+
47  *
+
48  * PROCEDURE rates() {
+
49  * tau = beta * 0.12 * some_var
+
50  * }
+
51  * \endcode
+
52  *
+
53  * When rates() will be inlined into states(), local definition of tau will
+
54  * conflict with range variable tau. Hence we can't just copy the statements.
+
55  * Dataflow analysis could be done at the time of inlining. Other way is to run
+
56  * this pass before inlining and pre-rename any local-global variable conflicts.
+
57  * As we are renaming local variables only, it's safe and there are no side effects.
+
58  *
+
59  * \todo
+
60  * - Currently we are renaming variables even if there is no inlining candidates.
+
61  * In this case ideally we should not rename.
+
62  */
+ +
64  private:
+
65  /// non-null symbol table in the scope hierarchy
+
66  const symtab::SymbolTable* symtab = nullptr;
+
67 
+
68  /// symbol tables in case of nested blocks
+
69  std::stack<const symtab::SymbolTable*> symtab_stack;
+
70 
+
71  /// variables currently being renamed and their count
+
72  std::map<std::string, int> renamed_variables;
+
73 
+
74  public:
+
75  LocalVarRenameVisitor() = default;
+
76  void visit_statement_block(ast::StatementBlock& node) override;
+
77 };
+
78 
+
79 /** \} */ // end of visitor_classes
+
80 
+
81 } // namespace visitor
+
82 } // namespace nmodl
encapsulates code generation backend implementations
Definition: ast_common.hpp:26
-
const symtab::SymbolTable * symtab
non-null symbol table in the scope hierarchy
+
const symtab::SymbolTable * symtab
non-null symbol table in the scope hierarchy
Concrete visitor for all AST classes.
Definition: ast_visitor.hpp:37
Represent symbol table for a NMODL block.
-
std::map< std::string, int > renamed_variables
variables currently being renamed and their count
-
std::stack< const symtab::SymbolTable * > symtab_stack
symbol tables in case of nested blocks
+
std::map< std::string, int > renamed_variables
variables currently being renamed and their count
+
std::stack< const symtab::SymbolTable * > symtab_stack
symbol tables in case of nested blocks
Represents block encapsulating list of statements.
void visit_statement_block(ast::StatementBlock &node) override
rename name conflicting variables in the statement block and it's all children
-
Visitor to rename local variables conflicting with global scope
+
Visitor to rename local variables conflicting with global scope
Forward declarations of symbols in namespace nmodl::symtab.
Concrete visitor for all AST classes.
diff --git a/doxygen/localize__visitor_8cpp_source.html b/doxygen/localize__visitor_8cpp_source.html index 45ff33b24a..11e04bd1b8 100644 --- a/doxygen/localize__visitor_8cpp_source.html +++ b/doxygen/localize__visitor_8cpp_source.html @@ -283,7 +283,7 @@
@ D
global variable is defined
DUChain analyze(const ast::Ast &node, const std::string &name)
compute def-use chain for a variable within the node
@ U
global variable is used
-
bool ignore_verbatim
ignore verbatim blocks while localizing
+
bool ignore_verbatim
ignore verbatim blocks while localizing
Base class for all block scoped nodes.
Definition: block.hpp:41
@ AFTER_BLOCK
type of ast::AfterBlock
bool is_solve_procedure(const ast::Node &node) const
@@ -302,7 +302,7 @@
virtual std::shared_ptr< StatementBlock > get_statement_block() const
Return associated statement block for the AST node.
Definition: ast.cpp:32
Represents top level AST node for whole NMODL input.
Definition: program.hpp:39
@ BEFORE_BLOCK
type of ast::BeforeBlock
-
symtab::SymbolTable * program_symtab
+
symtab::SymbolTable * program_symtab
std::shared_ptr< Symbol > lookup(const std::string &name) const
check if symbol with given name exist in the current table (but not in parents)
@ BREAKPOINT_BLOCK
type of ast::BreakpointBlock
@ BA_BLOCK
type of ast::BABlock
diff --git a/doxygen/localize__visitor_8hpp.html b/doxygen/localize__visitor_8hpp.html index 6424b97cb3..0d6e7e561f 100644 --- a/doxygen/localize__visitor_8hpp.html +++ b/doxygen/localize__visitor_8hpp.html @@ -105,6 +105,7 @@

Definition in file localize_visitor.hpp.

#include <map>
+#include <string>
#include "symtab/decl.hpp"
#include "visitors/ast_visitor.hpp"
diff --git a/doxygen/localize__visitor_8hpp_source.html b/doxygen/localize__visitor_8hpp_source.html index 14fdee0d38..9106759c2a 100644 --- a/doxygen/localize__visitor_8hpp_source.html +++ b/doxygen/localize__visitor_8hpp_source.html @@ -109,115 +109,116 @@
13  */
14 
15 #include <map>
-
16 
-
17 #include "symtab/decl.hpp"
-
18 #include "visitors/ast_visitor.hpp"
-
19 
+
16 #include <string>
+
17 
+
18 #include "symtab/decl.hpp"
+
19 #include "visitors/ast_visitor.hpp"
20 
-
21 namespace nmodl {
-
22 namespace visitor {
-
23 
-
24 /**
-
25  * \addtogroup visitor_classes
-
26  * \{
-
27  */
-
28 
-
29 /**
-
30  * \class LocalizeVisitor
-
31  * \brief %Visitor to transform global variable usage to local
-
32  *
-
33  * Motivation: As NMODL doesn't support returning multiple values,
-
34  * procedures are often written with use of range variables that
-
35  * can be made local. For example:
-
36  *
-
37  * \code{.mod}
-
38  * NEURON {
-
39  * RANGE tau, alpha, beta
-
40  * }
-
41  *
-
42  * DERIVATIVE states() {
-
43  * ...
-
44  * rates()
-
45  * alpha = tau + beta
-
46  * }
-
47  *
-
48  * PROCEDURE rates() {
-
49  * tau = xx * 0.12 * some_var
-
50  * beta = yy * 0.11
-
51  * }
-
52  * \endcode
-
53  *
-
54  * In above example we are only interested in variable alpha computed in
-
55  * DERIVATIVE block. If rates() is inlined into DERIVATIVE block then we
-
56  * get:
-
57  *
-
58  * \code{.mod}
-
59  * DERIVATIVE states() {
-
60  * ...
-
61  * {
-
62  * tau = xx * 0.12 * some_var
-
63  * beta = yy * 0.11
-
64  * }
-
65  * alpha = tau + beta
-
66  * }
-
67  * \endcode
-
68  *
-
69  * Now tau and beta could become local variables provided that their values
-
70  * are not used in any other global blocks.
-
71  *
-
72  * Implementation Notes:
-
73  * - For every global variable in the mod file we have to compute
-
74  * def-use chains in global blocks (except procedure and functions, which should be
-
75  * already inlined).
-
76  * - If every block has "definition" first then that variable is safe to "localize"
-
77  *
-
78  * \todo
-
79  * - We are excluding procedures/functions because they will be still using global
-
80  * variables. We need to have dead-code removal pass to eliminate unused procedures/
-
81  * functions before localizer pass.
-
82  */
- -
84  private:
-
85  /// ignore verbatim blocks while localizing
-
86  bool ignore_verbatim = false;
-
87 
- -
89 
-
90  std::vector<std::string> variables_to_optimize() const;
-
91 
-
92  bool node_for_def_use_analysis(const ast::Node& node) const;
-
93 
-
94  bool is_solve_procedure(const ast::Node& node) const;
-
95 
-
96  public:
-
97  LocalizeVisitor() = default;
-
98 
- - -
101 
-
102  void visit_program(const ast::Program& node) override;
-
103 };
-
104 
-
105 /** \} */ // end of visitor_classes
-
106 
-
107 } // namespace visitor
-
108 } // namespace nmodl
+
21 
+
22 namespace nmodl {
+
23 namespace visitor {
+
24 
+
25 /**
+
26  * \addtogroup visitor_classes
+
27  * \{
+
28  */
+
29 
+
30 /**
+
31  * \class LocalizeVisitor
+
32  * \brief %Visitor to transform global variable usage to local
+
33  *
+
34  * Motivation: As NMODL doesn't support returning multiple values,
+
35  * procedures are often written with use of range variables that
+
36  * can be made local. For example:
+
37  *
+
38  * \code{.mod}
+
39  * NEURON {
+
40  * RANGE tau, alpha, beta
+
41  * }
+
42  *
+
43  * DERIVATIVE states() {
+
44  * ...
+
45  * rates()
+
46  * alpha = tau + beta
+
47  * }
+
48  *
+
49  * PROCEDURE rates() {
+
50  * tau = xx * 0.12 * some_var
+
51  * beta = yy * 0.11
+
52  * }
+
53  * \endcode
+
54  *
+
55  * In above example we are only interested in variable alpha computed in
+
56  * DERIVATIVE block. If rates() is inlined into DERIVATIVE block then we
+
57  * get:
+
58  *
+
59  * \code{.mod}
+
60  * DERIVATIVE states() {
+
61  * ...
+
62  * {
+
63  * tau = xx * 0.12 * some_var
+
64  * beta = yy * 0.11
+
65  * }
+
66  * alpha = tau + beta
+
67  * }
+
68  * \endcode
+
69  *
+
70  * Now tau and beta could become local variables provided that their values
+
71  * are not used in any other global blocks.
+
72  *
+
73  * Implementation Notes:
+
74  * - For every global variable in the mod file we have to compute
+
75  * def-use chains in global blocks (except procedure and functions, which should be
+
76  * already inlined).
+
77  * - If every block has "definition" first then that variable is safe to "localize"
+
78  *
+
79  * \todo
+
80  * - We are excluding procedures/functions because they will be still using global
+
81  * variables. We need to have dead-code removal pass to eliminate unused procedures/
+
82  * functions before localizer pass.
+
83  */
+ +
85  private:
+
86  /// ignore verbatim blocks while localizing
+
87  bool ignore_verbatim = false;
+
88 
+ +
90 
+
91  std::vector<std::string> variables_to_optimize() const;
+
92 
+
93  bool node_for_def_use_analysis(const ast::Node& node) const;
+
94 
+
95  bool is_solve_procedure(const ast::Node& node) const;
+
96 
+
97  public:
+
98  LocalizeVisitor() = default;
+
99 
+ + +
102 
+
103  void visit_program(const ast::Program& node) override;
+
104 };
+
105 
+
106 /** \} */ // end of visitor_classes
+
107 
+
108 } // namespace visitor
+
109 } // namespace nmodl
-
LocalizeVisitor(bool ignore_verbatim)
+
LocalizeVisitor(bool ignore_verbatim)
Base class for all AST node.
Definition: node.hpp:40
Concrete constant visitor for all AST classes.
std::vector< std::string > variables_to_optimize() const
encapsulates code generation backend implementations
Definition: ast_common.hpp:26
-
Visitor to transform global variable usage to local
-
bool ignore_verbatim
ignore verbatim blocks while localizing
+
Visitor to transform global variable usage to local
+
bool ignore_verbatim
ignore verbatim blocks while localizing
bool is_solve_procedure(const ast::Node &node) const
void visit_program(const ast::Program &node) override
visit node of type ast::Program
Represent symbol table for a NMODL block.
bool node_for_def_use_analysis(const ast::Node &node) const
Represents top level AST node for whole NMODL input.
Definition: program.hpp:39
-
symtab::SymbolTable * program_symtab
+
symtab::SymbolTable * program_symtab
Forward declarations of symbols in namespace nmodl::symtab.
Concrete visitor for all AST classes.
diff --git a/doxygen/sympy__conductance__visitor_8cpp_source.html b/doxygen/sympy__conductance__visitor_8cpp_source.html index 7ac9d5cba8..68e5f68323 100644 --- a/doxygen/sympy__conductance__visitor_8cpp_source.html +++ b/doxygen/sympy__conductance__visitor_8cpp_source.html @@ -346,26 +346,26 @@
std::shared_ptr< Name > get_ion() const noexcept
Getter for member variable ConductanceHint::ion.
std::vector< std::string > generate_statement_strings(ast::BreakpointBlock &node)
Represents CONDUCTANCE statement in NMODL.
-
string_map i_name
map between current write names and ion names
-
bool under_breakpoint_block
true while visiting breakpoint block
+
string_map i_name
map between current write names and ion names
+
bool under_breakpoint_block
true while visiting breakpoint block
encapsulates code generation backend implementations
Definition: ast_common.hpp:26
-
string_set all_vars
set of all variables for SymPy
+
string_set all_vars
set of all variables for SymPy
void visit_binary_expression(ast::BinaryExpression &node) override
visit node of type ast::BinaryExpression
-
std::vector< std::string > ordered_binary_exprs
list in order of binary expressions in breakpoint
+
std::vector< std::string > ordered_binary_exprs
list in order of binary expressions in breakpoint
static std::string to_nmodl_for_sympy(const ast::Ast &node)
logger_type logger
Definition: logger.cpp:34
void visit_program(ast::Program &node) override
visit node of type ast::Program
std::shared_ptr< StatementBlock > get_statement_block() const noexcept override
Getter for member variable BreakpointBlock::statement_block.
-
std::vector< std::shared_ptr< const ast::Ast > > use_ion_nodes
use ion ast nodes
+
std::vector< std::shared_ptr< const ast::Ast > > use_ion_nodes
use ion ast nodes
AstNodeType
Enum type for every AST node type.
Definition: ast_decl.hpp:164
void visit_breakpoint_block(ast::BreakpointBlock &node) override
visit node of type ast::BreakpointBlock
- +
Utility functions for visitors implementation.
Visitor for generating CONDUCTANCE statements for ions
Represents a BREAKPOINT block in NMODL.
-
std::map< std::string, std::size_t > binary_expr_index
map from lhs of binary expression to index of expression in above vector
+
std::map< std::string, std::size_t > binary_expr_index
map from lhs of binary expression to index of expression in above vector
const pybind_wrap_api & api()
Get a pointer to the pybind_wrap_api struct.
Definition: pyembed.cpp:134
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:12902
@ UNIT_DEF
type of ast::UnitDef
@@ -380,14 +380,14 @@
static bool conductance_statement_possible(const ast::BreakpointBlock &node)
Analyse breakpoint block to check if it is safe to insert CONDUCTANCE statements.
BinaryOp get_value() const noexcept
Getter for member variable BinaryOperator::value.
Implement logger based on spdlog library.
-
std::vector< std::string > ordered_binary_exprs_lhs
ditto but for LHS of expression only
- +
std::vector< std::string > ordered_binary_exprs_lhs
ditto but for LHS of expression only
+
LocalVar * add_local_variable(StatementBlock &node, Identifier *varname)
std::shared_ptr< Expression > get_lhs() const noexcept
Getter for member variable BinaryExpression::lhs.
Represents top level AST node for whole NMODL input.
Definition: program.hpp:39
-
string_set i_ignore
set of currents to ignore
-
std::vector< std::shared_ptr< const ast::Ast > > nonspecific_nodes
non specific currents
+
string_set i_ignore
set of currents to ignore
+
std::vector< std::shared_ptr< const ast::Ast > > nonspecific_nodes
non specific currents
void visit_conductance_hint(ast::ConductanceHint &node) override
visit node of type ast::ConductanceHint
Represents binary expression in the NMODL.
diff --git a/doxygen/sympy__conductance__visitor_8hpp.html b/doxygen/sympy__conductance__visitor_8hpp.html index bccf0ff7af..4a86941a7a 100644 --- a/doxygen/sympy__conductance__visitor_8hpp.html +++ b/doxygen/sympy__conductance__visitor_8hpp.html @@ -106,6 +106,7 @@

Definition in file sympy_conductance_visitor.hpp.

#include <map>
#include <set>
+#include <string>
#include <vector>
#include "visitors/ast_visitor.hpp"
diff --git a/doxygen/sympy__conductance__visitor_8hpp_source.html b/doxygen/sympy__conductance__visitor_8hpp_source.html index e298131d47..969b15fd27 100644 --- a/doxygen/sympy__conductance__visitor_8hpp_source.html +++ b/doxygen/sympy__conductance__visitor_8hpp_source.html @@ -110,123 +110,124 @@
14 
15 #include <map>
16 #include <set>
-
17 #include <vector>
-
18 
-
19 #include "visitors/ast_visitor.hpp"
-
20 
-
21 namespace nmodl {
-
22 
-
23 namespace visitor {
-
24 
-
25 /**
-
26  * @addtogroup visitor_classes
-
27  * @{
-
28  */
-
29 
-
30 /**
-
31  * \class SympyConductanceVisitor
-
32  * \brief %Visitor for generating CONDUCTANCE statements for ions
-
33  *
-
34  * This class visits each ion expression `I = ...` in the `BREAKPOINT`
-
35  * and symbolically differentiates it to get `dI/dV`, i.e. the conductance.
-
36  * If this coincides with an existing global variable `g` (e.g. when
-
37  * `I` is linear in `V`) then it will add
-
38  *
-
39  * \code{.mod}
-
40  * CONDUCTANCE g USEION I
-
41  * \endcode
-
42  *
-
43  * If `dI/dV` is a more complicated expression, it generates a new unique
-
44  * variable name `g_unique`, and adds two lines
-
45  *
-
46  * \code{.mod}
-
47  * CONDUCTANCE g_unique USEION I
-
48  * g_unique = [dI/dV expression]
-
49  * \endcode
-
50  *
-
51  * If an ion channel already has a `CONDUCTANCE` statement then it does
-
52  * not modify it.
-
53  */
- -
55  typedef std::map<std::string, std::string> string_map;
-
56  typedef std::set<std::string> string_set;
-
57 
-
58  private:
-
59  /// true while visiting breakpoint block
-
60  bool under_breakpoint_block = false;
-
61 
-
62  /// set of all variables for SymPy
- -
64 
-
65  /// set of currents to ignore
- -
67 
-
68  /// map between current write names and ion names
- -
70 
- -
72 
-
73  /// list in order of binary expressions in breakpoint
-
74  std::vector<std::string> ordered_binary_exprs;
-
75 
-
76  /// ditto but for LHS of expression only
-
77  std::vector<std::string> ordered_binary_exprs_lhs;
-
78 
-
79  /// map from lhs of binary expression to index of expression in above vector
-
80  std::map<std::string, std::size_t> binary_expr_index;
-
81 
-
82  /// use ion ast nodes
-
83  std::vector<std::shared_ptr<const ast::Ast>> use_ion_nodes;
-
84 
-
85  /// non specific currents
-
86  std::vector<std::shared_ptr<const ast::Ast>> nonspecific_nodes;
-
87 
-
88  std::vector<std::string> generate_statement_strings(ast::BreakpointBlock& node);
- - -
91 
-
92  static std::string to_nmodl_for_sympy(const ast::Ast& node);
-
93 
-
94  public:
-
95  SympyConductanceVisitor() = default;
- -
97  void visit_breakpoint_block(ast::BreakpointBlock& node) override;
-
98  void visit_conductance_hint(ast::ConductanceHint& node) override;
-
99  void visit_program(ast::Program& node) override;
-
100 };
-
101 
-
102 /** @} */ // end of visitor_classes
-
103 
-
104 } // namespace visitor
-
105 } // namespace nmodl
+
17 #include <string>
+
18 #include <vector>
+
19 
+
20 #include "visitors/ast_visitor.hpp"
+
21 
+
22 namespace nmodl {
+
23 
+
24 namespace visitor {
+
25 
+
26 /**
+
27  * @addtogroup visitor_classes
+
28  * @{
+
29  */
+
30 
+
31 /**
+
32  * \class SympyConductanceVisitor
+
33  * \brief %Visitor for generating CONDUCTANCE statements for ions
+
34  *
+
35  * This class visits each ion expression `I = ...` in the `BREAKPOINT`
+
36  * and symbolically differentiates it to get `dI/dV`, i.e. the conductance.
+
37  * If this coincides with an existing global variable `g` (e.g. when
+
38  * `I` is linear in `V`) then it will add
+
39  *
+
40  * \code{.mod}
+
41  * CONDUCTANCE g USEION I
+
42  * \endcode
+
43  *
+
44  * If `dI/dV` is a more complicated expression, it generates a new unique
+
45  * variable name `g_unique`, and adds two lines
+
46  *
+
47  * \code{.mod}
+
48  * CONDUCTANCE g_unique USEION I
+
49  * g_unique = [dI/dV expression]
+
50  * \endcode
+
51  *
+
52  * If an ion channel already has a `CONDUCTANCE` statement then it does
+
53  * not modify it.
+
54  */
+ +
56  typedef std::map<std::string, std::string> string_map;
+
57  typedef std::set<std::string> string_set;
+
58 
+
59  private:
+
60  /// true while visiting breakpoint block
+
61  bool under_breakpoint_block = false;
+
62 
+
63  /// set of all variables for SymPy
+ +
65 
+
66  /// set of currents to ignore
+ +
68 
+
69  /// map between current write names and ion names
+ +
71 
+ +
73 
+
74  /// list in order of binary expressions in breakpoint
+
75  std::vector<std::string> ordered_binary_exprs;
+
76 
+
77  /// ditto but for LHS of expression only
+
78  std::vector<std::string> ordered_binary_exprs_lhs;
+
79 
+
80  /// map from lhs of binary expression to index of expression in above vector
+
81  std::map<std::string, std::size_t> binary_expr_index;
+
82 
+
83  /// use ion ast nodes
+
84  std::vector<std::shared_ptr<const ast::Ast>> use_ion_nodes;
+
85 
+
86  /// non specific currents
+
87  std::vector<std::shared_ptr<const ast::Ast>> nonspecific_nodes;
+
88 
+
89  std::vector<std::string> generate_statement_strings(ast::BreakpointBlock& node);
+ + +
92 
+
93  static std::string to_nmodl_for_sympy(const ast::Ast& node);
+
94 
+
95  public:
+
96  SympyConductanceVisitor() = default;
+ +
98  void visit_breakpoint_block(ast::BreakpointBlock& node) override;
+
99  void visit_conductance_hint(ast::ConductanceHint& node) override;
+
100  void visit_program(ast::Program& node) override;
+
101 };
+
102 
+
103 /** @} */ // end of visitor_classes
+
104 
+
105 } // namespace visitor
+
106 } // namespace nmodl
Base class for all Abstract Syntax Tree node types.
Definition: ast.hpp:69
-
Visitor for generating CONDUCTANCE statements for ions
+
Visitor for generating CONDUCTANCE statements for ions
std::vector< std::string > generate_statement_strings(ast::BreakpointBlock &node)
Represents CONDUCTANCE statement in NMODL.
-
string_map i_name
map between current write names and ion names
-
bool under_breakpoint_block
true while visiting breakpoint block
+
string_map i_name
map between current write names and ion names
+
bool under_breakpoint_block
true while visiting breakpoint block
encapsulates code generation backend implementations
Definition: ast_common.hpp:26
-
string_set all_vars
set of all variables for SymPy
+
string_set all_vars
set of all variables for SymPy
void visit_binary_expression(ast::BinaryExpression &node) override
visit node of type ast::BinaryExpression
-
std::vector< std::string > ordered_binary_exprs
list in order of binary expressions in breakpoint
+
std::vector< std::string > ordered_binary_exprs
list in order of binary expressions in breakpoint
static std::string to_nmodl_for_sympy(const ast::Ast &node)
void visit_program(ast::Program &node) override
visit node of type ast::Program
-
std::vector< std::shared_ptr< const ast::Ast > > use_ion_nodes
use ion ast nodes
+
std::vector< std::shared_ptr< const ast::Ast > > use_ion_nodes
use ion ast nodes
void visit_breakpoint_block(ast::BreakpointBlock &node) override
visit node of type ast::BreakpointBlock
- +
Represents a BREAKPOINT block in NMODL.
-
std::map< std::string, std::size_t > binary_expr_index
map from lhs of binary expression to index of expression in above vector
+
std::map< std::string, std::size_t > binary_expr_index
map from lhs of binary expression to index of expression in above vector
Concrete visitor for all AST classes.
Definition: ast_visitor.hpp:37
-
std::vector< std::string > ordered_binary_exprs_lhs
ditto but for LHS of expression only
- -
std::map< std::string, std::string > string_map
+
std::vector< std::string > ordered_binary_exprs_lhs
ditto but for LHS of expression only
+ +
std::map< std::string, std::string > string_map
Represents top level AST node for whole NMODL input.
Definition: program.hpp:39
-
string_set i_ignore
set of currents to ignore
-
std::vector< std::shared_ptr< const ast::Ast > > nonspecific_nodes
non specific currents
+
string_set i_ignore
set of currents to ignore
+
std::vector< std::shared_ptr< const ast::Ast > > nonspecific_nodes
non specific currents
void visit_conductance_hint(ast::ConductanceHint &node) override
visit node of type ast::ConductanceHint
Represents binary expression in the NMODL.
diff --git a/notebooks/nmodl-kinetic-schemes.ipynb b/notebooks/nmodl-kinetic-schemes.ipynb index 7cd4a0d2bf..3dcb3bbc94 100644 --- a/notebooks/nmodl-kinetic-schemes.ipynb +++ b/notebooks/nmodl-kinetic-schemes.ipynb @@ -152,10 +152,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:20:57.963225Z", - "iopub.status.busy": "2024-07-17T08:20:57.963027Z", - "iopub.status.idle": "2024-07-17T08:20:58.817110Z", - "shell.execute_reply": "2024-07-17T08:20:58.816141Z" + "iopub.execute_input": "2024-07-17T21:11:06.333839Z", + "iopub.status.busy": "2024-07-17T21:11:06.333615Z", + "iopub.status.idle": "2024-07-17T21:11:07.140048Z", + "shell.execute_reply": "2024-07-17T21:11:07.139221Z" } }, "outputs": [], @@ -169,10 +169,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:20:58.820657Z", - "iopub.status.busy": "2024-07-17T08:20:58.820395Z", - "iopub.status.idle": "2024-07-17T08:20:58.851620Z", - "shell.execute_reply": "2024-07-17T08:20:58.850945Z" + "iopub.execute_input": "2024-07-17T21:11:07.143476Z", + "iopub.status.busy": "2024-07-17T21:11:07.143026Z", + "iopub.status.idle": "2024-07-17T21:11:07.172919Z", + "shell.execute_reply": "2024-07-17T21:11:07.172252Z" } }, "outputs": [], @@ -277,10 +277,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:20:58.854650Z", - "iopub.status.busy": "2024-07-17T08:20:58.854428Z", - "iopub.status.idle": "2024-07-17T08:20:58.859634Z", - "shell.execute_reply": "2024-07-17T08:20:58.858951Z" + "iopub.execute_input": "2024-07-17T21:11:07.175892Z", + "iopub.status.busy": "2024-07-17T21:11:07.175535Z", + "iopub.status.idle": "2024-07-17T21:11:07.180336Z", + "shell.execute_reply": "2024-07-17T21:11:07.179625Z" } }, "outputs": [ @@ -323,10 +323,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:20:58.892617Z", - "iopub.status.busy": "2024-07-17T08:20:58.892024Z", - "iopub.status.idle": "2024-07-17T08:20:58.896481Z", - "shell.execute_reply": "2024-07-17T08:20:58.895781Z" + "iopub.execute_input": "2024-07-17T21:11:07.212312Z", + "iopub.status.busy": "2024-07-17T21:11:07.211782Z", + "iopub.status.idle": "2024-07-17T21:11:07.216048Z", + "shell.execute_reply": "2024-07-17T21:11:07.215330Z" } }, "outputs": [ @@ -367,10 +367,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:20:58.899185Z", - "iopub.status.busy": "2024-07-17T08:20:58.898799Z", - "iopub.status.idle": "2024-07-17T08:20:58.903017Z", - "shell.execute_reply": "2024-07-17T08:20:58.902293Z" + "iopub.execute_input": "2024-07-17T21:11:07.218618Z", + "iopub.status.busy": "2024-07-17T21:11:07.218227Z", + "iopub.status.idle": "2024-07-17T21:11:07.222141Z", + "shell.execute_reply": "2024-07-17T21:11:07.221472Z" }, "scrolled": true }, @@ -412,10 +412,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:20:58.905746Z", - "iopub.status.busy": "2024-07-17T08:20:58.905357Z", - "iopub.status.idle": "2024-07-17T08:20:58.909164Z", - "shell.execute_reply": "2024-07-17T08:20:58.908470Z" + "iopub.execute_input": "2024-07-17T21:11:07.224597Z", + "iopub.status.busy": "2024-07-17T21:11:07.224208Z", + "iopub.status.idle": "2024-07-17T21:11:07.227905Z", + "shell.execute_reply": "2024-07-17T21:11:07.227199Z" }, "scrolled": true }, @@ -459,10 +459,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:20:58.911650Z", - "iopub.status.busy": "2024-07-17T08:20:58.911447Z", - "iopub.status.idle": "2024-07-17T08:20:58.916157Z", - "shell.execute_reply": "2024-07-17T08:20:58.915458Z" + "iopub.execute_input": "2024-07-17T21:11:07.230540Z", + "iopub.status.busy": "2024-07-17T21:11:07.230161Z", + "iopub.status.idle": "2024-07-17T21:11:07.234396Z", + "shell.execute_reply": "2024-07-17T21:11:07.233726Z" } }, "outputs": [ diff --git a/notebooks/nmodl-python-tutorial.ipynb b/notebooks/nmodl-python-tutorial.ipynb index 4403318ef5..8c88298c2e 100644 --- a/notebooks/nmodl-python-tutorial.ipynb +++ b/notebooks/nmodl-python-tutorial.ipynb @@ -30,10 +30,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:04.521812Z", - "iopub.status.busy": "2024-07-17T08:21:04.521241Z", - "iopub.status.idle": "2024-07-17T08:21:05.362924Z", - "shell.execute_reply": "2024-07-17T08:21:05.362029Z" + "iopub.execute_input": "2024-07-17T21:11:15.763099Z", + "iopub.status.busy": "2024-07-17T21:11:15.762889Z", + "iopub.status.idle": "2024-07-17T21:11:16.556208Z", + "shell.execute_reply": "2024-07-17T21:11:16.555386Z" } }, "outputs": [], @@ -63,10 +63,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:05.366328Z", - "iopub.status.busy": "2024-07-17T08:21:05.366098Z", - "iopub.status.idle": "2024-07-17T08:21:05.393757Z", - "shell.execute_reply": "2024-07-17T08:21:05.393010Z" + "iopub.execute_input": "2024-07-17T21:11:16.559203Z", + "iopub.status.busy": "2024-07-17T21:11:16.558980Z", + "iopub.status.idle": "2024-07-17T21:11:16.586804Z", + "shell.execute_reply": "2024-07-17T21:11:16.586217Z" } }, "outputs": [], @@ -86,10 +86,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:05.396796Z", - "iopub.status.busy": "2024-07-17T08:21:05.396230Z", - "iopub.status.idle": "2024-07-17T08:21:05.400101Z", - "shell.execute_reply": "2024-07-17T08:21:05.399549Z" + "iopub.execute_input": "2024-07-17T21:11:16.589624Z", + "iopub.status.busy": "2024-07-17T21:11:16.589207Z", + "iopub.status.idle": "2024-07-17T21:11:16.592856Z", + "shell.execute_reply": "2024-07-17T21:11:16.592231Z" } }, "outputs": [], @@ -152,10 +152,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:05.402631Z", - "iopub.status.busy": "2024-07-17T08:21:05.402279Z", - "iopub.status.idle": "2024-07-17T08:21:05.406076Z", - "shell.execute_reply": "2024-07-17T08:21:05.405502Z" + "iopub.execute_input": "2024-07-17T21:11:16.595432Z", + "iopub.status.busy": "2024-07-17T21:11:16.595066Z", + "iopub.status.idle": "2024-07-17T21:11:16.598919Z", + "shell.execute_reply": "2024-07-17T21:11:16.598218Z" } }, "outputs": [], @@ -183,10 +183,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:05.408520Z", - "iopub.status.busy": "2024-07-17T08:21:05.408204Z", - "iopub.status.idle": "2024-07-17T08:21:05.412204Z", - "shell.execute_reply": "2024-07-17T08:21:05.411492Z" + "iopub.execute_input": "2024-07-17T21:11:16.601488Z", + "iopub.status.busy": "2024-07-17T21:11:16.601132Z", + "iopub.status.idle": "2024-07-17T21:11:16.605081Z", + "shell.execute_reply": "2024-07-17T21:11:16.604365Z" } }, "outputs": [ @@ -235,10 +235,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:05.414627Z", - "iopub.status.busy": "2024-07-17T08:21:05.414255Z", - "iopub.status.idle": "2024-07-17T08:21:05.418003Z", - "shell.execute_reply": "2024-07-17T08:21:05.417479Z" + "iopub.execute_input": "2024-07-17T21:11:16.607369Z", + "iopub.status.busy": "2024-07-17T21:11:16.607163Z", + "iopub.status.idle": "2024-07-17T21:11:16.611313Z", + "shell.execute_reply": "2024-07-17T21:11:16.610680Z" } }, "outputs": [], @@ -260,10 +260,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:05.420349Z", - "iopub.status.busy": "2024-07-17T08:21:05.420051Z", - "iopub.status.idle": "2024-07-17T08:21:05.423950Z", - "shell.execute_reply": "2024-07-17T08:21:05.423284Z" + "iopub.execute_input": "2024-07-17T21:11:16.613806Z", + "iopub.status.busy": "2024-07-17T21:11:16.613458Z", + "iopub.status.idle": "2024-07-17T21:11:16.617134Z", + "shell.execute_reply": "2024-07-17T21:11:16.616480Z" } }, "outputs": [ @@ -297,10 +297,10 @@ "execution_count": 8, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:05.426433Z", - "iopub.status.busy": "2024-07-17T08:21:05.426124Z", - "iopub.status.idle": "2024-07-17T08:21:05.433656Z", - "shell.execute_reply": "2024-07-17T08:21:05.432952Z" + "iopub.execute_input": "2024-07-17T21:11:16.619719Z", + "iopub.status.busy": "2024-07-17T21:11:16.619254Z", + "iopub.status.idle": "2024-07-17T21:11:16.626561Z", + "shell.execute_reply": "2024-07-17T21:11:16.625878Z" } }, "outputs": [ @@ -365,10 +365,10 @@ "execution_count": 9, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:05.436207Z", - "iopub.status.busy": "2024-07-17T08:21:05.435785Z", - "iopub.status.idle": "2024-07-17T08:21:05.440305Z", - "shell.execute_reply": "2024-07-17T08:21:05.439631Z" + "iopub.execute_input": "2024-07-17T21:11:16.629062Z", + "iopub.status.busy": "2024-07-17T21:11:16.628854Z", + "iopub.status.idle": "2024-07-17T21:11:16.633047Z", + "shell.execute_reply": "2024-07-17T21:11:16.632370Z" } }, "outputs": [ @@ -416,10 +416,10 @@ "execution_count": 10, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:05.442816Z", - "iopub.status.busy": "2024-07-17T08:21:05.442431Z", - "iopub.status.idle": "2024-07-17T08:21:05.445741Z", - "shell.execute_reply": "2024-07-17T08:21:05.445183Z" + "iopub.execute_input": "2024-07-17T21:11:16.635472Z", + "iopub.status.busy": "2024-07-17T21:11:16.635267Z", + "iopub.status.idle": "2024-07-17T21:11:16.638460Z", + "shell.execute_reply": "2024-07-17T21:11:16.637925Z" } }, "outputs": [], @@ -441,10 +441,10 @@ "execution_count": 11, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:05.448170Z", - "iopub.status.busy": "2024-07-17T08:21:05.447712Z", - "iopub.status.idle": "2024-07-17T08:21:05.451509Z", - "shell.execute_reply": "2024-07-17T08:21:05.450888Z" + "iopub.execute_input": "2024-07-17T21:11:16.640836Z", + "iopub.status.busy": "2024-07-17T21:11:16.640634Z", + "iopub.status.idle": "2024-07-17T21:11:16.644433Z", + "shell.execute_reply": "2024-07-17T21:11:16.643746Z" } }, "outputs": [ @@ -510,10 +510,10 @@ "execution_count": 12, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:05.454038Z", - "iopub.status.busy": "2024-07-17T08:21:05.453651Z", - "iopub.status.idle": "2024-07-17T08:21:05.457303Z", - "shell.execute_reply": "2024-07-17T08:21:05.456593Z" + "iopub.execute_input": "2024-07-17T21:11:16.646878Z", + "iopub.status.busy": "2024-07-17T21:11:16.646671Z", + "iopub.status.idle": "2024-07-17T21:11:16.650020Z", + "shell.execute_reply": "2024-07-17T21:11:16.649343Z" } }, "outputs": [ @@ -548,10 +548,10 @@ "execution_count": 13, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:05.459834Z", - "iopub.status.busy": "2024-07-17T08:21:05.459449Z", - "iopub.status.idle": "2024-07-17T08:21:05.463203Z", - "shell.execute_reply": "2024-07-17T08:21:05.462536Z" + "iopub.execute_input": "2024-07-17T21:11:16.652399Z", + "iopub.status.busy": "2024-07-17T21:11:16.652195Z", + "iopub.status.idle": "2024-07-17T21:11:16.655625Z", + "shell.execute_reply": "2024-07-17T21:11:16.654968Z" } }, "outputs": [ @@ -584,10 +584,10 @@ "execution_count": 14, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:05.465700Z", - "iopub.status.busy": "2024-07-17T08:21:05.465319Z", - "iopub.status.idle": "2024-07-17T08:21:05.469212Z", - "shell.execute_reply": "2024-07-17T08:21:05.468537Z" + "iopub.execute_input": "2024-07-17T21:11:16.658166Z", + "iopub.status.busy": "2024-07-17T21:11:16.657777Z", + "iopub.status.idle": "2024-07-17T21:11:16.661372Z", + "shell.execute_reply": "2024-07-17T21:11:16.660702Z" } }, "outputs": [ @@ -622,10 +622,10 @@ "execution_count": 15, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:05.471630Z", - "iopub.status.busy": "2024-07-17T08:21:05.471243Z", - "iopub.status.idle": "2024-07-17T08:21:05.475550Z", - "shell.execute_reply": "2024-07-17T08:21:05.474970Z" + "iopub.execute_input": "2024-07-17T21:11:16.663644Z", + "iopub.status.busy": "2024-07-17T21:11:16.663443Z", + "iopub.status.idle": "2024-07-17T21:11:16.667499Z", + "shell.execute_reply": "2024-07-17T21:11:16.666843Z" } }, "outputs": [ @@ -669,10 +669,10 @@ "execution_count": 16, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:05.478045Z", - "iopub.status.busy": "2024-07-17T08:21:05.477619Z", - "iopub.status.idle": "2024-07-17T08:21:05.483373Z", - "shell.execute_reply": "2024-07-17T08:21:05.482691Z" + "iopub.execute_input": "2024-07-17T21:11:16.669795Z", + "iopub.status.busy": "2024-07-17T21:11:16.669594Z", + "iopub.status.idle": "2024-07-17T21:11:16.675245Z", + "shell.execute_reply": "2024-07-17T21:11:16.674568Z" } }, "outputs": [ @@ -733,10 +733,10 @@ "execution_count": 17, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:05.485905Z", - "iopub.status.busy": "2024-07-17T08:21:05.485542Z", - "iopub.status.idle": "2024-07-17T08:21:05.489178Z", - "shell.execute_reply": "2024-07-17T08:21:05.488498Z" + "iopub.execute_input": "2024-07-17T21:11:16.677624Z", + "iopub.status.busy": "2024-07-17T21:11:16.677422Z", + "iopub.status.idle": "2024-07-17T21:11:16.680895Z", + "shell.execute_reply": "2024-07-17T21:11:16.680289Z" } }, "outputs": [], @@ -761,10 +761,10 @@ "execution_count": 18, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:05.491698Z", - "iopub.status.busy": "2024-07-17T08:21:05.491207Z", - "iopub.status.idle": "2024-07-17T08:21:05.501525Z", - "shell.execute_reply": "2024-07-17T08:21:05.500984Z" + "iopub.execute_input": "2024-07-17T21:11:16.683132Z", + "iopub.status.busy": "2024-07-17T21:11:16.682931Z", + "iopub.status.idle": "2024-07-17T21:11:16.693079Z", + "shell.execute_reply": "2024-07-17T21:11:16.692496Z" } }, "outputs": [], @@ -857,10 +857,10 @@ "execution_count": 19, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:05.503919Z", - "iopub.status.busy": "2024-07-17T08:21:05.503532Z", - "iopub.status.idle": "2024-07-17T08:21:05.507351Z", - "shell.execute_reply": "2024-07-17T08:21:05.506682Z" + "iopub.execute_input": "2024-07-17T21:11:16.695527Z", + "iopub.status.busy": "2024-07-17T21:11:16.695146Z", + "iopub.status.idle": "2024-07-17T21:11:16.698873Z", + "shell.execute_reply": "2024-07-17T21:11:16.698204Z" } }, "outputs": [ @@ -897,10 +897,10 @@ "execution_count": 20, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:05.509842Z", - "iopub.status.busy": "2024-07-17T08:21:05.509457Z", - "iopub.status.idle": "2024-07-17T08:21:05.515284Z", - "shell.execute_reply": "2024-07-17T08:21:05.514604Z" + "iopub.execute_input": "2024-07-17T21:11:16.701532Z", + "iopub.status.busy": "2024-07-17T21:11:16.701070Z", + "iopub.status.idle": "2024-07-17T21:11:16.706664Z", + "shell.execute_reply": "2024-07-17T21:11:16.706020Z" } }, "outputs": [ diff --git a/notebooks/nmodl-sympy-conductance.ipynb b/notebooks/nmodl-sympy-conductance.ipynb index b71bf53ca0..6f698ec7b2 100644 --- a/notebooks/nmodl-sympy-conductance.ipynb +++ b/notebooks/nmodl-sympy-conductance.ipynb @@ -86,10 +86,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:07.799173Z", - "iopub.status.busy": "2024-07-17T08:21:07.798616Z", - "iopub.status.idle": "2024-07-17T08:21:08.589332Z", - "shell.execute_reply": "2024-07-17T08:21:08.588277Z" + "iopub.execute_input": "2024-07-17T21:11:19.091746Z", + "iopub.status.busy": "2024-07-17T21:11:19.091543Z", + "iopub.status.idle": "2024-07-17T21:11:19.880201Z", + "shell.execute_reply": "2024-07-17T21:11:19.879360Z" } }, "outputs": [], @@ -103,10 +103,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:08.592952Z", - "iopub.status.busy": "2024-07-17T08:21:08.592624Z", - "iopub.status.idle": "2024-07-17T08:21:08.626040Z", - "shell.execute_reply": "2024-07-17T08:21:08.625400Z" + "iopub.execute_input": "2024-07-17T21:11:19.883557Z", + "iopub.status.busy": "2024-07-17T21:11:19.883109Z", + "iopub.status.idle": "2024-07-17T21:11:19.912930Z", + "shell.execute_reply": "2024-07-17T21:11:19.912247Z" } }, "outputs": [], @@ -149,10 +149,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:08.628841Z", - "iopub.status.busy": "2024-07-17T08:21:08.628440Z", - "iopub.status.idle": "2024-07-17T08:21:08.904562Z", - "shell.execute_reply": "2024-07-17T08:21:08.903853Z" + "iopub.execute_input": "2024-07-17T21:11:19.915637Z", + "iopub.status.busy": "2024-07-17T21:11:19.915313Z", + "iopub.status.idle": "2024-07-17T21:11:20.205003Z", + "shell.execute_reply": "2024-07-17T21:11:20.204306Z" } }, "outputs": [ @@ -196,10 +196,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:08.907388Z", - "iopub.status.busy": "2024-07-17T08:21:08.906867Z", - "iopub.status.idle": "2024-07-17T08:21:09.038000Z", - "shell.execute_reply": "2024-07-17T08:21:09.037272Z" + "iopub.execute_input": "2024-07-17T21:11:20.207943Z", + "iopub.status.busy": "2024-07-17T21:11:20.207512Z", + "iopub.status.idle": "2024-07-17T21:11:20.339546Z", + "shell.execute_reply": "2024-07-17T21:11:20.338864Z" } }, "outputs": [ @@ -243,10 +243,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:09.040819Z", - "iopub.status.busy": "2024-07-17T08:21:09.040407Z", - "iopub.status.idle": "2024-07-17T08:21:09.048849Z", - "shell.execute_reply": "2024-07-17T08:21:09.048254Z" + "iopub.execute_input": "2024-07-17T21:11:20.342201Z", + "iopub.status.busy": "2024-07-17T21:11:20.341985Z", + "iopub.status.idle": "2024-07-17T21:11:20.350139Z", + "shell.execute_reply": "2024-07-17T21:11:20.349445Z" } }, "outputs": [ @@ -290,10 +290,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:09.051413Z", - "iopub.status.busy": "2024-07-17T08:21:09.051049Z", - "iopub.status.idle": "2024-07-17T08:21:09.068654Z", - "shell.execute_reply": "2024-07-17T08:21:09.068100Z" + "iopub.execute_input": "2024-07-17T21:11:20.352814Z", + "iopub.status.busy": "2024-07-17T21:11:20.352345Z", + "iopub.status.idle": "2024-07-17T21:11:20.370453Z", + "shell.execute_reply": "2024-07-17T21:11:20.369924Z" } }, "outputs": [ @@ -337,10 +337,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:09.071316Z", - "iopub.status.busy": "2024-07-17T08:21:09.070943Z", - "iopub.status.idle": "2024-07-17T08:21:09.192047Z", - "shell.execute_reply": "2024-07-17T08:21:09.191265Z" + "iopub.execute_input": "2024-07-17T21:11:20.372836Z", + "iopub.status.busy": "2024-07-17T21:11:20.372638Z", + "iopub.status.idle": "2024-07-17T21:11:20.491962Z", + "shell.execute_reply": "2024-07-17T21:11:20.491224Z" } }, "outputs": [ @@ -400,10 +400,10 @@ "execution_count": 8, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:09.194994Z", - "iopub.status.busy": "2024-07-17T08:21:09.194463Z", - "iopub.status.idle": "2024-07-17T08:21:09.291489Z", - "shell.execute_reply": "2024-07-17T08:21:09.290755Z" + "iopub.execute_input": "2024-07-17T21:11:20.494942Z", + "iopub.status.busy": "2024-07-17T21:11:20.494406Z", + "iopub.status.idle": "2024-07-17T21:11:20.591045Z", + "shell.execute_reply": "2024-07-17T21:11:20.590346Z" } }, "outputs": [ @@ -456,10 +456,10 @@ "execution_count": 9, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:09.294434Z", - "iopub.status.busy": "2024-07-17T08:21:09.293906Z", - "iopub.status.idle": "2024-07-17T08:21:09.370120Z", - "shell.execute_reply": "2024-07-17T08:21:09.369403Z" + "iopub.execute_input": "2024-07-17T21:11:20.593728Z", + "iopub.status.busy": "2024-07-17T21:11:20.593517Z", + "iopub.status.idle": "2024-07-17T21:11:20.669296Z", + "shell.execute_reply": "2024-07-17T21:11:20.668640Z" } }, "outputs": [ diff --git a/notebooks/nmodl-sympy-solver-cnexp.ipynb b/notebooks/nmodl-sympy-solver-cnexp.ipynb index 9ea31ef24c..34e8133f7f 100644 --- a/notebooks/nmodl-sympy-solver-cnexp.ipynb +++ b/notebooks/nmodl-sympy-solver-cnexp.ipynb @@ -62,10 +62,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:11.255136Z", - "iopub.status.busy": "2024-07-17T08:21:11.254913Z", - "iopub.status.idle": "2024-07-17T08:21:12.121042Z", - "shell.execute_reply": "2024-07-17T08:21:12.120137Z" + "iopub.execute_input": "2024-07-17T21:11:22.425415Z", + "iopub.status.busy": "2024-07-17T21:11:22.424859Z", + "iopub.status.idle": "2024-07-17T21:11:23.203178Z", + "shell.execute_reply": "2024-07-17T21:11:23.202302Z" } }, "outputs": [], @@ -79,10 +79,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:12.124542Z", - "iopub.status.busy": "2024-07-17T08:21:12.124247Z", - "iopub.status.idle": "2024-07-17T08:21:12.156974Z", - "shell.execute_reply": "2024-07-17T08:21:12.156152Z" + "iopub.execute_input": "2024-07-17T21:11:23.206835Z", + "iopub.status.busy": "2024-07-17T21:11:23.206230Z", + "iopub.status.idle": "2024-07-17T21:11:23.236324Z", + "shell.execute_reply": "2024-07-17T21:11:23.235660Z" } }, "outputs": [], @@ -123,10 +123,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:12.160430Z", - "iopub.status.busy": "2024-07-17T08:21:12.160117Z", - "iopub.status.idle": "2024-07-17T08:21:12.621667Z", - "shell.execute_reply": "2024-07-17T08:21:12.620861Z" + "iopub.execute_input": "2024-07-17T21:11:23.239175Z", + "iopub.status.busy": "2024-07-17T21:11:23.238655Z", + "iopub.status.idle": "2024-07-17T21:11:23.653057Z", + "shell.execute_reply": "2024-07-17T21:11:23.652310Z" } }, "outputs": [ @@ -165,10 +165,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:12.624566Z", - "iopub.status.busy": "2024-07-17T08:21:12.624023Z", - "iopub.status.idle": "2024-07-17T08:21:12.740513Z", - "shell.execute_reply": "2024-07-17T08:21:12.739761Z" + "iopub.execute_input": "2024-07-17T21:11:23.655688Z", + "iopub.status.busy": "2024-07-17T21:11:23.655439Z", + "iopub.status.idle": "2024-07-17T21:11:23.768237Z", + "shell.execute_reply": "2024-07-17T21:11:23.767478Z" } }, "outputs": [ @@ -207,10 +207,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:12.743453Z", - "iopub.status.busy": "2024-07-17T08:21:12.742916Z", - "iopub.status.idle": "2024-07-17T08:21:12.945300Z", - "shell.execute_reply": "2024-07-17T08:21:12.944535Z" + "iopub.execute_input": "2024-07-17T21:11:23.771090Z", + "iopub.status.busy": "2024-07-17T21:11:23.770597Z", + "iopub.status.idle": "2024-07-17T21:11:23.970417Z", + "shell.execute_reply": "2024-07-17T21:11:23.969756Z" } }, "outputs": [ @@ -255,10 +255,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:12.948149Z", - "iopub.status.busy": "2024-07-17T08:21:12.947917Z", - "iopub.status.idle": "2024-07-17T08:21:13.112854Z", - "shell.execute_reply": "2024-07-17T08:21:13.112114Z" + "iopub.execute_input": "2024-07-17T21:11:23.973133Z", + "iopub.status.busy": "2024-07-17T21:11:23.972742Z", + "iopub.status.idle": "2024-07-17T21:11:24.132291Z", + "shell.execute_reply": "2024-07-17T21:11:24.131428Z" } }, "outputs": [ @@ -303,10 +303,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:13.115679Z", - "iopub.status.busy": "2024-07-17T08:21:13.115453Z", - "iopub.status.idle": "2024-07-17T08:21:14.935381Z", - "shell.execute_reply": "2024-07-17T08:21:14.934632Z" + "iopub.execute_input": "2024-07-17T21:11:24.134954Z", + "iopub.status.busy": "2024-07-17T21:11:24.134551Z", + "iopub.status.idle": "2024-07-17T21:11:25.941888Z", + "shell.execute_reply": "2024-07-17T21:11:25.941219Z" } }, "outputs": [ @@ -351,10 +351,10 @@ "execution_count": 8, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:14.938042Z", - "iopub.status.busy": "2024-07-17T08:21:14.937802Z", - "iopub.status.idle": "2024-07-17T08:21:17.212903Z", - "shell.execute_reply": "2024-07-17T08:21:17.212223Z" + "iopub.execute_input": "2024-07-17T21:11:25.944652Z", + "iopub.status.busy": "2024-07-17T21:11:25.944220Z", + "iopub.status.idle": "2024-07-17T21:11:28.182022Z", + "shell.execute_reply": "2024-07-17T21:11:28.181280Z" } }, "outputs": [ diff --git a/notebooks/nmodl-sympy-solver-derivimplicit.ipynb b/notebooks/nmodl-sympy-solver-derivimplicit.ipynb index d9febfd426..5f6aef5da9 100644 --- a/notebooks/nmodl-sympy-solver-derivimplicit.ipynb +++ b/notebooks/nmodl-sympy-solver-derivimplicit.ipynb @@ -39,10 +39,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:19.148887Z", - "iopub.status.busy": "2024-07-17T08:21:19.148454Z", - "iopub.status.idle": "2024-07-17T08:21:20.002107Z", - "shell.execute_reply": "2024-07-17T08:21:20.001171Z" + "iopub.execute_input": "2024-07-17T21:11:29.888338Z", + "iopub.status.busy": "2024-07-17T21:11:29.887740Z", + "iopub.status.idle": "2024-07-17T21:11:30.698914Z", + "shell.execute_reply": "2024-07-17T21:11:30.697970Z" } }, "outputs": [], @@ -56,10 +56,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:20.005679Z", - "iopub.status.busy": "2024-07-17T08:21:20.005397Z", - "iopub.status.idle": "2024-07-17T08:21:20.038904Z", - "shell.execute_reply": "2024-07-17T08:21:20.038171Z" + "iopub.execute_input": "2024-07-17T21:11:30.703224Z", + "iopub.status.busy": "2024-07-17T21:11:30.702699Z", + "iopub.status.idle": "2024-07-17T21:11:30.733975Z", + "shell.execute_reply": "2024-07-17T21:11:30.733287Z" } }, "outputs": [], @@ -100,10 +100,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:20.042589Z", - "iopub.status.busy": "2024-07-17T08:21:20.041997Z", - "iopub.status.idle": "2024-07-17T08:21:20.557352Z", - "shell.execute_reply": "2024-07-17T08:21:20.556542Z" + "iopub.execute_input": "2024-07-17T21:11:30.737144Z", + "iopub.status.busy": "2024-07-17T21:11:30.736722Z", + "iopub.status.idle": "2024-07-17T21:11:31.204246Z", + "shell.execute_reply": "2024-07-17T21:11:31.203490Z" } }, "outputs": [ @@ -165,10 +165,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:20.559949Z", - "iopub.status.busy": "2024-07-17T08:21:20.559688Z", - "iopub.status.idle": "2024-07-17T08:21:20.784804Z", - "shell.execute_reply": "2024-07-17T08:21:20.784096Z" + "iopub.execute_input": "2024-07-17T21:11:31.206992Z", + "iopub.status.busy": "2024-07-17T21:11:31.206739Z", + "iopub.status.idle": "2024-07-17T21:11:31.422863Z", + "shell.execute_reply": "2024-07-17T21:11:31.422141Z" } }, "outputs": [ diff --git a/notebooks/nmodl-sympy-solver-sparse.ipynb b/notebooks/nmodl-sympy-solver-sparse.ipynb index 86dc62417c..32c4847e5b 100644 --- a/notebooks/nmodl-sympy-solver-sparse.ipynb +++ b/notebooks/nmodl-sympy-solver-sparse.ipynb @@ -39,10 +39,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:22.253154Z", - "iopub.status.busy": "2024-07-17T08:21:22.252925Z", - "iopub.status.idle": "2024-07-17T08:21:23.066156Z", - "shell.execute_reply": "2024-07-17T08:21:23.065389Z" + "iopub.execute_input": "2024-07-17T21:11:32.719285Z", + "iopub.status.busy": "2024-07-17T21:11:32.719080Z", + "iopub.status.idle": "2024-07-17T21:11:33.515467Z", + "shell.execute_reply": "2024-07-17T21:11:33.514637Z" } }, "outputs": [], @@ -56,10 +56,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:23.069460Z", - "iopub.status.busy": "2024-07-17T08:21:23.069036Z", - "iopub.status.idle": "2024-07-17T08:21:23.100117Z", - "shell.execute_reply": "2024-07-17T08:21:23.099407Z" + "iopub.execute_input": "2024-07-17T21:11:33.518518Z", + "iopub.status.busy": "2024-07-17T21:11:33.518294Z", + "iopub.status.idle": "2024-07-17T21:11:33.548688Z", + "shell.execute_reply": "2024-07-17T21:11:33.547932Z" } }, "outputs": [], @@ -100,10 +100,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:23.103365Z", - "iopub.status.busy": "2024-07-17T08:21:23.102940Z", - "iopub.status.idle": "2024-07-17T08:21:23.598396Z", - "shell.execute_reply": "2024-07-17T08:21:23.597625Z" + "iopub.execute_input": "2024-07-17T21:11:33.551693Z", + "iopub.status.busy": "2024-07-17T21:11:33.551277Z", + "iopub.status.idle": "2024-07-17T21:11:34.014714Z", + "shell.execute_reply": "2024-07-17T21:11:34.013851Z" } }, "outputs": [ @@ -165,10 +165,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-07-17T08:21:23.601274Z", - "iopub.status.busy": "2024-07-17T08:21:23.600820Z", - "iopub.status.idle": "2024-07-17T08:21:23.822929Z", - "shell.execute_reply": "2024-07-17T08:21:23.822180Z" + "iopub.execute_input": "2024-07-17T21:11:34.018110Z", + "iopub.status.busy": "2024-07-17T21:11:34.017661Z", + "iopub.status.idle": "2024-07-17T21:11:34.234341Z", + "shell.execute_reply": "2024-07-17T21:11:34.233568Z" } }, "outputs": [