From 5ece1f6c88b78e5a2437978761cdbc41dfbfc348 Mon Sep 17 00:00:00 2001 From: Sergiu Ivanov Date: Thu, 12 Nov 2020 01:09:18 +0100 Subject: [PATCH] =?UTF-8?q?networks:=20list-interactions=20=E2=86=92=20lis?= =?UTF-8?q?t-syntactic-interactions.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- networks.rkt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/networks.rkt b/networks.rkt index c62031d..c493e0d 100644 --- a/networks.rkt +++ b/networks.rkt @@ -29,7 +29,7 @@ [network-form->network (-> network-form? network?)] [make-network-from-forms (-> (listof (cons/c symbol? update-function-form?)) network?)] - [list-interactions (-> network-form? variable? (listof variable?))] + [list-syntactic-interactions (-> network-form? variable? (listof variable?))] [build-syntactic-interaction-graph (-> network-form? graph?)] [build-all-states (-> domain-mapping/c (listof state?))] [make-same-domains (-> (listof variable?) generic-set? domain-mapping/c)] @@ -294,17 +294,17 @@ ;;; Lists the variables of the network form appearing in the update ;;; function form for x. -(define (list-interactions nf x) +(define (list-syntactic-interactions nf x) (set-intersect (extract-symbols (hash-ref nf x)) (hash-keys nf))) (module+ test - (test-case "list-interactions" + (test-case "list-syntactic-interactions" (define n #hash((a . (+ a b c)) (b . (- b c)))) - (check-true (set=? (list-interactions n 'a) '(a b))) - (check-true (set=? (list-interactions n 'b) '(b))))) + (check-true (set=? (list-syntactic-interactions n 'a) '(a b))) + (check-true (set=? (list-syntactic-interactions n 'b) '(b))))) ;;; Builds the graph in which the vertices are the variables of a ;;; given network, and which contains an arrow from a to b whenever a @@ -322,7 +322,7 @@ (define (build-syntactic-interaction-graph n) (transpose (unweighted-graph/adj - (for/list ([(var _) n]) (cons var (list-interactions n var)))))) + (for/list ([(var _) n]) (cons var (list-syntactic-interactions n var)))))) (module+ test (test-case "build-syntactic-interaction-graph"