Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pystencils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pycodegen
pystencils
Merge requests
!57
Add AssignmentCollection.{free_fields,bound_fields}
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Add AssignmentCollection.{free_fields,bound_fields}
seitz/pystencils:AssignmentCollection.free-bound_fields
into
master
Overview
0
Commits
1
Pipelines
1
Changes
1
Merged
Stephan Seitz
requested to merge
seitz/pystencils:AssignmentCollection.free-bound_fields
into
master
5 years ago
Overview
0
Commits
1
Pipelines
1
Changes
1
Expand
Wasn't this merged already?
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
4c225c82
1 commit,
5 years ago
1 file
+
9
−
0
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
pystencils/simp/assignment_collection.py
+
9
−
0
Options
@@ -111,6 +111,15 @@ class AssignmentCollection:
@@ -111,6 +111,15 @@ class AssignmentCollection:
"
Not in SSA form - same symbol assigned multiple times
"
"
Not in SSA form - same symbol assigned multiple times
"
return
bound_symbols_set
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
@property
def
defined_symbols
(
self
)
->
Set
[
sp
.
Symbol
]:
def
defined_symbols
(
self
)
->
Set
[
sp
.
Symbol
]:
"""
All symbols which occur as left-hand-sides of one of the main equations
"""
"""
All symbols which occur as left-hand-sides of one of the main equations
"""
Loading