Re: [abc-users] probability

From: Eric Bodden <eric.bodden_at_mail.mcgill.ca>
Date: Tue, 31 Mar 2009 11:10:45 -0400

Still, you should probably try this first and then you can still
change it later if required.

When you generate random numbers at runtime, then all you need to do
is create a dynamic residue that returns the result of a call to some
function "shouldExecute()". This function should return a random
boolean.

Eric

2009/3/31 Amjad Nusayr <anusayr_at_cs.nmsu.edu>:
> I thought of that, but that means more overhead time at runtime. Thats why I
> wanted to generate the trace when compiling.
>
> Amjad
>
>
> Eric Bodden wrote:
>>
>> Hi Amjad. Why don't you compute the random number at runtime? That
>> would be way easier than storing it in a trace. Would that work for
>> you?
>>
>> Eric
>>
>> 2009/3/31 Amjad Nusayr <anusayr_at_cs.nmsu.edu>:
>>
>>>
>>> Hello
>>> I want to design a PC called probability(p) i n which advice is woven at
>>> each joinpoint but is executed only with P probability. My main concern
>>> here
>>> is that a dynamic check is needed to create this action. To check the
>>> probability I want to pre-compute a "trace" of random numbers, then just
>>> pull the next unused number out of the trace. There are two things I need
>>> to
>>> ask of. First, How can I create this dynamic check? Second. How can I get
>>> the trace of random numbers to be a part of my generated code?
>>>
>>> Thanks
>>> Amjad
>>>
>>>
>>>
>>
>>
>>
>>
>
>
>

-- 
Eric Bodden
Sable Research Group, McGill University
Montréal, Québec, Canada
Received on Tue Mar 31 2009 - 16:10:53 BST

This archive was generated by hypermail 2.2.0 : Tue Mar 31 2009 - 23:50:12 BST