Ash Ashbhai wrote:
> > > Has anyone got a copy of the documents by Charlie mentioned in
> > > the below thread?
> > > http://sourceforge.net/mailarchive/forum.php?thread_id=1094644&forum_id=4764
This email mentions a zip file containing 3 docs - I've searched
through my archives and can only find a zip file containing 1 Word
document ... this contains instructions on adding a bitwise OR (%)
operator and the ~NEG_EXP_DIST() function ...
Thierry Boullet wrote:
> > The last post of Charlie contains the instructions for adding an integer
> > function to SCL (NEG_EXP_DIST_FUNC):
> > http://sourceforge.net/mailarchive/message.php?msg_id=11783362
> > (RE: Duration of the viewstate encoding - 2005-05-17)
>
> Thanks. I missed that thread.
The instructions given in this email are the same as the latter half
of the document I have... Interestingly enough ~NEG_EXP_DIST is
implemented in the current OpenSTA - but there is no mention of it
in the documentation! Here's what the comments in the code say:
; The NEG_EXP_DIST function has the following format:
; ~NEG_EXP_DIST(random, mean)
; where 'random' and 'mean' are integer operands. The
; function returns an INTEGER value.
Here's the bit that does the actual work:
//Calculation of negative exponential distribution
// make value range from {(1/2147493647):1}
temp = (double)nedrand / 2147483647.0;
// (2^31) - 1 is the max value (range 1-2147483647)
int reslt = (int)(-(log(temp) * nedmean));
// scaling factor set to 1000 (to keep higher resolution on result)
I'm not sure what specific use this has but maybe it is useful to
someone out there... Maybe if Charlie has the time he can fill us in.
I'll document it for the next release of the SCL Reference.
The bitwise OR operator that Charlie documented implenting looks like
it was included into the source very differently. There are a
bitwise XOR(^) and IOR(|), and the % was given to the modulo
operator.
I'm going to drop both of these into the Wiki so we can find them
easier and add to them as we work out more about this area. I'll
reply with a link once I've done this.
> Can you please point me in the right direction on where can I get
> more documentation on using tpg.exe? Like how to write
> subexpressions...
ROTFL :-)
Richard Clarke was the only one of the team that really knew his way
around the legacy code that was used for the SCL parsing - and he
seems to be "missing".
What I do know is that the parsing mechanism is derived from the
OpenVMS TPARSE routines - so maybe looking for some online VMS TPARSE
documentation may help. There will be actual TPG documentation
somewhere (from the Performance Software days) but even if I had this
documentation (which I don't) the chances are that I wouldn't legally
be able to make this available...
The other possibility is that if Malcolm Green is listening in here,
and is feeling generous :-) He could perhaps provide us some clues
as to where to look for information and how different the PSL TPG is
from the original OpenVMS equivalent... please.
Other than that, it really is a matter of working it out for
ourselves... if we work together and document as we go then that
shouldn't be too difficult, the TPA files seem very well commented.
Ash: may I ask what you'd like to add to SCL? And make sure that you
are willing to donate your work back to the product... ? If you
aren't willing to give back to the community then it is difficult to
justify spending too much time helping you (or anyone) out. :-)
Hope this info helps,
Cheers
/dan
--
Daniel Sutcliffe <Da...@Op...>
OpenSTA part-time caretaker - http://OpenSTA.org/
|