Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dx
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
2xs
dx
Commits
272b7b36
Commit
272b7b36
authored
3 years ago
by
Samuel Hym
Browse files
Options
Downloads
Patches
Plain Diff
Add a primitive for equality on booleans
parent
bbeaed0a
No related branches found
No related tags found
No related merge requests found
Pipeline
#16880
passed
3 years ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Type/Bool.v
+11
-0
11 additions, 0 deletions
src/Type/Bool.v
with
11 additions
and
0 deletions
src/Type/Bool.v
+
11
−
0
View file @
272b7b36
...
...
@@ -17,6 +17,8 @@
Require
Import
List
.
Import
ListNotations
.
From
Coq
Require
Bool
.
Bool
.
From
compcert
.
cfrontend
Require
Csyntax
Ctypes
Cop
.
From
compcert
.
common
Require
Values
.
...
...
@@ -59,6 +61,14 @@ Definition boolNeg :=
|
_
=>
Err
PrimitiveEncodingFailed
end
).
Definition
boolEq
:=
MkPrimitive
boolToBoolToBoolSymbolType
Bool
.
Bool
.
eqb
(
fun
es
=>
match
es
with
|
[
e1
;
e2
]
=>
Ok
(
Csyntax
.
Ebinop
Cop
.
Oeq
e1
e2
Ctypes
.
type_bool
)
|
_
=>
Err
PrimitiveEncodingFailed
end
).
Definition
boolOr
:=
MkPrimitive
boolToBoolToBoolSymbolType
orb
...
...
@@ -81,6 +91,7 @@ Module Exports.
Definition
boolMatchableType
:=
boolMatchableType
.
Definition
boolFalse
:=
boolFalse
.
Definition
boolTrue
:=
boolTrue
.
Definition
boolEq
:=
boolEq
.
Definition
boolNeg
:=
boolNeg
.
Definition
boolOr
:=
boolOr
.
Definition
boolAnd
:=
boolAnd
.
...
...
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