cxbrooks / test

Second test for bugzilla to git
0 stars 0 forks source link

XMLToken parsing problems #230

Open cxbrooks opened 14 years ago

cxbrooks commented 14 years ago

Note: the issue was created automatically with bugzilla2github tool

Original bug ID: BZ#348 From: @cxbrooks Reported version: 8.1.devel CC: pt-dev@chess.eecs.berkeley.edu

cxbrooks commented 14 years ago

Created attachment 36 StringToXML to Test Problem

A Const -> StringToXML -> Test model hangs during run

I modified (hacked) XMLToken so that two XMLTokens are comparable. If their toString() representations are equal, then they are equal. (A better test would be to parse both and do the compare, but that would be a later day).

The attached model hangs

  1. $PTII/bin/vergil StringToXML.xml &

  2. run the model

  3. "kill -3 %1", I get:

"StringToXML" prio=1 tid=0x0102f3e0 nid=0x98b400 runnable [0xb0f32000..0xb0f33d90] at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.(Throwable.java:196) at java.lang.Exception.(Exception.java:41) at ptolemy.data.expr.ParseException.(ParseException.java:59) at ptolemy.data.expr.PtParser.generateParseException(PtParser.java:3962) at ptolemy.data.expr.PtParser.jj_consume_token(PtParser.java:3809) at ptolemy.data.expr.PtParser.unary(PtParser.java:1674) at ptolemy.data.expr.PtParser.power(PtParser.java:1207) at ptolemy.data.expr.PtParser.term(PtParser.java:1461) at ptolemy.data.expr.PtParser.sum(PtParser.java:1396) at ptolemy.data.expr.PtParser.shift(PtParser.java:1330) at ptolemy.data.expr.PtParser.relational(PtParser.java:1260) at ptolemy.data.expr.PtParser.logicalEquals(PtParser.java:1145) at ptolemy.data.expr.PtParser.bitwiseAnd(PtParser.java:1091) at ptolemy.data.expr.PtParser.bitwiseXor(PtParser.java:1038) at ptolemy.data.expr.PtParser.bitwiseOr(PtParser.java:985) at ptolemy.data.expr.PtParser.logicalAnd(PtParser.java:932) at ptolemy.data.expr.PtParser.logicalOr(PtParser.java:879) at ptolemy.data.expr.PtParser.funcIf(PtParser.java:828) at ptolemy.data.expr.PtParser.arrayConstruct(PtParser.java:2845) at ptolemy.data.expr.PtParser.primaryElement(PtParser.java:2223) at ptolemy.data.expr.PtParser.element(PtParser.java:1730) at ptolemy.data.expr.PtParser.unary(PtParser.java:1670) at ptolemy.data.expr.PtParser.power(PtParser.java:1207) at ptolemy.data.expr.PtParser.term(PtParser.java:1461) at ptolemy.data.expr.PtParser.sum(PtParser.java:1396) at ptolemy.data.expr.PtParser.shift(PtParser.java:1330) at ptolemy.data.expr.PtParser.relational(PtParser.java:1260) at ptolemy.data.expr.PtParser.logicalEquals(PtParser.java:1145) at ptolemy.data.expr.PtParser.bitwiseAnd(PtParser.java:1091) at ptolemy.data.expr.PtParser.bitwiseXor(PtParser.java:1038) at ptolemy.data.expr.PtParser.bitwiseOr(PtParser.java:985) at ptolemy.data.expr.PtParser.logicalAnd(PtParser.java:932) at ptolemy.data.expr.PtParser.logicalOr(PtParser.java:879) at ptolemy.data.expr.PtParser.funcIf(PtParser.java:828) at ptolemy.data.expr.PtParser.expression(PtParser.java:815) at ptolemy.data.expr.PtParser.start(PtParser.java:768) at ptolemy.data.expr.PtParser.generateParseTree(PtParser.java:180) at ptolemy.data.expr.Variable._parseIfNecessary(Variable.java:1706) at ptolemy.data.expr.Variable._evaluate(Variable.java:1634) at ptolemy.data.expr.Variable.getType(Variable.java:602) at ptolemy.data.expr.Variable$TypeTerm.getValue(Variable.java:2375) at ptolemy.graph.Inequality.isSatisfied(Inequality.java:130) at ptolemy.graph.InequalitySolver._solve(InequalitySolver.java:490) at ptolemy.graph.InequalitySolver.solveLeast(InequalitySolver.java:217) at ptolemy.actor.TypedCompositeActor.resolveTypes(TypedCompositeActor.java:267) at ptolemy.actor.Manager.resolveTypes(Manager.java:1111) at ptolemy.actor.Manager.preinitializeAndResolveTypes(Manager.java:993)

I think this might be because we are not correctly parsing the XMLToken?

In the model, the Constant has the value as a double quoted string:

In the Test actor, the value is not double quoted, which seems right: However, how will the parser know that this is an XMLToken? > Attached file: [StringToXML.xml](https://coq.inria.fr/bugfiles/attachment.cgi?id=36) (text/xml, 6518 bytes) > Description: StringToXML to Test Problem