Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tlc4b
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
tlc4b
Commits
033c0b03
Commit
033c0b03
authored
10 years ago
by
hansen
Browse files
Options
Downloads
Patches
Plain Diff
Fixed type restriction bug
parent
2a4bbd9d
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/de/tlc4b/analysis/typerestriction/TypeRestrictor.java
+18
-17
18 additions, 17 deletions
...ava/de/tlc4b/analysis/typerestriction/TypeRestrictor.java
with
18 additions
and
17 deletions
src/main/java/de/tlc4b/analysis/typerestriction/TypeRestrictor.java
+
18
−
17
View file @
033c0b03
...
@@ -196,6 +196,7 @@ public class TypeRestrictor extends DepthFirstAdapter {
...
@@ -196,6 +196,7 @@ public class TypeRestrictor extends DepthFirstAdapter {
private
void
analysePredicate
(
Node
n
,
HashSet
<
Node
>
list
,
private
void
analysePredicate
(
Node
n
,
HashSet
<
Node
>
list
,
HashSet
<
Node
>
ignoreList
)
{
HashSet
<
Node
>
ignoreList
)
{
if
(
removedNodes
.
contains
(
n
))
if
(
removedNodes
.
contains
(
n
))
return
;
return
;
...
@@ -227,23 +228,23 @@ public class TypeRestrictor extends DepthFirstAdapter {
...
@@ -227,23 +228,23 @@ public class TypeRestrictor extends DepthFirstAdapter {
putRestrictedType
(
r_right
,
new
ASetExtensionExpression
(
element
));
putRestrictedType
(
r_right
,
new
ASetExtensionExpression
(
element
));
removedNodes
.
add
(
n
);
removedNodes
.
add
(
n
);
}
}
if
(
left
instanceof
ACoupleExpression
)
{
// detecting couples, e.g. (a,b) = (1,3)
ACoupleExpression
couple
=
(
ACoupleExpression
)
left
;
//
if (left instanceof
ACoupleExpression)
{
P
Expression
first
=
couple
.
getList
().
get
(
0
)
;
//
ACouple
Expression
couple = (ACoupleExpression) left
;
Node
r_first
=
machineContext
.
getReferenceNode
(
first
);
//
PExpression first = couple.getList().get(0
);
PExpression
second
=
couple
.
getList
().
get
(
0
);
//
Node r_first = machineContext.getReferenceNode(first
);
Node
r_second
=
machineContext
.
getReferenceNode
(
second
);
//
PExpression second = couple.getList().get(0
);
// Node r_second = machineContext.getReferenceNode(second);
if
(
list
.
contains
(
r_first
)
&&
list
.
contains
(
r_second
)
//
&&
isAC
on
s
ta
ntExpression
(
right
,
list
,
ignoreList
))
{
//
if (list.c
onta
ins(r_first) && list.contains(r_second)
ArrayList
<
PExpression
>
element
=
new
ArrayList
<
PExpression
>();
//
&& isAConstantExpression(right, list, ignoreList)) {
element
.
add
(
right
);
//
ArrayList<PExpression> element = new ArrayList<PExpression>(
);
putRestrictedTypeOfTuple
(
r_
right
,
//
element.add(
right
);
new
ASetExtensionExpression
(
element
));
//
putRestrictedTypeOfTuple(r_right,
removedNodes
.
add
(
n
);
//
new ASetExtensionExpression(element)
);
}
//
removedNodes.add(n);
// }
}
//
}
return
;
return
;
}
}
...
...
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