Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
spins-ltsmin-deb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Spot
spins-ltsmin-deb
Commits
8d8f1727
Commit
8d8f1727
authored
Nov 21, 2018
by
Pim Wijn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed output formatting bug where models compiled without -T would get syntax errors
parent
186182e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
src/spins/promela/compiler/ltsmin/LTSminPrinter.java
src/spins/promela/compiler/ltsmin/LTSminPrinter.java
+10
-3
No files found.
src/spins/promela/compiler/ltsmin/LTSminPrinter.java
View file @
8d8f1727
...
...
@@ -1826,13 +1826,16 @@ public class LTSminPrinter {
generateMaybe
(
w
,
id
.
getArrayExpr
(),
state
);
generateMaybe
(
w
,
id
.
getSub
(),
state
);
if
(
id
.
getArrayExpr
()
!=
null
)
{
w
.
append
(
" || "
);
if
(
w
.
options
.
total
)
{
w
.
append
(
" || "
);
}
generateExpression
(
w
,
id
.
getArrayExpr
(),
state
);
w
.
append
(
" < 0 || "
);
generateExpression
(
w
,
id
.
getArrayExpr
(),
state
);
w
.
append
(
String
.
format
(
" >= %d"
,
id
.
getVariable
().
getArraySize
()));
}
else
if
(
id
.
getVariable
().
getArrayIndex
()
!=
-
1
)
{
w
.
append
(
String
.
format
(
" || %s < 0 || %s >= %d"
,
id
.
getVariable
().
getArrayIndex
(),
id
.
getVariable
().
getArrayIndex
(),
id
.
getVariable
().
getArraySize
()));
w
.
append
(
String
.
format
(
" || %s < 0 || %s >= %d"
,
id
.
getVariable
().
getArrayIndex
(),
id
.
getVariable
().
getArrayIndex
(),
id
.
getVariable
().
getArraySize
()));
}
}
else
if
(
e
instanceof
AritmicExpression
)
{
AritmicExpression
ae
=
(
AritmicExpression
)
e
;
...
...
@@ -2090,7 +2093,11 @@ public class LTSminPrinter {
String
maybe
=
w2
.
toString
();
if
(
maybe
.
length
()
!=
0
)
{
w
.
append
(
"(0"
);
if
(
w
.
options
.
total
)
{
w
.
append
(
"(0"
);
}
else
{
w
.
append
(
"("
);
}
w
.
append
(
maybe
);
w
.
append
(
") ? 2 :"
).
appendLine
();
w
.
appendPrefix
().
appendPrefix
().
appendPrefix
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment