Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NIWO
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages
Packages
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
Christian Müller
NIWO
Commits
81b7e2b3
Commit
81b7e2b3
authored
Sep 20, 2017
by
Christian Müller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add error messages
parent
4351dd62
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
6 deletions
+14
-6
src/main/scala/de/tum/workflows/Main.scala
src/main/scala/de/tum/workflows/Main.scala
+2
-2
src/main/scala/de/tum/workflows/foltl/FOLTL.scala
src/main/scala/de/tum/workflows/foltl/FOLTL.scala
+4
-0
src/main/scala/de/tum/workflows/toz3/InvariantChecker.scala
src/main/scala/de/tum/workflows/toz3/InvariantChecker.scala
+3
-4
src/test/scala/de/tum/workflows/ltl/tests/FOLTLTest.scala
src/test/scala/de/tum/workflows/ltl/tests/FOLTLTest.scala
+5
-0
No files found.
src/main/scala/de/tum/workflows/Main.scala
View file @
81b7e2b3
...
...
@@ -131,6 +131,6 @@ object Main extends App with LazyLogging {
// clear()
// generateExample("omitting/conference")
generateExample
(
"tests/declasstest"
)
//
generateAllExamples()
//
generateExample("tests/declasstest")
generateAllExamples
()
}
\ No newline at end of file
src/main/scala/de/tum/workflows/foltl/FOLTL.scala
View file @
81b7e2b3
...
...
@@ -23,6 +23,10 @@ object FOLTL {
case
_:
BinOp
=>
"("
+
this
+
")"
case
_
=>
this
.
toString
()
}
def
→
(
f2
:
Formula
)
=
Implies
(
this
,
f2
)
def
∧
(
f2
:
Formula
)
=
And
(
this
,
f2
)
def
∨
(
f2
:
Formula
)
=
Or
(
this
,
f2
)
def
pretty
()
:
String
=
{
val
s
=
this
.
toString
...
...
src/main/scala/de/tum/workflows/toz3/InvariantChecker.scala
View file @
81b7e2b3
...
...
@@ -27,7 +27,6 @@ object InvariantChecker extends LazyLogging {
val
cfg
=
new
HashMap
[
String
,
String
]()
cfg
.
put
(
"timeout"
,
TIMEOUT
.
toString
())
val
ctx
=
new
Context
(
cfg
)
// val t = ctx.andThen(ctx.mkTactic("qe"), ctx.mkTactic("smt"))
val
s
=
ctx
.
mkSolver
()
s
.
add
(
toZ3
.
translate
(
f
,
ctx
))
...
...
@@ -76,8 +75,8 @@ object InvariantChecker extends LazyLogging {
if
(
res
==
Status
.
SATISFIABLE
)
{
msg
++=
"Satisfying model:\n"
msg
++=
toZ3
.
printModel
(
solver
.
getModel
())
}
else
{
msg
++=
s
"Z3 result: $res\n"
}
else
if
(
res
==
Status
.
UNKNOWN
)
{
msg
++=
s
"Z3 result: $res
(${solver.getReasonUnknown()})
\n"
}
msg
++=
"\n"
logger
.
info
(
s
"Could not prove invariant $inv"
)
...
...
@@ -113,7 +112,7 @@ object InvariantChecker extends LazyLogging {
Forall
(
quant
,
genEq
(
r
,
agent
::
quant
))
})
Forall
(
agent
,
Implies
(
premise
,
conclusion
)
).
simplify
()
Forall
(
agent
,
premise
→
conclusion
).
simplify
()
}
}
\ No newline at end of file
src/test/scala/de/tum/workflows/ltl/tests/FOLTLTest.scala
View file @
81b7e2b3
...
...
@@ -8,6 +8,11 @@ import de.tum.workflows.foltl.FOLTL._
import
de.tum.workflows.Implicits._
class
FOLTLTest
extends
FlatSpec
{
"Formulas"
should
"be constructed correctly"
in
{
True
→
Var
(
"x"
)
should
be
(
Implies
(
True
,
Var
(
"x"
)))
}
"Formula functions"
should
"generate inequalities"
in
{
...
...
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