Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
personoj
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
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
koizel
personoj
Commits
9f128c6b
Commit
9f128c6b
authored
3 years ago
by
Gabriel
Committed by
hondet
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
uppercase variables
parent
0503c38d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/toCert.ml
+1
-3
1 addition, 3 deletions
lib/toCert.ml
lib/tptp.ml
+17
-1
17 additions, 1 deletion
lib/tptp.ml
test/lpvs.t
+2
-2
2 additions, 2 deletions
test/lpvs.t
with
20 additions
and
6 deletions
lib/toCert.ml
+
1
−
3
View file @
9f128c6b
...
...
@@ -198,9 +198,7 @@ let rec tptp_of (vm : Tt.t B.var CVMap.t) (t : term) : Tt.t =
let
b
=
B
.
bind_var
x
(
Tt
.
lift
b
)
in
cons
(
B
.
unbox
b
)
(* Generic transformations. *)
|
Symbol
(
_
,
s
)
->
let
x
=
B
.
new_var
Tt
.
mkfree
s
in
Tt
.
Var
x
|
Symbol
(
_
,
s
)
->
Id
s
|
Var
x
->
Tt
.
Var
(
CVMap
.
find
x
vm
)
|
Appl
(
t
,
u
)
->
Tt
.
App
(
tptp_of
vm
t
,
tptp_of
vm
u
)
|
Lambda
(
_
,
b
)
->
...
...
This diff is collapsed.
Click to expand it.
lib/tptp.ml
+
17
−
1
View file @
9f128c6b
(* TPTP abstract syntax tree and printer. *)
module
B
=
Bindlib
module
Term
=
struct
type
t
=
|
True
|
False
|
Id
of
string
|
Var
of
t
B
.
var
|
App
of
t
*
t
|
Not
of
t
...
...
@@ -16,6 +18,7 @@ module Term = struct
|
Lam
of
(
t
,
t
)
B
.
binder
let
_Var
=
B
.
box_var
let
_Id
s
=
B
.
box
(
Id
s
)
let
_App
=
B
.
box_apply2
(
fun
t
u
->
App
(
t
,
u
))
let
_Not
=
B
.
box_apply
(
fun
t
->
Not
t
)
let
_And
=
B
.
box_apply2
(
fun
t
u
->
And
(
t
,
u
))
...
...
@@ -35,6 +38,7 @@ module Term = struct
match
t
with
|
True
->
_True
|
False
->
_False
|
Id
s
->
_Id
s
|
Var
x
->
_Var
x
|
App
(
t
,
u
)
->
_App
(
l
t
)
(
l
u
)
|
Not
t
->
_Not
(
l
t
)
...
...
@@ -46,7 +50,18 @@ module Term = struct
|
Ex
b
->
lift_bder
_Ex
b
|
Lam
b
->
lift_bder
_Lam
b
let
pp_var
ppf
(
x
:
t
B
.
var
)
:
unit
=
Format
.
fprintf
ppf
"%s"
(
B
.
name_of
x
)
(** [pp_var ppf x] prints variable [x] to formatter [ppf]. Variables
are uppercased in TPTP. *)
let
pp_var
ppf
(
x
:
t
B
.
var
)
:
unit
=
Format
.
fprintf
ppf
"%s"
(
String
.
capitalize_ascii
(
B
.
name_of
x
))
(** [pp_id ppf s] prints identifier [s] to formatter [ppf]. Identifiers
are lowercased in TPTP. *)
let
pp_id
ppf
(
s
:
string
)
:
unit
=
Format
.
fprintf
ppf
"%s"
(
String
.
lowercase_ascii
s
)
(* TODO handle name clash if [p] and [P] are both different vars (or
different symbols) in some PVS-Cert term. *)
let
rec
pp
(
wrap
:
bool
)
(
ppf
:
Format
.
formatter
)
(
t
:
t
)
:
unit
=
let
open
Format
in
...
...
@@ -55,6 +70,7 @@ module Term = struct
match
t
with
|
True
->
out
"$true"
|
False
->
out
"$false"
|
Id
s
->
pp_id
ppf
s
|
Var
x
->
pp_var
ppf
x
|
App
(
t
,
u
)
->
out
(
wrap
"@[%a@ %a@]"
)
(
pp
false
)
t
(
pp
true
)
u
|
Not
t
->
out
(
wrap
"@[~@ %a@]"
)
(
pp
false
)
t
...
...
This diff is collapsed.
Click to expand it.
test/lpvs.t
+
2
−
2
View file @
9f128c6b
$
lpvs
--
lib
-
root
encoding
/
false
.
lp
symbol
false:
∀
prop
(
\
p:
prop
.
p
);
symbol
true:
∀
prop
(
\
p:
prop
.
⇒
p
(
\
_:
p
.
p
));
fof
(
false
,
!
[
p
]
:
p
)
.
fof
(
true
,
!
[
p
]
:
p
=>
p
)
.
fof
(
false
,
!
[
P
]
:
P
)
.
fof
(
true
,
!
[
P
]
:
P
=>
P
)
.
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