Reply To: OSVVM 2015.03 problem pure function GenRandSeed calls impure procedure Alert

Why OSVVM™? Forums OSVVM OSVVM 2015.03 problem pure function GenRandSeed calls impure procedure Alert Reply To: OSVVM 2015.03 problem pure function GenRandSeed calls impure procedure Alert

#976

I am sure it applies since the state changes between calls and thus the program result is affected by the number of calls to the function. Is not the idea behind pure functions to provide referential transparency (https://en.wikipedia.org/wiki/Referential_transparency_%28computer_science%29)?

Anyway I am convinced that changing the signature to impure cannot have any effects since it is a subprogram within a protected type which cannot be passed as an argument to a pure function anyway and cannot be used anywhere where a pure function would be required.

I have made this modification myself locally to OSVVM 2015.03 and I am able to use it with the latest GHDL using the LLVM backend and VHDL 2008 by the way. I was quite impressed by development of GHDL lately.