public class Respect2PLibrary
extends alice.tuprolog.Library
Constructor and Description |
---|
Respect2PLibrary() |
Modifier and Type | Method and Description |
---|---|
boolean |
after_1(alice.tuprolog.Term time) |
boolean |
before_1(alice.tuprolog.Term time) |
boolean |
between_2(alice.tuprolog.Term time1,
alice.tuprolog.Term time2) |
boolean |
compl_0() |
boolean |
completion_0() |
boolean |
current_predicate_1(alice.tuprolog.Term predicate) |
boolean |
current_source_1(alice.tuprolog.Term source) |
boolean |
current_target_1(alice.tuprolog.Term target) |
boolean |
current_time_1(alice.tuprolog.Term time) |
boolean |
current_tuple_1(alice.tuprolog.Term tuple) |
boolean |
endo_0() |
boolean |
env_2(alice.tuprolog.Term key,
alice.tuprolog.Term value) |
boolean |
event_predicate_1(alice.tuprolog.Term predicate) |
boolean |
event_source_1(alice.tuprolog.Term source) |
boolean |
event_target_1(alice.tuprolog.Term target) |
boolean |
event_time_1(alice.tuprolog.Term time) |
boolean |
event_tuple_1(alice.tuprolog.Term tuple) |
boolean |
exo_0() |
boolean |
failure_0() |
boolean |
from_agent_0() |
boolean |
from_env_0() |
boolean |
from_tc_0() |
boolean |
get_2(alice.tuprolog.Term arg0,
alice.tuprolog.Term arg1) |
boolean |
get_s_2(alice.tuprolog.Term arg0,
alice.tuprolog.Term arg1) |
boolean |
getEnv_3(alice.tuprolog.Term env,
alice.tuprolog.Term key,
alice.tuprolog.Term val) |
java.lang.String |
getTheory()
ReSpecT theory to interface with Prolog.
|
boolean |
in_2(alice.tuprolog.Term arg0,
alice.tuprolog.Term arg1) |
boolean |
in_all_3(alice.tuprolog.Term arg0,
alice.tuprolog.Term arg1,
alice.tuprolog.Term arg2) |
boolean |
in_s_4(alice.tuprolog.Term ev,
alice.tuprolog.Term g,
alice.tuprolog.Term r,
alice.tuprolog.Term tc) |
void |
init(RespectVMContext m) |
boolean |
inp_2(alice.tuprolog.Term arg0,
alice.tuprolog.Term arg1) |
boolean |
inp_s_4(alice.tuprolog.Term ev,
alice.tuprolog.Term g,
alice.tuprolog.Term r,
alice.tuprolog.Term tc) |
boolean |
inter_0() |
boolean |
internal_0() |
boolean |
intra_0() |
boolean |
inv_0() |
boolean |
invocation_0() |
boolean |
link_in_0() |
boolean |
link_out_0() |
boolean |
no_2(alice.tuprolog.Term arg0,
alice.tuprolog.Term arg1) |
boolean |
no_all_3(alice.tuprolog.Term arg0,
alice.tuprolog.Term arg1,
alice.tuprolog.Term arg2) |
boolean |
no_s_4(alice.tuprolog.Term ev,
alice.tuprolog.Term g,
alice.tuprolog.Term r,
alice.tuprolog.Term tc) |
boolean |
nop_2(alice.tuprolog.Term arg0,
alice.tuprolog.Term arg1) |
boolean |
nop_s_4(alice.tuprolog.Term ev,
alice.tuprolog.Term g,
alice.tuprolog.Term r,
alice.tuprolog.Term tc) |
boolean |
operation_0() |
boolean |
out_2(alice.tuprolog.Term arg0,
alice.tuprolog.Term arg1) |
boolean |
out_all_2(alice.tuprolog.Term arg0,
alice.tuprolog.Term arg1) |
boolean |
out_s_4(alice.tuprolog.Term ev,
alice.tuprolog.Term g,
alice.tuprolog.Term r,
alice.tuprolog.Term tc) |
boolean |
post_0() |
boolean |
pre_0() |
boolean |
rd_2(alice.tuprolog.Term arg0,
alice.tuprolog.Term arg1) |
boolean |
rd_all_3(alice.tuprolog.Term arg0,
alice.tuprolog.Term arg1,
alice.tuprolog.Term arg2) |
boolean |
rd_s_4(alice.tuprolog.Term ev,
alice.tuprolog.Term g,
alice.tuprolog.Term r,
alice.tuprolog.Term tc) |
boolean |
rdp_2(alice.tuprolog.Term arg0,
alice.tuprolog.Term arg1) |
boolean |
rdp_s_4(alice.tuprolog.Term ev,
alice.tuprolog.Term g,
alice.tuprolog.Term r,
alice.tuprolog.Term tc) |
boolean |
req_0() |
boolean |
request_0() |
boolean |
resp_0() |
boolean |
response_0() |
boolean |
setEnv_3(alice.tuprolog.Term env,
alice.tuprolog.Term key,
alice.tuprolog.Term val) |
boolean |
spawn_2(alice.tuprolog.Term arg0,
alice.tuprolog.Term arg1) |
boolean |
start_predicate_1(alice.tuprolog.Term predicate) |
boolean |
start_source_1(alice.tuprolog.Term source) |
boolean |
start_target_1(alice.tuprolog.Term target) |
boolean |
start_time_1(alice.tuprolog.Term time) |
boolean |
start_tuple_1(alice.tuprolog.Term tuple) |
boolean |
success_0() |
boolean |
to_agent_0() |
boolean |
to_env_0() |
boolean |
to_tc_0() |
boolean |
uin_2(alice.tuprolog.Term arg0,
alice.tuprolog.Term arg1) |
boolean |
uinp_2(alice.tuprolog.Term arg0,
alice.tuprolog.Term arg1) |
boolean |
uno_2(alice.tuprolog.Term arg0,
alice.tuprolog.Term arg1) |
boolean |
unop_2(alice.tuprolog.Term arg0,
alice.tuprolog.Term arg1) |
boolean |
urd_2(alice.tuprolog.Term arg0,
alice.tuprolog.Term arg1) |
boolean |
urdp_2(alice.tuprolog.Term arg0,
alice.tuprolog.Term arg1) |
public boolean after_1(alice.tuprolog.Term time)
time
- the time that should have passedtrue
if the given time passedpublic boolean before_1(alice.tuprolog.Term time)
time
- the time to compare.public boolean between_2(alice.tuprolog.Term time1, alice.tuprolog.Term time2)
time1
- the time that should have passedtime2
- the time that should not have passedtrue
if the time is between given valuespublic boolean compl_0()
true
if ReSpecT VM is in the completion phasepublic boolean completion_0()
true
if ReSpecT VM is in the completion phasepublic boolean current_predicate_1(alice.tuprolog.Term predicate)
predicate
- the expected ReSpecT predicate currently under solving
process.public boolean current_source_1(alice.tuprolog.Term source)
source
- the expected tuplecentre which is responsible for the
generation of the currently processing ReSpecT reaction.public boolean current_target_1(alice.tuprolog.Term target)
target
- the expected target of the current operationtrue
if the given term unifies with the current
targetpublic boolean current_time_1(alice.tuprolog.Term time)
time
- the expected time we're at.true
if the given term unifies with the current timepublic boolean current_tuple_1(alice.tuprolog.Term tuple)
tuple
- the expected logic tuple which directly started the current
ReSpecT computation.public boolean endo_0()
true
if the current ReSpecT event is coming from
this tuple centrepublic boolean env_2(alice.tuprolog.Term key, alice.tuprolog.Term value)
key
- the term representing the environmental property to be testedvalue
- the term representing the value of the environmental propertytrue
if the environmental property given has the
given valuepublic boolean event_predicate_1(alice.tuprolog.Term predicate)
predicate
- the predicate direct cause of current ReSpecT eventtrue
if the current ReSpecT event has the given
direct causepublic boolean event_source_1(alice.tuprolog.Term source)
source
- the identifier of the direct cause source of the eventtrue
if current ReSpecT event direct cause has the
given sourcepublic boolean event_target_1(alice.tuprolog.Term target)
target
- the identifier of the direct cause targettrue
if current ReSpecT event direct cause has the
given targetpublic boolean event_time_1(alice.tuprolog.Term time)
time
- the expected time at which the current ReSpecT computation has
been triggered.public boolean event_tuple_1(alice.tuprolog.Term tuple)
tuple
- the tuple argument of the direct cause predicatetrue
if the direct cause tuple argument has the
given tuplepublic boolean exo_0()
public boolean failure_0()
public boolean from_agent_0()
public boolean from_env_0()
true
if the triggering event has been generated by
the environmentpublic boolean from_tc_0()
public boolean get_2(alice.tuprolog.Term arg0, alice.tuprolog.Term arg1) throws InvalidTupleCentreIdException
arg0
- the Prolog variable to unify the result witharg1
- the identifier of the target tuple centretrue
if the operation is successfullInvalidTupleCentreIdException
- if arg1 (tuple centre's id) is not a well-formed ground logic
termpublic boolean get_s_2(alice.tuprolog.Term arg0, alice.tuprolog.Term arg1) throws InvalidTupleCentreIdException
arg0
- the Prolog variable to unify the result witharg1
- the identifier of the target tuple centretrue
if the operation is successfullInvalidTupleCentreIdException
- if arg1 (tuple centre's id) is not a well-formed ground logic
termpublic boolean getEnv_3(alice.tuprolog.Term env, alice.tuprolog.Term key, alice.tuprolog.Term val) throws TucsonOperationNotPossibleException, UnreachableNodeException, OperationTimeOutException
env
- the identifier of the target environmental resourcekey
- the environmental property to senseval
- the value sensedtrue
if the operation is successfullOperationTimeOutException
- if the notification operation expires timeoutUnreachableNodeException
- if the TuCSoN tuple centre target of the notification cannot
be reached over the networkTucsonOperationNotPossibleException
- if the requested operation cannot be performed for some
reasonpublic java.lang.String getTheory()
getTheory
in class alice.tuprolog.Library
public boolean in_2(alice.tuprolog.Term arg0, alice.tuprolog.Term arg1) throws InvalidTupleCentreIdException
arg0
- the Prolog variable to unify the result witharg1
- the identifier of the target tuple centretrue
if the operation is successfullInvalidTupleCentreIdException
- if arg1 (tuple centre's id) is not a well-formed ground logic
termpublic boolean in_all_3(alice.tuprolog.Term arg0, alice.tuprolog.Term arg1, alice.tuprolog.Term arg2) throws InvalidTupleCentreIdException, InvalidLogicTupleException
arg0
- the tuple template to be usedarg1
- the Prolog variable to unify the result witharg2
- the identifier of the target tuple centretrue
if the operation is successfullInvalidTupleCentreIdException
- if arg2 (tuple centre's id) is not a well-formed ground logic
termInvalidLogicTupleException
- if the text does not represent a valid logic tuplepublic boolean in_s_4(alice.tuprolog.Term ev, alice.tuprolog.Term g, alice.tuprolog.Term r, alice.tuprolog.Term tc) throws InvalidTupleCentreIdException, InvalidTupleArgumentException
ev
- the triggering event of a ReSpecT specificationg
- the guard of a ReSpecT specificationr
- the body of a ReSpecT specificationtc
- the identifier of the target tuple centretrue
if the operation is successfullInvalidTupleCentreIdException
- if tc (tuple centre's id) is not a well-formed ground logic
termInvalidTupleArgumentException
- if is not possible to create a valid Prolog Term with the
specified values for ev, g and rpublic void init(RespectVMContext m)
m
- the ReSpecT VM this tuProlog library interfaces topublic boolean inp_2(alice.tuprolog.Term arg0, alice.tuprolog.Term arg1) throws InvalidTupleCentreIdException
arg0
- the Prolog variable to unify the result witharg1
- the identifier of the target tuple centretrue
if the operation is successfullInvalidTupleCentreIdException
- if arg1 (tuple centre's id) is not a well-formed ground logic
termpublic boolean inp_s_4(alice.tuprolog.Term ev, alice.tuprolog.Term g, alice.tuprolog.Term r, alice.tuprolog.Term tc) throws InvalidTupleCentreIdException, InvalidTupleArgumentException
ev
- the triggering event of a ReSpecT specificationg
- the guard of a ReSpecT specificationr
- the body of a ReSpecT specificationtc
- the identifier of the target tuple centretrue
if the operation is successfullInvalidTupleCentreIdException
- if tc (tuple centre's id) is not a well-formed ground logic
termInvalidTupleArgumentException
- if an invalid tuple argument is usedpublic boolean inter_0()
true
if the triggering event has not this tuple
centre as targetpublic boolean internal_0()
true
if the triggering event has being generated by
this tc and target to this same tcpublic boolean intra_0()
public boolean inv_0()
true
if the ReSpecT VM is currently in the
invocation phasepublic boolean invocation_0()
true
if the ReSpecT VM is currently in the
invocation phasepublic boolean link_in_0()
true
if the triggering event is coming from a
different tuple centrepublic boolean link_out_0()
true
if the triggering event is originating from
this tuple centre toward a different onepublic boolean no_2(alice.tuprolog.Term arg0, alice.tuprolog.Term arg1) throws InvalidTupleCentreIdException
arg0
- the Prolog variable to unify the result witharg1
- the identifier of the target tuple centretrue
if the operation is successfullInvalidTupleCentreIdException
- if arg1 (tuple centre's id) is not a well-formed ground logic
termpublic boolean no_all_3(alice.tuprolog.Term arg0, alice.tuprolog.Term arg1, alice.tuprolog.Term arg2) throws InvalidTupleCentreIdException, InvalidLogicTupleException
arg0
- the tuple template to be usedarg1
- the Prolog variable to unify the result witharg2
- the identifier of the target tuple centretrue
if the operation is successfullInvalidTupleCentreIdException
- if arg2 (tuple centre's id) is not a well-formed ground logic
termInvalidLogicTupleException
- if the text does not represent a valid logic tuplepublic boolean no_s_4(alice.tuprolog.Term ev, alice.tuprolog.Term g, alice.tuprolog.Term r, alice.tuprolog.Term tc) throws InvalidTupleCentreIdException, InvalidTupleArgumentException
ev
- the triggering event of a ReSpecT specificationg
- the guard of a ReSpecT specificationr
- the body of a ReSpecT specificationtc
- the identifier of the target tuple centretrue
if the operation is successfullInvalidTupleCentreIdException
- if tc (tuple centre's id) is not a well-formed ground logic
termInvalidTupleArgumentException
- if is not possible to create a valid Prolog Term with the
specified values for ev, g and rpublic boolean nop_2(alice.tuprolog.Term arg0, alice.tuprolog.Term arg1) throws InvalidTupleCentreIdException
arg0
- the Prolog variable to unify the result witharg1
- the identifier of the target tuple centretrue
if the operation is successfullInvalidTupleCentreIdException
- if arg1 (tuple centre's id) is not a well-formed ground logic
termpublic boolean nop_s_4(alice.tuprolog.Term ev, alice.tuprolog.Term g, alice.tuprolog.Term r, alice.tuprolog.Term tc) throws InvalidTupleCentreIdException, InvalidTupleArgumentException
ev
- the triggering event of a ReSpecT specificationg
- the guard of a ReSpecT specificationr
- the body of a ReSpecT specificationtc
- the identifier of the target tuple centretrue
if the operation is successfullInvalidTupleCentreIdException
- if tc (tuple centre's id) is not a well-formed ground logic
termInvalidTupleArgumentException
- if is not possible to create a valid Prolog Term with the
specified values for ev, g and rpublic boolean operation_0()
true
if the triggering event comes from an agent and
is directed toward a tuple centrepublic boolean out_2(alice.tuprolog.Term arg0, alice.tuprolog.Term arg1) throws InvalidTupleCentreIdException
arg0
- the tuple to inject in the tuple centrearg1
- the identifier of the target tuple centretrue
if the operation is successfullInvalidTupleCentreIdException
- if arg1 (tuple centre's id) is not a well-formed ground logic
termpublic boolean out_all_2(alice.tuprolog.Term arg0, alice.tuprolog.Term arg1) throws InvalidTupleCentreIdException
arg0
- the list of tuples to injectin the tuple centrearg1
- the identifier of the target tuple centretrue
if the operation is successfullInvalidTupleCentreIdException
- if arg1 (tuple centre's id) is not a well-formed ground logic
termpublic boolean out_s_4(alice.tuprolog.Term ev, alice.tuprolog.Term g, alice.tuprolog.Term r, alice.tuprolog.Term tc) throws InvalidTupleCentreIdException, InvalidTupleArgumentException
ev
- the triggering event of a ReSpecT specificationg
- the guard of a ReSpecT specificationr
- the body of a ReSpecT specificationtc
- the identifier of the target tuple centretrue
if the operation is successfullInvalidTupleCentreIdException
- if tc (tuple centre's id) is not a well-formed ground logic
termInvalidTupleArgumentException
- if is not possible to create a valid Prolog Term with the
specified values for ev, g and rpublic boolean post_0()
true
if the ReSpecT VM is in the completion phasepublic boolean pre_0()
true
if the ReSpecT VM is in the invocation phasepublic boolean rd_2(alice.tuprolog.Term arg0, alice.tuprolog.Term arg1) throws InvalidTupleCentreIdException
arg0
- the Prolog variable to unify the result witharg1
- the identifier of the target tuple centretrue
if the operation is successfullInvalidTupleCentreIdException
- if arg1 (tuple centre's id) is not a well-formed ground logic
termpublic boolean rd_all_3(alice.tuprolog.Term arg0, alice.tuprolog.Term arg1, alice.tuprolog.Term arg2) throws InvalidTupleCentreIdException, InvalidLogicTupleException
arg0
- the tuple template to be usedarg1
- the Prolog variable to unify the result witharg2
- the identifier of the target tuple centretrue
if the operation is successfullInvalidTupleCentreIdException
- if arg2 (tuple centre's id) is not a well-formed ground logic
termInvalidLogicTupleException
- if the text does not represent a valid logic tuplepublic boolean rd_s_4(alice.tuprolog.Term ev, alice.tuprolog.Term g, alice.tuprolog.Term r, alice.tuprolog.Term tc) throws InvalidTupleCentreIdException, InvalidTupleArgumentException
ev
- the triggering event of a ReSpecT specificationg
- the guard of a ReSpecT specificationr
- the body of a ReSpecT specificationtc
- the identifier of the target tuple centretrue
if the operation is successfullInvalidTupleCentreIdException
- if tc (tuple centre's id) is not a well-formed ground logic
termInvalidTupleArgumentException
- if is not possible to create a valid Prolog Term with the
specified values for ev, g and rpublic boolean rdp_2(alice.tuprolog.Term arg0, alice.tuprolog.Term arg1) throws InvalidTupleCentreIdException
arg0
- the Prolog variable to unify the result witharg1
- the identifier of the target tuple centretrue
if the operation is successfullInvalidTupleCentreIdException
- if arg1 (tuple centre's id) is not a well-formed ground logic
termpublic boolean rdp_s_4(alice.tuprolog.Term ev, alice.tuprolog.Term g, alice.tuprolog.Term r, alice.tuprolog.Term tc) throws InvalidTupleCentreIdException, InvalidTupleArgumentException
ev
- the triggering event of a ReSpecT specificationg
- the guard of a ReSpecT specificationr
- the body of a ReSpecT specificationtc
- the identifier of the target tuple centretrue
if the operation is successfullInvalidTupleCentreIdException
- if tc (tuple centre's id) is not a well-formed ground logic
termInvalidTupleArgumentException
- if is not possible to create a valid Prolog Term with the
specified values for ev, g and rpublic boolean req_0()
true
if the ReSpecT VM is in the invocation phasepublic boolean request_0()
public boolean resp_0()
true
if the ReSpecT VM is in the completion phasepublic boolean response_0()
public boolean setEnv_3(alice.tuprolog.Term env, alice.tuprolog.Term key, alice.tuprolog.Term val) throws TucsonOperationNotPossibleException, UnreachableNodeException, OperationTimeOutException
env
- the identifier of the target environmental resourcekey
- the environmental property to modifyval
- the value modifiedtrue
if the operation is successfullOperationTimeOutException
- if the notification operation expires timeoutUnreachableNodeException
- if the TuCSoN tuple centre target of the notification cannot
be reached over the networkTucsonOperationNotPossibleException
- if the requested operation cannot be performed for some
reasonpublic boolean spawn_2(alice.tuprolog.Term arg0, alice.tuprolog.Term arg1) throws InvalidTupleCentreIdException
arg0
- the Java class full name or tuProlog theory file path to spawnarg1
- the identifier of the target tuple centretrue
if the operation is successfullInvalidTupleCentreIdException
- if arg1 (tuple centre's id) is not a well-formed ground logic
termpublic boolean start_predicate_1(alice.tuprolog.Term predicate)
predicate
- the predicate prime cause of current ReSpecT eventtrue
if the current ReSpecT event has the given
prime causepublic boolean start_source_1(alice.tuprolog.Term source)
source
- the identifier of the prime cause source of the eventtrue
if current ReSpecT event prime cause has the
given sourcepublic boolean start_target_1(alice.tuprolog.Term target)
target
- the identifier of the prime cause targettrue
if current ReSpecT event prime cause has the
given targetpublic boolean start_time_1(alice.tuprolog.Term time)
time
- the expected time at which the current ReSpecT computation has
been triggered.public boolean start_tuple_1(alice.tuprolog.Term tuple)
tuple
- the tuple argument of the direct cause predicatetrue
if the direct cause tuple argument has the
given tuplepublic boolean success_0()
public boolean to_agent_0()
public boolean to_env_0()
true
if the triggering event was directed toward the
environmentpublic boolean to_tc_0()
public boolean uin_2(alice.tuprolog.Term arg0, alice.tuprolog.Term arg1) throws InvalidTupleCentreIdException
arg0
- the Prolog variable to unify the result witharg1
- the identifier of the target tuple centretrue
if the operation is successfullInvalidTupleCentreIdException
- if arg1 (tuple centre's id) is not a well-formed ground logic
termpublic boolean uinp_2(alice.tuprolog.Term arg0, alice.tuprolog.Term arg1) throws InvalidTupleCentreIdException
arg0
- the Prolog variable to unify the result witharg1
- the identifier of the target tuple centretrue
if the operation is successfullInvalidTupleCentreIdException
- if arg1 (tuple centre's id) is not a well-formed ground logic
termpublic boolean uno_2(alice.tuprolog.Term arg0, alice.tuprolog.Term arg1) throws InvalidTupleCentreIdException
arg0
- the Prolog variable to unify the result witharg1
- the identifier of the target tuple centretrue
if the operation is successfullInvalidTupleCentreIdException
- if arg1 (tuple centre's id) is not a well-formed ground logic
termpublic boolean unop_2(alice.tuprolog.Term arg0, alice.tuprolog.Term arg1) throws InvalidTupleCentreIdException
arg0
- the Prolog variable to unify the result witharg1
- the identifier of the target tuple centretrue
if the operation is successfullInvalidTupleCentreIdException
- if arg1 (tuple centre's id) is not a well-formed ground logic
termpublic boolean urd_2(alice.tuprolog.Term arg0, alice.tuprolog.Term arg1) throws InvalidTupleCentreIdException
arg0
- the Prolog variable to unify the result witharg1
- the identifier of the target tuple centretrue
if the operation is successfullInvalidTupleCentreIdException
- if arg1 (tuple centre's id) is not a well-formed ground logic
termpublic boolean urdp_2(alice.tuprolog.Term arg0, alice.tuprolog.Term arg1) throws InvalidTupleCentreIdException
arg0
- the Prolog variable to unify the result witharg1
- the identifier of the target tuple centretrue
if the operation is successfullInvalidTupleCentreIdException
- if arg1 (tuple centre's id) is not a well-formed ground logic
term