Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tla2bAST
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
general
stups
tla2bAST
Commits
8f49aebf
Commit
8f49aebf
authored
9 months ago
by
Jan Gruteser
Browse files
Options
Downloads
Patches
Plain Diff
use OpApplNode instead of ExprNode in BOperation
parent
02d549cb
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#142852
passed
9 months ago
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/de/tla2b/analysis/BOperation.java
+6
-8
6 additions, 8 deletions
src/main/java/de/tla2b/analysis/BOperation.java
src/main/java/de/tla2b/translation/OperationsFinder.java
+1
-2
1 addition, 2 deletions
src/main/java/de/tla2b/translation/OperationsFinder.java
with
7 additions
and
10 deletions
src/main/java/de/tla2b/analysis/BOperation.java
+
6
−
8
View file @
8f49aebf
...
...
@@ -13,10 +13,9 @@ import java.util.*;
import
java.util.Map.Entry
;
import
java.util.stream.Collectors
;
public
class
BOperation
extends
BuiltInOPs
implements
ASTConstants
,
ToolGlobals
,
TranslationGlobals
{
public
class
BOperation
extends
BuiltInOPs
implements
ASTConstants
,
ToolGlobals
,
TranslationGlobals
{
private
final
String
name
;
private
final
Expr
Node
node
;
private
final
OpAppl
Node
node
;
private
final
List
<
OpApplNode
>
existQuans
;
private
List
<
String
>
opParams
;
private
List
<
FormalParamNode
>
formalParams
;
...
...
@@ -28,7 +27,7 @@ public class BOperation extends BuiltInOPs implements ASTConstants,
private
List
<
OpDeclNode
>
anyVariables
;
private
final
SpecAnalyser
specAnalyser
;
public
BOperation
(
String
name
,
Expr
Node
n
,
List
<
OpApplNode
>
existQuans
,
SpecAnalyser
specAnalyser
)
{
public
BOperation
(
String
name
,
OpAppl
Node
n
,
List
<
OpApplNode
>
existQuans
,
SpecAnalyser
specAnalyser
)
{
this
.
name
=
name
;
this
.
node
=
n
;
this
.
existQuans
=
existQuans
;
...
...
@@ -225,10 +224,9 @@ public class BOperation extends BuiltInOPs implements ASTConstants,
}
public
SymbolNode
getSymbolNode
()
{
if
(
node
instanceof
OpApplNode
)
{
OpApplNode
n
=
((
OpApplNode
)
node
);
if
(
n
.
getOperator
().
getKind
()
==
UserDefinedOpKind
)
{
return
((
OpApplNode
)
node
).
getOperator
();
if
(
node
!=
null
)
{
if
(
node
.
getOperator
().
getKind
()
==
UserDefinedOpKind
)
{
return
node
.
getOperator
();
}
}
return
null
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/de/tla2b/translation/OperationsFinder.java
+
1
−
2
View file @
8f49aebf
...
...
@@ -92,8 +92,7 @@ public class OperationsFinder extends AbstractASTVisitor implements
visitExprOrOpArgNode
(
n
.
getArgs
()[
0
]);
}
else
{
String
oldName
=
currentName
;
ArrayList
<
OpApplNode
>
oldExists
=
new
ArrayList
<>(
exists
);
ArrayList
<
OpApplNode
>
oldExists
=
new
ArrayList
<>(
exists
);
for
(
int
i
=
0
;
i
<
n
.
getArgs
().
length
;
i
++)
{
exists
=
new
ArrayList
<>(
oldExists
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment