1
0
mirror of synced 2026-01-31 06:02:25 +00:00
Files
Interlisp.medley/internal/test/env/program-analysis/hand/BROWSER-PART2.U

116 lines
4.1 KiB
Plaintext

;; Function To Be Tested: BROWSER-2 (Program Analysis)
;;
;; Source: Lisp Library Modules Manual (Lyric Beta Release 2)
;; Browser, Page 11
;; Section: Program Analysis (Library)
;;
;; Created By: John Park
;;
;; Creation Date: March 10, 1987
;;
;; Last Update: March 11, 1987
;;
;; Somewhat Repaired: June 16, 1988
;;
;; Filed As: {ERIS}<lispcore>test>program-analysis>browser-part2.u
;;
;;
;; Syntax: (BROWSER T/NIL)
;;
;; Function Description: BROWSER modifies the SHOW PATHS command of Masterscope so that
;; the command's output is displayed as an undirected graph. It creates a new window
;; for each SHOW PATHS command, but will reuse a window if that window has an earlier
;; instance of the same SHOW PATHS command displayed in it.
;;
;; Argument(s): T or NIL (SEE Browser documentation)
;;
;; Returns: IL:MSPATHS
;;
;; Constraints/Limitations: BROWSER modifies the SHOW PATHS command of Masterscope so that
;; the command's output is displayed as an undirected graph. It creates a new window
;; for each SHOW PATHS command, but will reuse a window if that window has an earlier
;; instance of the same SHOW PATHS command displayed in it. Part 1 of this test is
;; to determine if masterscope is unaffected when the BROWSER is not enabled or
;; (IL:BROWSER NIL). Part I also tests to see if grapher is automatically loaded
;; by browser. Make sure that Part 1 is run before Part 2. Part 2 of BROWSER test
;; determines if BROWSER modified masterscope in such a way that paths are displayed
;; grahically in a display window.
;;
;; The tree structure of the functions being analyzed are as follows:
;;
;; Top-GFuntion
;; |
;; GFun-A------------------------GFun-B
;; | |
;; --------------------- --------------------
;; | | | | | |
;; GFun-A1 GFun-A2 GFun-A3 GFun-B1 GFun-B2 GFun-B3
;; |
;; --------------
;; | |
;; GFun-C1 GFun-A1
;;
;;
;; Messages will be printed before each command in the command files is executed
;; for user monitoring. Test result is logged on
;; {eris}<lispcore>test>program-analysis>masterscope.report
(DO-TEST "BROWSER2-TEST-SETUP"
(IL:FILESLOAD (IL:SYSLOAD) MASTERSCOPE BROWSER GRAPHER)
(SETQ BROWSERW (IL:CREATEW '(100 100 325 90) NIL NIL T))
; Reinitialize and Define functions to be analyzed....
(IL:MASTERSCOPE '(ERASE))
(DEFUN TOP-GFUNTION NIL (AND (GFUN-A) (GFUN-B)))
(DEFUN GFUN-A NIL (OR (GFUN-A1) (GFUN-A2) (GFUN-A3)))
(DEFUN GFUN-B NIL (OR (GFUN-B1) (GFUN-B2) (GFUN-B3)))
(DEFUN GFUN-A1 NIL T)
(DEFUN GFUN-A2 NIL NIL)
(DEFUN GFUN-A3 NIL T)
(DEFUN GFUN-B1 NIL (AND (GFUN-C1)(GFUN-A1)))
(DEFUN GFUN-B2 NIL NIL)
(DEFUN GFUN-B3 NIL T)
(DEFUN GFUN-C1 NIL NIL)
(IL:MASTERSCOPE '(ANALYZE TOP-GFUNTION))
(IL:MASTERSCOPE '(ANALYZE GFUN-A))
(IL:MASTERSCOPE '(ANALYZE GFUN-B))
(IL:MASTERSCOPE '(ANALYZE GFUN-A1))
(IL:MASTERSCOPE '(ANALYZE GFUN-A2))
(IL:MASTERSCOPE '(ANALYZE GFUN-A3))
(IL:MASTERSCOPE '(ANALYZE GFUN-B1))
(IL:MASTERSCOPE '(ANALYZE GFUN-B2))
(IL:MASTERSCOPE '(ANALYZE GFUN-B3))
(IL:MASTERSCOPE '(ANALYZE GFUN-C1))
; Browser is now loaded and activated by Part 1 test of browser
; Part 2 of this test is to determine if masterscope is modified by enabling
; the BROWSER or (IL:BROWSER T)
(IL:BROWSER T)
; show paths should display the following path graphically in a display window
; 1.gfun-a1 gfun-a top-gfuntion
; 2. gfun-b1 gfun-b top-gfuntion
; show paths should display the above path graphically in a display window
; as being shown on the lower left from
; {eris}<lispcore>test>program-analysis>browser.graph.
; Loading the graph.......
;
; The graph returned from BROWSER should look like the one that is being
; displayed on the lower right. If they are identical, please enter
; (BROWSER-SUCCEEDED) else enter (BROWSER-FAILED)
; at the end of the test. If it breaks, enter ^ in the break
; window to return to exec. The result will automatically be logged
; in {eris}<lispcore>test>program-analysis>browser.report.
(IL:MASTERSCOPE '(SHOW PATHS TO GFUN-A1 FROM TOP-GFUNTION))
(PASS-FAIL 'BROWSER-DISPLAY (Y-OR-N-P "Did the browser work? "))
)
STOP