Package jason.stdlib

Class setof

All Implemented Interfaces:
InternalAction, Serializable

@Manual(literal=".setof(term,query,result)", hint="builds a Set of all instantiations of referred term which make query a logical consequence of the agent\'s BB", argsHint={"the variable or structure whose instances will \"populate\" the set","the formula used to find literals in the belief base","the result set populated with found solutions for the query"}, argsType={"variable or structure","logical formula","list"}, examples=".setof(X,c(X),L): assuming current BB with {c(100),c(200),c(100)}, L unifies with [100,200]", seeAlso={"jason.stdlib.count","jason.stdlib.findall"}) public class setof extends DefaultInternalAction

Internal action: .setof(Term,Query,List).

Description: builds a Set of unique instantiations of Term which make Query a logical consequence of the agent's BB.

Parameters:

  • + term (variable or structure): the variable or structure whose instances will "populate" the set.
  • + query (logical formula): the formula used to find literals in the belief base; is has the same syntax as the plan context.
  • +/- result (list): the result set populated with found solutions for the query.

Examples assuming the BB is currently {c(100),c(200),c(100)}:

  • .setof(X,c(X),L): L unifies with [100,200].
See Also: