Skip to content

Getting compilation error in OS X with test contracts #2

Description

@nettrino

Analysis passes for examples 1 and 2 however I am getting the following error in OS X for the leak_unsafe contract as well as a contract I want to test - is this a misconfiguration on my end?
Commands are as follows:
For test.sol :

./main.native -input examples/test.sol -main OCR2Aggregator -verify_timeout 60 -z3timeout 10000 -solc 0.8.0
[CHECKER] Integer Over/Underflows
[CHECKER] Division-by-zero

Solc.CompilationError
Raised at Stdlib.input_line.scan in file "stdlib.ml", line 450, characters 14-31
Called from Solc.get_json_ast in file "src/util/solc.ml", line 26, characters 19-35

and for leak_unsafe

./main.native -input examples/leak_unsafe.sol -verify_timeout 60 -z3timeout 1000
[CHECKER] Integer Over/Underflows
[CHECKER] Division-by-zero

Solc.CompilationError
Raised at Stdlib.input_line.scan in file "stdlib.ml", line 450, characters 14-31
Called from Solc.get_json_ast in file "src/util/solc.ml", line 26, characters 19-35

Please note that I have installed solc via brew and z3 via opam due to installation problems.

opam list is as follows:

# Packages matching: installed
# Name        # Installed # Synopsis
base-bigarray base
base-threads  base
base-unix     base
batteries     3.5.0       A community-maintained standard library extension
biniou        1.2.1       Binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve
conf-gmp      4           Virtual package relying on a GMP lib system installation
conf-m4       1           Virtual package relying on m4
conf-python-3 1.0.0       Virtual package relying on Python-3 installation
cppo          1.6.8       Code preprocessor like cpp for OCaml
dune          2.9.3       Fast, portable, and opinionated build system
easy-format   1.3.2       High-level and functional interface to the Format module of the OCaml standard library
num           1.4         The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml         4.12.0      The OCaml compiler (virtual package)
ocaml-config  2           OCaml Switch Configuration
ocaml-system  4.12.0      The OCaml compiler (system version, from outside of opam)
ocamlbuild    0.14.1      OCamlbuild is a build system with builtin rules to easily build most OCaml projects
ocamlfind     1.9.3       A library manager for OCaml
ocamlgraph    2.0.0       A generic graph library for OCaml
stdlib-shims  0.3.0       Backport some of the new stdlib features to older compiler
yojson        1.7.0       Yojson is an optimized parsing and printing library for the JSON format
z3            4.8.14      Z3 solver
zarith        1.12        Implements arithmetic and logical operations over arbitrary-precision integers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions