Commit graph

3180 commits

Author SHA1 Message Date
Leonardo de Moura
61661478ad refactor(kernel/metavar): simplify substitution class, and remove dead code
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-23 10:03:03 -07:00
Leonardo de Moura
caf3e5a449 fix(kernel/metavar): missing justification bug
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-23 08:41:09 -07:00
Leonardo de Moura
d998bf9300 test(tests/lean/run): add some 'lost' tests
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-23 08:22:53 -07:00
Leonardo de Moura
75005765d6 perf(library/unifier): add small performance improvement
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 17:58:40 -07:00
Leonardo de Moura
90189f8eb6 chore(frontends/lean/elaborator): fix outdated comment
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 17:50:13 -07:00
Leonardo de Moura
35e7302d8a perf(frontends/lean/elaborator): fix performance bottleneck
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 17:45:45 -07:00
Leonardo de Moura
697bcf4b4f perf(library/unifier): improve performance of instantiate_meta method
It provides a significant performance boost in some files.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 16:24:07 -07:00
Leonardo de Moura
5ad6d5cbc4 feat(kernel/converter): add eta-expansion to converter, this is important when terms contains metavariables
For example, consider the unification constrains

    fun (x : A), f (?m x)  =?=  f

Eta-reduction is not applicable since (?m x) is not a variable.
However, if we eta-expand the left-hand-side, we get

   fun (x : A), f (?m x)  =?=  fun (x : A), f x

