[savant-devel] StandardPackage problems
Rudolf Matousek
matousek at utia.cas.cz
Tue Jul 19 10:26:05 EDT 2005
Hi,
I'm now working on the plugin generator script in
savant/doc/plugin_creation.pl. According my recent discussions with Dale
Martin, I would like to generate code in a way that it won't depend on
IIRScram code (no references to it in the code).
Please read through my discussion I had with Dale Martin on ICQ about it:
--
(15:38:33) Rud'as: I had a look in tyvis
(15:38:59) Rud'as: there is a strange thing. It is using function
instance from ScramStandardPackage.
(15:39:57) Dale Martin: If one assumes that the tyvis tree is generated
from the scram tree, that might be OK
(15:40:06) Dale Martin: Up until now it's probably been a valid
assumption too
(15:40:12) Rud'as: dynamic_cast<StandardPackage
*>(ScramStandardPackage::instance()->convert_tree( this ));
(15:40:20) Dale Martin: But long term it's probably not smart
(15:40:48) Rud'as: Ok, so I would suggest to implement this in
BaseStandardPackage and inherit it for other plugins
(15:41:18) Dale Martin: Right
(15:41:24) Dale Martin: Talk to Doug about that
(15:41:33) Rud'as: In fact the convert_tree in ScramStandardPackage does
something like go in BaseStandardPackage::convert_tree
(15:41:52) Rud'as: I will. I just wanted to know if this assumption is ok.
(15:41:52) Dale Martin: Right, it should use that
(15:41:56) Dale Martin: I think so
(15:42:09) Dale Martin: there might need to be the addition of an
IIR_StandardPackage
(15:42:29) Dale Martin: Currently there is an API in the StandardPackage
to allow easy finding of standard types and so forth
(15:42:38) Rud'as: I see, to add interface specification there?
(15:42:40) Dale Martin: Under the hood it's a plain old package
(15:42:44) Dale Martin: Yes
(15:43:09) Dale Martin: The plain old package would work but how would
you find the true literal, or some specific piece
(15:43:24) Dale Martin: You don't want to have to traverse the
declaration list, etc
(15:43:25) Rud'as: Is it a good idea to add these functions there?
(15:44:32) Dale Martin: Actually, there is a src/analyzer/StandardPackage
(15:44:41) Dale Martin: It could move into IIR
(15:45:05) Rud'as: I see.
(15:45:06) Dale Martin: and then there could be a BaseStandardPackage,
and basically it could be handled that way
(15:45:09) Rud'as: I 'll try that.
(15:45:26) Dale Martin: See what falls out of that.
(15:45:34) Rud'as: Thanks!
(15:45:41) Rud'as: That's enough for now.
(15:45:51) Rud'as: I'll put it in and see what I'll get.
(15:46:10) Dale Martin: If you look at scram.hh, it's the "owner" of the
standard package
(15:46:26) Dale Martin: In general IIR_DesignFile has an associated
parser...
(15:46:33) Dale Martin: (a "scram" instance)
(15:46:44) Dale Martin: that's kind of how all of these pieces hook together
(15:46:48) Dale Martin: take care
(15:47:21) Rud'as: ok
(15:48:12) Rud'as: thanks
--
What's your opinion on this problem? I'll try to do this modification in
my local copy of savant.
Regards,
Ruda Matousek
More information about the savant-devel
mailing list