|
From: <sr...@us...> - 2010-03-11 18:12:47
|
Revision: 16
http://golok.svn.sourceforge.net/golok/?rev=16&view=rev
Author: sralmai
Date: 2010-03-11 18:12:37 +0000 (Thu, 11 Mar 2010)
Log Message:
-----------
[MINOR ENHANCEMENT]: --dump now returns full model if depth is > model size or if depth is -1. Example: --dump -1 builds the first system and returns it.
Modified Paths:
--------------
trunk/search.scm
Modified: trunk/search.scm
===================================================================
--- trunk/search.scm 2010-03-10 21:08:55 UTC (rev 15)
+++ trunk/search.scm 2010-03-11 18:12:37 UTC (rev 16)
@@ -276,8 +276,10 @@
[gr (if new-fringe (hash-map new-fringe (lambda (x y) x)) #f)]
[dbg-dummy (if (>= debug 2) (display-ln "\tdepth " depth " fringe has " (if gr (length gr) 0)) (void))])
- (if (not gr) #f ; there are no more states to search
+ (cond ((and (not gr) (not dump)) #f) ; there are no more states to search
+ ((and (not gr) dump) (make-model (hash->model state-space lt topo-ht start-state state->representative) lt))
+ (#t
; check if some fringe node is the start of 1e simulating chunk
(let ([sim (ormap search-node gr)])
(cond
@@ -289,7 +291,7 @@
(make-model (hash->model state-space lt topo-ht start-state state->representative) lt))
; otherwise, keep going
(#t
- (search-bfs-rec (add1 depth) new-fringe (if dump (sub1 dump) #f)))))))))
+ (search-bfs-rec (add1 depth) new-fringe (if dump (sub1 dump) #f))))))))))
; create a state space and fringe
(define create-sp-and-fr
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|