Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Learning RFSA in reverse
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This project is archived. Its data is
read-only
.
Show more breadcrumbs
Thomas
Learning RFSA in reverse
Commits
47e68bc0
Commit
47e68bc0
authored
Nov 30, 2019
by
Thomas
Browse files
Options
Downloads
Patches
Plain Diff
fix dotfile
parent
cc5bdfec
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
learnlib/GraphvizParser.java
+19
-11
19 additions, 11 deletions
learnlib/GraphvizParser.java
learnlib/mydotfile.dot
+1
-1
1 addition, 1 deletion
learnlib/mydotfile.dot
with
20 additions
and
12 deletions
learnlib/GraphvizParser.java
+
19
−
11
View file @
47e68bc0
...
...
@@ -9,10 +9,8 @@ import net.automatalib.words.impl.Alphabets;
import
java.io.IOException
;
import
java.nio.file.Path
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Scanner
;
import
java.util.Set
;
import
java.nio.file.Paths
;
import
java.util.*
;
/**
* A class which is just able to parse the output generated by LearnLib (why is this not included in LearnLib itself?
...
...
@@ -81,15 +79,16 @@ public class GraphvizParser {
String
[]
io
=
e
.
label
.
split
(
"/"
);
for
(
String
o
:
outputs
){
if
(
e
.
from
.
equals
(
"0"
)
&&
e
.
to
.
equals
(
"0"
)
&&
accepting
.
contains
(
o
)
&&
accepting
.
contains
(
io
[
1
].
trim
()))
if
(
e
.
from
.
equals
(
"0"
)
&&
e
.
to
.
equals
(
"0"
)
&&
accepting
.
contains
(
o
)
&&
accepting
.
contains
(
io
[
1
].
trim
()))
{
builder
.
from
(
e
.
from
).
on
(
io
[
0
].
trim
()).
to
(
e
.
to
);
else
if
(
e
.
from
.
equals
(
"0"
)
&&
accepting
.
contains
(
o
))
}
else
if
(
e
.
from
.
equals
(
"0"
)
&&
accepting
.
contains
(
o
))
{
builder
.
from
(
e
.
from
).
on
(
io
[
0
].
trim
()).
to
(
e
.
to
+
"_"
+
io
[
1
].
trim
());
else
if
(
e
.
to
.
equals
(
"0"
)
&&
accepting
.
contains
(
io
[
1
].
trim
()))
}
else
if
(
e
.
to
.
equals
(
"0"
)
&&
accepting
.
contains
(
io
[
1
].
trim
()))
{
builder
.
from
(
e
.
from
+
"_"
+
o
).
on
(
io
[
0
].
trim
()).
to
(
e
.
to
);
else
}
else
{
builder
.
from
(
e
.
from
+
"_"
+
o
).
on
(
io
[
0
].
trim
()).
to
(
e
.
to
+
"_"
+
io
[
1
].
trim
());
}
}
if
(
accepting
.
contains
(
io
[
1
].
trim
())){
if
(
e
.
to
.
equals
(
"0"
))
...
...
@@ -118,4 +117,13 @@ public class GraphvizParser {
return
builder
.
create
();
}
public
static
void
main
(
String
[]
args
)
throws
IOException
{
GraphvizParser
parser
=
new
GraphvizParser
(
Paths
.
get
(
"mydotfile.dot"
));
CompactDFA
<
String
>
target
=
parser
.
createDFA
(
Arrays
.
asList
(
"0"
,
"1K"
,
"2K"
,
"3K"
));
GraphvizParser
parser2
=
new
GraphvizParser
(
Paths
.
get
(
"passport.flat_0_1.dot"
));
CompactDFA
<
String
>
target2
=
parser2
.
createDFAfromMealy
(
Collections
.
singletonList
(
"OOK"
));
}
}
This diff is collapsed.
Click to expand it.
learnlib/mydotfile.dot
+
1
−
1
View file @
47e68bc0
...
...
@@ -28,7 +28,7 @@ digraph {
1
K
->
2
K
[
label
=
"ICOMPLETEBAC"
]
1
K
->
0
N
[
label
=
"IFAILBAC"
]
1
K
->
1
N
[
label
=
"IFAILEAC"
]
1
K
->
1
N
[
label
=
"IGETCHALLENGE"
]
1
K
->
1
K
[
label
=
"IGETCHALLENGE"
]
1
K
->
1
N
[
label
=
"IREADFILE_0"
]
1
K
->
1
N
[
label
=
"IREADFILE_1"
]
1
K
->
0
[
label
=
"IRESET"
]
...
...
...
...
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
sign in
to comment