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
ef9fbf2c
Commit
ef9fbf2c
authored
3 years ago
by
hondet
Browse files
Options
Downloads
Patches
Plain Diff
continued documentation up to translation
parent
0d86bfa2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/main.adoc
+61
-20
61 additions, 20 deletions
docs/main.adoc
with
61 additions
and
20 deletions
docs/main.adoc
+
61
−
20
View file @
ef9fbf2c
...
@@ -61,6 +61,14 @@ because it is somewhat linked to the lisp code of PVS. Some steps
...
@@ -61,6 +61,14 @@ because it is somewhat linked to the lisp code of PVS. Some steps
shouldn't be necessary when translating other libraries such as NASA's
shouldn't be necessary when translating other libraries such as NASA's
link:https://github.com/nasa/pvslib[pvslib].
link:https://github.com/nasa/pvslib[pvslib].
TIP: Looking at the scripts used by the continuous integration may
help with the installation and translation.
NOTE: If not stated otherwise, all paths are relative to the root of
the local clone of personoj (if the paths are not absolute). This path
is also assumed to be stored in the environment variable
+$PERSONOJPATH+.
=== Requirements ===
=== Requirements ===
* link:https://github.com/CSL-SRI/PVS[PVS sources] version 7.1
* link:https://github.com/CSL-SRI/PVS[PVS sources] version 7.1
...
@@ -80,29 +88,43 @@ and then compile PVS with the modified prelude.
...
@@ -80,29 +88,43 @@ and then compile PVS with the modified prelude.
CAUTION: this tutorial is made for Linux operating systems. PVS
CAUTION: this tutorial is made for Linux operating systems. PVS
handles poorly BSD systems and I do not use MacOS nor Windows.
handles poorly BSD systems and I do not use MacOS nor Windows.
NOTE: It's difficult to use some system-installed SBCL to compile PVS.
[source,sh]
[source,sh]
git clone https://github.com/CSL-SRI/PVS
git clone https://github.com/CSL-SRI/PVS
cd PVS
cd PVS
git checkout pvs7.1
git checkout pvs7.1
export PVSPATH=$(pwd)
export PVSPATH=$(pwd)
The last command sets the environment variable +PVSPATH+ to the root
of the sources of PVS.
The patches to be applied to the prelude are in
The patches to be applied to the prelude are in
+tools/prelude_patches/+ and must be applied in the
+specs/tools/prelude_patches/+ and must be applied in the
order defined by their filename. Assuming the shell is in the root
order defined by their filename.
directory of personoj,
[source,sh]
[source,sh]
personoj $
for p in $(find 'tools/prelude_patches/' -name '*.diff' | sort); do
for p in $(find 'tools/
specs/
prelude_patches/' -name '*.diff' | sort); do
personoj $
patch "${PVSPATH}/lib/prelude.pvs" "$p"
patch "${PVSPATH}/lib/prelude.pvs" "$p"
personoj $
done
done
PVS can then be compiled, the instructions to compile PVS can be found
PVS can then be compiled, the instructions to compile PVS can be found
in +$PVSPATH/INSTALL+.
in +$PVSPATH/INSTALL+.
[NOTE]
--
It's difficult (but possible) to use a system-installed SBCL to
compile PVS. For this, the script +tools/build-pvs.sh+ can be used:
[source,sh]
cp tools/build-pvs.sh "$PVSPATH"/
cd "$PVSPATH"
autoconf
./configure
./build-pvs.sh
--
[TIP]
--
PVS can be loaded into any SBCL session (unless the running SBCL is
not the same as the one PVS has been compiled with) using
[source,lisp]
include::../tools/load-pvs.lisp[]
--
=== Installing lambdapi ===
=== Installing lambdapi ===
The easiest way is to use the link:https://opam.ocaml.org[opam]
The easiest way is to use the link:https://opam.ocaml.org[opam]
...
@@ -117,21 +139,40 @@ These
...
@@ -117,21 +139,40 @@ These
link:https://github.com/Deducteam/lambdapi#compilation-from-the-sources[installation
link:https://github.com/Deducteam/lambdapi#compilation-from-the-sources[installation
instructions] can then be followed.
instructions] can then be followed.
NOTE: a local OPAM switch with all dependencies installed can be set
[NOTE]
up using
--
A local OPAM switch with all dependencies installed can be set up
using
[source,sh]
[source,sh]
lambdapi $ opam switch create .
opam switch create .
--
at the root of the local clone of lambdapi
=== Installing personoj ===
=== Installing personoj ===
T
o install t
he encoding
The encoding
can be install with (BSD) make,
[source,sh]
[source,sh]
personoj $ bmake -C encoding install
bmake -C encoding install
The exporter must be loaded by PVS upon startup.
For this, add the following to +~/.pvs.lisp+
To install the exporter, add the content of +tools/load-personoj.lisp+ to
+$HOME/.pvs.lisp+, add the line
[source,lisp]
[source,lisp]
include::../tools/load-personoj.lisp[]
(load-personoj)
(load-personoj)
at the end of +$HOME/.pvs.lisp+ and set the environment variable
TIP: +load-personoj+ can be called with a parameter which supersedes
+PERSONOJPATH+ to the path to the local copy of +PERSONOJ+.
the variable +$PERSONOJPATH+.
=== Translating the Prelude ===
[source,sh]
cd specs/tools/prelude
bmake
will create a set of empty +.lp+ files and translate and type check
other files. The (nearly) empty files stand for theories that can't be
translated yet.
TIP: if the translation fails, ensure that +$PVSPATH+ and
+$PERSONOJPATH+ are correctly set up.
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