org.hops.dm.tad
Class Domain

java.lang.Object
  extended by org.hops.dm.tad.Domain
All Implemented Interfaces:
java.io.Serializable

public class Domain
extends java.lang.Object
implements java.io.Serializable

Version:
3.0 Operations about the domain
Author:
Meritxell Gonzalez
See Also:
Serialized Form

Constructor Summary
Domain()
           
 
Method Summary
static attrval action(attrval pag_attribute)
          returns the action confirmation of the pagination action
static boolean AnswerIsRelevant(queueact queuesrc, attrval quest)
          There is a relevant answer for the question in the queue 4:forall(latest_moves/elem = Answer(A'), not fst(/shared/qud, Q) and domain :: relevant(A',Q) ) from select.cpp: no answer is relevant to any question on QUD
static boolean AnswerIsRelevant(queueact queuesrc, stackp quds)
          There is a relevant answer for the question in the queue 4:forall(latest_moves/elem = Answer(A'), not fst(/shared/qud, Q) and domain :: relevant(A',Q) ) from select.cpp: no answer is relevant to any question on QUD
static attrval combine(attrval contans, attrval contQUD)
          combines returns the value in contans
static boolean compatible(attrval attr1, attrval attr2)
          incompatible attributes: same name, different values except for those attributes that accept more than one value -> requesteddata -> object -> queryfocus
static stackp ObtainAnswers(stackp stackin)
          Obtain the attributes that are not yes-no props
static attrval ObtainPaginationProp(stackp issuestack, attrval pagprop)
          Search a proposition in the stack that has the name of the pagination attribute
static boolean ObtainPropResolvesQUD(stackp propstack, stackp qudstack, attrval prop, attrval qud)
          obtain the proposition in the propstack that solves a qud in the qudstack in(/shared/qud, Q) not in(/private/bel, P) and domain::resolves(P,Q) from update ( recover_plan )
static boolean ObtainPropResolvesRespondQUD(stackp propstack, stackact qudstack, attrval prop, action qud)
          Search the proposition that solves the question in(/private/agenda, respond(Q)) not in(private/bel,P) and domain::resolves(P,Q) if not found, return an empty prop, and the first qud in the stack from update ( findPlan )
static attrval ObtainPropSolution(stackp stprop, attrval fact)
          search a proposition in the stack that solves the question in the second parameter in(STACK,P) domain :: resolves(P,Q)
static stackact ObtainQUDResolvesProp(stackp propstack, stackact qudstack)
          obtain all the questions in the qudstack that are solved by the propositions in the propstack in(/private/Plan, Q) in(/shared/issues, P) and domain::resolves(P,Q) from integrate.cpp ( downdateissues3 )
static attrval ObtainQUDSolution(stackp stprop, attrval prop)
          search a Qud in the stack that solves the prop in the last position of the QUD stak in(shared/ISSUES,IssueQ) fst(shared/ISSUES,Q) domain :: resolves(Q,IssueQ) from integrate ( downdateISSUES2 )
static queueact ObtainRelevantANS(queueact queuein, attrval qud)
          Search all the answers in the queue that are relevant for the quesiton in the second parameter 5:not ( first(shared/qud, und(usr*C)) and in(Moves,answer(D)) and domain::relevant(D,und(usr*C)))
static queueact ObtainRelevantANS(queuepair queuein, attrval qud)
          Search all the answers in the queue that are relevant for the quesiton in the second parameter not A/elem = answer(A) and domain::relevant(A,Q) the latest utterance is relevant to Q neither by answering it not by asking a question on which Q pedens
static attrval ObtainRelevantIssue(stackp issuestack, attrval answer)
          Search a proposition in the stack that is relevant for the prop in the second parameter 4:in(/shared/issues, Q) // the answer is relevant to an issues with is on 6:domain::relevant(A,Q)
static boolean relevant_issue(attrval contans, attrval contQUD)
          Tests wheter the contans is relevant to the contQUD
static boolean relevant(attrval contans, action contQUD)
          relevant content to qud if the same attribute and has value relevant(A,Q) if resolves(A,Q) and A:Proposition and Q:question negative answer to wh-questions and alt-Questions are relevant but no resolving
static boolean resolves(attrval contans, attrval contQUD)
          solves content to qud if the same attribute and has value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Domain

public Domain()
Method Detail

action

public static attrval action(attrval pag_attribute)
returns the action confirmation of the pagination action


relevant_issue

public static boolean relevant_issue(attrval contans,
                                     attrval contQUD)
Tests wheter the contans is relevant to the contQUD


relevant

public static boolean relevant(attrval contans,
                               action contQUD)
relevant content to qud if the same attribute and has value relevant(A,Q) if resolves(A,Q) and A:Proposition and Q:question negative answer to wh-questions and alt-Questions are relevant but no resolving


resolves

public static boolean resolves(attrval contans,
                               attrval contQUD)
solves content to qud if the same attribute and has value


combine

public static attrval combine(attrval contans,
                              attrval contQUD)
