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 7720295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:38:11+00:00 2026-06-01T03:38:11+00:00

I am trying to use the function Z3_benchmark_to_smtlib_string(). Here are the arguments I am

  • 0

I am trying to use the function Z3_benchmark_to_smtlib_string(). Here are the arguments I am using:

Z3_benchmark_to_smtlib_string(
                   ctx,          /* this one is valid */
                   "test",       /* this one is random, I don't understand it */
                   "QF_UFBV",    /* I got this name from the smtlib website, valid ? */
                   "sat",        /* not sure about this one either */
                   NULL,         /* not sure about this one either */
                   nb_assumptions, /* should be ok */
                   assumptions,    /* should be ok too */
                   NULL);          /* not sure about this one, is this mandatory ? */

Any help would be welcome.

In parallel, I am using displaying my assumptions on the fly, using:

Z3_set_ast_print_mode(ctx,Z3_PRINT_SMTLIB2_COMPLIANT);

en get strange characters like : ?x21, ?x24, ?x37, (see below). Any hint to solve this issue ?

Thanks in advance,

A.G.

(let ((?x21 (bvand (_ bv582 32) (ite (= ((_ sign_extend 24) (_ bv98 8)) ((_ sign_extend 24) |Mem5[8]|)) (_ bv64 32) (_ bv0 32)))))
(let ((?x24 (bvand ?x21 (ite (bvsgt ((_ sign_extend 24) (_ bv98 8)) ((_ sign_extend 24) |Mem5[8]|)) (_ bv128 32) (_ bv0 32)))))
(let ((?x37 (bvand ?x24 (ite (= ((_ sign_extend 24) (_ bv97 8)) ((_ sign_extend 24) |Mem6[8]|)) (_ bv64 32) (_ bv0 32)))))
(bvand ?x37 (ite (bvsgt ((_ sign_extend 24) (_ bv97 8)) ((_ sign_extend 24) |Mem6[8]|)) (_ bv128 32) (_ bv0 32))))))

  • 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-06-01T03:38:12+00:00Added an answer on June 1, 2026 at 3:38 am

    This function is quite old. It was created when SMT 2.0 didn’t exist. A SMT 1.0 benchmark looks like that:

    (benchmark example
    :status sat
    :logic QF_LIA
    :extrafuns ((x1 Int) (x2 Int) (x3 Int) (x4 Int) (x5 Int))
    :assumption (>= (- x1 x2) 1)
    :assumption (>= (- x1 x2) 3)
    :assumption (= x3 x5)
    :formula (= x2 (* 6 x4))
    )
    

    The function you are using was meant for producing a benchmark in this format. That is why we have parameters such as name, logic, status, etc. They correspond to the annotations in the example above. Moreover, a SMT 1.0 problem consists of 0 or more assumptions and 1 formula.

    When SMT 2.0 was introduced, this method was extended to print benchmarks in SMT 2.0 format when we have

    Z3_set_ast_print_mode(ctx,Z3_PRINT_SMTLIB2_COMPLIANT);
    

    The strange characters are just auxiliary let declarations used to avoid an exponential blowup when printing formulas. Note that, Z3 ASTs are DAGs and not trees. It is very easy to create a DAG using the C API that has a lot of sharing. Example:

     a_1 = Z3_mk_bvadd(b, c)
     a_2 = Z3_mk_bvmul(a1, a1)
     a_3 = Z3_mk_bvadd(a2, a2)
     a_4 = Z3_mk_bvmul(a3, a3)
     ...
    

    The AST a_100 is a very compact object in memory. If we try to print it as a tree without using the auxiliary let declarations, the output will be very huge.

    Note that the output produced by this function was never meant to be consumed by humans. It is mainly used to generate benchmarks for the SMT-LIB repository.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to use eval() function to deserialize this JSON text by using
I am trying to use this function from a COM API which enables the
I was trying to use the function glMultiDrawElements while studying OpenGL (using red book)
I'm trying to use the .Contains() function on a list of custom objects. This
I'm trying to use this function in a C program that needs to be
I'm trying to use a function with PostgreSQL to save some data. Here is
I am trying to use random function in C# to randomly pick four from
Here is my program which reverses a string. I am trying to use function
I am trying to use the function PathCanonicalize using DllImport (PInvoke) on a 64
I am trying to use the function found here: DataTable to List<object> public static

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.