@@ -113,7 +113,7 @@ function IndexCache(sys::AbstractSystem)
113
113
error (" Discrete subsystem $i input $inp is not a parameter" )
114
114
disc_clocks[inp] = i
115
115
disc_clocks[default_toterm (inp)] = i
116
- if hasname (inp) && (! istree (inp) || operation (inp) != = getindex)
116
+ if hasname (inp) && (! iscall (inp) || operation (inp) != = getindex)
117
117
disc_clocks[getname (inp)] = i
118
118
disc_clocks[default_toterm (inp)] = i
119
119
end
@@ -126,7 +126,7 @@ function IndexCache(sys::AbstractSystem)
126
126
error (" Discrete subsystem $i unknown $sym is not a parameter" )
127
127
disc_clocks[sym] = i
128
128
disc_clocks[default_toterm (sym)] = i
129
- if hasname (sym) && (! istree (sym) || operation (sym) != = getindex)
129
+ if hasname (sym) && (! iscall (sym) || operation (sym) != = getindex)
130
130
disc_clocks[getname (sym)] = i
131
131
disc_clocks[getname (default_toterm (sym))] = i
132
132
end
@@ -138,13 +138,13 @@ function IndexCache(sys::AbstractSystem)
138
138
# FIXME : This shouldn't be necessary
139
139
eq. rhs === - 0.0 && continue
140
140
sym = eq. lhs
141
- if istree (sym) && operation (sym) == Shift (t, 1 )
141
+ if iscall (sym) && operation (sym) == Shift (t, 1 )
142
142
sym = only (arguments (sym))
143
143
end
144
144
disc_clocks[sym] = i
145
145
disc_clocks[sym] = i
146
146
disc_clocks[default_toterm (sym)] = i
147
- if hasname (sym) && (! istree (sym) || operation (sym) != = getindex)
147
+ if hasname (sym) && (! iscall (sym) || operation (sym) != = getindex)
148
148
disc_clocks[getname (sym)] = i
149
149
disc_clocks[getname (default_toterm (sym))] = i
150
150
end
@@ -153,7 +153,7 @@ function IndexCache(sys::AbstractSystem)
153
153
154
154
for par in inputs[continuous_id]
155
155
is_parameter (sys, par) || error (" Discrete subsystem input is not a parameter" )
156
- istree (par) && operation (par) isa Hold ||
156
+ iscall (par) && operation (par) isa Hold ||
157
157
error (" Continuous subsystem input is not a Hold" )
158
158
if haskey (disc_clocks, par)
159
159
sym = par
@@ -176,7 +176,7 @@ function IndexCache(sys::AbstractSystem)
176
176
disc_clocks[affect. lhs] = user_affect_clock
177
177
disc_clocks[default_toterm (affect. lhs)] = user_affect_clock
178
178
if hasname (affect. lhs) &&
179
- (! istree (affect. lhs) || operation (affect. lhs) != = getindex)
179
+ (! iscall (affect. lhs) || operation (affect. lhs) != = getindex)
180
180
disc_clocks[getname (affect. lhs)] = user_affect_clock
181
181
disc_clocks[getname (default_toterm (affect. lhs))] = user_affect_clock
182
182
end
@@ -190,7 +190,7 @@ function IndexCache(sys::AbstractSystem)
190
190
disc = unwrap (disc)
191
191
disc_clocks[disc] = user_affect_clock
192
192
disc_clocks[default_toterm (disc)] = user_affect_clock
193
- if hasname (disc) && (! istree (disc) || operation (disc) != = getindex)
193
+ if hasname (disc) && (! iscall (disc) || operation (disc) != = getindex)
194
194
disc_clocks[getname (disc)] = user_affect_clock
195
195
disc_clocks[getname (default_toterm (disc))] = user_affect_clock
196
196
end
@@ -245,7 +245,7 @@ function IndexCache(sys::AbstractSystem)
245
245
for (j, sym) in enumerate (buffer[btype])
246
246
disc_idxs[sym] = (clockidx, i, j)
247
247
disc_idxs[default_toterm (sym)] = (clockidx, i, j)
248
- if hasname (sym) && (! istree (sym) || operation (sym) != = getindex)
248
+ if hasname (sym) && (! iscall (sym) || operation (sym) != = getindex)
249
249
disc_idxs[getname (sym)] = (clockidx, i, j)
250
250
disc_idxs[getname (default_toterm (sym))] = (clockidx, i, j)
251
251
end
@@ -256,7 +256,7 @@ function IndexCache(sys::AbstractSystem)
256
256
haskey (disc_idxs, sym) && continue
257
257
disc_idxs[sym] = (clockid, 0 , 0 )
258
258
disc_idxs[default_toterm (sym)] = (clockid, 0 , 0 )
259
- if hasname (sym) && (! istree (sym) || operation (sym) != = getindex)
259
+ if hasname (sym) && (! iscall (sym) || operation (sym) != = getindex)
260
260
disc_idxs[getname (sym)] = (clockid, 0 , 0 )
261
261
disc_idxs[getname (default_toterm (sym))] = (clockid, 0 , 0 )
262
262
end
0 commit comments