Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jonas Plewinski
pystencils
Commits
4c225c82
Commit
4c225c82
authored
Sep 25, 2019
by
Stephan Seitz
Browse files
Add AssignmentCollection.{free_fields,bound_fields}
parent
0a8c16b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
pystencils/simp/assignment_collection.py
View file @
4c225c82
...
...
@@ -111,6 +111,15 @@ class AssignmentCollection:
"Not in SSA form - same symbol assigned multiple times"
return
bound_symbols_set
def
free_fields
(
self
):
"""All fields accessed in the assignment collection, which do not occur as left hand sides in any assignment."""
return
{
s
.
field
for
s
in
self
.
free_symbols
if
hasattr
(
s
,
'field'
)}
@
property
def
bound_fields
(
self
):
"""All field accessed on the left hand side of a main assignment or a subexpression."""
return
{
s
.
field
for
s
in
self
.
bound_symbols
if
hasattr
(
s
,
'field'
)}
@
property
def
defined_symbols
(
self
)
->
Set
[
sp
.
Symbol
]:
"""All symbols which occur as left-hand-sides of one of the main equations"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment