Skip to content
Snippets Groups Projects
Commit 75e890ff authored by René Schöne's avatar René Schöne
Browse files

Finally working name-analysis for PropertyRef.

parent 267e1e92
No related branches found
No related tags found
No related merge requests found
...@@ -64,7 +64,9 @@ ...@@ -64,7 +64,9 @@
(define (=value-attr n) (att-value 'value-attr n)) (define (=value-attr n) (att-value 'value-attr n))
(define (=value-of n name) (att-value 'value-of n name)) (define (=value-of n name) (att-value 'value-of n name))
(define (find-prop propname subtree) (ast-find-child* (lambda (i n) (string=? propname (->name n))) subtree)) (define (find-prop propname subtree)
(ast-find-child (lambda (i n) (and (ast-subtype? n 'RealProperty)
(string=? propname (->name n)))) subtree))
(define (add-basic-ags mquat-spec) (define (add-basic-ags mquat-spec)
(with-specification (with-specification
...@@ -189,11 +191,9 @@ ...@@ -189,11 +191,9 @@
(SWRoot (lambda (n propname) (or (find-prop propname (->RealProperty* n)) (SWRoot (lambda (n propname) (or (find-prop propname (->RealProperty* n))
(ast-find-child* (lambda (i c) (=lookup-property c propname)) (->Comp* n))))) (ast-find-child* (lambda (i c) (=lookup-property c propname)) (->Comp* n)))))
(Comp (lambda (n propname) (find-prop propname (->Property* n)))) (Comp (lambda (n propname) (find-prop propname (->Property* n))))
(HWRoot (lambda (n propname) (or (ast-find-child* (lambda (i rt) (=lookup-property rt propname)) (->ResourceType* n)) (HWRoot (lambda (n propname) (or (find-prop propname (->RealProperty* n))
(ast-find-child* (lambda (i r) (=lookup-property r propname)) (->SubResources n))))) (ast-find-child* (lambda (i rt) (=lookup-property rt propname)) (->ResourceType* n)))))
(ResourceType (lambda (n propname) (find-prop propname (->RealProperty* n)))) (ResourceType (lambda (n propname) (find-prop propname (->Property* n)))))
(Resource (lambda (n propname) (or (find-prop propname (->Property* n))
(ast-find-child* (lambda (i sr) (=lookup-property sr propname)) (->SubResources n))))))
; <=impl: Get Impl in subtree of the Impl ; <=impl: Get Impl in subtree of the Impl
(ag-rule get-impl (Impl (lambda (n) n))) (ag-rule get-impl (Impl (lambda (n) n)))
...@@ -253,7 +253,8 @@ ...@@ -253,7 +253,8 @@
(ag-rule (ag-rule
real real
(RealProperty (lambda (n) n)) (RealProperty (lambda (n) n))
(PropertyRef (lambda (n) (debug n ", refname=" (ast-child 'refname n) ", hasParent=" (ast-has-parent? n)) (=lookup-property (<=root n) (ast-child 'refname n))))) (PropertyRef (lambda (n) ;(debug n ", refname=" (ast-child 'refname n) ", hasParent=" (ast-has-parent? n))
(=lookup-property (<=root n) (ast-child 'refname n)))))
; =req-comp-map: Returns a associate list, mapping required components to a list of implementations requiring that component ; =req-comp-map: Returns a associate list, mapping required components to a list of implementations requiring that component
(ag-rule (ag-rule
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment