При попытке отправить сообщение отмены возникла ошибка. Я написал простой проект для объяснения: когда Боб отправляет сообщение untell, происходит ошибка в системе перехода. Можно ли убрать веру, не сказав? Итак, как его отправить?
Код Боба:
!start.
+!start <-
.print("Starting...");
.send(alice, tell, hi).
+hi <-
.print("Hi");
.send(alice, tell, marryMe).
+yes <-
.print("No no...");
.send(alice, untell, marryMe).
{ include("$jacamoJar/templates/common-cartago.asl") }
{ include("$jacamoJar/templates/common-moise.asl") }
Код Алисы:
+hi <-
.print("Hi");
.send(bob, tell, hi).
+marryMe <-
.print("Yes!");
.send(bob, tell, yes).
-marryMe <- .print("Humm?").
{ include("$jacamoJar/templates/common-cartago.asl") }
{ include("$jacamoJar/templates/common-moise.asl") }
Проект:
mas jacamotest {
agent bob
agent alice
}
Вывод Jacamo:
CArtAgO Http Server running on http://X.X.X.X:3273
Jason Http Server running on http://X.X.X.X:3272
[bob] Starting...
[alice] Hi
[bob] Hi
[alice] Yes!
[bob] No no...
[ArithExpr] The value of (-NS::CA) is not a number! Unifier = {Sender=bob, NS=default, Content=marryMe, _42=mid5,
CA=marryMe[source(bob)]}. Code: kqmlPlans.asl:43
[alice] *** ERROR in the transition system (act). Circumstance:
E =[]
I =[]
A =null
MB=[]
RP=null
AP=null
SE=+!kqml_received(bob,untell,marryMe,mid5)
SO=(@kqmlReceivedUnTell[source(self)] +!kqml_received(Sender,untell,NS::Content,_42) <- .add_nested_source(Content,Sender,CA); -(-NS::CA).,{Sender=bob,
NS=default, Content=marryMe, _42=mid5, CA=marryMe[source(bob)]})
SI=intention 6:
+!kqml_received(bob,untell,marryMe,mid5) <- ... -(-NS::CA) / {Sender=bob, NS=default, Content=marryMe, _42=mid5,
CA=marryMe[source(bob)]}
AI=null
AE=null
PA={}
PI={}
FA=[].
Creating a new C!
java.lang.ClassCastException: jason.asSyntax.NumberTermImpl cannot be cast to jason.asSyntax.Literal
at jason.asSemantics.TransitionSystem.prepareBodyForEvent(TransitionSystem.java:932)
at jason.asSemantics.TransitionSystem.applyExecInt(TransitionSystem.java:907)
at jason.asSemantics.TransitionSystem.applySemanticRuleAct(TransitionSystem.java:237)
at jason.asSemantics.TransitionSystem.act(TransitionSystem.java:1525)
at jason.infra.centralised.CentralisedAgArch.act(CentralisedAgArch.java:203)
at jason.infra.centralised.CentralisedAgArch.reasoningCycle(CentralisedAgArch.java:212)
at jason.infra.centralised.CentralisedAgArch.run(CentralisedAgArch.java:231)
at java.base/java.lang.Thread.run(Thread.java:844)