Jump to content
Sign in to follow this  
tudor.timi

Philosophical questions about C++ specification

Recommended Posts

It's easy to see from the examples that the C++ snippets are much longer than the DSL examples. I don't really buy the argument that some people are more accustomed with C++  and would find it easier to work with it.

When the announcement was made that a DSL was going to be developed, I wasn't a big fan of the idea: "yet another verification language". I was put off by the time it would take to develop it, but now since the deed is done, I fear it will take more time to move the standard forward with both languages.

I would buy into it more if it were possible to specify stuff in C++ and the standard would provide the required library to link into my PSS model in order to compile everything with GCC and get the model in executable form. Back-end tools could take this model and generate verification infrastructure from it. They could also provide a front-end to directly read C++, so that it's easier to set things up. The idea behind using GCC is that it would be easy to build extensions to tools, since the entire model would be traverse-able in user code. I could also build my own little back-end tools without having to build the entire front-end (lexing, parsing, compiling, etc.) if I want to experiment with some new thing.

There were some blog posts out there (can't remember where exactly) that mentioned that this won't be the case. It won't be possible to just take a C++ PSS model and put it into GCC, which is kind of a missed opportunity. The PSS library doesn't have to be part of the standard. The current specifications in the standard would suffice and vendors could provide their own libraries that are optimized for traversal speed or whatever else. I would welcome an open-source implementation, though, similar to how UVM has the Accellera SV-BCL. Without this basic ecosystem, I don't see much sense in supporting both languages.

Share this post


Link to post
Share on other sites

Joint response from the PSWG:

The assumption that is being made is not correct. Specifically: It will be possible to take the C++ PSS model and use a standard C++ tool chain (GCC, MSVC, etc).  So to now get back to specific parts of the feedback:

Quote

I don't really buy the argument that some people are more accustomed with C++ and would find it easier to work with it.

Perhaps, but perhaps not. The WG discussed this and decided to leave the choice to the users.

Quote

The idea behind using GCC is that it would be easy to build extensions to tools, since the entire model would be traverse-able in user code

Yes, this is possible, with the caveat that the model will be traversable in the PSS library implementation and not in the end "user" code. The EA spec doesn’t define introspection APIs. However, your tool vendor (the one who implements the PSS library) may define such APIs.

Quote

I could also build my own little back-end tools without having to build the entire front-end (lexing, parsing, compiling, etc.) if I want to experiment with some new thing.

Yes, this is possible if supported by the tool vendor.

Quote

The PSS library doesn't have to be part of the standard. The current specifications in the standard would suffice and vendors could provide their own libraries that are optimized... 

This is indeed the direction the WG is taking.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×