Skip to content

Commit 9a925a5

Browse files
committed
Add README
1 parent f9bf8da commit 9a925a5

File tree

3 files changed

+34
-14
lines changed

3 files changed

+34
-14
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# HOL to ACL2 Translation
2+
3+
This directory provides an automated translation from a subset of HOL
4+
to ACL(zfc), a formalization of Set Theory in the ACL2 system. Details
5+
of ACL2(zfc) can be found at
6+
```
7+
https://github.com/acl2/acl2/tree/master/books/projects/set-theory
8+
```
9+
10+
The modelling of the HOL logic in ACL2(zfc) is analogous to the
11+
"Pitts" semantics of the HOL4 Logic Manual. It can be found at
12+
```
13+
https://github.com/acl2/acl2/tree/master/books/projects/hol-in-acl2/acl2
14+
```
15+
16+
The translator itself can be seen in action in the `examples` directory.
17+
Typing
18+
```
19+
<holdir>/bin/Holmake cleanAll
20+
<holdir>/bin/Holmake
21+
```
22+
will create, for each `<x>Script.sml`, a corresponding file
23+
`<x>.defhol`, comprising a list of so-called `defhol forms` which can
24+
then be used in ACL2(zfc) to "recreate" the selected definitions,
25+
theorems, and goals coming from the `<x>` formalization in HOL4.

examples/acl2/hol-to-acl2/src/HOL_to_ACL2.sig

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@ signature HOL_to_ACL2 =
22
sig
33
include Abbrev
44

5-
datatype t =
6-
Cons of t * t
7-
| Integer of int
8-
| String of string
9-
| Symbol of string
5+
datatype t = datatype HOLsexp_dtype.t
106

117
val basis_defs : thm list
128
val builtin_const_map : (term * string) list
@@ -35,5 +31,4 @@ sig
3531
{fns: term list,
3632
defs: (term list * ((term * term list) * term)) list}
3733

38-
3934
end

examples/acl2/hol-to-acl2/src/HOL_to_ACL2.sml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -366,14 +366,14 @@ fun pp_sexp t =
366366
| Integer i => add_string (if i < 0 then "-" ^ Int.toString (~i) else Int.toString i)
367367
| Cons _ =>
368368
let val (els, last) = break_sexp_list t
369-
in block INCONSISTENT 1 (
370-
add_string "(" ::
371-
pr_list pp_sexp [add_break(1,0)] els @
372-
(case last
373-
of Symbol "nil" => [add_string ")"]
374-
| t => [add_string " .", add_break(1,0), printer t, add_string ")"])
375-
)
376-
end
369+
in block INCONSISTENT 1 (
370+
add_string "(" ::
371+
pr_list pp_sexp [add_break(1,0)] els @
372+
(case last
373+
of Symbol "nil" => [add_string ")"]
374+
| t => [add_string " .", add_break(1,0), pp_sexp t, add_string ")"])
375+
)
376+
end
377377
end
378378

379379
(*---------------------------------------------------------------------------*)

0 commit comments

Comments
 (0)