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
6bf25276
Commit
6bf25276
authored
3 years ago
by
hondet
Browse files
Options
Downloads
Patches
Plain Diff
Specification parameter removed
Extra theories added as requires in the input
parent
2d122401
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
proofs/qfo/bin/main.ml
+4
-16
4 additions, 16 deletions
proofs/qfo/bin/main.ml
proofs/qfo/test/qfo.t
+2
-2
2 additions, 2 deletions
proofs/qfo/test/qfo.t
proofs/qfo/test/withsymb_thms.lp
+1
-0
1 addition, 0 deletions
proofs/qfo/test/withsymb_thms.lp
with
7 additions
and
18 deletions
proofs/qfo/bin/main.ml
+
4
−
16
View file @
6bf25276
...
...
@@ -31,7 +31,7 @@ let new_sig_state (mp : Path.t) : Sig_state.t =
(** Main function *)
let
translate
(
lib_root
:
string
option
)
(
map_dir
:
(
string
*
string
)
list
)
(
mapfile
:
string
)
(
specification
:
string
list
)
:
unit
=
(
mapfile
:
string
)
:
unit
=
(* Get symbol mappings *)
let
mapping
=
PvsLp
.
Mappings
.
of_file
mapfile
in
let
pcertmap
,
depconnectives
,
connectives
=
...
...
@@ -106,10 +106,8 @@ let translate (lib_root : string option) (map_dir : (string * string) list)
(* Create a sig state with PVS-Cert and the specification*)
try
let
ss
=
new_sig_state
[
"<qfo>"
]
in
let
opensig
=
"lpvs.lhol"
::
"lpvs.pcert"
::
specification
in
let
ast
=
Parser
.
parse_string
"<qfo>"
(
Format
.
sprintf
"require open %s;"
(
String
.
concat
" "
opensig
))
Parser
.
parse_string
"<qfo>"
"require open lpvs.lhol lpvs.pcert;"
in
compile_ast
ss
ast
with
Error
.
Fatal
(
p
,
m
)
->
...
...
@@ -131,11 +129,7 @@ let translate (lib_root : string option) (map_dir : (string * string) list)
(* Signature state used to print terms *)
try
let
ss
=
new_sig_state
[
"<qfo.print>"
]
in
let
open_cmd
=
String
.
concat
" "
([
"lpvs.lhol"
;
"lpvs.pcert"
;
"lpvs.connectives"
]
@
specification
)
|>
Format
.
sprintf
"require open %s;"
in
let
open_cmd
=
"require open lpvs.lhol lpvs.pcert lpvs.connectives;"
in
compile_ast
ss
(
Parser
.
parse_string
"<qfo.print>"
open_cmd
)
with
Error
.
Fatal
(
p
,
msg
)
->
Format
.
eprintf
"Couldn't initialise signature for printing@
\n
"
;
...
...
@@ -166,12 +160,6 @@ let mapfile =
let
doc
=
"Maps Dedukti symbols into the runtime process."
in
Arg
.(
required
&
pos
0
(
some
string
)
None
&
info
[]
~
doc
~
docv
:
"JSON"
)
let
specification
=
let
doc
=
"Load symbols and definitions that may be used in propositions from $(docv)"
in
Arg
.(
value
&
opt_all
string
[]
&
info
[
"s"
;
"spec"
]
~
doc
)
let
cmd
=
let
doc
=
"Convert PVS-Cert encoded file quasi first order encoded files"
in
let
man
=
...
...
@@ -263,7 +251,7 @@ let cmd =
]
in
let
exits
=
Term
.
default_exits
in
(
Term
.(
const
translate
$
lib_root
$
map_dir
$
mapfile
$
specification
)
(
Term
.(
const
translate
$
lib_root
$
map_dir
$
mapfile
)
,
Term
.
info
"psnj-qfo"
~
doc
~
man
~
exits
)
let
()
=
Term
.(
exit
@@
eval
cmd
)
This diff is collapsed.
Click to expand it.
proofs/qfo/test/qfo.t
+
2
−
2
View file @
6bf25276
...
...
@@ -2,5 +2,5 @@
symbol
false:
Prf
(
@∀
prop
(
λ
p:
El
prop
,
p
));
symbol
true:
Prf
(
@∀
prop
(
λ
p:
El
prop
,
imp
p
p
));
$
psnj
-
qfo
--
map
-
dir
=
lpvs:encoding
--
map
-
dir
=
spec:spec
qfo
.
json
-
s spec.withsymb
< withs
ymb_thms
.
lp
symbol
trivial:
Prf
(
imp
P
P
);
$
psnj
-
qfo
--
map
-
dir
=
lpvs:encoding
--
map
-
dir
=
spec:spec
qfo
.
json
<
withsymb_thms
.
lp
symbol
trivial:
Prf
(
imp
spec
.
withsymb
.
P
spec
.
withsymb
.
P
);
This diff is collapsed.
Click to expand it.
proofs/qfo/test/withsymb_thms.lp
+
1
−
0
View file @
6bf25276
require open spec.withsymb;
symbol trivial: Prf (P ⇒ (λ _: Prf 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