Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
why3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
126
Issues
126
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Why3
why3
Commits
c6032b96
Commit
c6032b96
authored
Sep 28, 2011
by
Andrei Paskevich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pretty: print qualified theory names in use/clone
parent
c4254b35
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
6 deletions
+18
-6
src/core/pretty.ml
src/core/pretty.ml
+9
-3
src/printer/why3printer.ml
src/printer/why3printer.ml
+9
-3
No files found.
src/core/pretty.ml
View file @
c6032b96
...
...
@@ -421,19 +421,25 @@ let print_meta_arg fmt = function
|
MAstr
s
->
fprintf
fmt
"
\"
%s
\"
"
s
|
MAint
i
->
fprintf
fmt
"%d"
i
let
print_qt
fmt
th
=
if
th
.
th_path
=
[]
then
print_th
fmt
th
else
fprintf
fmt
"%a.%a"
(
print_list
(
constant_string
"."
)
string
)
th
.
th_path
print_th
th
let
print_tdecl
fmt
td
=
match
td
.
td_node
with
|
Decl
d
->
print_decl
fmt
d
|
Use
th
->
fprintf
fmt
"@[<hov 2>(* use %a *)@]"
print_
th
th
fprintf
fmt
"@[<hov 2>(* use %a *)@]"
print_
qt
th
|
Clone
(
th
,
sm
)
when
is_empty_sm
sm
->
fprintf
fmt
"@[<hov 2>(* use %a *)@]"
print_
th
th
fprintf
fmt
"@[<hov 2>(* use %a *)@]"
print_
qt
th
|
Clone
(
th
,
sm
)
->
let
tm
=
Mts
.
fold
(
fun
x
y
a
->
(
x
,
y
)
::
a
)
sm
.
sm_ts
[]
in
let
lm
=
Mls
.
fold
(
fun
x
y
a
->
(
x
,
y
)
::
a
)
sm
.
sm_ls
[]
in
let
pm
=
Mpr
.
fold
(
fun
x
y
a
->
(
x
,
y
)
::
a
)
sm
.
sm_pr
[]
in
fprintf
fmt
"@[<hov 2>(* clone %a with %a,@ %a,@ %a *)@]"
print_
th
th
(
print_list
comma
print_inst_ts
)
tm
print_
qt
th
(
print_list
comma
print_inst_ts
)
tm
(
print_list
comma
print_inst_ls
)
lm
(
print_list
comma
print_inst_pr
)
pm
|
Meta
(
m
,
al
)
->
...
...
src/printer/why3printer.ml
View file @
c6032b96
...
...
@@ -347,19 +347,25 @@ let print_meta_arg fmt = function
|
MAstr
s
->
fprintf
fmt
"
\"
%s
\"
"
s
|
MAint
i
->
fprintf
fmt
"%d"
i
let
print_qt
fmt
th
=
if
th
.
th_path
=
[]
then
print_th
fmt
th
else
fprintf
fmt
"%a.%a"
(
print_list
(
constant_string
"."
)
string
)
th
.
th_path
print_th
th
let
print_tdecl
fmt
td
=
match
td
.
td_node
with
|
Decl
d
->
print_decl
fmt
d
|
Use
th
->
fprintf
fmt
"@[<hov 2>(* use %a *)@]@
\n
@
\n
"
print_
th
th
fprintf
fmt
"@[<hov 2>(* use %a *)@]@
\n
@
\n
"
print_
qt
th
|
Clone
(
th
,
sm
)
when
is_empty_sm
sm
->
fprintf
fmt
"@[<hov 2>(* use %a *)@]@
\n
@
\n
"
print_
th
th
fprintf
fmt
"@[<hov 2>(* use %a *)@]@
\n
@
\n
"
print_
qt
th
|
Clone
(
th
,
sm
)
->
let
tm
=
Mts
.
fold
(
fun
x
y
a
->
(
x
,
y
)
::
a
)
sm
.
sm_ts
[]
in
let
lm
=
Mls
.
fold
(
fun
x
y
a
->
(
x
,
y
)
::
a
)
sm
.
sm_ls
[]
in
let
pm
=
Mpr
.
fold
(
fun
x
y
a
->
(
x
,
y
)
::
a
)
sm
.
sm_pr
[]
in
fprintf
fmt
"@[<hov 2>(* clone %a with %a,@ %a,@ %a *)@]@
\n
@
\n
"
print_
th
th
(
print_list
comma
print_inst_ts
)
tm
print_
qt
th
(
print_list
comma
print_inst_ts
)
tm
(
print_list
comma
print_inst_ls
)
lm
(
print_list
comma
print_inst_pr
)
pm
|
Meta
(
m
,
al
)
->
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment