Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7090031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:59:41+00:00 2026-05-28T07:59:41+00:00

I have a file containing: (declare-const a Int) (declare-const b Int) (declare-const c Int)

  • 0

I have a file containing:

(declare-const a Int)
(declare-const b Int)
(declare-const c Int)
(declare-const d Real)
(declare-const e Real)
(assert (> a (+ b 2)))
(assert (= a (+ (* 2 c) 10)))
(assert (<= (+ c b) 1000))
(assert (>= d e))
(check-sat)
(get-model)

and, according to the online tutorial, running z3 on this file should return:

sat
(model
    (define-fun c () Int
        (- 5))
    (define-fun a () Int
        0)
    (define-fun b () Int
        (- 3))
    (define-fun d ()
        Real 0.0)
    (define-fun e ()
        Real 0.0)
)

So I know this is legal Z3 input. However, whenever I run “z3 [option] ” all I get is error messages no matter what option I choose — including none. Can someone tell me how to correctly invoke Z3 on the input file?

Regards.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:59:42+00:00Added an answer on May 28, 2026 at 7:59 am

    Z3 supports many input formats. It uses the file extension to guess which parser will be used. If the extension is .smt2. It will use the SMT 2.0 parser. You can also specify which parser should be used. The option -smt2 will force Z3 to use the SMT 2.0 parser. Finally, Z3 does not enable model construction by default. So, you should use the option MODEL=true, or add the command (set-option :produce-models true) in the beginning of your script.

    If you want to use a very old version of Z3, you will have to use SMT 1.0 format.
    This format is described at: http://goedel.cs.uiowa.edu/smtlib/papers/format-v1.2-r06.08.30.pdf

    That being said, I strongly encourage you to upgrade. The SMT 1.0 is not very user friendly, and most documentation/tutorials for SMT are in SMT 2.0 format.

    Here is your example in this format:

    (benchmark file
      :extrafuns ((a Int) (b Int) (c Int) (d Real) (e Real))
      :assumption (> a (+ b 2))
      :assumption (= a (+ (* 2 c) 10))
      :assumption (<= (+ c b) 1000)
      :assumption (>= d e)
      :formula true)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a file containing the following content 1000 line in the following format:
I have a file containing lots of data put in a form similar to
I have a file containing a list of filenames: esocket.c esocket.h dockwin.cpp dockwin.h makefile
I have a file containing data in a single column .. I have to
I have a .xib file containing a UIView and 2 UILabel subviews linked to
I have a zip file containing a folder structure like main-folder/ subFolder1/ subFolder2/ subFolder3/
I have a text file containing the data in following format 12345 Abdt3 hy45d
I have C header file containing the following type definition: // example.h typedef struct
I have an ARFF file containing 14 numerical columns. I want to perform a
I have a batch file containing a python script using the Output template> %(NAME)s

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.