Commit graph

4027 commits

Author SHA1 Message Date
Leonardo de Moura
baf4c01de8 feat(frontends/lean): definitions are opaque by default 2014-09-19 15:54:32 -07:00
Leonardo de Moura
48dbd13eef feat(frontends/lean): allow transient classes/instances, i.e.,
classes/instances that are not saved in .olean files
2014-09-19 15:54:32 -07:00
Leonardo de Moura
93c2c30310 feat(frontends/lean): allow transient coercions, i.e., coercions that
are not saved in .olean files
2014-09-19 15:54:32 -07:00
Leonardo de Moura
cbafa0dbf9 feat(library/scoped_ext): allow extensions to mark whether an entry is
persistent or not
2014-09-19 15:54:32 -07:00
Soonho Kong
5b9b814fd1 fix(shell/lean.cpp): use binary mode to open cache file 2014-09-19 09:36:23 -07:00
Leonardo de Moura
a3e43c2173 refactor(util/thread_script_state): remove 'enable_script_state_recycling' hack 2014-09-19 08:14:50 -07:00
Leonardo de Moura
49d5af473d refactor(kernel): remove support for proof irrelevant classes
Motivation: we can use Prop
2014-09-19 07:32:07 -07:00
Leonardo de Moura
87592cdb43 refactor(library): remove dead code 2014-09-18 22:45:53 -07:00
Leonardo de Moura
2bde3f55d5 feat(shell): include build type when printing version 2014-09-18 22:40:05 -07:00
Leonardo de Moura
dd31ed60b0 refactor(library): remove unnecessary file hott_kernel, HoTT and
standard library have been merged
2014-09-18 20:30:37 -07:00
Leonardo de Moura
b53b1825ae fix(frontends/lean/info_manager): get_closest_env_opts 2014-09-18 17:03:59 -07:00
Leonardo de Moura
9e29602934 fix(frontends/lean/info_manager): make sure env_info is not lost when
starting parser in the middle of the 'file'
2014-09-18 16:51:59 -07:00
Leonardo de Moura
970ad72bc3 fix(frontends/lean/pp): protect pretty printer from exceptions 2014-09-18 16:21:20 -07:00
Leonardo de Moura
b3e05a2fe9 refactor(frontends/lean/scanner): remove dependency to seekg and unget
methods

It is not safe to use seekg for textual files. Here is a fragment from a
C++ manual:

seekg() and seekp()

This pair of functions serve respectively to change the position of stream pointers get and put. Both functions are overloaded with two different prototypes:

     seekg ( pos_type position );
     seekp ( pos_type position );

Using this prototype the stream pointer is changed to an absolute position from the beginning of the file. The type required is the same as that returned by functions tellg and tellp.

      seekg ( off_type offset, seekdir direction );
      seekp ( off_type offset, seekdir direction );

Using this prototype, an offset from a concrete point determined by
parameter direction can be specified. It can be:

          ios::beg	offset specified from the beginning of the stream
          ios::cur	offset specified from the current position of the stream pointer
          ios::end	offset specified from the end of the stream

The values of both stream pointers get and put are counted in different
ways for text files than for binary files, since in text mode files some
modifications to the appearance of some special characters can
occur. For that reason it is advisable to use only the first prototype
of seekg and seekp with files opened in text mode and always use
non-modified values returned by tellg or tellp. With binary files, you
can freely use all the implementations for these functions. They should
not have any unexpected behavior.
2014-09-18 15:24:48 -07:00
Leonardo de Moura
243f80231a chore(kernel): fix style and lua bindings 2014-09-17 18:30:28 -07:00
Leonardo de Moura
ea1bae0143 refactor(kernel/converter): replace extra_opaque_set with predicate
It gives us more flexibility.
2014-09-17 17:05:13 -07:00
Leonardo de Moura
1fbb554a16 feat(library/module): provide predicate module::is_definition 2014-09-17 16:32:00 -07:00
Leonardo de Moura
9733401c20 fix(frontends/lean/tactic_hint): failure when compiling lean terms into
tactics: mismatch on the number of universe parameters
2014-09-17 15:23:10 -07:00
Leonardo de Moura
8b76deb971 fix(util/thread_script_state): style 2014-09-17 15:23:10 -07:00
Leonardo de Moura
19148af7ae feat(build): do not display WARNING message when tcmalloc is not found 2014-09-17 15:23:10 -07:00
Leonardo de Moura
26918022d8 feat(build): use Release when compilation mode is not specified 2014-09-17 15:23:10 -07:00
Leonardo de Moura
e3e1668f27 fix(util/thread_script_state): disable script_state recycling at finalization time
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-17 09:57:17 -07:00
Leonardo de Moura
a72a11db8e fix(util/script_state_manager): crash when compiling with msys2 stack
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-17 08:39:06 -07:00
Leonardo de Moura
aa5abefaff fix(util/thread_script_state): make sure system does not crash during
finalization
2014-09-17 08:25:21 -07:00
Soonho Kong
42314c61b6 chore(.travis.osx.yml): update homebrew lua package names
lua5.1: lua            => lua51
lua5.2: versions/lua52 => lua
2014-09-17 00:49:32 -07:00
Soonho Kong
9161a6a210 fix(emacs/lean-type): change where to trigger eldoc
Previously, eldoc is triggered regardless of current position.
Now, it is triggered:

 - *NOT* looking-at whitespace or
 - looking-back end-parens such as ')', '}', ']', etc
