From 4d3d1c101e0b71ce9daabc6514b8941a444c1ba0 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 19 Jun 2015 21:17:00 -0700 Subject: 1603 --- 065duplex_list.mu | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/065duplex_list.mu b/065duplex_list.mu index 0bcda1b9..ff588120 100644 --- a/065duplex_list.mu +++ b/065duplex_list.mu @@ -64,22 +64,31 @@ scenario duplex-list-handling [ 6:number <- first 4:address:duplex-list 4:address:duplex-list <- next-duplex 4:address:duplex-list 7:number <- first 4:address:duplex-list + 8:address:duplex-list <- next-duplex 4:address:duplex-list + 9:number <- first 8:address:duplex-list + 10:address:duplex-list <- next-duplex 8:address:duplex-list + 11:address:duplex-list <- prev-duplex 8:address:duplex-list 4:address:duplex-list <- prev-duplex 4:address:duplex-list - 8:number <- first 4:address:duplex-list + 12:number <- first 4:address:duplex-list 4:address:duplex-list <- prev-duplex 4:address:duplex-list - 9:number <- first 4:address:duplex-list - 10:boolean <- equal 3:address:duplex-list, 4:address:duplex-list + 13:number <- first 4:address:duplex-list + 14:boolean <- equal 3:address:duplex-list, 4:address:duplex-list #? $dump-trace #? 1 ] memory-should-contain [ + 0 <- 0 # no modifications to null pointers 1 <- 34 2 <- 35 5 <- 5 # scanning next 6 <- 4 7 <- 3 - 8 <- 4 # then prev - 9 <- 5 - 10 <- 1 # list back at start + 8 <- 0 # null + 9 <- 0 # first of null + 10 <- 0 # next of null + 11 <- 0 # prev of null + 12 <- 4 # then start scanning prev + 13 <- 5 + 14 <- 1 # list back at start ] ] -- cgit 1.4.1-2-gfad0