Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cosyverif
Services
service adt2amas
Commits
ebfa0a60
Commit
ebfa0a60
authored
Dec 07, 2020
by
Jaime Arias
Browse files
wip: read output from minimal
parent
39d2d967
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/cosyverif/service/adt2amas/MinimalScheduling.java
View file @
ebfa0a60
package
org.cosyverif.service.adt2amas
;
import
java.io.BufferedWriter
;
import
java.io.File
;
import
java.io.FileWriter
;
import
java.io.IOException
;
import
java.nio.file.Paths
;
import
org.apache.commons.exec.CommandLine
;
import
org.cosyverif.alligator.service.AnnotatedService.Task
;
import
org.cosyverif.Configuration
;
import
org.cosyverif.alligator.service.BinaryService
;
import
org.cosyverif.alligator.service.Parameter.Direction
;
import
org.cosyverif.alligator.service.annotation.Example
;
...
...
@@ -60,16 +63,37 @@ public class MinimalScheduling extends BinaryService {
@Override
public
void
fallback
(
String
line
){
try
{
outputParameter
=
formatResult
(
line
);
outputParameter
=
formatResult
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
@Override
public
void
fallback
(
String
key
,
String
value
)
{
}
});
}
private
String
formatResult
(
String
output
)
throws
IOException
{
return
output
;
private
String
formatResult
()
throws
IOException
{
BufferedWriter
bw
=
null
;
FileWriter
fw
=
null
;
String
result
=
""
;
try
{
File
fileOutput
=
new
File
(
baseDirectory
().
getAbsolutePath
()
+
"/minimal_scheduling.log"
);
fw
=
new
FileWriter
(
fileOutput
);
bw
=
new
BufferedWriter
(
fw
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
if
(
bw
!=
null
)
bw
.
close
();
if
(
fw
!=
null
)
fw
.
close
();
}
return
result
;
}
@Example
(
name
=
"Example of the minimal scheduling algorithm"
,
...
...
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