Code Monkey home page Code Monkey logo

hol-light's Introduction

                             HOL LIGHT

HOL Light is an interactive theorem prover / proof checker. It is
written in Objective CAML (OCaml) and uses the toplevel from OCaml as
its front end. This is the HOL Light homepage:

        http://www.cl.cam.ac.uk/~jrh13/hol-light/index.html

and this is the root of the Github code repository:

        https://github.com/jrh13/hol-light

Basic installation instructions are below. For more detailed information
on usage, see the Tutorial:

        http://www.cl.cam.ac.uk/~jrh13/hol-light/tutorial.pdf

Refer to the reference manual for more details of individual functions:

        http://www.cl.cam.ac.uk/~jrh13/hol-light/reference.html (HTML files)
        http://www.cl.cam.ac.uk/~jrh13/hol-light/reference.pdf (one PDF file)

        *       *       *       *       *       *       *       *

                             INSTALLATION

The Objective CAML (OCaml) implementation is a prerequisite for running
HOL Light. HOL Light should work with any recent version of OCaml; I've
tried it on at least 3.04, 3.06, 3.07+2, 3.08.1, 3.09.3, 3.10.0, 3.11.2,
4.00, 4.05 and 4.14.

 1. OCaml: there are packages for many Linux distributions. For
    example, on a debian derivative like Ubuntu, you may just need
    to do the following:

        sudo apt-get install ocaml

    Alternatively you can download binaries directly, or get sources
    and build them (which in my experience is usually trouble-free).
    See the OCaml Web page for downloads and other information.

        http://caml.inria.fr/ocaml/index.en.html

  2. Dependencies: HOL Light uses camlp5 and zarith (num for OCaml
    version < 4.14). If you have OPAM installed on your machine,
    running the following command inside this directory will create a local
    OPAM switch which uses the latest OCaml version that fully supports
    features of as well as all dependencies installed:

        make switch
        eval $(opam env)

    To manually install dependencies, the DEPENDENCIES chapter of this document
    explains it.

Now for HOL Light itself. The instructions below assume a Unix-like
environment such as Linux [or Cygwin (see www.cygwin.com) under
Windows], but the steps automated by the Makefile are easy enough to
invoke manually. There's more detail on doing that in the Tutorial.

(0) You can download the HOL Light sources from the Github site.
    For example, the following will copy the code from the trunk of the
    Github repository into a new directory 'hol-light':

        git clone https://github.com/jrh13/hol-light.git

    The above is now the recommended way of getting HOL Light. There
    are also gzipped tar files on the HOL Light Web page, but they are
    only for quite old versions and will probably be difficult to use
    with recent versions of OCaml.

    You should next enter the 'hol-light' directory that has been
     created:

        cd ./hol-light

There are now two alternatives: launch the OCaml toplevel and directly
load the HOL Light source files into it, or create a standalone image
with all the HOL Light sources pre-loaded. The latter is more
convenient, but requires a separate checkpointing program, which may not
be available for some platforms. First the basic approach:

(1) Do 'make'. This ought to build the appropriate syntax extension
    file ('pa_j.cmo') for the version of OCaml that you're using. If you
    have the camlp4 or camlp5 libraries in a non-standard place rather
    than /usr/local/lib/ocaml/camlp4 or /usr/local/lib/ocaml/camlp5
    then you may get an error like this

      Error while loading "pa_extend.cmo": file not found in path.

    in which case you should add the right directory to CAMLP4LIB or
    CAMLP5LIB, e.g.

      export CAMLP5LIB=$HOME/mylib/ocaml/camlp5

(2) If you are using a Unix-like environment, simply run `./hol.sh`.
    This should rebuild all the core HOL Light theories, and terminate after
    a few minutes with the usual OCaml prompt, something like:

                Camlp5 parsing version (HOL-Light) 8.02.00

        #

    HOL Light is now ready for the user to start proving theorems.

    If you are not using a Unix-like environment, do
    'ocaml'. (Actually for OCaml >= 4.02 I prefer 'ocaml -safe-string'
    to avoid mutable strings, while you may need something else like
    'ocamlnum' on some platforms --- see [*] below.)
    If you are using OCaml 4.14, you need to create a top-level OCaml
    using 'ocamlmktop -o ocaml-hol' and use 'ocaml-hol' because the default
    'ocaml' does not have 'compiler-libs' that is necessary to run HOL Light.

    At the OCaml prompt '#', do '#use "hol.ml";;' (the '#' is part of the
    command, not the prompt) followed by a newline.

    You can also use the load process (2) in other directories, but
    you should either set the environment variable HOLLIGHT_DIR to point
    to the directory containing the HOL source files, or change the
    first line of "hol.ml" to give that explicitly, from

        let hol_dir = ref (try Sys.getenv "HOLLIGHT_DIR" with Not_found -> Sys.getcwd());;

    to, for example

        let hol_dir = "/home/johnh/hol-light";;

    or

        let hol_dir = "/usr/share/hol";;

