[RavenclawDev 233] Re: accessing history of concepts from ravenclaw

Svetlana Stenchikova svetastenchikova at gmail.com
Thu Mar 22 11:58:23 EDT 2007


Thanks Antoine. I am sorry to bother you guys with my questions. I
know everyone is busy. I hope everything is going well.


The RESETS in my application were inherited from the roomline. When I
replaced all RESETS with REOPEN, it broke some functionality. For
example, when the confirm agent is entered the second time, it does
not get executed. I assume its because confiration_result does not get
reset.
Even though I explicitly reopen it:
			REOPEN_CONCEPT(/RavenCalendar/Task/TaskRemoveEvents/Confirm/confirmation_result)		C("/RavenCalendar/Task/TaskRemoveEvents/Confirm/confirmation_result").ClearExplicitlyConfirmedHyp();
	    C("/RavenCalendar/Task/TaskRemoveEvents/Confirm/confirmation_result").ClearExplicitlyDisconfirmedHyp();


Is the functionality of Reopen complete?

Also, I see some calls to Clone(false) in the Concept.cpp. Wouldn't
that erase the history?


Thank you,
Svetlana



****************************
the confirm agent:


DEFINE_REQUEST_AGENT( CConfirm,
    REQUEST_CONCEPT(confirmation_result)
	DEFINE_CONCEPTS(BOOL_USER_CONCEPT(confirmation_result, "expl"))
	INPUT_LINE_CONFIGURATION("set_grammar=toplevel")
    PROMPT(":non-interruptable request confirm_operation
operation_type<operation_type event<eventlistresult.0")
    GRAMMAR_MAPPING("[yes]>true, [no]>false, [Quit]>false")
    SUCCEEDS_WHEN(AVAILABLE(confirmation_result) &&
UPDATED(confirmation_result)
		&& C("confirmation_result") == CBool(true))
    FAILS_WHEN(AVAILABLE(confirmation_result) && UPDATED(confirmation_result)
		&& C("confirmation_result") == CBool(false))





On 3/21/07, Antoine Raux <antoine at cs.cmu.edu> wrote:
> Hi Svetlana,
>
> Sorry for not being responsive these days...
>
> The answer to your question is that Reset is *supposed* to clear the
> values of all the concepts under this particular agent, including their
> history.
> What you need in your case (apparently) is Reopen() (or the macro
> REOPEN). Reopen resets the completion state of the agent/subagents and
> pushes the concept values into their history, thus clearing the current
> value but not the history. This corresponds more to cases like yours
> where you want to allow the user to restart a given (sub)dialogue but
> not lose the concept values. Reset is more to completely restart from
> scratch (part of) a dialogue.
>
> Hope this helps...
>
> antoine
>
> Svetlana Stenchikova wrote:
>
> > Indeed, this change has affected the application. ravenclaw now
> > (sometimes) gets in an infinite loop where the agents seem to be
> > placed and executed (without any effect on the appication). I haven't
> > been able to figure out what exactly causes it, but when clear()  in
> > CDialogAgent::Reset() is called it works fine (but I  can not get
> > history)
> >
> > I also tried to replace the call to clear() by ClearCurrentValue()
> > but the history still does not get preserved.
> >
> > Please suggest if it is possible somehow to maintain the history.
> >
> > Has anyone ever used this functionality? If you think that this has
> > not been tested and is not supposed to work, please tell me and I will
> > stop asking this question.
> >
> > thank you
> >
> > Svetlana
> >
> > On 3/20/07, Svetlana Stenchikova <svetastenchikova at gmail.com> wrote:
> >
> >> Dear ravenclaw developers,
> >>
> >> could someone please help me to figure out how to use the past concepts.
> >>
> >> I am trying to get a value for the history (C("the_event")[-1]), but
> >> it is empty.
> >>
> >> It looks like RESET_AGENT command also clears the concepts. My system
> >> runs in a lookp (like the roomline) and RESET_AGENT is called at the
> >> end of the loop.
> >>
> >> Is this an intended functionality to erase all past values?
> >> This means that in the next iteration of the dialog (my system is
> >> iterative) you can not get to the past values)
> >>
> >> If I comment out in CDialogAgent::Reset():
> >>         /*for(unsigned int i = 0; i < Concepts.size(); i++)
> >>                 Concepts[i]->Clear();*/
> >>
> >> this fixes my problem, but I am not sure if it will introduce other
> >> problems.
> >> Please advise on the best solution,
> >>
> >> thank you
> >> Svetlana
> >>
> >> On 2/6/07, Svetlana Stenchikova <svetastenchikova at gmail.com> wrote:
> >> > Hi, I have a question about accessing history of a concept.
> >> >
> >> > Is this the right syntax to copy an old concept into a temporary
> >> value of
> >> > the same type:
> >> > EXECUTE(C("LOCAL_the_old_event") = C("the_event")[-1])
> >> >
> >> > It appears to be empty after this command, although "the_event" has
> >> had a
> >> > value before.
> >> >
> >> > Could you please suggest what may be a problem? Do I have to do
> >> anything
> >> > explicitly to keep the history of concepts?
> >> >
> >> > thanks
> >> > Svetlana
> >> >
> >> >
> >>
> >
>
>


More information about the Ravenclaw-developers mailing list