2014-09-17 00:24:30 -07:00
Leonardo de Moura
9a2f1ba423 fix(util): compilation problems when using msys2
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-16 21:29:51 -07:00
Leonardo de Moura
f03f0aa8b9 fix(util/thread): MULTI_THREAD=OFF mode 2014-09-16 20:44:43 -07:00
Leonardo de Moura
2b0623c0a1 fix(frontends/lean): assertion violations 2014-09-16 18:59:51 -07:00
Leonardo de Moura
78ad24a697 feat(frontends/lean/server): add SYNC command, closes #199 2014-09-16 18:42:34 -07:00
Leonardo de Moura
e3e2370a38 feat(frontends/lean): split 'opaque_hint' command into 'opaque' and 'transparent'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-16 18:03:40 -07:00
Leonardo de Moura
4b51d50ad4 fix(frontends/lean/elaborator): coercion overloading 2014-09-16 15:12:20 -07:00
Leonardo de Moura
50f788a427 fix(tests/lean/interactive): adjust test to library reorg 2014-09-16 13:16:46 -07:00
Jeremy Avigad
74cb289d48 refactor(library): rename algebra directory to struc, move categories.lean to algebra 2014-09-16 13:13:01 -07:00
Jeremy Avigad
9988914189 refactor(library/logic): move files in classes directory to core 2014-09-16 13:13:01 -07:00
Leonardo de Moura
dffe9a6f17 fix(frontends/lean/elaborator): more robust support for coercions to
function-class that contains implicit arguments
2014-09-16 13:08:34 -07:00
Leonardo de Moura
d0d23eb525 fix(frontends/lean/inductive_cmd): improve name resolution in inductive
command

The new test demonstrates the problem being fixed by this commit
2014-09-16 09:48:51 -07:00
Leonardo de Moura
7ea6a17ae8 feat(library/data/num): add 'mul' and 'add' for binary numerals 2014-09-16 08:05:00 -07:00
Soonho Kong
2a8ddf055b fix(emacs/lean-option): fix lean-get-options 2014-09-15 17:44:24 -07:00
Soonho Kong
aa9fe958a9 feat(emacs/lean-debug): add lean-debug minor-mode
close #177
2014-09-15 16:50:35 -07:00
Leonardo de Moura
851444b77a test(tests/lean/interactive): test for issue #193 2014-09-15 16:07:23 -07:00
Leonardo de Moura
8e52c478b1 refactor(library/data/num): add 'succ', 'pred' and 'size' (aka number of bits),
rename is_inhabited theorems
2014-09-15 16:05:17 -07:00
Leonardo de Moura
af2c3b1815 fix(frontends/lean/info_manager): bug in save_environment_options,
server was displaying old results
2014-09-15 16:05:17 -07:00
Leonardo de Moura
93e83baa1b fix(frontends/lean/parser): commit_upto invocation after 'import' 2014-09-15 16:05:17 -07:00
Leonardo de Moura
feb4993f9c fix(frontends/lean/server): '[anonymous]' entry being displayed by FINDP
This could happen when there is a declaration (e.g., nat) whose type is
equal to an active namespace.
2014-09-15 16:05:17 -07:00
Soonho Kong
a803b8fd8d fix(bin/ltags): handle recursor specially in tags generation
fix #197
2014-09-15 15:17:46 -07:00
Soonho Kong
8899ded46b fix(bin/linja): pass args.cache to lean when project file not found
fix #195
2014-09-15 14:35:13 -07:00
Soonho Kong
18e6481ce3 test(emacs/lean-option-test): add lean-test-update-string-alist-default 2014-09-15 13:04:53 -07:00
Soonho Kong
b650793b33 feat(lean-option): handle default pp.width option value 2014-09-15 13:04:53 -07:00
Soonho Kong
254d861970 feat(bin/linja): pass -D config option to lean
Close #196
2014-09-15 13:04:13 -07:00