Now for the alternative approach of building a standalone image.
The level of convenience depends on the checkpointing program you
have installed. As of 2024, there are three programs you can use.

(1) DMTCP: you can download from here:

        https://github.com/dmtcp/dmtcp/releases

    To build DMTCP, please refer to
    https://github.com/dmtcp/dmtcp/blob/master/INSTALL.md .
    HOL Light does not have convenient commands or scripts to exploit DMTCP,
    but you can proceed as follows:

        1. Start ocaml running under the DMTCP coordinator:

              dmtcp_launch ocaml

        2. Use ocaml to load HOL Light as usual, for example:

              #use "hol.ml";;

        3. From another terminal, issue the checkpoint command:

             dmtcp_command -kc

           This will kill the ocaml process once checkpointing is done.

        4. Step 3 created a checkpoint of the OCaml process and
           a shell script to invoke it, both in the directory in
           which ocaml was started. Running that should restore
           the OCaml process with all your state and bindings:

             ./dmtcp_restart_script.sh

(2) CRIU: CRIU is similar to DMTCP but faster. However, it requires sudo
    priviledge depending on your environment (e.g., WSL2).
    you can download from here:

        https://criu.org/Download/criu

    To build CRIU, please refer to https://criu.org/Installation .
    To checkpoint,

        1. Start ocaml process and load HOL Light.

        2. From another terminal, run

            criu dump -o dump.log -t <ocaml process id> --shell-job

        3. To restore, run

            criu restore -o restore.log --shell-job

    Please refer to https://criu.org/Simple_loop for details.

(3) selfie: This is a convenient OCaml checkpointing tool developed by
    Quentin Carbonneaux. Please git clone git://c9x.me/selfie.git and
    run `make selfie.cma` from the directory.
    Open ocaml and run

        # #load "selfie.cma";;
        # #use "selfie.ml";;

    Now you can use `snap "output.img";;` to checkpoint the process.


The directories "Library" and "Examples" may give an idea of the
kind of thing that might be done, or may be useful in further work.

Thanks to Carl Witty for help with Camlp4 porting and advice on
checkpointing programs.

        *       *       *       *       *       *       *       *

                             DEPENDENCIES

 1. zarith or num: The HOL Light system uses the OCaml "Num" library
    or "Zarith" library for rational arithmetic. If OCaml 4.14 is used,
    HOL Light will use Zarith. You can install it using the OCaml package
    manager "opam" by

        opam install zarith

    If OCaml 4.05 is used, HOL Light will use Num which is included in
    the core system. If you are using an OCaml version between 4.06 and 4.13,
    Num must be installed separately because it is no longer included in
    the core system. You can use "opam" by

        opam install num

    Alternatively you can download the sources from here

        https://github.com/ocaml/num

    and build and install them following the instructions on that
    page, for example

        git clone https://github.com/ocaml/num mynums
        cd mynums
        make all
        sudo make install [assuming no earlier errors]

 2. camlp5: this is needed to run HOL Light under any OCaml >= 3.10.
    Somtimes you need a recent version of camlp5 to be compatible with
    your OCaml. For example, OCaml 4.05 is compatible with camlp5 7.10 and
    OCaml 4.14 is compatible with camlp5 8.02. I recommend downloading
    the sources for a recent version from

        https://github.com/camlp5/camlp5/releases ('tags' tab has full series)

    and building it in "strict" mode before installing it, thus:

        cd software/camlp5-rel701 [or wherever you unpacked sources to]
        ./configure --strict
        make
        sudo make install       [assuming no earlier errors]

    There are also packages for camlp5, so you may be able to get away
    with just something like

        sudo apt-get install camlp5

    or

        opam pin add camlp5 <version (e.g., 7.10 for ocaml 4.05)>

    However, you may get a version in "transitional" instead of
    "strict" mode (do "camlp5 -pmode" to check which you have).

        *       *       *       *       *       *       *       *

[*] HOL Light uses the OCaml 'num' library for multiple-precision
rationals. On many platforms, including Linux and native Windows, this
will be loaded automatically by the HOL root file 'hol.ml'. However,
OCaml on some platforms (notably Cygwin) does not support dynamic
loading, hence the need to use 'ocamlnum', a toplevel with the 'num'
library already installed. You can make your own with:

    ocamlmktop -o ocamlnum nums.cma

hol-light's People

Contributors

aqjune avatar asr avatar binghe avatar blynn avatar glondu avatar hendriktews avatar jrh13 avatar monadius avatar mpu avatar petrospapapa avatar yiyuan-cao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hol-light's Issues

pa_j.ml: parse error after upgrade to ocaml 3.12 and camlp5 6.02

pa_j.ml: parse error after upgrade to ocaml 3.12 and camlp5 6.02

kx@linux:~/tmp/hol_light_svn> make
if test `ocamlc -version | cut -c3` = "0" ; \
                   then ocamlc -c -pp "camlp4r pa_extend.cmo q_MLast.cmo" -I +camlp4 pa_j.ml; \
                   else ocamlc -c -pp "camlp5r pa_lexer.cmo pa_extend.cmo q_MLast.cmo" -I +camlp5 pa_j.ml; \
                   fi
File "pa_j.ml", line 1689, characters 37-56:
While expanding quotation "class_expr":
Parse error: ']' or [expr] expected after '[' (in [expr])
File "pa_j.ml", line 1, characters 0-1:
Error: Preprocessor error
make: *** [pa_j.cmo] Error 2

Original issue reported on code.google.com by [email protected] on 16 Nov 2010 at 11:00

Another error in pa_j.ml

What steps will reproduce the problem?
1. Install the Windows version of OCaml
2. Download Camlp5 and apply all 3 patches, "configure", "make" and "make 
install"
3. Download the HOL Light source and try to "make" it

What is the expected output? What do you see instead?

