|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hops.dm.tad.PlanSet
public class PlanSet
Stores the knows plans and dependent attributes Reads the plans from input file Dependet attribute are those that change the value its other attribute value has change, as database queries.
Constructor Summary | |
---|---|
PlanSet()
Creates a new instance of plan set |
Method Summary | |
---|---|
void |
add(plan planin)
the plan to the table of plans |
boolean |
AllAnswerAreRelevant(queueact ansActs,
stackact planin)
all the answer are relevant for the plan stack |
boolean |
answerIsRelevant(stackact planin,
attrval ans)
there is a qud on planin for wichi the ans is relevant |
boolean |
belongsToDomain(java.util.ArrayList lstin,
java.lang.String attr)
checks whether the attribute name belongs to the same plan that the attributes in list |
boolean |
belongsToDomain(java.lang.String plan_name,
java.lang.String attr)
checks whether the attribute name belongs to the plan named plan_name |
static boolean |
depends(attrval q,
attrval q2)
search if q is an attribute with dependences and q2 is in the list of q dependents |
boolean |
exists(attrval taskid)
Tests wheter exists a plan with the taskid name |
boolean |
exists(java.lang.String taskid)
Tests wheter exists a plan with the taskid name |
static boolean |
ExistsDependents(queuepair pairqueue,
attrval prevmove)
PrevMove=ask(Q) or (PrevMove=icm:und*int:DP*C and Q=und(DP*C)) not Moves/ELEM=ask(Q') and domain::depends(Q,Q') no move performed in the latest utterance is ( relevant to Q neither by answering it not by ) asking a question on which Q pedens from update.cpp - irrelevant followup |
boolean |
ExistsSubsumedAsk(queuepair actions,
action actin)
search an action in the queue subsummed by the action in the second parameter. |
plan |
get()
Returns the initial plan |
plan |
get(attrval inf,
plantype pltype)
Returns the plan named inf and of type pltype |
stackp |
get(queueact ansActs,
plantype pltype)
obtain all the plans of the type pltype which questions are relevant to ALL the ansActs |
stackp |
get(queueact ansActs,
plantype pltype,
java.lang.String currPlan)
obtain all the plans of the type pltype which questions are relevant to ALL the ansActs. |
plan |
get(java.lang.String taskid)
Returns the plan identified with the specific taskid name |
attrval_ary |
getArity(java.lang.String attr_name)
Returns the arity of an attribute |
java.lang.String |
getAttrName(java.lang.String attr_name)
Retruns the name of an attribute |
java.util.Set |
getPlansKeys()
Returs all the plan keys |
void |
ini_dependences(java.io.FileInputStream fileString)
initialized dependencies, reads from file |
void |
ini_plans(java.io.FileInputStream fileString,
java.io.FileInputStream params)
initialize plans, reads plans from file |
boolean |
isBoolean(java.lang.String attr_name)
Return true if there is a plan with an action named attr_name that is boolean |
boolean |
IsIssueQ(stackp issues,
attrval qud)
qud represents a plan where there is a question for which there is a solution on issues |
stackact |
ObtainDefaultMatchQUD(stackact planstack,
stackp answers)
Search all the questions in the stack that has a default value which condition is matching with the answer |
stackp |
ObtainDependentActions(action ansA)
2: setof(Action, domain::depends(a,Q) and domain::relevant(A,Q),ActionSet) |
stackp |
ObtainDependentIssues(action q)
7:domain::depends(Q,Q') Obtain all the dependent issues for ansA ObtainDependentIssues( QSetOut, depIssues ); |
static stackp |
ObtainDependents(stackact planin,
action ansA)
it is dependent if the exeprop is of type executing/answering in the same plan where ansprop is asking |
static stackp |
ObtainDependentsRelevantActions(stackact planin,
action ansA)
2: setof(Action, domain::depends(a,Q) and domain::relevant(A,Q),ActionSet) |
stackp |
ObtainDepQPlan(attrval ansA)
obtain all the taskid-values plans where there is a questions for which the answer is relevant 2:setof ( Q', domain::plan(Q',Plan) and // constructs the set of dependent issues in(Plan, findout(SomeQ)) and domain:: relevant(A, someQ), QSet') |
stackp |
ObtainDepQPrecondPlan(IS sharetis,
attrval ansA)
equal than obtainDepqPlan but matching the condition |
stackact |
ObtainRelevantPrecondQUD(IS sharetis,
stackact planstack,
attrval answer)
equal than ObtainRelevantQUD but it must also accomplish the action condition |
stackact |
ObtainRelevantQUD(stackact planstack,
attrval answer)
Search all the questions in the stack that are relevant for the prop in the second parameter setof(C,in(/private/plan, findout(Q)) and domain::relevant(A,Q), QSet) there is more than one question in the plan to which the answer is relevant |
stackact |
ObtainRelevantQUD(stackact planstack,
condition cond)
Search all the questions in the stack that are relevant for ANY prop in the condition |
stackact |
ObtainRelevants(attrval answer)
Search all the questions in the stack that are relevant for the prop in the second parameter setof(C,in(/private/plan, findout(Q)) and domain::relevant(A,Q), QSet) there is more than one question in the plan to which the answer is relevant 3:domain::question(Q) 4:domain::relevant(A,Q) 5:domain::relevant(P,Q) |
stackp |
remove_unifiables(stackp p)
for all propo1 in source, if propo1 is subaction of propo2 and propo2 is in the stack, remove propo2 |
stackp |
SearchPlansFromSubAction(java.lang.String attrname)
search all the plans that CONTAINS the subaction |
boolean |
subsumes(attrval subs,
attrval sumed)
subs subsumes sumed if there is a plan P represented by subs that it is more concrete that the one represented by sumed ONLY used with ASK propositions ( tasks ) |
boolean |
taskIsCovered(stackact next_moves)
check whether the task is covered in the current next moves stack |
java.lang.String |
toString()
Returns a string representation of the object. |
boolean |
validPlansParameter(attrval param)
search all the actions for the param |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PlanSet()
Method Detail |
---|
public void ini_dependences(java.io.FileInputStream fileString) throws java.lang.Exception
java.lang.Exception
public static boolean depends(attrval q, attrval q2)
public stackp remove_unifiables(stackp p)
p
- the list os attributes
public static stackp ObtainDependents(stackact planin, action ansA)
planin
- the current planansA
- the answer action
public static stackp ObtainDependentsRelevantActions(stackact planin, action ansA)
planin
- the current planansA
- the current answer action
public static boolean ExistsDependents(queuepair pairqueue, attrval prevmove)
pairqueue
- the list pairsprevmove
- the previous movepublic void ini_plans(java.io.FileInputStream fileString, java.io.FileInputStream params) throws java.lang.Exception
java.lang.Exception
public java.util.Set getPlansKeys()
public void add(plan planin)
public boolean exists(java.lang.String taskid)
public boolean exists(attrval taskid)
public plan get(java.lang.String taskid)
public plan get()
public plan get(attrval inf, plantype pltype)
inf
- the attributepltype
- type of attributepublic stackp get(queueact ansActs, plantype pltype, java.lang.String currPlan)
ansActs
- the list of actionspltype
- the type of the plancurrPlan
- the current plan namepublic stackp get(queueact ansActs, plantype pltype)
ansActs
- the list of answerspltype
- the type of planspublic java.lang.String getAttrName(java.lang.String attr_name)
public attrval_ary getArity(java.lang.String attr_name)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isBoolean(java.lang.String attr_name)
attr_name
- the action name we are searching for.
public boolean subsumes(attrval subs, attrval sumed)
subs
- the name of a plansumed
- the name of an attributepublic boolean ExistsSubsumedAsk(queuepair actions, action actin)
actions
- the list of actionsactin
- the action to searchpublic boolean belongsToDomain(java.lang.String plan_name, java.lang.String attr)
plan_name
- the name of the planattr
- the name of the attributepublic boolean belongsToDomain(java.util.ArrayList lstin, java.lang.String attr)
lstin
- the list of attributesattr
- the attribute to searchpublic boolean AllAnswerAreRelevant(queueact ansActs, stackact planin)
ansActs
- the list of actionsplanin
- the current plan
public boolean answerIsRelevant(stackact planin, attrval ans)
planin
- the current planans
- the attribute
public stackp ObtainDepQPlan(attrval ansA)
ansA
- the attribute
public stackp SearchPlansFromSubAction(java.lang.String attrname)
attrname
-
public stackact ObtainRelevantQUD(stackact planstack, condition cond)
planstack
- the current plancond
- the condition from an action
public stackact ObtainRelevantQUD(stackact planstack, attrval answer)
planstack
- the current plananswer
- the answer attribute
public stackact ObtainDefaultMatchQUD(stackact planstack, stackp answers)
planstack
- the current plananswers
- the current answers
public boolean IsIssueQ(stackp issues, attrval qud)
issues
- the issues stack from ISqud
- the question
public stackp ObtainDependentIssues(action q)
q
- the question
public stackp ObtainDependentActions(action ansA)
ansA
- the attribute
public stackact ObtainRelevants(attrval answer)
answer
- the attributes
public boolean validPlansParameter(attrval param)
param
- ant attribute
public stackp ObtainDepQPrecondPlan(IS sharetis, attrval ansA)
sharetis
- the ISansA
- the answer we are looking for
public stackact ObtainRelevantPrecondQUD(IS sharetis, stackact planstack, attrval answer)
sharetis
- the ISplanstack
- the current plananswer
- the answer that must be found
public boolean taskIsCovered(stackact next_moves)
next_moves
- the current next_moves stack
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |