Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cs598mp-fall2021-proj
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
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
chsieh16
cs598mp-fall2021-proj
Commits
4acae8f4
Commit
4acae8f4
authored
3 years ago
by
chsieh16
Browse files
Options
Downloads
Patches
Plain Diff
Add SMT based encoding
parent
3acf1bd2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
firstpass.smt2
+57
-0
57 additions, 0 deletions
firstpass.smt2
with
57 additions
and
0 deletions
firstpass.smt2
0 → 100644
+
57
−
0
View file @
4acae8f4
; (set-logic NRA)
(set-logic LRA)
; Variable declarations
(declare-fun a00 () Real)
(declare-fun a01 () Real)
(declare-fun b0 () Real)
(declare-fun a10 () Real)
(declare-fun a11 () Real)
(declare-fun b1 () Real)
(declare-fun radius () Real)
; Constraints
(assert (>= radius 0.0))
; (define-fun norm ((x Real) (y Real)) Real (+ (* x x) (* y y)))
(define-fun Abs ((x Real)) Real (ite (>= x 0) x (- x)))
(define-fun norm ((x Real) (y Real)) Real (+ (Abs x) (Abs y)))
(define-fun err ((x Real) (y Real)) Real (Abs x))
(define-fun transitionX ((x Real) (xP Real)) Real
(ite (> xP 0) (- x 1) (ite (= xP 0) x (+ x 1)))
)
(define-fun transitionY ((y Real) (yP Real)) Real
(ite (> yP 0) (- y 1) (ite (= yP 0) y (+ y 1)))
)
(define-fun inCircle ((x Real) (y Real) (xP Real) (yP Real)) Bool
(<=
(norm
(+ (- xP) (* 1 x) (* 0 y) b0)
(+ (- yP) (* 0 x) (* 1 y) b1)
)
radius
)
)
(assert (inCircle 1 1 1.2 0.8))
(assert (inCircle 10 -10 9 10.8))
(assert (forall ((xx Real) (yy Real) (xxP Real) (yyP Real))
(=>
(and (inCircle xx yy xxP yyP) (>= xx 5) (>= yy 5))
(<= (err (transitionX xx xxP) (transitionY yy yyP)) (err xx yy) )
)
))
(apply (then qe nnf) :print false :print-benchmark true)
;(apply (! qe :qe-nonlinear true))
; Solve
;(check-sat)
;(get-model)
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
register
or
sign in
to comment