From 94a0e2722a42551d68cce8886c6fa5ad06e1b783 Mon Sep 17 00:00:00 2001 From: Tom Russo Date: Thu, 8 Aug 2019 11:46:13 -0600 Subject: [PATCH 1/3] Propagate dependencies into AF output args Per issue #67, the e:dependency template in adms.implicit.xml will propagate probe and variable dependencies from analog function arguments into the top-level expression in which the function is called (generally the RHS of an assignment), but does NOT do the same thing for any output arguments that might exist in the analog function. Some new CMC standard models (e.g. the MVSG-HV model) use analog functions in this manner, and it would be good to fix it. This commit augments the e:dependency template so that it completely propagates all dependencies from function arguments into any output variables that might exist. It is a no-op if there are no such function output arguments. This commit also obsoletes pull request #68. Unlike that PR, this one makes sure to perform dependency checking on the input arguments before copying their probe dependencies, and unlike that PR, it also copies their variable dependencies. Also unlike that code, it will correctly handle output arguments that are not at the beginning of the argument list, because it selects all arguments in the function definition in order and uses their position in the global list rather than selecting only the output arguments and using their position in the truncated list. Issue #67 PR #68 --- admsXml/adms.implicit.xml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/admsXml/adms.implicit.xml b/admsXml/adms.implicit.xml index c2b2d7a..82ec083 100644 --- a/admsXml/adms.implicit.xml +++ b/admsXml/adms.implicit.xml @@ -36,6 +36,8 @@ + + @@ -71,6 +73,9 @@ + + + @@ -81,6 +86,12 @@ + + + + + + @@ -160,7 +171,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + From ed6cac8c2d4bf14fcf03523d1243aedd05ee385e Mon Sep 17 00:00:00 2001 From: Tom Russo Date: Thu, 8 Aug 2019 11:59:44 -0600 Subject: [PATCH 2/3] Assure various "setin*" attributes are set for AF outputs Analog Function output variables should definitely behave in every way as if they're just assignments. Assignments also set attributes like "setinmodel" or "setininstance", and so should these. Issue #67 --- admsXml/adms.implicit.xml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/admsXml/adms.implicit.xml b/admsXml/adms.implicit.xml index 82ec083..ccabdfe 100644 --- a/admsXml/adms.implicit.xml +++ b/admsXml/adms.implicit.xml @@ -192,6 +192,26 @@ format="%(function/name) output arg $position is %(.), must be a variable\n"/> + + + + + + + + + + + + + + + + + + + + From 0be3dbcdbc5829c5c453a08f38c50dc923ae3092 Mon Sep 17 00:00:00 2001 From: Tom Russo Date: Mon, 28 Nov 2022 12:25:34 -0700 Subject: [PATCH 3/3] Make analog function output variables have correct dependency In my other commits on this branch, I modified adms.implicit.xml to propagate probe and variable dependencies from analog function argument lists into output variables (other than the return value, which was already handled correctly). In doing so, I had neglected setting the "dependency" element of the ADMS data tree on those variables, and so they were incorrectly being set to "constant". This led to the incorrect setting downstream of the OPdependent element as well. This commit correctly sets "dependency", and therefore OPdependent (which is set later by probing "dependency"). Qucs/ADMS#67 --- admsXml/adms.implicit.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/admsXml/adms.implicit.xml b/admsXml/adms.implicit.xml index ccabdfe..dce9878 100644 --- a/admsXml/adms.implicit.xml +++ b/admsXml/adms.implicit.xml @@ -192,6 +192,20 @@ format="%(function/name) output arg $position is %(.), must be a variable\n"/> + + + + + + + + + + + + + +