Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
csci71-lib
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Brian Guadalupe
csci71-lib
Commits
59009bf7
Commit
59009bf7
authored
Mar 16, 2023
by
Brian Guadalupe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed program line indicator to not advance to the next line when program halts
parent
83c5edff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
tmachine.rkt
tm/tmachine.rkt
+5
-6
No files found.
tm/tmachine.rkt
View file @
59009bf7
...
@@ -166,13 +166,12 @@
...
@@ -166,13 +166,12 @@
(
define
line-before
(
tm-config-line-no
tm
))
(
define
line-before
(
tm-config-line-no
tm
))
(
define
stmt
(
vector-ref
(
tm-config-program
tm
)
(
tm-config-line-no
tm
)))
(
define
stmt
(
vector-ref
(
tm-config-program
tm
)
(
tm-config-line-no
tm
)))
(
execute-statement!
tm
stmt
)
(
execute-statement!
tm
stmt
)
(
when
(
not
(
eq?
(
tm-config-state
tm
)
'running
))
(
void
))
(
when
(
eq?
(
tm-config-state
tm
)
'running
)
(
when
(
=
line-before
(
tm-config-line-no
tm
))
(
when
(
=
line-before
(
tm-config-line-no
tm
))
(
go-to-next-line!
tm
))
(
go-to-next-line!
tm
))
(
when
(
and
(
>=
(
tm-config-line-no
tm
)
(
tm-config-last-line-no
tm
))
(
when
(
>=
(
tm-config-line-no
tm
)
(
tm-config-last-line-no
tm
))
(
eq?
(
tm-config-state
tm
)
'running
))
(
set-tm-config-state!
tm
'reject
)))))
(
set-tm-config-state!
tm
'reject
)
)))))
(
define
MAX-STEPS
100000
)
; 100k steps should be enough
(
define
MAX-STEPS
100000
)
; 100k steps should be enough
;(define MAX-STEPS 10000000)
;(define MAX-STEPS 10000000)
...
...
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