Giter Site home page Giter Site logo

pessaux-f / focalize Goto Github PK

View Code? Open in Web Editor NEW
8.0 8.0 1.0 35.55 MB

The FoCaLiZe development environment

License: Other

Makefile 2.74% HTML 0.51% CSS 0.17% Roff 0.33% TeX 20.39% Emacs Lisp 0.26% OCaml 67.18% Shell 0.01% XSLT 4.69% Coq 1.40% Ruby 0.02% Prolog 1.78% Standard ML 0.17% Python 0.35% Perl 0.01%

focalize's People

Contributors

damiendoligez avatar pessaux-f avatar rafoo avatar renaud-rioboo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

rafoo

focalize's Issues

Typechecking issue ? Wrong type generated in Coq.

The same abstracted method from a collection parameter does not have the same type in very similar situations.
In some, it looks wrong, causing the lookup in the collection carriers mapping to fail. Hence, the type is considered as coming from an external top-level collection.

File "./bug.v", line 180, characters 6-45:
Error: The reference conversionFunctions.Super.me_as_carrier was not found
in the current environment.

See the attached file (to rename .fcl). Instructions to reproduce the bug are in comment in the file.
Tester with version 0.9.5, OCaml 5.0.0, Coq 8.17.0.
bug.txt

Unbound reference in Coq code when playing with parametrized collection parameters.

_The reference p_C_foo was not found in the current environment.
For the following code.
I suspect this is related to issue #3 since it also deals with the PRM rule.
The substitution should change _p_C_foo into _p_D_foo.
I'm afraid the way the substitution is applied is wrong since it proceeds collection parameter by collection parameter. Hence if several collection parameters are involved, each time a substitution modifies a type is does not modify the types of the other collection parameters.

open "basics" ;;

species Obj =
  signature elem : Self ;
end ;;

species S (X is Obj, Y is Obj) =
  let foo (x : X, y : Y) = true ;
  property theprop : all x : X, all y : Y, foo (x, y) = true ;
end ;;

species T (A is Obj, B is Obj, C is S (A, B), D is C) =
  let bar = D!foo (A!elem, B!elem) ;
  theorem bar_is_true : bar = true
  proof = definition of bar property D!theprop assumed ;
end ;;

Note the enforced dependencies in the assumed proof.

Installation through opam does not work

I have tried installing FoCaLiZe from the opam file as follows:

opam pin add -k git focalize https://github.com/pessaux-f/focalize.git

I get an error which I guess means that opam sandboxing prevents the use of sudo:

[focalize.0.9.2] synchronised from git+https://github.com/pessaux-f/focalize.git
[WARNING] Failed checks on focalize package definition from source at git+https://github.com/pessaux-f/focalize.git:
    error 57: Synopsis and description must not be both empty
focalize is now pinned to git+https://github.com/pessaux-f/focalize.git (version master)

The following actions will be performed:
  ∗ install focalize master*
Do you want to continue? [Y/n] y

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of focalize failed at "/home/cauderlier/.opam/opam-init/hooks/sandbox.sh build make
        OPAM_PREFIX=/home/cauderlier/.opam/4.07.1 opam_build".

#=== ERROR while compiling focalize.master ====================================#
# context     2.0.4 | linux/x86_64 | ocaml-base-compiler.4.07.1 | pinned(git+https://github.com/pessaux-f/focalize.git#a2176f9a)
# path        ~/.opam/4.07.1/.opam-switch/build/focalize.master
# command     ~/.opam/opam-init/hooks/sandbox.sh build make OPAM_PREFIX=/home/cauderlier/.opam/4.07.1 opam_build
# exit-code   2
# env-file    ~/.opam/log/focalize-16974-c743ac.env
# output-file ~/.opam/log/focalize-16974-c743ac.out
### output ###
# if test -x zvtov.bin; then \
# [...]
#         else \
#   cp zvtov.byt zvtov; \
# fi
# make[1] : on quitte le répertoire « /home/cauderlier/.opam/4.07.1/.opam-switch/build/focalize.master/zvtov »
# Installing...
# make[1] : on entre dans le répertoire « /home/cauderlier/.opam/4.07.1/.opam-switch/build/focalize.master/zvtov »
# sudo mkdir -p /home/cauderlier/.opam/4.07.1/bin
# sudo: le uid effectif n'est pas 0. Est-ce que /usr/bin/sudo est sur un système de fichiers avec l'option « nosuid » ou un système de fichiers NFS sans privilèges root ?
# make[1]: *** [Makefile:66: install] Error 1
# make[1] : on quitte le répertoire « /home/cauderlier/.opam/4.07.1/.opam-switch/build/focalize.master/zvtov »
# make: *** [Makefile:64: opam_build] Error 2



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build focalize master
└─ 
╶─ No changes have been performed
[NOTE] Pinning command successful, but your installed packages may be out of sync.

I am attaching the log files.
focalize-16974-c743ac.env.txt
focalize-16974-c743ac.info.txt
focalize-16974-c743ac.out.txt

Misusage of Self as an expression

open "basics";;
species Une_Erreur_S =
signature une_fonction : Self -> bool;
logical let erreur (s : Self) =
une_fonction (Self);
end;;


Compilation generates:
Error: Unexpected error:
"File "species_record_type_coq_generation.ml", line 992, characters 9-15: Assertion failed".
Please report.

When calling une_fonction, passing Self as argument is incorrect. The broken assertion especially detects this. An error message should be issued instead of an assertion.
Some check should be done somewhere earlier in the compilation pass. May be at scoping if possible. Indeed, Self is syntactically an expression since it is used for collection parameters expressions. Everywhere else, it is illegal.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.