Sebastian Ullrich
11ab7dde3a
chore: update to LLVM 10
2020-04-13 12:18:56 +02:00
Leonardo de Moura
7322345768
fix: private names
...
@Kha I tried to fix a few issues with private names. The new test
tries to cover them. If you have more, please create an issue.
1- Scoping. A private declaration should shadow one in a previous scope.
2- We should not be able to define the same `private` in the same
module more than once.
```
private def x := 10
private def x := "hello" -- should produce error here
```
3- Dot-notation should work with private declarations in the module
where they were defined.
4- The following should work
```
namespace N
private def x := 10
end N
#check N.x
```
5- The following should **not** work
```
def y := 10
private def y := "hello" -- produce error
private def z := 10
def z := "hello" -- produce error
```
BTW, I am happy to change this behavior. I just mimicked C's
behavior for `static`.
It is not clear whether the following should work or not.
```
namespace N
private def b := 10
end N
open N
#check b
```
2020-04-09 16:28:21 -07:00
Leonardo de Moura
596a3af1a0
feat: check if "has already been declared" at the beginning
2020-04-09 15:29:10 -07:00
Leonardo de Moura
360cebf680
fix: induction tactic must check expected major premise type
...
`whnfUntil` now returns `Option Expr`.
2020-04-09 11:18:02 -07:00
Leonardo de Moura
9a38aca8ec
feat: add evalFailIfSuccess
2020-04-09 11:02:15 -07:00
Leonardo de Moura
679bdb5886
chore: update stage0
2020-04-09 10:56:17 -07:00
Leonardo de Moura
539bb4a282
feat: add failIfSuccess tactic parser
2020-04-09 10:55:03 -07:00
Leonardo de Moura
9a5bed0f94
fix: missing ! at whnfUntil
2020-04-09 10:49:20 -07:00
Leonardo de Moura
7a5fcfae8b
feat: add [recursor] attribute to Iff.elim
2020-04-09 10:45:27 -07:00
Leonardo de Moura
40336131bb
feat: do not switch to term mode in the RHS of induction and cases tactics
2020-04-08 17:45:06 -07:00
Daniel Selsam
7c1c0dc01e
test: example that requires the instance arg reordering
2020-04-08 16:56:14 -07:00
Daniel Selsam
fd61812b6e
fix: wrong instance order for several instances
2020-04-08 16:55:48 -07:00
Leonardo de Moura
e22af8d1ef
feat: add FloatArray
...
cc @dselsam
2020-04-07 18:05:54 -07:00
Leonardo de Moura
2a1d9a0285
test: simple demo mixing C/C++ and Lean
...
@dselsam @kha
I did not have to create a new shared library.
The main limitation of this approach is that the new `extern`
functions are only available in compile code. That is, we cannot use
them with `#eval`.
2020-04-06 16:16:49 -07:00
Leonardo de Moura
b8ea55c989
feat: expose some transcendental functions from the C library
...
cc @dselsam
2020-04-06 15:22:25 -07:00
Leonardo de Moura
705530b62b
fix: remove DecidableEq for Float
...
We cannot implement `DecidableEq Float` using C equality for
`double`. Reason: the C implementation is not even reflexive.
If we need `DecidableEq Float`, we will need to provide our own
implementation (i.e., a wrapper around the one provided by the
hardware). In this commit, we implement `HasBeq Float` instead.
cc @dselsam
2020-04-06 14:10:18 -07:00
Leonardo de Moura
8e84a8c9ec
feat: Float from big numbers
2020-04-06 14:05:17 -07:00
Sebastian Ullrich
f66039f7f0
feat: generalize Array function universes
2020-04-06 13:48:09 -07:00
Leonardo de Moura
746615d81d
chore: remove ⇒ as alternative for =>
2020-04-06 13:45:22 -07:00
Sebastian Ullrich
729c750003
doc: adjust commit convention
...
/cc @leodemoura
2020-04-05 11:29:30 +02:00
Sebastian Ullrich
e971c8dd7a
feat: support Float in the interpreter
...
/cc @leodemoura @dselsam
2020-04-05 10:50:30 +02:00
Leonardo de Moura
03f0c3fdd8
chore: update stage0
2020-04-03 18:28:35 -07:00
Leonardo de Moura
acad6015c4
chore: add new primitives to object.h
2020-04-03 18:26:13 -07:00
Leonardo de Moura
582fe3ac8a
test: add test that exposed unboxing issue
2020-04-03 18:24:48 -07:00
Leonardo de Moura
64c3be44f8
fix: lean_unbox_float
2020-04-03 18:23:45 -07:00
Leonardo de Moura
8e952f3c36
chore: style
2020-04-03 17:48:06 -07:00
Leonardo de Moura
d1b0bd0c77
chore: update stage0
2020-04-03 17:41:09 -07:00
Leonardo de Moura
51f1893a8c
test: add basic float tests
2020-04-03 17:39:47 -07:00
Leonardo de Moura
485034bbba
fix: bug at ir.cpp
2020-04-03 17:39:28 -07:00
Leonardo de Moura
a84c177cb5
chore: update stage0
2020-04-03 17:21:03 -07:00
Leonardo de Moura
c236a179f2
feat: enable externs
2020-04-03 17:19:48 -07:00
Leonardo de Moura
0457cb35ec
chore: update stage0
2020-04-03 17:08:25 -07:00
Leonardo de Moura
0e2ebd36ff
feat: make sure Float is in WHNF
2020-04-03 17:07:29 -07:00
Leonardo de Moura
c6d77423d1
chore: update stage0
2020-04-03 16:51:39 -07:00
Leonardo de Moura
b5f258773b
feat: add Float
2020-04-03 16:49:32 -07:00
Leonardo de Moura
60d84660e6
feat: add support for Float in the compiler
2020-04-03 16:39:29 -07:00
Leonardo de Moura
b0a02ef0bb
feat: emit float runtime primitives
2020-04-03 16:02:35 -07:00
Leonardo de Moura
71397aad36
feat: runtime primitives
2020-04-03 15:55:39 -07:00
Leonardo de Moura
52cffcb67f
feat: add Float.lean
2020-04-03 15:40:38 -07:00
Leonardo de Moura
3dda98a40b
proto: checkpoint
2020-04-03 15:20:54 -07:00
Leonardo de Moura
22fc56f5c8
chore: fix test
2020-03-31 10:10:57 -07:00
Leonardo de Moura
082b13456c
chore: update stage0
2020-03-31 10:06:34 -07:00
Leonardo de Moura
af8bc28be0
fix: typo at IR.Expr.alphaEqv
2020-03-31 10:04:59 -07:00
Daniel Selsam
722ea2b694
failing test for suspicious behavior
2020-03-31 10:03:22 -07:00
Leonardo de Moura
73f5801d8a
proto: use generalizeTelescope
2020-03-30 11:47:03 -07:00
Leonardo de Moura
0cbd09f967
chore: make sure generalizeTelescope signature is similar to other telescope methods
2020-03-30 11:43:41 -07:00
Sebastian Ullrich
b6fc9428f1
fix: support Windows newlines and '\r' escape
2020-03-27 13:21:21 -07:00
Leonardo de Moura
0595e8a78a
feat: add tryPureCoe
...
@Kha It seems to work reasonably well. It didn't break any test.
2020-03-27 11:20:43 -07:00
Leonardo de Moura
3c699eb915
feat: add mkAppOptM
2020-03-27 11:14:38 -07:00
Sebastian Ullrich
fcdbdeecaf
feat: delaborator: use implicit lambdas where possible
...
/cc @leodemoura it's not bullet-proof (unless `pp.explicit` is set), but let's
see if it is good enough in practice
2020-03-27 14:55:46 +01:00