Re: [isabelle-dev] typedef (open) legacy

2012-10-05 Thread Makarius

On Thu, 4 Oct 2012, Florian Haftmann wrote:


I think either option 3 or 4 would make sense, although I'd say 4 is
preferable for a couple of reasons: First, it makes the implementation
of typedef simpler. Second, it actually gives users more flexibility
because if they want a set constant, they can use any definition
package, not just definition. The extra verbosity in some cases is a
small price to pay.


I would support (4).  In the long run, typedef should be the bare 
foundational minimum for introducing HOL types


I also remember it like that -- most package authors were already in 
favour of (4) open only without option some years ago, but we never made 
the move.



Makarius
___
isabelle-dev mailing list
isabelle-...@in.tum.de
https://mailmanbroy.informatik.tu-muenchen.de/mailman/listinfo/isabelle-dev


Re: [isabelle-dev] strange behaviour with Z3 and smt method

2012-10-05 Thread Jasmin Christian Blanchette
Am 05.10.2012 um 10:47 schrieb Lukas Bulwahn:

 Solver z3: Z3 proof parser (line 87): unknown sort: Bool
 
 Although it is possible to work around it, it might be worthwhile to 
 investigate.

Thanks for the report. See 6279490e0438.

Jasmin

___
isabelle-dev mailing list
isabelle-...@in.tum.de
https://mailmanbroy.informatik.tu-muenchen.de/mailman/listinfo/isabelle-dev


Re: [isabelle-dev] An note on code generator bookkeeping and the code generator preprocessor [was: Locale interpretation with mixins]

2012-10-05 Thread Makarius

On Thu, 4 Oct 2012, Florian Haftmann wrote:


The current infrastructure has only a preprocessor applied *after* the
internal bookkeeping (for reasons I will explain in a separate, long
promised mail), so this would add further complexity here.


What sets the code generator apart from other tools is that theorems are
never stand-alone but grouped according to their equation head.  E.g.
the two theorems
f (Suc n) = …
f 0 = …
belong inherently together, resulting in Haskell into something like
f :: Nat - …
f (Suc n) = …
f Zero = …
Compare this e.g. to the simplifier where both theorems can stand for
their own.


For now just some comments on this aspect that code theorems are organized 
in packs.  (I've already made it a habit to re-read the cumulative mail 
thread on the whole topic every week, and the understanding increases 
slowly every time.)




Internally, code theorems are declared as singleton declarations
(typically via attributes), e.g.
lemma [code]:
  f 0= …
  f (Suc n) = …
  proof
results in two separate declarations.



Life would have been much more easier from the very beginning if the
code generator would only have accepted simultaneous declarations. But I
don't think this is possible. Either one would have to sacrifice the
simple lightweight declaration
lemma [code]:
  … … … proof


Grouped declarations are not so alien, see the Spec_Rules concept that was 
introduced a few years ago. The the corresponding Morphism.fact for such 
declarations operates on thm list anyway.  It is merely a genuine 
simplification of attribute notation that it goes down to individual list 
members.


When you say Internally above, it probably refers to 
Code.add_default_eqn_attrib in the usual packages, which is mostly 
parallel to the slightly more modern Spec_Rules.add in the same packages.


So the question about [code] only comes up in Isar source notation.  It 
avoids an extra 'declaration' wrapper command like this:



an instead having e.g. the more explicit
and verbose
code_function
  …
  …
  by (fact …)+



Or attributes would be changed to take simultaneous lists of theorems 
instead of single ones, but I guess a such fundamental change of the 
framework is not feasible.


This was an explicit simplification of the attribute language from the 
very beginning in 1999.  Later so many other aspects were adjoined to 
attributes that it became quite complex nonetheless.  So multi-attributes 
are off the radar to keep things manageable, and half understandable for 
the user (who already struggles to distinguish rule attributes from 
declaration attributes).


There are two ways to evade from this notational restriction:

  * explicit derivative of 'declaration' command, which is the fully
general form (e.g. 'code_function' above)

  * additional parameters to attributes as part of the syntax:

  th [code th1 th2 ... thn]

This form can then be used with 'declare' or 'lemmas'.


So how is the de-facto situation concerning [code] in the reachable 
universe of Isabelle libraries and applications? How many of [code] 
declarations are non-singleton (outside package implementations)?



Makarius___
isabelle-dev mailing list
isabelle-...@in.tum.de
https://mailmanbroy.informatik.tu-muenchen.de/mailman/listinfo/isabelle-dev


Re: [isabelle-dev] jedit Replace Find

2012-10-05 Thread Makarius

On Tue, 2 Oct 2012, Tobias Nipkow wrote:


For example 03bc7afe8814


There is certainly not a general problem of jedit and JVM on Mac OS that covers
all versions of the past and future.  Funny things on Mac OS have happened
before, but were sorted out at some point, by looking very closely which version
of what was used of what component.


Actually, what is your Mac OS version?

The Mac Pro in my office runs Snow Leopard most of the time, while my 
MacBook is on Mountain Lion already.  I am not testing Lion much.



There are two sources of problems with Java/jEdit on Mac OS to be 
anticipated for the coming months:


  (1) Special cases in jEdit to accomodate former Apple Java 1.6
  now work against Oracle Java 1.7.  I've already removed some old
  key handler workaround to make normal COMMAND-C/X/V work without
  further ado on Java 1.7.

  (2) Java 1.7 is officially supported by Oracle only for Lion and
  Mountain Lion, but usually happens to work on Snow Leopard as
  well.  They don't make plans against it, but they don't support it
  specifically.

In the testing phase of Java 1.7, Oracle had a version for Snow Leopard 
that was based on a certain update/patch for Apple's Java 1.6.  Thus my 
local machine might now look slightly different to official Java 1.7 and 
have fewer problems in that respect.



Makarius
___
isabelle-dev mailing list
isabelle-...@in.tum.de
https://mailmanbroy.informatik.tu-muenchen.de/mailman/listinfo/isabelle-dev