Giter Club home page Giter Club logo

Comments (7)

Gbury avatar Gbury commented on May 14, 2024

I thought about it when writing it but from what I understand there will be problems only if a problem make use of bitvectors whose size is strictly greater than 2 ^ 62, (in which case, I don't think parsing such a bitvector litteral will be realistic, so only symbolic manipulation may be done, but I guess this can happen ?), or am I missing something ?

from dolmen.

bobot avatar bobot commented on May 14, 2024

No, just a bitvector of size 62, it is the actual value of the bitvector that goes through int_of_string not just the size.

from dolmen.

bobot avatar bobot commented on May 14, 2024

(define-fun big () (_ BitVec 334) (_ bv9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 334))

from dolmen.

Gbury avatar Gbury commented on May 14, 2024

Oh, indeed that's a problem. We'll have to write a manual conversion to strings in that case (I'd rather avoid depending on zarith for now if not absolutely necessary).

from dolmen.

bobot avatar bobot commented on May 14, 2024

So https://stackoverflow.com/a/11007021/1531323 for direct conversion to binary ?

from dolmen.

bobot avatar bobot commented on May 14, 2024

For reference the code with zarith (for COLIBRI I fixed it that way temporarily):

    let parse_extended_lit _env _ast s n =
      assert (String.length s >= 2);
      let s' = String.sub s 2 (String.length s - 2) in
      match Z.of_string s' with
      | exception Failure _ -> None
      | z ->
        let z = Z.rem z (Z.shift_left Z.one n) in
        let s'' = Z.format (Printf.sprintf "%%0%ib" n) z in
        Some (Type.Term (T.mk_bitv s''))

from dolmen.

Gbury avatar Gbury commented on May 14, 2024

So https://stackoverflow.com/a/11007021/1531323 for direct conversion to binary ?

Yes, i'll try and implement it as soon as possible.

from dolmen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.