File "pa_j.ml", line 112, characters 72-74:
Error: This expression has type (string * MLast.ctyp) list
       but is here used with type ('a * MLast.ctyp) list Ploc.vala
make: *** [pa_j.cmo] Error 2


What version of the product are you using? On what operating system?

Windows 7 Professional
OCaml: 3.11.0, MinGW port
Camlp5: 6.02.2-3
HOL Light: revision 86
MSys to run patch, make etc.

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 2 Apr 2011 at 4:31

unnecessary hyp in TAN_ADD

in transc.ml lime 2605 :
let TAN_ADD = prove(
!x y. ~(cos(x) = &0) /\ ~(cos(y) = &0) /\ ~(cos(x + y) = &0) ==> (tan(x + y) = (tan(x) + tan(y)) / (&1 - tan(x) * tan(y))),

the assumption ~(cos(x + y) = &0) seems unnecessary.

string_of_term ignores the current line length

Here's a patch to the print_to_string function that accesses the current line 
length using a call to get_margin before printing the argument to a string. I 
also recoded the print_to_string function in terms of ocaml buffers, instead of 
a string reference.

The patchfile can be applied using the command

patch -p0 < patchfile

Original issue reported on code.google.com by [email protected] on 3 Mar 2014 at 12:37

Attachments:

Logic/canon.ml fails

Exception: Failure "new_definition: term not closed: V, Fn".
Error in included file /home/blanqui/src/hol-light/Logic/canon.ml

real	1m4,107s

I am using the current version of HOL-Light, OCaml 4.14.1 and Camlp5 8.00.05.

Camlp5-6.12 is out

What steps will reproduce the problem?
1. Install camlp5-6.12 (released 2014-09-19)
2. Checkout the source of hol-light (revision 199)
3. Run `make`

What is the expected output? What do you see instead?

The compilation fails, because the wrong file was copied to `pa_j.ml`.

What version of the product are you using? On what operating system?

hol-light r199 on linux x86_64 with ocaml 4.01.0 and camlp5 6.12

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 30 Sep 2014 at 11:59

Attachments:

`instantiate` can produce terms that are not parsable

For example:

utop # t1;;
- : term = `\x. s x`
utop # x1, type_of x1;;
- : term * hol_type = (`x`, `:A->bool`)
utop # let s1 = frees t1 |> hd;;
val s1 : term = `s`
utop # instantiate (term_match [] s1 x1) t1;;
- : term = `\x. x x`

The last term is semantically (and type-wise) okay but will not be accepted by the parser (even with explicit type annotations). The reason is that the two xs have different types so the bound variable is not renamed. On the other hand the following sequence produces the correct renaming:

utop # t2;;
- : term = `\x. s + x`
utop # x2, type_of x2;;
- : term * hol_type = (`x`, `:num`)
utop # let s2 = frees t2 |> hd;;
val s2 : term = `s`
utop # instantiate (term_match [] s2 x2) t2;;
- : term = `\x'. x + x'`

[PATCH] Fragile include for camlp4/camlp5

I installed OCaml 4.00.0 and camlp5 using GODI a while back. Today, I checked 
out the hol-light sources, but when I tried building them I got the following 
error:

File "pa_j.ml", line 13, characters 0-10:
Error: Unbound module Pcaml
make: *** [pa_j.cmo] Error 2

After a bit of searching, I found that ocamlc treats the `-I +foo` argument as 
`-I /usr/lib/ocaml/foo`:
http://stackoverflow.com/questions/3848897/unbound-modules-in-ocaml

As it turns out, GODI installs camlp5 in a non-standard location. On this 
machine (Ubuntu 12.04.1 x86), `which camlp5` returns:
/opt/godi/bin/camlp5

So, I tweaked the Makefile a bit to make it more robust (see the attached 
diff). camlp4 and camlp5 both support the "-where" option, so I've used that 
within backticks along with the -I option when invoking ocamlc. This makes it 
so camlp4/camlp5 will be included properly no matter where it's installed on 
the system.

Cheers,
Jack


Original issue reported on code.google.com by [email protected] on 14 Feb 2013 at 9:22

Attachments:

HOL light installation problem on macos

I am trying to install Hol light on macos. I downloaded the hol-light package and typed ¨make¨ but I got the following error:

File "pa_j.ml", line 1:
Error: Error while running external preprocessor
Command line: camlp5r pa_lexer.cmo pa_extend.cmo q_MLast.cmo 'pa_j.ml' > /var/folders/sy/0_3rx36s29d7zb8504hj9fkm0000gn/T/ocamlpp5d527d

make: *** [pa_j.cmo] Error 2

I use camlp5 version 7.10 and ocaml version 4.05

I would be glad of any advice.

Another error in pa_j.ml

What steps will reproduce the problem?
1. Install the Windows version of OCaml
2. Download Camlp5 and apply all 3 patches, "configure", "make" and "make 
install"
3. Download the HOL Light source and try to "make" it

What is the expected output? What do you see instead?

File "pa_j.ml", line 112, characters 72-74:
Error: This expression has type (string * MLast.ctyp) list
       but is here used with type ('a * MLast.ctyp) list Ploc.vala
make: *** [pa_j.cmo] Error 2


What version of the product are you using? On what operating system?

Windows 7 Professional
OCaml: 3.11.0, MinGW port
Camlp5: 6.02.2-3
HOL Light: revision 86
MSys to run patch, make etc.

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 2 Apr 2011 at 4:31

build fails with "cp: cannot stat `pa_j_3.1x_7.xx.ml': No such file or directory"

I checked out from the subversion repository (r146) and executed make in the 
root directory and got the error message above returned. A quick look at the 
directory showed that it is really not there:

[user@hostname hol-light-read-only]$ ls -1 pa_j*
pa_j_3.07.ml
pa_j_3.08.ml
pa_j_3.09.ml
pa_j_3.1x_5.xx.ml
pa_j_3.1x_6.02.1.ml
pa_j_3.1x_6.02.2.ml
pa_j_3.1x_6.xx.ml

as far as i could see, these files are not automatically generated - is it 
possible that they are only missing in the repository or am I doing something 
wrong? Thanks in advance, Martin

Original issue reported on code.google.com by [email protected] on 29 Aug 2012 at 2:12

"Comms::Receive failed" when inference the whole val dataset to generate proof_log

When I tried to do inference on the whole validation dataset, I encounter an error caused by receive_int() inside the sandboxee, it always occurs several hours after I start the inference. Does anyone know what caused this issue? and how to solve it? Below is the error screen:

Traceback (most recent call last):
File "/mnt/lustre/zhoujingqiu/./deepmath_bin/main.runfiles/deepmath/deepmath/deephol/main.py", line 28, in
tf.app.run(main)
File "/mnt/lustre/zhoujingqiu/deepmath_bin/main.runfiles/org_tensorflow/tensorflow/python/platform/app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "/mnt/lustre/zhoujingqiu/deepmath_bin/main.runfiles/absl_py/absl/app.py", line 300, in run
_run_main(main, args)
File "/mnt/lustre/zhoujingqiu/deepmath_bin/main.runfiles/absl_py/absl/app.py", line 251, in _run_main
sys.exit(main(argv))
File "/mnt/lustre/zhoujingqiu/./deepmath_bin/main.runfiles/deepmath/deepmath/deephol/main.py", line 24, in main
prover_runner.run_pipeline(*prover_flags.process_prover_flags())
File "/mnt/lustre/zhoujingqiu/deepmath_bin/main.runfiles/deepmath/deepmath/deephol/prover_runner.py", line 56, in run_pipeline
proof_log = this_prover.prove(task)
File "/mnt/lustre/zhoujingqiu/deepmath_bin/main.runfiles/deepmath/deepmath/deephol/prover.py", line 130, in prove
return self.prove_one_wrapper(task)
File "/mnt/lustre/zhoujingqiu/deepmath_bin/main.runfiles/deepmath/deepmath/deephol/prover.py", line 159, in prove_one_wrapper
error_message = self.prove_one(tree, task)
File "/mnt/lustre/zhoujingqiu/deepmath_bin/main.runfiles/deepmath/deepmath/deephol/prover.py", line 284, in prove_one
self.prover_options.tactic_timeout_ms)
File "/mnt/lustre/zhoujingqiu/deepmath_bin/main.runfiles/deepmath/deepmath/deephol/prover_util.py", line 179, in try_tactics
request, score)
File "/mnt/lustre/zhoujingqiu/deepmath_bin/main.runfiles/deepmath/deepmath/deephol/proof_search_tree.py", line 240, in init
response = tree.proof_assistant.ApplyTactic(request)
File "/mnt/lustre/zhoujingqiu/deepmath_bin/main.runfiles/deepmath/deepmath/deephol/public/proof_assistant.py", line 34, in ApplyTactic
return self.stub.ApplyTactic(request)
File "/mnt/lustre/zhoujingqiu/.conda/envs/deephol/lib/python3.5/site-packages/grpc/_channel.py", line 826, in call
return _end_unary_response_blocking(state, call, False, None)
File "/mnt/lustre/zhoujingqiu/.conda/envs/deephol/lib/python3.5/site-packages/grpc/_channel.py", line 729, in _end_unary_response_blocking
raise _InactiveRpcError(state)
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.INTERNAL
details = "Failure("Comms::Receive failed")"
debug_error_string = "{"created":"@1595325578.814092705","description":"Error received from peer ipv4:0.0.0.0:2080","file":"src/core/lib/surface/call.cc","file_line":1055,"grpc_message":"Failure("Comms::Receive failed")","grpc_sta
tus":13}"

camlp5 version detection logic incorrect

What steps will reproduce the problem?
1. svn checkout
2. make
3.

What is the expected output? What do you see instead?
File "pa_j.ml", line 195, characters 6-21:
Error: The constructor PaLab expects 2 argument(s),
       but is applied here to 3 argument(s)


What version of the product are you using? On what operating system?
camlp5 6.06

Please provide any additional information below.
This patch seems to solve the problem

Index: Makefile
===================================================================
--- Makefile    (revision 146)
+++ Makefile    (working copy)
@@ -56,7 +56,7 @@
         then cp pa_j_${OCAML_VERSION}.ml pa_j.ml ; \
         else if test ${CAMLP5_VERSION} = "6.02.1" ; \
              then cp pa_j_3.1x_6.02.1.ml pa_j.ml; \
-             else if test ${CAMLP5_VERSION} = "6.02.2" -o ${CAMLP5_VERSION} = 
"6.02.3" -o ${CAMLP5_VERSION} = "6.05" ; \
+             else if test ${CAMLP5_VERSION} = "6.02.2" -o ${CAMLP5_VERSION} = 
"6.02.3" -o ${CAMLP5_VERSION} = "6.05" -o ${CAMLP5_VERSION} = "6.06" ; \
                   then cp pa_j_3.1x_6.02.2.ml pa_j.ml; \
                   else cp pa_j_3.1x_${CAMLP5_BINARY_VERSION}.xx.ml pa_j.ml; \
                   fi \


Original issue reported on code.google.com by [email protected] on 20 Aug 2012 at 4:42

hol-online link broken

Its presence here https://github.com/jbem/dead-souls suggests that the project 
is abandoned. The link on the hol-light home page (and google code page) is 
broken.

Original issue reported on code.google.com by [email protected] on 4 Sep 2011 at 10:31

HOL Terminal Basic Issues, Syntax and Related Commands

How do I get out of this without necessarily have to open a new OCaml prompt and reload HOL libs?

ARITH_RULE `(a + x + b * y + a * y) EXP 3 + (b * x) EXP + (a * x + b * ;;

;;
‘(a * x + b * y + a * y) EXP 3 + (b * x) EXP 3 +
( a * x + b * y + b * x) EXP 3 + (a * y) EXP 3 = (a * x + a * y + b * x) EXP 3 + (b * y) EXP 3 + (a * y + b * y + b * x) EXP 3 + (a * x) EXP 3‘;;

;;

^[
^[[D
^[[C
end
;;

opam installation

Probably a naive question: can hol-light be installed as an opam pacakge? If not, why?

Compatibility with camlp5-7.07?

The version 7.07 of camlp5 was released a few days ago. Unfortunately, it breaks HOL-light:

 File "pa_j.ml", line 571, characters 6-18:
Error: The constructor StTyp expects 3 argument(s),
       but is applied here to 2 argument(s)

Are there any plans to make the twain compatible again? Thanks.

Error on the installation: Cannot find file camlp5o.cma

I'm not familiar with the Ocaml tool-chain. Following the instructions in the README, I got the following problem:

$ make
$ ocaml
# #use "hol.ml";;
val hol_version : string = "2.20++"
val hol_dir : string ref = {contents = "/home/asr/src/hol-light"}
val temp_path : string ref = {contents = "/tmp"}
Cannot find file camlp5o.cma.
- : unit = ()
Exception: Symtable.Error _.

From this and this comments (I don't know in which language these comments were written), I could fix my problem by running

$ ocaml -I `camlp5 -where` camlp5o.cma

instead of

$ ocaml

Is there something missing in the Makefile?

$ ocaml --version
The OCaml toplevel, version 4.03.0

$ camlp5 -v
Camlp5 version 6.16 (ocaml 4.03.0)

Error in pa_j.ml with OCaml 3.12.0 and camlp5 6.02.2-2

What steps will reproduce the problem?
1. Install OCaml 3.12.0 on Mac OS X 10.5.8 from prebuilt binaries
2. Download camlp5-6.02.2, apply two patches, and build.
3. Check out most recent verson of HOL Light with svn, and do make.

What is the expected output? What do you see instead?

I get this error message from make:

File "pa_j.ml", line 195, characters 6-21:
Error: The constructor PaLab expects 2 argument(s),
       but is applied here to 3 argument(s)
make: *** [pa_j.cmo] Error 2


What version of the product are you using? On what operating system?

Revision 83 on Mac OS 10.5.8.


Please provide any additional information below.

Can you tell me a combination of a version of HOL Light and a version of camlp5 
that work together?  I had other problems when I tried building the 10 Jan 2010 
snapshot you have on the HOL Light home page.

Original issue reported on code.google.com by [email protected] on 19 Mar 2011 at 3:19

User pretty-printers don't print via the formatter argument

This causes user pretty-printers to print directly to the console, instead of 
the correct destination known to the formatter (e.g., a target string in 
string_of_term).

I attach a patchfile that fixes this that can be applied using the command 

patch -p0 < patchfile

Note: it changes the type of user pretty-printers by adding the formatter as an 
argument, so existing user pretty-printers will need to be updated.

Original issue reported on code.google.com by [email protected] on 3 Mar 2014 at 12:31

Attachments:

Problem building HOL light with OCaml 4

What steps will reproduce the problem?
1. svn checkout http://hol-light.googlecode.com/svn/trunk/ hol-light-read-only
2. make
3.

What is the expected output? What do you see instead?
I get the error message:
File "pa_j.ml", line 1918, characters 35-43:
While expanding quotation "str_item":
Parse error: antiquot "_" or antiquot "" or [ident] expected after 'type' (in
  [str_item])
File "pa_j.ml", line 1:
Error: Preprocessor error
make: *** [pa_j.cmo] Error 2

What version of the product are you using? On what operating system?
OCaml 4.00.1
Linux Fedora 18

Please provide any additional information below.
I am trying to build HOL Light with OCaml 4, but the build bombs out with the 
above error message.

Original issue reported on code.google.com by [email protected] on 27 Oct 2013 at 7:39

unable to install hol-light on mac or centos 7.4

I got similar errors in these two environments:

cd hol-light && make

cp: cannot stat ‘pa_j_3.1x_8.xx.ml’: No such file or directory
make: *** [Makefile:67: pa_j.ml] Error 1

The error seems related to #7

cp: cannot stat ‘pa_j_3.1x_9.xx.ml’: No such file or directory

Hi all.

I'm getting a similar issue to #7. Here is the output after running make:

[jt273@lancing hol-light]$ make
\
        if test `ocamlc -version | cut -c1-3` = "3.0"  ; \
        then cp pa_j_`ocamlc -version | cut -c1-4`.ml pa_j.ml ; \
        else if test `camlp5 -v 2>&1 | cut -f3 -d' ' | cut -f1-3 -d'.' | cut -c1-6` = "6.02.1" ; \
             then cp pa_j_3.1x_6.02.1.ml pa_j.ml; \
             else if test `camlp5 -v 2>&1 | cut -f3 -d' ' | cut -f1-3 -d'.' | cut -c1-6` = "6.02.2" -o `camlp5 -v 2>&1 | cut -f3 -d' ' | cut -f1-3 -d'.' | cut -c1-6` = "6.02.3" -o `camlp5 -v 2>&1 | cut -f3 -d' ' | cut -f1-3 -d'.' | cut -c1-6` = "6.03" -o `camlp5 -v 2>&1 | cut -f3 -d' ' | cut -f1-3 -d'.' | cut -c1-6` = "6.04" -o `camlp5 -v 2>&1 | cut -f3 -d' ' | cut -f1-3 -d'.' | cut -c1-6` = "6.05" -o `camlp5 -v 2>&1 | cut -f3 -d' ' | cut -f1-3 -d'.' | cut -c1-6` = "6.06" ; \
                  then cp pa_j_3.1x_6.02.2.ml pa_j.ml; \
                  else if test `camlp5 -v 2>&1 | cut -f3 -d' ' | cut -f1-3 -d'.' | cut -c1-6` = "6.06" -o `camlp5 -v 2>&1 | cut -f3 -d' ' | cut -f1-3 -d'.' | cut -c1-6` = "6.07" -o `camlp5 -v 2>&1 | cut -f3 -d' ' | cut -f1-3 -d'.' | cut -c1-6` = "6.08" -o `camlp5 -v 2>&1 | cut -f3 -d' ' | cut -f1-3 -d'.' | cut -c1-6` = "6.09" -o `camlp5 -v 2>&1 | cut -f3 -d' ' | cut -f1-3 -d'.' | cut -c1-6` = "6.10" -o `camlp5 -v 2>&1 | cut -f3 -d' ' | cut -f1-3 -d'.' | cut -c1-6` = "6.11" -o `camlp5 -v 2>&1 | cut -f3 -d' ' | cut -f1-3 -d'.' | cut -c1-6` = "6.12" -o `camlp5 -v 2>&1 | cut -f3 -d' ' | cut -f1-3 -d'.' | cut -c1-6` = "6.13" -o `camlp5 -v 2>&1 | cut -f3 -d' ' | cut -f1-3 -d'.' | cut -c1-6` = "6.14" -o `camlp5 -v 2>&1 | cut -f3 -d' ' | cut -f1-3 -d'.' | cut -c1-6` = "6.15" ; \
                       then cp pa_j_3.1x_6.11.ml pa_j.ml; \
                       else cp pa_j_3.1x_`camlp5 -v 2>&1 | cut -f3 -d' ' | cut -c1`.xx.ml pa_j.ml; \
                       fi \
                  fi \
             fi \
        fi
cp: cannot stat ‘pa_j_3.1x_9.xx.ml’: No such file or directory
Makefile:58: recipe for target 'pa_j.ml' failed
make: *** [pa_j.ml] Error 1

I've tried running make clean first, but no joy. My system runs Fedora 23, and my ocamlc version is 4.02.2, from the Fedora repository. I'm using hol-light master branch, commit c9ee18f.

All the best,
James.

How to use Map.Make after "hol.ml"?

Hello. Using ocaml.4.02.3 and campl5.6.17 I get the following problem:

#use "hol.ml";;
# module OrdInt = struct type t = int let compare = (-) end;;
Toplevel input:
# module OrdInt = struct type t = int let compare = (-) end;;
         ^^^^^^
Parse error: 'type' or 'rec' expected after 'module' (in [str_item])

Why can't I define modules anymore? How do I do to build maps on integers (Map.Make(OrdInt))?

[INFO] HOL Light Native

I have adapted HOL Light to compile natively. Now one is no longer restricted to a particular version of OCaml!

However it is just a start. For details see the holnat project.

Any feedback welcome in this thread or over at the new repo.

Conflicting definitions of - - ?

What steps will reproduce the problem?
1. load ocaml and hol.ml as usual
2. loadt "Library/analysis.ml";;
3. loadt "Multivariate/vectors.ml";;

What is the expected output? What do you see instead?
Expecting exit with no problems.  Instead, it exits with the final lines:

val DOT_RMUL : thm = |- !c x y. x dot c % y = c * (x dot y)
Warning: inventing type variables
Exception: Failure "GEN_TAC".
Error in included file 
/home/ivan/Dropbox/ReadSterling/hol_light/Multivariate/vectors.ml
val it : unit = ()


What version of the product are you using? On what operating system?
2.20++ , Linux Mint


Please provide any additional information below.

It appears that the "--" defined in analysis.ml conflicts somehow with the "--" 
defined in realax.ml , or I may be completely off.


Original issue reported on code.google.com by [email protected] on 2 Mar 2014 at 10:52

make error

File "pa_j.ml", line 413, characters 6-24:
413 | | MtFun loc x1 x2 x3 →
^^^^^^^^^^^^^^^^^^
Error: The constructor MtFun expects 3 argument(s),
but is applied here to 4 argument(s)
make: *** [Makefile:49: pa_j.cmo] Error 2

I received this error when running make in ~/hol-light.

Examples/prog.ml: VC_TAC has trouble with with single-variable programs

What steps will reproduce the problem?

Execute these commands:
# needs "Examples/prog.ml";;
# install_parser ("correct",parse_program_assertion);;
# g `correct
     T
       var x;
       x := 1
       end
     x > 0`;;
# e VC_TAC;;

What is the expected output? What do you see instead?

VC_TAC should generate verification conditions `1 > 0`, but it leaves the goal 
unmodified.

What version of the product are you using? On what operating system?

HOL Light from SVN, revision 200; ocaml 4.01.0, Linux

Please provide any additional information below.

VC_TAC works as expected if I introduce a dummy variable:

# g `correct T var x, dummy; x := 1 end x > 0`;;

Original issue reported on code.google.com by [email protected] on 20 Oct 2014 at 9:50

(Maybe) a typo in Examples/prog.ml ?

[VC_UNPACK_TAC; VC_UNPACK_TAC; STATE_GEN_TAC'];

This line should be [VC_UNPACK_TAC; VC_UNPACK_TAC; GEN_TAC];(same as 728)

When matching a pattern which already contains MEASURE, GEN_TAC should be used instead.

Example:

`correct
         T
          var m,n;
        do  [invariant 0<=m ; measure m]
              (if 0<n then n:=0;
               m:= PRE m)
              while 0<m
      end
     n=0`;;

With e VC_TAC, it outputs:

`m' = m /\ n' = n /\ ~(0 < n)
 ==> 0 <= PRE m /\ MEASURE (\(m,n). m) (PRE m,n) (m',n')`

`m' = m /\ n' = n /\ 0 < n
 ==> 0 <= PRE m /\ MEASURE (\(m,n). m) (PRE m,0) (m',n')`

`~(0 < m) /\ 0 <= m ==> n = 0`

`WF (MEASURE (\(m,n). m))`

This is because the match to correct p (ADO i (MEASURE m) c e) q failed, correct p (ADO i v c e) q was used instead,

With e (MATCH_MP_TAC VC_ADO_MEASURE THEN REPEAT CONJ_TAC THENL [VC_UNPACK_TAC; VC_UNPACK_TAC; GEN_TAC]), the output is:

`correct ((\(m,n). T) AND (\s. X = (\(m,n). m) s))
 (IF (\(m,n). 0 < n) (Assign (\(m,n). m,0)) Seq Assign (\(m,n). PRE m,n))
 ((\(m,n). 0 <= m) AND (\s. (\(m,n). m) s < X))`

`~(0 < m) /\ 0 <= m ==> n = 0`

Where no MEASURE is found, and continue with VC_TAC, all VC goals will be generated normally

Illegal begin of top_parse

When I input " 'x+1' " in hol-light system , it responses "Illegal begin of top_parse", whats wrong with it ?, Thanks.

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.