Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cs444
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xun Yang
cs444
Merge requests
!8
implemented reachability checking. passing 56 test cases locally
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
implemented reachability checking. passing 56 test cases locally
reachabilityCheck
into
master
Overview
0
Commits
1
Pipelines
0
Changes
6
Merged
Pui Yan Chloe Sham
requested to merge
reachabilityCheck
into
master
5 years ago
Overview
0
Commits
1
Pipelines
0
Changes
6
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
de31ad20
1 commit,
5 years ago
6 files
+
123
−
81
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
6
Search (e.g. *.vue) (Ctrl+P)
AST.py
+
2
−
20
Options
@@ -68,28 +68,10 @@ class ASTNode():
if
c
and
hasattr
(
c
,
'
checkType
'
):
c
.
checkType
()
def
staticAnalysis
(
self
):
for
c
in
self
.
children
:
if
c
and
hasattr
(
c
,
'
staticAnalysis
'
):
c
.
staticAnalysis
()
# return outMaybe
def
reachCheck
(
self
,
inMaybe
=
True
):
if
inMaybe
==
False
:
# error if in[s] = no for any s
# I don't think it should get to here... but maybe?
raise
Exception
(
"
in[s] = no for a certain {}
"
.
format
(
type
(
self
)))
self
.
inMaybe
=
inMaybe
self
.
outMaybe
=
self
.
inMaybe
lastOut
=
self
.
inMaybe
def
reachCheck
(
self
,
inMaybe
=
True
):
for
c
in
self
.
children
:
if
c
and
hasattr
(
c
,
'
reachCheck
'
):
lastOut
=
c
.
reachCheck
(
lastOut
)
self
.
outMaybe
=
self
.
outMaybe
and
lastOut
return
self
.
outMaybe
c
.
reachCheck
(
inMaybe
)
def
printNodePretty
(
self
,
prefix
=
0
):
pp
=
pprint
.
PrettyPrinter
(
indent
=
prefix
)
Loading