combines returns the value in contans


compatible

public static boolean compatible(attrval attr1,
                                 attrval attr2)
incompatible attributes: same name, different values except for those attributes that accept more than one value -> requesteddata -> object -> queryfocus


ObtainPropSolution

public static attrval ObtainPropSolution(stackp stprop,
                                         attrval fact)
search a proposition in the stack that solves the question in the second parameter in(STACK,P) domain :: resolves(P,Q)

Parameters:
stprop - the list of propositions
fact - the question
Returns:
the proposition if found

ObtainQUDSolution

public static attrval ObtainQUDSolution(stackp stprop,
                                        attrval prop)
search a Qud in the stack that solves the prop in the last position of the QUD stak in(shared/ISSUES,IssueQ) fst(shared/ISSUES,Q) domain :: resolves(Q,IssueQ) from integrate ( downdateISSUES2 )

Parameters:
stprop - the list of propositions
prop - the proposition
Returns:
the question

ObtainPropResolvesQUD

public static boolean ObtainPropResolvesQUD(stackp propstack,
                                            stackp qudstack,
                                            attrval prop,
                                            attrval qud)
obtain the proposition in the propstack that solves a qud in the qudstack in(/shared/qud, Q) not in(/private/bel, P) and domain::resolves(P,Q) from update ( recover_plan )

Parameters:
propstack - the list of propositions
qudstack - the list of questions
prop - the proposition if found
qud - the question if found
Returns:
true if proposition and question were found

ObtainQUDResolvesProp

public static stackact ObtainQUDResolvesProp(stackp propstack,
                                             stackact qudstack)
obtain all the questions in the qudstack that are solved by the propositions in the propstack in(/private/Plan, Q) in(/shared/issues, P) and domain::resolves(P,Q) from integrate.cpp ( downdateissues3 )

Parameters:
propstack - the list of propositions
qudstack - the list of qustions
Returns:
the list of solved quesitons

ObtainPropResolvesRespondQUD

public static boolean ObtainPropResolvesRespondQUD(stackp propstack,
                                                   stackact qudstack,
                                                   attrval prop,
                                                   action qud)
Search the proposition that solves the question in(/private/agenda, respond(Q)) not in(private/bel,P) and domain::resolves(P,Q) if not found, return an empty prop, and the first qud in the stack from update ( findPlan )

Parameters:
propstack - the list of believes
qudstack - the agenda
prop - the proposition
qud - the question if found
Returns:
true if the question was found

AnswerIsRelevant

public static boolean AnswerIsRelevant(queueact queuesrc,
                                       stackp quds)
There is a relevant answer for the question in the queue 4:forall(latest_moves/elem = Answer(A'), not fst(/shared/qud, Q) and domain :: relevant(A',Q) ) from select.cpp: no answer is relevant to any question on QUD

Parameters:
queuesrc - the list of actions
quds - the list of questions

AnswerIsRelevant

public static boolean AnswerIsRelevant(queueact queuesrc,
                                       attrval quest)
There is a relevant answer for the question in the queue 4:forall(latest_moves/elem = Answer(A'), not fst(/shared/qud, Q) and domain :: relevant(A',Q) ) from select.cpp: no answer is relevant to any question on QUD

Parameters:
queuesrc - the list of actions
quest - the question

ObtainRelevantANS

public static queueact ObtainRelevantANS(queueact queuein,
                                         attrval qud)
Search all the answers in the queue that are relevant for the quesiton in the second parameter 5:not ( first(shared/qud, und(usr*C)) and in(Moves,answer(D)) and domain::relevant(D,und(usr*C)))

Parameters:
queuein - the list of actions
qud - the question
Returns:
the list of answers

ObtainRelevantANS

public static queueact ObtainRelevantANS(queuepair queuein,
                                         attrval qud)
Search all the answers in the queue that are relevant for the quesiton in the second parameter not A/elem = answer(A) and domain::relevant(A,Q) the latest utterance is relevant to Q neither by answering it not by asking a question on which Q pedens

Parameters:
queuein - the list of actions
qud - the question
Returns:
the list of answers

ObtainRelevantIssue

public static attrval ObtainRelevantIssue(stackp issuestack,
                                          attrval answer)
Search a proposition in the stack that is relevant for the prop in the second parameter 4:in(/shared/issues, Q) // the answer is relevant to an issues with is on 6:domain::relevant(A,Q)

Parameters:
issuestack - the list of attributes
answer - the attribute
Returns:
the proposition if found

ObtainPaginationProp

public static attrval ObtainPaginationProp(stackp issuestack,
                                           attrval pagprop)
Search a proposition in the stack that has the name of the pagination attribute

Parameters:
issuestack - the list of attributes
pagprop - the pagination attribute
Returns:
the proposition if found

ObtainAnswers

public static stackp ObtainAnswers(stackp stackin)
Obtain the attributes that are not yes-no props

Parameters:
stackin - the list of attributes
Returns:
the list without the yes-no props