which is reduced to

      (?m x) =?= x

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 16:24:02 -07:00
Leonardo de Moura
e81d96ffc1 feat(build): add build option for jemalloc
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 13:44:47 -07:00
Leonardo de Moura
368c94ccc5 feat(util/rb_tree): use memory_pool at rb_tree, 5% performance improvement when using multiple threads
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 10:53:07 -07:00
Leonardo de Moura
fd7e20f11c fix(util/thread): thread_specific_ptr finalization
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 10:50:44 -07:00
Leonardo de Moura
a7c6c3e840 fix(kernel/expr): memory corruption in dealloc method
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 10:16:44 -07:00
Leonardo de Moura
8adf6e25ef refactor(library/standard/unit): make unit type similar to the one in the hott library
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 09:56:05 -07:00
Leonardo de Moura
c5cbe1cc2c refactor(library/standard): rename bool_decidable to prop_decidable
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 09:53:05 -07:00
Leonardo de Moura
b522ea6f2d refactor(library/standard): rename bit to bool
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 09:49:54 -07:00
Leonardo de Moura
5eaf04518b refactor(*): rename Bool to Prop
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 09:43:18 -07:00
Leonardo de Moura
4c6ebdeaf9 perf(util/memory_pool): use memory_pool for hierarchical names and justification objects we get a 8% performance improvement when using multiple threads
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 09:18:26 -07:00
Leonardo de Moura
c8b6f0c7fb refactor(util): rename fixed_size_allocator to memory_pool
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 07:49:40 -07:00
Leonardo de Moura
b7838f5db7 feat(library/standard/cast): add dcongr2 theorem
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 05:58:58 -07:00
Leonardo de Moura
a9f7d87aae test(tests/lean/run/decidable): show implicit argument that is computed automatically
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 05:58:36 -07:00
Leonardo de Moura
1e595e8027 feat(library/standard/decidable): decidable is proof irrelevant
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 03:54:28 -07:00
Leonardo de Moura
725f370e59 fix(build): number of core detection on OSX
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-21 20:07:11 -07:00
Leonardo de Moura
77537d43a3 fix(util): add missing file
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-21 18:58:24 -07:00
Leonardo de Moura
79ea7c5910 perf(kernel/expr): minimize access to system memory allocator by recycling expr_cells
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-21 18:46:47 -07:00
Leonardo de Moura
e3d4b2490d perf(kernel/type_checker): improve infer_app peformance
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-21 17:11:47 -07:00
Leonardo de Moura
ad87c0b3e1 fix(frontends/lean): race condition
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-21 09:32:13 -07:00
Leonardo de Moura
de657e8df0 fix(util/rc): reference counter memory_order flags
See discussion at
http://www.chaoticmind.net/~hcb/projects/boost.atomic/doc/atomic/usage_examples.html#boost_atomic.usage_examples.example_reference_counters
http://stackoverflow.com/questions/10268737/c11-atomics-and-intrusive-shared-pointer-reference-count

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-21 08:23:01 -07:00
Leonardo de Moura
c0f862d88a feat(library/standard): add Diaconescu's theorem
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-20 21:15:48 -07:00
Leonardo de Moura
13804f75f9 feat(library/standard/logic): iff is refl, trans, and symm
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-20 21:10:30 -07:00
Leonardo de Moura
c02629c76d feat(util/lean_path): allow 'import dirname' as shorthand for 'import dirname.default'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-20 19:59:13 -07:00
Leonardo de Moura
9c499e723f perf(build): use make -j option when invoking external makefile for compiling Lean libraries
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-20 19:38:46 -07:00
Leonardo de Moura
cff6bf8c6d fix(library/module): sign error is circular module dependency is detected
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-20 19:21:54 -07:00
Leonardo de Moura
29b6d1081c feat(library/standard/bool_decidable): cleanup bool_decidable, and remove the artificial dependency to bit
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-21 02:42:11 +01:00
Leonardo de Moura
293ed333c7 feat(library/standard/if): cleanup 'if-then-else' theorems
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-21 02:40:43 +01:00
Leonardo de Moura
ba9dd8b686 fix(library/choice): style
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-21 01:36:53 +01:00
Leonardo de Moura
9ef4d44a86 chore(frontends/lean): add 'replace' auxiliary funcs
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-20 01:10:49 +01:00
Leonardo de Moura
5e8c128b00 feat(library/standard): add more decidable instances
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-20 01:10:49 +01:00
Leonardo de Moura
c37b5afe93 feat(library/standard): add decidable class
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-20 00:19:32 +01:00
Leonardo de Moura
4a0e701f6d feat(library/standard/bit): add theorems and notation
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-20 00:19:32 +01:00
Leonardo de Moura
438a42d010 feat(library/unifier): improve error message when metavar assignment is type incorrect
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-20 00:19:32 +01:00
Leonardo de Moura
e39a6e732a refactor(kernel/error_msgs): move pp_type_mismatch to error_msgs module
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-20 00:19:31 +01:00
Leonardo de Moura
55db3aaaa1 fix(library/module): module index assignment
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-20 00:19:31 +01:00
Leonardo de Moura
8b70ffb0a4 feat(library/standard): add equivalence inductive predicate
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-20 00:19:31 +01:00
Leonardo de Moura
bef64305cf feat(kernel/constraint): add 'print' function for debugging purposes
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-20 00:19:31 +01:00
Leonardo de Moura
c1b7d7bf7e fix(library/choice): we should be able to store 'choice' operators in .olean files, this can happen because of notation decls
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-20 00:19:31 +01:00
Leonardo de Moura
d69db172a1 chore(kernel/replace_fn): add syntax sugar for replace function
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-19 12:53:37 +01:00
Leonardo de Moura
6b60db7b93 fix(frontends/lean/elaborator): bug when mixing implicit arguments and sections
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-19 09:55:34 +01:00
Leonardo de Moura
e817260c6d feat(library/standard): add or_comm, and_comm, ... theorems, cleanup notation
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-19 09:29:04 +01:00
Leonardo de Moura
66ba3c8a0b fix(frontends/lean/elaborator): bug in the elaborator reported by Jeremy
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-18 23:48:27 +01:00
Soonho Kong
41a073e0c2 chore(.travis.osx.yml): use homebrew gcc-4.8.3 2014-07-18 09:40:21 -04:00