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
bdbbde88
Commit
bdbbde88
authored
1 year ago
by
Michele Alberti
Browse files
Options
Downloads
Patches
Plain Diff
[interpretation] Some function renaming.
parent
e67a9505
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/interpretation.ml
+7
-7
7 additions, 7 deletions
src/interpretation.ml
with
7 additions
and
7 deletions
src/interpretation.ml
+
7
−
7
View file @
bdbbde88
...
...
@@ -117,7 +117,7 @@ let const_real_of_float value =
let
value_term
t
=
CRE
.
Value
(
Term
t
)
let
value_int
i
=
CRE
.
Value
(
Int
i
)
let
builtin_caisar
:
caisar_env
CRE
.
built_in_theories
list
=
let
caisar_builtins
:
caisar_env
CRE
.
built_in_theories
list
=
let
reconstruct
()
=
(* Force the engine to reconstruct the original term. *)
raise
Caml
.
Not_found
...
...
@@ -160,7 +160,7 @@ let builtin_caisar : caisar_env CRE.built_in_theories list =
|
[
Term
_t1
;
Term
_t2
]
->
reconstruct
()
|
_
->
invalid_arg
(
error_message
ls
)
in
let
length
:
_
CRE
.
builtin
=
let
v
length
:
_
CRE
.
builtin
=
fun
engine
ls
vl
_ty
->
match
vl
with
|
[
Term
{
t_node
=
Tapp
(
ls
,
[]
);
_
}
]
->
(
...
...
@@ -214,10 +214,10 @@ let builtin_caisar : caisar_env CRE.built_in_theories list =
let
caisar_op
=
Vector
(
Language
.
create_vector
env
n
)
in
value_term
(
term_of_caisar_op
~
args
engine
caisar_op
ty
)
|
_
->
assert
false
)
|
[
Term
t1
;
Term
t2
]
->
value_term
(
Term
.
t_app_infer
ls
[
t1
;
t2
]
)
|
[
Term
_
t1
;
Term
_
t2
]
->
reconstruct
(
)
|
_
->
invalid_arg
(
error_message
ls
)
in
let
mapi
:
_
CRE
.
builtin
=
let
v
mapi
:
_
CRE
.
builtin
=
fun
engine
ls
vl
ty
->
match
vl
with
|
[
...
...
@@ -302,8 +302,8 @@ let builtin_caisar : caisar_env CRE.built_in_theories list =
[
([
Ident
.
op_get
""
]
(* ([]) *)
,
None
,
vget
);
([
Ident
.
op_infix
"-"
]
,
None
,
vminus
);
([
"length"
]
,
None
,
length
);
([
"mapi"
]
,
None
,
mapi
);
([
"length"
]
,
None
,
v
length
);
([
"mapi"
]
,
None
,
v
mapi
);
]
);
(
[
"interpretation"
]
,
"NeuralNetwork"
,
...
...
@@ -374,7 +374,7 @@ let interpret_task ~cwd env task =
}
in
let
engine
=
CRE
.
create
~
bounded_quant
params
env
known_map
caisar_env
builtin_caisar
CRE
.
create
~
bounded_quant
params
env
known_map
caisar_env
caisar_builtins
in
let
g
,
f
=
(
Task
.
task_goal
task
,
Task
.
task_goal_fmla
task
)
in
let
f
=
CRE
.
normalize
~
limit
:
Int
.
max_value
engine
Term
.
Mvs
.
empty
f
in
...
...
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