Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
colibrics
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
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
colibrics
Commits
e00fa71b
Commit
e00fa71b
authored
2 years ago
by
Hichem R. A.
Committed by
François Bobot
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[NSeq] Added the nseq_content builtin
parent
41004c69
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!27
New array and sequence theory
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
colibri2/theories/nseq/nseq.ml
+9
-0
9 additions, 0 deletions
colibri2/theories/nseq/nseq.ml
with
9 additions
and
0 deletions
colibri2/theories/nseq/nseq.ml
+
9
−
0
View file @
e00fa71b
...
@@ -25,6 +25,7 @@ module Builtin = struct
...
@@ -25,6 +25,7 @@ module Builtin = struct
|
NSeq
|
NSeq
|
NSeq_first
|
NSeq_first
|
NSeq_last
|
NSeq_last
|
NSeq_content
|
NSeq_length
|
NSeq_length
|
NSeq_get
|
NSeq_get
|
NSeq_set
|
NSeq_set
...
@@ -56,6 +57,12 @@ module Builtin = struct
...
@@ -56,6 +57,12 @@ module Builtin = struct
(
Dolmen_std
.
Path
.
global
"nseq_last"
)
(
Dolmen_std
.
Path
.
global
"nseq_last"
)
(
Expr
.
Ty
.
pi
[
val_ty_var
]
(
Expr
.
Ty
.
arrow
[
val_nseq_ty
]
int_ty
))
(
Expr
.
Ty
.
pi
[
val_ty_var
]
(
Expr
.
Ty
.
arrow
[
val_nseq_ty
]
int_ty
))
let
nseq_content
:
Dolmen_std
.
Expr
.
term_cst
=
Expr
.
Id
.
mk
~
name
:
"nseq_content"
~
builtin
:
NSeq_content
(
Dolmen_std
.
Path
.
global
"nseq_content"
)
(
Expr
.
Ty
.
pi
[
val_ty_var
]
(
Expr
.
Ty
.
arrow
[
val_nseq_ty
]
(
Expr
.
Ty
.
arrow
[
int_ty
]
val_ty
)))
let
nseq_length
:
Dolmen_std
.
Expr
.
term_cst
=
let
nseq_length
:
Dolmen_std
.
Expr
.
term_cst
=
Expr
.
Id
.
mk
~
name
:
"nseq_length"
~
builtin
:
NSeq_length
Expr
.
Id
.
mk
~
name
:
"nseq_length"
~
builtin
:
NSeq_length
(
Dolmen_std
.
Path
.
global
"nseq_length"
)
(
Dolmen_std
.
Path
.
global
"nseq_length"
)
...
@@ -152,6 +159,8 @@ module Builtin = struct
...
@@ -152,6 +159,8 @@ module Builtin = struct
app1
env
s
nseq_first
app1
env
s
nseq_first
|
Dolmen_loop
.
Typer
.
T
.
Id
{
ns
=
Term
;
name
=
Simple
"nseq_last"
}
->
|
Dolmen_loop
.
Typer
.
T
.
Id
{
ns
=
Term
;
name
=
Simple
"nseq_last"
}
->
app1
env
s
nseq_last
app1
env
s
nseq_last
|
Dolmen_loop
.
Typer
.
T
.
Id
{
ns
=
Term
;
name
=
Simple
"nseq_content"
}
->
app1
env
s
nseq_content
|
Dolmen_loop
.
Typer
.
T
.
Id
{
ns
=
Term
;
name
=
Simple
"nseq_length"
}
->
|
Dolmen_loop
.
Typer
.
T
.
Id
{
ns
=
Term
;
name
=
Simple
"nseq_length"
}
->
app1
env
s
nseq_length
app1
env
s
nseq_length
|
Dolmen_loop
.
Typer
.
T
.
Id
{
ns
=
Term
;
name
=
Simple
"nseq_get"
}
->
|
Dolmen_loop
.
Typer
.
T
.
Id
{
ns
=
Term
;
name
=
Simple
"nseq_get"
}
->
...
...
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