-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
198 additions
and
0 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
tests/coq-tests/bool-inequality-function-notation/base.template.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<style> | ||
body { | ||
font-family: monospace, monospace; | ||
} | ||
|
||
.tooltipped { | ||
position: relative; | ||
} | ||
|
||
.tooltip { | ||
background-color: white; | ||
visibility: hidden; | ||
border: black 1px solid; | ||
position: absolute; | ||
z-index: 1; | ||
padding: 1em; | ||
top: 100%; | ||
left: 0; | ||
} | ||
|
||
.tooltipped:hover { | ||
border: 1px solid black; | ||
} | ||
|
||
.tooltipped:hover > .tooltip { | ||
visibility: visible; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
(*< | ||
(generate (base-html-translation)) | ||
>*) | ||
</body> | ||
</html> |
16 changes: 16 additions & 0 deletions
16
tests/coq-tests/bool-inequality-function-notation/base.template.v
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
(*< | ||
(generate (base-translation)) | ||
>*) | ||
|
||
(*< | ||
(if (untranslated-definitions?) | ||
(generate "Theorem UNTRANSLATED_DEFINITIONS : False. Qed.")) | ||
>*) | ||
|
||
(* | ||
(*< | ||
(generate (untranslated-definitions)) | ||
>*) | ||
*) |
57 changes: 57 additions & 0 deletions
57
tests/coq-tests/bool-inequality-function-notation/configuration.lisp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
(use-list-notations) | ||
|
||
(ignore-all-overloads) | ||
(ignore-pragmas "include_start" | ||
"include_end" | ||
"file_start" | ||
"file_end" | ||
"sail_internal") | ||
|
||
(ignore-function-definition-predicate (lambda (identifier) | ||
(or | ||
(string-ends-with? "_of_num" identifier) | ||
(string-starts-with? "num_of_" identifier) | ||
(string-starts-with? "undefined_" identifier) | ||
(string-starts-with? "regval_of_" identifier) | ||
(string-ends-with? "_of_regval" identifier) | ||
(contains? '( | ||
"eq_unit" | ||
"neq_int" | ||
"neq_bool" | ||
"neq_bits" | ||
"slice_mask" | ||
"_shl_int_general" | ||
"_shr_int_general" | ||
"fdiv_int" | ||
"fmod_int" | ||
"is_none" | ||
"is_some" | ||
"__id" | ||
"sail_mask" | ||
"sail_ones" | ||
"concat_str_bits" | ||
"concat_str_dec") | ||
identifier)))) | ||
|
||
(ignore-type-definition-predicate (lambda (identifier) | ||
(contains? '( | ||
"option" | ||
"register_value" | ||
"bits" | ||
"regstate") | ||
identifier))) | ||
|
||
(ignore-value-definition-predicate | ||
(lambda (identifier) | ||
(contains? '( | ||
"default_capability" | ||
"initial_regstate" | ||
"initial_Capability" | ||
) | ||
identifier))) | ||
|
||
(template "base.template.v") | ||
(template "machine.template.v") | ||
(template "base.template.html") | ||
(template "machine.template.html") | ||
|
38 changes: 38 additions & 0 deletions
38
tests/coq-tests/bool-inequality-function-notation/machine.template.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<style> | ||
body { | ||
font-family: monospace, monospace; | ||
} | ||
|
||
.tooltipped { | ||
position: relative; | ||
} | ||
|
||
.tooltip { | ||
background-color: white; | ||
visibility: hidden; | ||
border: black 1px solid; | ||
position: absolute; | ||
z-index: 1; | ||
padding: 1em; | ||
top: 100%; | ||
left: 0; | ||
} | ||
|
||
.tooltipped:hover { | ||
border: 1px solid black; | ||
} | ||
|
||
.tooltipped:hover > .tooltip { | ||
visibility: visible; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
(*< | ||
(generate (program-html-translation)) | ||
>*) | ||
</body> | ||
</html> |
5 changes: 5 additions & 0 deletions
5
tests/coq-tests/bool-inequality-function-notation/machine.template.v
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Require Export base. | ||
|
||
(*< | ||
(generate (program-translation)) | ||
>*) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
default Order dec | ||
|
||
$include <prelude.sail> | ||
|
||
|
||
val foo : (bool, bool) -> bool | ||
function foo(x, y) = { | ||
x != y | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
SAIL=sail | ||
COQ=coqc | ||
|
||
SAIL_SOURCES=model.sail | ||
TESTED_FILE=microsail.v | ||
|
||
if [ -n "$1" ] | ||
then | ||
OPT="-ddump_rewrite_ast intermediate" | ||
else | ||
OPT= | ||
fi | ||
|
||
$SAIL $OPT -katamaran -katamaran_config configuration.lisp $SAIL_SOURCES | ||
$COQ base.v | ||
$COQ machine.v |
15 changes: 15 additions & 0 deletions
15
tests/coq-tests/bool-inequality-function-notation/translate.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
SAIL=sail | ||
COQ=coqc | ||
|
||
SAIL_SOURCES=model.sail | ||
TESTED_FILE=microsail.v | ||
|
||
if [ -n "$1" ] | ||
then | ||
OPT="-ddump_rewrite_ast intermediate" | ||
else | ||
OPT= | ||
fi | ||
|
||
$SAIL $OPT -katamaran -katamaran_config configuration.lisp $SAIL_SOURCES |