Commit 4bac1afd authored by Alfons Laarman's avatar Alfons Laarman
Browse files

Fix assignedTo for structs

parent 8e0eb28f
......@@ -642,6 +642,10 @@ public class LTSminTreeWalker {
ChannelReadAction newcra = new ChannelReadAction(cra.getToken(), id, cra.isPoll(), cra.isRandom());
for (Expression e : cra.getExprs()) {
Expression newe = instantiate(e, p, true);
if (newe instanceof Identifier) {
Identifier newid = (Identifier) newe;
newid.getVariable().setAssignedTo();
}
newcra.addExpression(newe);
}
reads.add(new ReadAction(newcra, t, t.getProc()));
......
......@@ -199,11 +199,11 @@ public class LTSminStateVector extends LTSminSubVectorStruct
lvar = new LTSminVariable(type, var, struct);
} else if (var.getType() instanceof VariableType) {
try {
var.getConstantValue();
debug.say(MessageKind.DEBUG, var.getType().getName() +" "+ name +" --> SKIPPING CONSTANT");
return;
var.getConstantValue();
debug.say(MessageKind.DEBUG, var.getType().getName() +" "+ name +" --> SKIPPING CONSTANT");
return;
} catch (ParseException pe) {
debug.say(MessageKind.DEBUG, var.getType().getName() +" "+ name);
debug.say(MessageKind.DEBUG, var.getType().getName() +" "+ name);
}
lvar = new LTSminVariable(LTSminTypeNative.get(var), var, struct);
} else {
......
......@@ -140,6 +140,12 @@ public class Variable {
public Variable setAssignedTo() {
assignedTo = true;
if (type instanceof CustomVariableType) {
CustomVariableType cvt = (CustomVariableType) type;
for (Variable v : cvt.getVariableStore().getVariables()) {
v.setAssignedTo();
}
}
return this;
}
public boolean isNotAssignedTo() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment