Skip to content

How to find the relation between ProceduralBlockSymbol and SequenceSymbol #705

Answered by MikePopoloski
HungMingWu asked this question in Q&A
Discussion options

You must be logged in to vote

The second ProceduralBlock isn't the inside of the sequence, it's the (implicit) wrapper around the assert property statement, as specified by the LRM.

It's not generally possible to inspect the body of a sequence or property in AST form until you know how it's being instantiated, due to the formal arguments acting essentially like a macro and being replaced as-is. You can get an approximation by using AssertionInstanceExpression::makeDefault() to get an expression that instantiates the sequence with placeholder arguments but I think you'll be better off just walking into the assert property statement and finding the actual instantiation there.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by HungMingWu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants