Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tlatools
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
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
tlatools
Commits
2d4b4fb2
Commit
2d4b4fb2
authored
Jul 30, 2015
by
hansene
Browse files
Options
Downloads
Patches
Plain Diff
Collecting all assumption errors
parent
30d171e1
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
tlatools/build.gradle
+0
-1
0 additions, 1 deletion
tlatools/build.gradle
tlatools/src/tlc2/output/OutputCollector.java
+5
-5
5 additions, 5 deletions
tlatools/src/tlc2/output/OutputCollector.java
tlatools/src/tlc2/tool/ModelChecker.java
+9
-4
9 additions, 4 deletions
tlatools/src/tlc2/tool/ModelChecker.java
with
14 additions
and
10 deletions
tlatools/build.gradle
+
0
−
1
View file @
2d4b4fb2
...
@@ -5,7 +5,6 @@ apply plugin: 'maven'
...
@@ -5,7 +5,6 @@ apply plugin: 'maven'
project
.
version
=
'1.0.0-SNAPSHOT'
project
.
version
=
'1.0.0-SNAPSHOT'
project
.
group
=
'de.tla'
project
.
group
=
'de.tla'
sourceCompatibility
=
1.5
repositories
{
repositories
{
mavenCentral
()
mavenCentral
()
...
...
This diff is collapsed.
Click to expand it.
tlatools/src/tlc2/output/OutputCollector.java
+
5
−
5
View file @
2d4b4fb2
...
@@ -17,7 +17,7 @@ public class OutputCollector {
...
@@ -17,7 +17,7 @@ public class OutputCollector {
private
static
ArrayList
<
Message
>
allMessages
=
new
ArrayList
<
Message
>();
private
static
ArrayList
<
Message
>
allMessages
=
new
ArrayList
<
Message
>();
private
static
Hashtable
<
Location
,
Long
>
lineCount
=
new
Hashtable
<
Location
,
Long
>();
private
static
Hashtable
<
Location
,
Long
>
lineCount
=
new
Hashtable
<
Location
,
Long
>();
private
static
ModuleNode
moduleNode
=
null
;
private
static
ModuleNode
moduleNode
=
null
;
private
static
ExprNode
violatedAssumption
=
n
ull
;
private
static
ArrayList
<
ExprNode
>
violatedAssumption
s
=
n
ew
ArrayList
<>()
;
public
static
ArrayList
<
TLCStateInfo
>
getTrace
()
{
public
static
ArrayList
<
TLCStateInfo
>
getTrace
()
{
return
trace
;
return
trace
;
...
@@ -46,12 +46,12 @@ public class OutputCollector {
...
@@ -46,12 +46,12 @@ public class OutputCollector {
return
allMessages
;
return
allMessages
;
}
}
public
static
void
set
ViolatedAssumption
(
ExprNode
assumption
)
{
public
static
void
add
ViolatedAssumption
(
ExprNode
assumption
)
{
violatedAssumption
=
assumption
;
violatedAssumption
s
.
add
(
assumption
)
;
}
}
public
static
ExprNode
getViolatedAssumption
()
{
public
static
ArrayList
<
ExprNode
>
getViolatedAssumption
s
()
{
return
violatedAssumption
;
return
violatedAssumption
s
;
}
}
public
synchronized
static
void
saveMessage
(
int
messageClass
,
public
synchronized
static
void
saveMessage
(
int
messageClass
,
...
...
This diff is collapsed.
Click to expand it.
tlatools/src/tlc2/tool/ModelChecker.java
+
9
−
4
View file @
2d4b4fb2
...
@@ -267,25 +267,30 @@ public class ModelChecker extends AbstractChecker
...
@@ -267,25 +267,30 @@ public class ModelChecker extends AbstractChecker
{
{
ExprNode
[]
assumps
=
this
.
tool
.
getAssumptions
();
ExprNode
[]
assumps
=
this
.
tool
.
getAssumptions
();
boolean
[]
isAxiom
=
this
.
tool
.
getAssumptionIsAxiom
();
boolean
[]
isAxiom
=
this
.
tool
.
getAssumptionIsAxiom
();
boolean
assumptionsAreTRUE
=
true
;
for
(
int
i
=
0
;
i
<
assumps
.
length
;
i
++)
for
(
int
i
=
0
;
i
<
assumps
.
length
;
i
++)
{
{
try
try
{
{
if
((!
isAxiom
[
i
])
&&
!
this
.
tool
.
isValid
(
assumps
[
i
]))
if
((!
isAxiom
[
i
])
&&
!
this
.
tool
.
isValid
(
assumps
[
i
]))
{
{
OutputCollector
.
set
ViolatedAssumption
(
assumps
[
i
]);
OutputCollector
.
add
ViolatedAssumption
(
assumps
[
i
]);
MP
.
printError
(
EC
.
TLC_ASSUMPTION_FALSE
,
assumps
[
i
].
toString
());
MP
.
printError
(
EC
.
TLC_ASSUMPTION_FALSE
,
assumps
[
i
].
toString
());
return
false
;
//return false;
assumptionsAreTRUE
=
false
;
}
}
}
catch
(
Exception
e
)
}
catch
(
Exception
e
)
{
{
// Assert.printStack(e);
// Assert.printStack(e);
OutputCollector
.
addViolatedAssumption
(
assumps
[
i
]);
MP
.
printError
(
EC
.
TLC_ASSUMPTION_EVALUATION_ERROR
,
MP
.
printError
(
EC
.
TLC_ASSUMPTION_EVALUATION_ERROR
,
new
String
[]
{
assumps
[
i
].
toString
(),
e
.
getMessage
()
});
new
String
[]
{
assumps
[
i
].
toString
(),
e
.
getMessage
()
});
return
false
;
//return false;
assumptionsAreTRUE
=
false
;
}
}
}
}
return
true
;
//return true;
return
assumptionsAreTRUE
;
}
}
/**
/**
...
...
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