Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TTool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mbe-tools
TTool
Commits
6f3c792a
Commit
6f3c792a
authored
4 years ago
by
tempiaa
Browse files
Options
Downloads
Patches
Plain Diff
Better organization of graphic elements in model-checking window
parent
c8134e3a
No related branches found
Branches containing commit
No related tags found
1 merge request
!325
Avatar model-checker improvements
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/ui/window/JDialogAvatarModelChecker.java
+89
-39
89 additions, 39 deletions
src/main/java/ui/window/JDialogAvatarModelChecker.java
with
89 additions
and
39 deletions
src/main/java/ui/window/JDialogAvatarModelChecker.java
+
89
−
39
View file @
6f3c792a
...
...
@@ -43,7 +43,6 @@ import avatartranslator.AvatarSpecification;
import
avatartranslator.AvatarStateMachineElement
;
import
avatartranslator.modelchecker.AvatarModelChecker
;
import
avatartranslator.modelchecker.SafetyProperty
;
import
avatartranslator.modelchecker.SpecificationLiveness
;
import
avatartranslator.modelchecker.SpecificationReachability
;
import
avatartranslator.modelchecker.SpecificationPropertyPhase
;
import
myutil.*
;
...
...
@@ -185,6 +184,9 @@ public class JDialogAvatarModelChecker extends javax.swing.JFrame implements Act
if
(
graphDirDot
==
null
)
{
graphDirDot
=
_graphDir
+
File
.
separator
+
"rgavatar$.dot"
;
}
stateLimitValue
=
"100"
;
timeLimitValue
=
"5000"
;
//showLiveness = _showLiveness;
showLiveness
=
true
;
...
...
@@ -219,11 +221,24 @@ public class JDialogAvatarModelChecker extends javax.swing.JFrame implements Act
// Issue #41 Ordering of tabbed panes
jp1
=
GraphicLib
.
createTabbedPane
();
//new JTabbedPane();
JPanel
jpopt
=
new
JPanel
();
GridBagLayout
gridbagopt
=
new
GridBagLayout
();
GridBagConstraints
copt
=
new
GridBagConstraints
();
jpopt
.
setLayout
(
gridbagopt
);
jpopt
.
setBorder
(
new
javax
.
swing
.
border
.
TitledBorder
(
"Options"
));
copt
.
gridwidth
=
1
;
copt
.
gridheight
=
1
;
copt
.
weighty
=
1.0
;
copt
.
weightx
=
1.0
;
copt
.
fill
=
GridBagConstraints
.
HORIZONTAL
;
copt
.
gridwidth
=
GridBagConstraints
.
REMAINDER
;
//end row
JPanel
jp01
=
new
JPanel
();
GridBagLayout
gridbag01
=
new
GridBagLayout
();
GridBagConstraints
c01
=
new
GridBagConstraints
();
jp01
.
setLayout
(
gridbag01
);
jp01
.
setBorder
(
new
javax
.
swing
.
border
.
TitledBorder
(
"
O
ptions"
));
jp01
.
setBorder
(
new
javax
.
swing
.
border
.
TitledBorder
(
"
Graph generation o
ptions"
));
c01
.
gridwidth
=
1
;
c01
.
gridheight
=
1
;
...
...
@@ -249,55 +264,95 @@ public class JDialogAvatarModelChecker extends javax.swing.JFrame implements Act
ignoreInternalStates
.
addActionListener
(
this
);
jp01
.
add
(
ignoreInternalStates
,
c01
);
//Limitations
c01
.
gridwidth
=
1
;
stateLimit
=
new
JCheckBox
(
"Limit number of states in RG:"
,
limitStatesSelected
);
stateLimit
.
addActionListener
(
this
);
jp01
.
add
(
stateLimit
,
c01
);
c01
.
gridwidth
=
GridBagConstraints
.
REMAINDER
;
stateLimitField
=
new
JTextField
(
stateLimitValue
);
jp01
.
add
(
stateLimitField
,
c01
);
c01
.
gridwidth
=
1
;
timeLimit
=
new
JCheckBox
(
"Time constraint for RG generation (ms):"
,
limitTimeSelected
);
timeLimit
.
addActionListener
(
this
);
jp01
.
add
(
timeLimit
,
c01
);
c01
.
gridwidth
=
GridBagConstraints
.
REMAINDER
;
timeLimitField
=
new
JTextField
(
timeLimitValue
);
jp01
.
add
(
timeLimitField
,
c01
);
JPanel
jpbasic
=
new
JPanel
();
GridBagLayout
gridbagbasic
=
new
GridBagLayout
();
GridBagConstraints
cbasic
=
new
GridBagConstraints
();
jpbasic
.
setLayout
(
gridbagbasic
);
jpbasic
.
setBorder
(
new
javax
.
swing
.
border
.
TitledBorder
(
"Properties verification"
));
cbasic
.
gridwidth
=
1
;
cbasic
.
gridheight
=
1
;
cbasic
.
weighty
=
1.0
;
cbasic
.
weightx
=
1.0
;
cbasic
.
fill
=
GridBagConstraints
.
HORIZONTAL
;
cbasic
.
gridwidth
=
GridBagConstraints
.
REMAINDER
;
//end row
// Deadlocks
noDeadlocks
=
new
JCheckBox
(
"No deadlocks?"
,
checkNoDeadSelected
);
noDeadlocks
.
addActionListener
(
this
);
jp01
.
add
(
noDeadlocks
,
c01
);
jpbasic
.
add
(
noDeadlocks
,
cbasic
);
// Reachability
cbasic
.
gridwidth
=
1
;
jpbasic
.
add
(
new
JLabel
(
"Reachability:"
),
cbasic
);
reachabilities
=
new
ButtonGroup
();
noReachability
=
new
JRadioButton
(
"No
reachability
"
);
noReachability
=
new
JRadioButton
(
"No
ne
"
);
noReachability
.
addActionListener
(
this
);
jp
01
.
add
(
noReachability
,
c
01
);
jp
basic
.
add
(
noReachability
,
c
basic
);
reachabilities
.
add
(
noReachability
);
reachabilityCheckable
=
new
JRadioButton
(
"
Reachability of s
elected states"
);
reachabilityCheckable
=
new
JRadioButton
(
"
S
elected states"
);
reachabilityCheckable
.
addActionListener
(
this
);
jp
01
.
add
(
reachabilityCheckable
,
c
01
);
jp
basic
.
add
(
reachabilityCheckable
,
c
basic
);
reachabilities
.
add
(
reachabilityCheckable
);
reachabilityAllStates
=
new
JRadioButton
(
"Reachability of all states"
);
cbasic
.
gridwidth
=
GridBagConstraints
.
REMAINDER
;
reachabilityAllStates
=
new
JRadioButton
(
"All states"
);
reachabilityAllStates
.
addActionListener
(
this
);
jp
01
.
add
(
reachabilityAllStates
,
c
01
);
jp
basic
.
add
(
reachabilityAllStates
,
c
basic
);
reachabilities
.
add
(
reachabilityAllStates
);
noReachability
.
setSelected
(
reachabilitySelected
==
REACHABILITY_NONE
);
reachabilityCheckable
.
setSelected
(
reachabilitySelected
==
REACHABILITY_SELECTED
);
reachabilityAllStates
.
setSelected
(
reachabilitySelected
==
REACHABILITY_ALL
);
// Liveness
cbasic
.
gridwidth
=
1
;
jpbasic
.
add
(
new
JLabel
(
"Liveness:"
),
cbasic
);
liveness
=
new
ButtonGroup
();
noLiveness
=
new
JRadioButton
(
"No
liveness
"
);
noLiveness
=
new
JRadioButton
(
"No
ne
"
);
noLiveness
.
addActionListener
(
this
);
if
(
showLiveness
)
{
jp
01
.
add
(
noLiveness
,
c
01
);
jp
basic
.
add
(
noLiveness
,
c
basic
);
}
liveness
.
add
(
noLiveness
);
livenessCheckable
=
new
JRadioButton
(
"
Liveness of s
elected states"
);
livenessCheckable
=
new
JRadioButton
(
"
S
elected states"
);
livenessCheckable
.
addActionListener
(
this
);
if
(
showLiveness
)
{
jp
01
.
add
(
livenessCheckable
,
c
01
);
jp
basic
.
add
(
livenessCheckable
,
c
basic
);
}
liveness
.
add
(
livenessCheckable
);
livenessAllStates
=
new
JRadioButton
(
"Liveness of all states"
);
cbasic
.
gridwidth
=
GridBagConstraints
.
REMAINDER
;
livenessAllStates
=
new
JRadioButton
(
"All states"
);
livenessAllStates
.
addActionListener
(
this
);
if
(
showLiveness
)
{
jp
01
.
add
(
livenessAllStates
,
c
01
);
jp
basic
.
add
(
livenessAllStates
,
c
basic
);
}
liveness
.
add
(
livenessAllStates
);
...
...
@@ -309,35 +364,30 @@ public class JDialogAvatarModelChecker extends javax.swing.JFrame implements Act
//Safety pragmas
safety
=
new
JCheckBox
(
"Safety Pragmas"
,
safetySelected
);
safety
.
addActionListener
(
this
);
jp01
.
add
(
safety
,
c01
);
//Limitations
stateLimit
=
new
JCheckBox
(
"Limit number of states in GF"
,
limitStatesSelected
);
stateLimit
.
addActionListener
(
this
);
jp01
.
add
(
stateLimit
,
c01
);
stateLimitField
=
new
JTextField
(
stateLimitValue
);
jp01
.
add
(
stateLimitField
,
c01
);
timeLimit
=
new
JCheckBox
(
"Limit time for GF generation (ms)"
,
limitTimeSelected
);
timeLimit
.
addActionListener
(
this
);
jp01
.
add
(
timeLimit
,
c01
);
timeLimitField
=
new
JTextField
(
timeLimitValue
);
jp01
.
add
(
timeLimitField
,
c01
);
jpbasic
.
add
(
safety
,
cbasic
);
if
(
spec
.
getSafetyPragmas
()
==
null
||
spec
.
getSafetyPragmas
().
isEmpty
())
{
safety
.
setEnabled
(
false
);
}
jpopt
.
add
(
jp01
,
c01
);
jpopt
.
add
(
jpbasic
,
cbasic
);
// RG
saveGraphAUT
=
new
JCheckBox
(
"Reachability Graph Generation"
,
graphSelected
);
saveGraphAUT
.
addActionListener
(
this
);
//saveGraphAUT.addSelectionListener(this);
jp
01
.
add
(
saveGraphAUT
,
c
01
);
jp
opt
.
add
(
saveGraphAUT
,
c
opt
);
graphPath
=
new
JTextField
(
graphDir
);
jp
01
.
add
(
graphPath
,
c
01
);
jp
opt
.
add
(
graphPath
,
c
opt
);
saveGraphDot
=
new
JCheckBox
(
"Save RG in dotty:"
,
graphSelectedDot
);
saveGraphDot
.
addActionListener
(
this
);
//saveGraphDot.setEnebaled(false);
jp
01
.
add
(
saveGraphDot
,
c
01
);
jp
opt
.
add
(
saveGraphDot
,
c
opt
);
graphPathDot
=
new
JTextField
(
graphDirDot
);
jp01
.
add
(
graphPathDot
,
c01
);
c
.
add
(
jp01
,
BorderLayout
.
NORTH
);
jpopt
.
add
(
graphPathDot
,
copt
);
c
.
add
(
jpopt
,
BorderLayout
.
NORTH
);
jta
=
new
ScrolledJTextArea
();
...
...
This diff is collapsed.
Click to expand it.
Ludovic Apvrille
@ludovic.apvrille
mentioned in commit
93fdff47
·
4 years ago
mentioned in commit
93fdff47
mentioned in commit 93fdff47bc00b85cb9903bb9b46c2cb57bebc852
Toggle commit list
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