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
e7c79d3b
You need to sign in or sign up before continuing.
Commit
e7c79d3b
authored
8 months ago
by
Jan Gruteser
Browse files
Options
Downloads
Patches
Plain Diff
add comment
parent
be2f1e81
No related branches found
No related tags found
No related merge requests found
Pipeline
#144508
failed
8 months ago
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/de/tla2b/analysis/InstanceTransformation.java
+13
-2
13 additions, 2 deletions
src/main/java/de/tla2b/analysis/InstanceTransformation.java
with
13 additions
and
2 deletions
src/main/java/de/tla2b/analysis/InstanceTransformation.java
+
13
−
2
View file @
e7c79d3b
...
@@ -5,10 +5,18 @@ import tla2sany.semantic.*;
...
@@ -5,10 +5,18 @@ import tla2sany.semantic.*;
import
tlc2.tool.BuiltInOPs
;
import
tlc2.tool.BuiltInOPs
;
import
util.UniqueString
;
import
util.UniqueString
;
import
java.util.Arrays
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* This class handles substitutions during module instantiation, e.g.
* <p>
* M1 == INSTANCE Counter WITH x <- c, start <- 0
* <p>
* Example for usage in module:
* OpDef == /\ M1!Init
* <p>
* cf. <a href="https://lamport.azurewebsites.net/tla/newmodule.html">https://lamport.azurewebsites.net/tla/newmodule.html</a>
*/
public
class
InstanceTransformation
extends
BuiltInOPs
implements
ASTConstants
{
public
class
InstanceTransformation
extends
BuiltInOPs
implements
ASTConstants
{
private
final
OpDefNode
[]
defs
;
private
final
OpDefNode
[]
defs
;
...
@@ -24,6 +32,9 @@ public class InstanceTransformation extends BuiltInOPs implements ASTConstants {
...
@@ -24,6 +32,9 @@ public class InstanceTransformation extends BuiltInOPs implements ASTConstants {
new
InstanceTransformation
(
moduleNode
).
start
();
new
InstanceTransformation
(
moduleNode
).
start
();
}
}
/**
* replace all substitutions M1!Op1 by the real Op1 (?)
*/
private
void
start
()
{
private
void
start
()
{
for
(
OpDefNode
def
:
defs
)
{
for
(
OpDefNode
def
:
defs
)
{
if
(
def
.
getSource
()
!=
def
&&
!
BBuiltInOPs
.
contains
(
def
.
getSource
().
getName
()))
{
if
(
def
.
getSource
()
!=
def
&&
!
BBuiltInOPs
.
contains
(
def
.
getSource
().
getName
()))
{
...
...
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