Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
caisar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
caisar
Commits
b8848af1
Commit
b8848af1
authored
2 years ago
by
François Bobot
Committed by
Michele Alberti
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[interpretation] Example with forall_ predicate.
parent
c70d44de
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/reduction_engine.ml
+3
-1
3 additions, 1 deletion
src/reduction_engine.ml
stdlib/caisar.mlw
+3
-1
3 additions, 1 deletion
stdlib/caisar.mlw
tests/interpretation.t
+8
-1
8 additions, 1 deletion
tests/interpretation.t
with
14 additions
and
3 deletions
src/reduction_engine.ml
+
3
−
1
View file @
b8848af1
...
...
@@ -14,6 +14,8 @@ open Term
[
@@@
ocaml
.
warning
"-9"
]
let
debug
=
Debug
.
register_info_flag
~
desc
:
""
"Reduction_engine"
(* {2 Values} *)
type
value
=
...
...
@@ -1074,7 +1076,7 @@ and reduce_app_no_equ engine st ls ~orig ty rem_cont =
let
args
=
List
.
map
term_of_value
args
in
match
Ident
.
Mid
.
find
ls
.
ls_name
engine
.
known_map
with
|
exception
Not_found
->
Format
.
eprintf
"Reduction engine, ident not found: %s@."
Debug
.
dprintf
debug
"Reduction engine, ident not found: %s@."
ls
.
ls_name
.
Ident
.
id_string
;
{
value_stack
=
Term
(
t_attr_copy
orig
(
t_app
ls
args
ty
))
::
rem_st
;
...
...
This diff is collapsed.
Click to expand it.
stdlib/caisar.mlw
+
3
−
1
View file @
b8848af1
...
...
@@ -82,11 +82,13 @@ theory NN
end
theory Interpret
use bool.Bool
type input
type dataset
function open_dataset string: dataset
function size dataset: int
predicate forall_ (d: dataset) (f: input -> bool)
end
This diff is collapsed.
Click to expand it.
tests/interpretation.t
+
8
−
1
View file @
b8848af1
Test
verify
Test
interpret
$
caisar
interpret
-
L
.
--
format
whyml
-
2
>&
1
<<
EOF
|
./
filter_tmpdir
.
sh
>
theory
T
>
use
caisar
.
Interpret
...
...
@@ -14,7 +14,11 @@ Test verify
>
let
dataset
=
open_dataset
"
datasets/a
"
in
>
size
dataset
=
2
>
>
predicate
robust
(
i:
input
)
>
>
goal
G5:
>
let
dataset
=
open_dataset
"
datasets/a
"
in
>
forall_
dataset
(
fun
i
->
robust
i
)
>
end
>
EOF
G1
:
true
...
...
@@ -27,3 +31,6 @@ Test verify
G4
:
true
caisar_op1
,
(
Interpretation
.
Dataset
{
Interpretation
.
dataset
=
"
datasets/a
"
})
G5
:
forall_
caisar_op2
(
fun
(
i:input
)
->
robust
i
)
caisar_op2
,
(
Interpretation
.
Dataset
{
Interpretation
.
dataset
=
"
datasets/a
"
})
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment