From: <jom...@us...> - 2013-10-29 20:25:06
|
Revision: 1754 http://sourceforge.net/p/jason/svn/1754 Author: jomifred Date: 2013-10-29 20:25:04 +0000 (Tue, 29 Oct 2013) Log Message: ----------- fix a bug in Message class as reported by Lucas Welter Hilgert Modified Paths: -------------- trunk/src/jason/asSemantics/Message.java trunk/src/jason/asSyntax/PredicateIndicator.java trunk/src/jason/stdlib/relevant_plans.java Modified: trunk/src/jason/asSemantics/Message.java =================================================================== --- trunk/src/jason/asSemantics/Message.java 2013-10-24 20:07:19 UTC (rev 1753) +++ trunk/src/jason/asSemantics/Message.java 2013-10-29 20:25:04 UTC (rev 1754) @@ -164,7 +164,7 @@ if (msg.startsWith("<")) { one = msg.indexOf(","); int arrowIndex = msg.indexOf("->"); - if (one < arrowIndex) { // If there is an arrow before the first comma + if (one > arrowIndex) { // If there is an arrow before the first comma newmsg.msgId = msg.substring(1, arrowIndex); newmsg.inReplyTo = msg.substring(arrowIndex + 2, one); } else { // If not (either there is no arrow, or there is one behind the first comma) Modified: trunk/src/jason/asSyntax/PredicateIndicator.java =================================================================== --- trunk/src/jason/asSyntax/PredicateIndicator.java 2013-10-24 20:07:19 UTC (rev 1753) +++ trunk/src/jason/asSyntax/PredicateIndicator.java 2013-10-29 20:25:04 UTC (rev 1754) @@ -1,11 +1,13 @@ package jason.asSyntax; +import java.io.Serializable; + /** * Represents the "type" of a predicate based on the functor and the arity, e.g.: ask/4 * * @author jomi */ -public final class PredicateIndicator { +public final class PredicateIndicator implements Serializable { private final String functor; private final int arity; Modified: trunk/src/jason/stdlib/relevant_plans.java =================================================================== --- trunk/src/jason/stdlib/relevant_plans.java 2013-10-24 20:07:19 UTC (rev 1753) +++ trunk/src/jason/stdlib/relevant_plans.java 2013-10-29 20:25:04 UTC (rev 1754) @@ -99,15 +99,13 @@ np.getLabel().delSources(); np.setAsPlanTerm(true); np.makeVarsAnnon(); - //StringTerm stplan = new StringTermImpl(np.toASString().replaceAll("\\\"", "\\\\\"")); - //last = last.append(stplan); last = last.append(np); if (args.length == 3) labels.add(np.getLabel()); } } - boolean ok = un.unifies(lt, args[1]); // second arg is a var; + boolean ok = un.unifies(lt, args[1]); // args[1] is a var; if (ok && args.length == 3) ok = un.unifies(labels, args[2]); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |