Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • eclipse/escet/escet
  • droy2/escet
  • ameer/escet
  • frankvlaar/escet
  • bartwesselink/escet
  • mreniers/escet
  • sthuijsman/escet
  • jverbakel/escet
  • pvberkel/escet
  • riklubking/escet
  • mbaubek/escet
  • wytseoortwijn/escet
  • mgoorden7u4/escet
  • robertb/escet-cif
  • fgurr/escet
  • ribafish/eclipse-escet
  • timokopmels/escet
  • tbeijloos/escet
  • brentelia/escet
19 results
Show changes
Commits on Source (7)
Showing with 593 additions and 123 deletions
...@@ -282,8 +282,8 @@ Addressables : Addressable ...@@ -282,8 +282,8 @@ Addressables : Addressable
| Addressables "," Addressable | Addressables "," Addressable
; ;
Addressable : Identifier Addressable : Name
| Identifier Projections | Name Projections
| "(" Addressable "," Addressables ")" | "(" Addressable "," Addressables ")"
; ;
......
...@@ -1169,13 +1169,13 @@ implements CifParser.Hooks ...@@ -1169,13 +1169,13 @@ implements CifParser.Hooks
// return null; // return null;
} }
@Override // Addressable : Identifier; @Override // Addressable : Name;
public AExpression parseAddressable1(AIdentifier a1) { public AExpression parseAddressable1(AName a1) {
// return null; // return null;
} }
@Override // Addressable : Identifier Projections; @Override // Addressable : Name Projections;
public AExpression parseAddressable2(AIdentifier a1, List<AProjectionExpression> l2) { public AExpression parseAddressable2(AName a1, List<AProjectionExpression> l2) {
// return null; // return null;
} }
......
...@@ -1365,14 +1365,14 @@ public final class CifParserHooks implements CifParser.Hooks { ...@@ -1365,14 +1365,14 @@ public final class CifParserHooks implements CifParser.Hooks {
return l1; return l1;
} }
@Override // Addressable : Identifier; @Override // Addressable : Name;
public AExpression parseAddressable1(AIdentifier a1) { public AExpression parseAddressable1(AName a1) {
return new ANameExpression(new AName(a1.id, a1.position), false, copyPosition(a1.position)); return new ANameExpression(new AName(a1.name, a1.position), false, copyPosition(a1.position));
} }
@Override // Addressable : Identifier Projections; @Override // Addressable : Name Projections;
public AExpression parseAddressable2(AIdentifier a1, List<AProjectionExpression> l2) { public AExpression parseAddressable2(AName a1, List<AProjectionExpression> l2) {
AExpression refExpr = new ANameExpression(new AName(a1.id, a1.position), false, copyPosition(a1.position)); AExpression refExpr = new ANameExpression(new AName(a1.name, a1.position), false, copyPosition(a1.position));
AProjectionExpression rslt = null; AProjectionExpression rslt = null;
for (AProjectionExpression proj: l2) { for (AProjectionExpression proj: l2) {
if (rslt == null) { if (rslt == null) {
......
...@@ -587,8 +587,8 @@ Addressables : Addressable ...@@ -587,8 +587,8 @@ Addressables : Addressable
; ;
{exprs.AExpression} {exprs.AExpression}
Addressable : Identifier Addressable : Name
| Identifier Projections | Name Projections
| @PAROPENTK Addressable COMMATK Addressables PARCLOSETK | @PAROPENTK Addressable COMMATK Addressables PARCLOSETK
; ;
......
...@@ -14,10 +14,20 @@ ...@@ -14,10 +14,20 @@
group g: group g:
cont x1 = 1.0 der 2.0; cont x1 = 1.0 der 2.0;
cont x2 = 3.0 der 4.0; cont x2 = 3.0 der 4.0;
cont x3 = 5.0 der 6.0;
cont x4 = 7.0 der 8.0;
automaton p: automaton p:
location: location:
initial; initial;
edge do (x1, x2) := (3.0, 4.0); edge do (x1, x2, .g.x3, ^g.x4, q.x5) := (1.0, 2.0, 3.0, 4.0, 5.0);
edge do ( .g.q.x1, ^g.x2, q.x3) := (1.0, 2.0, 3.0);
end
automaton q:
cont x5 = 9.0 der 10.0;
disc real x1, x2, x3;
location:
initial;
end end
end end
ERROR: File "tchecker/asgn_non_local_var.cif": Semantic error at line 21, column 16: Cannot assign variable "g.x1", as it is not declared in automaton "g.p". ERROR: File "tchecker/asgn_non_local_var.cif": Semantic error at line 23, column 16: Cannot assign variable "g.x1", as it is not declared in automaton "g.p".
ERROR: File "tchecker/asgn_non_local_var.cif": Semantic error at line 21, column 20: Cannot assign variable "g.x2", as it is not declared in automaton "g.p". ERROR: File "tchecker/asgn_non_local_var.cif": Semantic error at line 23, column 20: Cannot assign variable "g.x2", as it is not declared in automaton "g.p".
ERROR: File "tchecker/asgn_non_local_var.cif": Semantic error at line 23, column 24: Cannot assign variable "g.x3", as it is not declared in automaton "g.p".
ERROR: File "tchecker/asgn_non_local_var.cif": Semantic error at line 23, column 33: Cannot assign variable "g.x4", as it is not declared in automaton "g.p".
ERROR: File "tchecker/asgn_non_local_var.cif": Semantic error at line 23, column 40: Cannot assign variable "g.q.x5", as it is not declared in automaton "g.p".
ERROR: File "tchecker/asgn_non_local_var.cif": Semantic error at line 24, column 24: Cannot assign variable "g.q.x1", as it is not declared in automaton "g.p".
ERROR: File "tchecker/asgn_non_local_var.cif": Semantic error at line 24, column 33: Cannot assign variable "g.x2", as it is not declared in automaton "g.p".
ERROR: File "tchecker/asgn_non_local_var.cif": Semantic error at line 24, column 40: Cannot assign variable "g.q.x3", as it is not declared in automaton "g.p".
ERROR: Failed to load CIF file "tchecker/asgn_non_local_var.cif": the file has errors. ERROR: Failed to load CIF file "tchecker/asgn_non_local_var.cif": the file has errors.
...@@ -962,12 +962,6 @@ public class AutScope extends ParentScope<Automaton> { ...@@ -962,12 +962,6 @@ public class AutScope extends ParentScope<Automaton> {
Assert.check(varParent instanceof ComplexComponent); Assert.check(varParent instanceof ComplexComponent);
Automaton curAut = scope.getAutomaton(); Automaton curAut = scope.getAutomaton();
if (varParent != curAut) { if (varParent != curAut) {
// This should actually hold by construction for discrete
// variables, as we can only specify an identifier in the
// ASCII syntax (not a general name), and ancestor scopes
// can't declare discrete variables. For continuous
// variables however, ancestor scopes can define them as
// well.
tchecker.addProblem(ErrMsg.ASGN_NON_LOCAL_VAR, expr.getPosition(), CifTextUtils.getAbsName(var), tchecker.addProblem(ErrMsg.ASGN_NON_LOCAL_VAR, expr.getPosition(), CifTextUtils.getAbsName(var),
CifTextUtils.getAbsName(curAut)); CifTextUtils.getAbsName(curAut));
// Non-fatal error. // Non-fatal error.
......