Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
peregrine
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
i7
peregrine
Commits
c3f3c6f4
Commit
c3f3c6f4
authored
Aug 08, 2018
by
Philipp Meyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small rewrite
parent
2f387156
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
src/Property.hs
src/Property.hs
+3
-3
src/Solver/Formula.hs
src/Solver/Formula.hs
+2
-0
No files found.
src/Property.hs
View file @
c3f3c6f4
...
@@ -95,10 +95,10 @@ eliminateModulo' n makeVar (Equation lhs (ModEq m) rhs) =
...
@@ -95,10 +95,10 @@ eliminateModulo' n makeVar (Equation lhs (ModEq m) rhs) =
let
k
=
makeVar
n
let
k
=
makeVar
n
in
(
Equation
lhs
Eq
(
rhs
:+:
((
Const
m
)
:*:
(
Var
k
))),
[
k
])
in
(
Equation
lhs
Eq
(
rhs
:+:
((
Const
m
)
:*:
(
Var
k
))),
[
k
])
eliminateModulo'
n
makeVar
(
Equation
lhs
(
ModNe
m
)
rhs
)
=
eliminateModulo'
n
makeVar
(
Equation
lhs
(
ModNe
m
)
rhs
)
=
let
j
=
makeVar
(
n
+
1
)
let
j
=
makeVar
n
k
=
makeVar
n
k
=
makeVar
(
n
+
1
)
in
((
Equation
lhs
Eq
(
rhs
:+:
((
Var
j
)
:+:
((
Const
m
)
:*:
(
Var
k
)))))
:&:
in
((
Equation
lhs
Eq
(
rhs
:+:
((
Var
j
)
:+:
((
Const
m
)
:*:
(
Var
k
)))))
:&:
(
Equation
(
Const
0
)
Lt
(
Var
j
))
:&:
(
Equation
(
Var
j
)
Lt
(
Const
m
)),
[
k
,
j
])
(
Equation
(
Const
0
)
Lt
(
Var
j
))
:&:
(
Equation
(
Var
j
)
Lt
(
Const
m
)),
[
j
,
k
])
eliminateModulo'
n
makeVar
(
g
:|:
h
)
=
eliminateModulo'
n
makeVar
(
g
:|:
h
)
=
let
(
g'
,
ag
)
=
eliminateModulo'
n
makeVar
g
let
(
g'
,
ag
)
=
eliminateModulo'
n
makeVar
g
(
h'
,
ah
)
=
eliminateModulo'
(
n
+
length
ag
)
makeVar
h
(
h'
,
ah
)
=
eliminateModulo'
(
n
+
length
ag
)
makeVar
h
...
...
src/Solver/Formula.hs
View file @
c3f3c6f4
...
@@ -23,6 +23,8 @@ opToFunction Eq = (.==)
...
@@ -23,6 +23,8 @@ opToFunction Eq = (.==)
opToFunction
Ne
=
(
./=
)
opToFunction
Ne
=
(
./=
)
opToFunction
Le
=
(
.<=
)
opToFunction
Le
=
(
.<=
)
opToFunction
Lt
=
(
.<
)
opToFunction
Lt
=
(
.<
)
opToFunction
(
ModEq
_
)
=
error
"symbolic modulo not supported"
opToFunction
(
ModNe
_
)
=
error
"symbolic modulo not supported"
evaluateFormula
::
(
Ord
a
,
Show
a
)
=>
Formula
a
->
SIMap
a
->
SBool
evaluateFormula
::
(
Ord
a
,
Show
a
)
=>
Formula
a
->
SIMap
a
->
SBool
evaluateFormula
FTrue
_
=
true
evaluateFormula
FTrue
_
=
true
...
...
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