Commit graph

16 commits

Author SHA1 Message Date
Leonardo de Moura
00032a7d37 chore(tests/shell/shell_test): fix output
BTW, we should probably temporarily delete this test.
2018-09-04 17:22:16 -07:00
Leonardo de Moura
805e45bba5 chore(tests/shell): fix test 2018-08-27 17:54:43 -07:00
Gabriel Ebner
d90dda01b0 chore(*): fix tests 2017-03-23 09:03:43 +01:00
Gabriel Ebner
a591e35544 chore(*): fix tests 2017-03-23 09:00:59 +01:00
Sebastian Ullrich
b3887f21a4 fix(shell/server): remove unnecessary dependencies of info_task and use intermediate envs 2017-03-08 10:40:59 -08:00
Leonardo de Moura
8f2a8a3cd3 chore(tests/shell): leftover 2017-02-15 21:40:27 -08:00
Leonardo de Moura
7ebf16ca26 fix(library/equations_compiler): performance issues at structural_rec module and equational lemma generator
There were two performance bottlenecks in the recursive equation
compiler. Both bottlenecks were due to conversion checking.

1- We allow patterns such as (x+1) in the left-hand-side of a
   recursive equation. This is kind of pattern has to be reduced
   since it is not a constructor. Moreover, when we are trying to
   compile using structural recursion, we need to find an element
   that is structurally smaller in recursive applications.
   Again, we need to use reduction since the pattern may be (x+2),
   and in the recursive application we have (x+1). Now, consider
   the following equation

         f (x+1) (y+1) := f complex_term y

   It will first check whether complex_term is structurally smaller
   than (x+1), and the compiler will timeout trying to reduce
   complex_term.

   This commit adds the following workaround. The structural
   recursion module from now on will only unfold reducible constants
   and constants marked as patterns. This is not a complete
   solution. It will timeout in the following equation:

         f (x+1) (y+1) := f (x+1000000000000) y

   For this one, we need to add a whnf "fuel" option to type_context

2- Equational lemma generation was producing lemmas that are too
   expensive to check. Suppose we the following two definitions

       | f x 0     := 1
       | f x (y+1) := f complex_term y

    and

       | g 0     y    := 1
       | g (x+1) y    := g x complex_term

    Before this commit, we would generate the following proofs for
    the second equation of each definition:

         eq.refl (f complex_term y)
         eq.refl (g x complex_term)

    This proof triggers the following definitionally equality test:

             f x     (y+1)  =?= f complex_term y
             g (x+1) y      =?= g x complex_term

    Since, we have f/g on both sides, the type checker will try
    first to unify the arguments, and may timeout trying to solve

               x  =?= complex_term
               y  =?= complex_term

    since it may take a long time to reduce `complex_term`.

    We workaround this problem by creating a slightly different
    proof.

          eq.refl (unfold_of(f x (y+1)))
          eq.refl (unfold_of(g (x+1) y))

    where unfold_of(t) is the result of applying one delta reduction
    step.
2017-02-15 21:31:28 -08:00
Leonardo de Moura
52164d56b9 chore(tests/shell/shell): style 2017-01-13 07:39:06 -08:00
Sebastian Ullrich
b180c54c0e feat(shell): move lean.js to server mode 2017-01-13 07:34:54 -08:00
Gabriel Ebner
6d7cf7bace fix(tests/shell): fix build 2016-10-16 14:41:35 -07:00
Gabriel Ebner
ec0aa6d248 refactor(*): integrate emscripten build 2016-10-16 14:41:35 -07:00
Leonardo de Moura
f3dbd0c69a chore(library): disable stdlib but init and systems folder 2016-08-11 18:42:10 -07:00
Leonardo de Moura
989dbcb265 chore(tests): fix some C++ unit tests 2016-06-10 18:29:41 -07:00
Leonardo de Moura
4a43e33d45 chore(*): disable big chunk of the standard library and tests 2016-03-03 13:43:08 -08:00
Leonardo de Moura
498afc1e6f feat(CMakeLists): add shared library 2015-08-13 11:21:05 -07:00
Leonardo de Moura
a24b06254b test(tests/shell): add unit test for emscripten_shell 2015-06-18 10:20:26 -07:00