[Haskell-cafe] An assembly DSL example.

2012-12-19 Thread Tom Hawkins
A few folks have asked me about building EDSLs in Haskell for assembly programming, so I've posted an example of the approach we have had success using at BAE Systems. It's a bit rough, so if anyone's motivated to polish it up, by all means. https://github.com/tomahawkins/asm-dsl-example/

[Haskell-cafe] Compiler jobs

2012-10-01 Thread Tom Hawkins
Hi, BAE Systems has some open positions for principal level Haskell programmers with compiler experience. Our DARPA project[1] is building a compiler for a new programming language with dynamic information flow control, targeting a custom ISA with hardware enforced information security. On the

[Haskell-cafe] Spurious pattern match warnings with GADTs

2012-01-12 Thread Tom Hawkins
Let's say I have: data T0 data T1 data T a where A :: T T0 B :: T T1 Then I can write the following without getting any non-exhaustive pattern match warnings: t :: T T0 - String t a = case a of A - A However, if I use type classes to constrain the constructors, instead of using the

[Haskell-cafe] Operator precedence and associativity with Polyparse

2011-10-25 Thread Tom Hawkins
Hi, Can someone provide guidance on how handle operator precedence and associativity with Polyparse? Thanks in advance. -Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Operator precedence and associativity with Polyparse

2011-10-25 Thread Tom Hawkins
Can someone provide guidance on how handle operator precedence and associativity with Polyparse? Do you mean parsing something like 1 + 2 * 3 ?  I don't think there's any real difference in using Polyparse vs Parsec for this, except for doing p `orElse` q rather than try p | q. Actually, I

[Haskell-cafe] ANN: mecha-0.1.0

2011-06-08 Thread Tom Hawkins
Mecha [1,2] is a constructive solid geometry (CSG) modeling language embedded in Haskell. This release adds OpenSCAD [3] as a backend target. OpenSCAD is a solid modeling DSL and a viewer. OpenSCAD uses OpenCSG [4] for rendering, which directly renders CSG objects with OpenGL without the need

Re: [Haskell-cafe] ANN: mecha-0.0.5

2011-06-05 Thread Tom Hawkins
On Sun, Jun 5, 2011 at 10:41 AM, Andrew Coppin andrewcop...@btinternet.com wrote: On 04/06/2011 08:25 PM, Tom Hawkins wrote: What is the easiest way to generate polygon meshes from constructive solid geometry?  Marching cubes [4] seems pretty involved. As I understand it, this is a Very Hard

[Haskell-cafe] ANN: mecha-0.0.5

2011-06-04 Thread Tom Hawkins
Mecha [1,2,3] is a constructive solid modeling DSL. I haven't worked on Mecha in awhile, so this release just contains some minor cleanup and reorganization. My next step is to build an OpenGL interactive visualization tool, something like a basic CAD window to rotate and zoom around 3D models.

[Haskell-cafe] ImProve Tutorial

2011-04-10 Thread Tom Hawkins
ImProve is a Haskell eDSL for embedded control systems -- we use it for automotive and off-highway powertrain control. I've started writing a tutorial for ImProve. So far it has a basic tour of the language and a handful of examples. Comments and suggestions are welcome. In other recent news,

[Haskell-cafe] ANN: improve-0.3.1

2011-03-29 Thread Tom Hawkins
ImProve [1] is an imperative DSL for hard realtime embedded applications. ImProve programs are verified with infinite state,unbounded model checking (k-induction, invariant strengthening, SMT). In addition to C, ImProve now supports Simulink [2] as a backend target. Simulink is a popular

Re: [Haskell-cafe] ANN: theoremquest-0.0.0

2011-03-08 Thread Tom Hawkins
I am curious -- how easy is it to use theoremquest for playing with equational theories? Let me turn the question around: How easy is it to play with equational theories in HOL Light? Because this is the planed basis for TheoremQuest. -Tom ___

[Haskell-cafe] ANN: theoremquest-0.0.0

2011-02-28 Thread Tom Hawkins
I have been wanting to gain a better understanding of interactive theorem proving for some time. And I've often wondered: Can theorem proving be made into a user-friendly game that could attract mass appeal? And if so, could a population of gamers collectively solve interesting and relevant

Re: [Haskell-cafe] ANN: theoremquest-0.0.0

2011-02-28 Thread Tom Hawkins
I find this fairly interesting. Once you're finished grappling with the logical core, I wouldn't mind helping out with a web interface, time permitting. I suspect attracting mass appeal, or getting users at all, is helped massively by having a web interface. Thanks for your interest. Yes, a

Re: [Haskell-cafe] ANN: theoremquest-0.0.0

2011-02-28 Thread Tom Hawkins
But what I miss when using these proof assistants, and what I have my eyes on, is a way to Search ALL The Theorems.  In current proof assistants, developments are still distributed in packages -- and a particular development might have already proved a very useful lemma that wasn't the main

[Haskell-cafe] Browser Game Engine

2011-01-16 Thread Tom Hawkins
I want to create a simple browser game using Haskell. It would be nothing complicated: basic 2D graphics, limited sound, and minimal network traffic. What is the recommended medium? Flash or JavaScript+SVG? Any recommended Haskell libraries for the server-side logic or client code generation?

[Haskell-cafe] ANN: improve-0.2.2

2010-12-12 Thread Tom Hawkins
ImProve [1] is an imperative DSL for high assurance, embedded applications. This release includes a new compositional proof framework where users can leverage previously proved theorems to aid the proof of new theorems. This new addition was inspired from discussions with Lee Pike [2]. Lee also

[Haskell-cafe] ANN: cil-0.1.0

2010-11-08 Thread Tom Hawkins
CIL (C Intermediate Language) [1], not to be confused with the Common Intermediate Language, is a mature OCaml library that parses and reduces C programs down to a simplified subset of the C language, making it easier to analyze and compile C programs. This library [2, 3] parses these results,

Re: [Haskell-cafe] ANN: fountain-0.0.0

2010-10-20 Thread Tom Hawkins
1. Wow that's cool. Indeed. 2. Is this technology not patented by Digital Fountain?  (now Qualcomm?) I'm sure it is. This library is a naive implementation of LT codes, which have nowhere near the performance of Digital Fountain's Raptor codes. I remember when I first heard of fountain

Re: [Haskell-cafe] Compiling a DSL on the shoulders of GHC

2010-10-19 Thread Tom Hawkins
On Tue, Oct 19, 2010 at 7:54 AM, Patai Gergely patai_gerg...@fastmail.fm wrote: I have nearly the same plan: I want to compile a restrictive form of Haskell to constant time and space C code for hard realtime embedded targets.  Except I need a top level monad with different semantics than IO.

[Haskell-cafe] profiling cabal libraries

2010-10-19 Thread Tom Hawkins
How do I profile cabal libraries? I cabal install -p a local package I am testing, and I compile a test of the library using -prof -auto-all. But the profiling report only lists a CAF entry for the library, but does not detail any of the library's top level functions. What am I doing wrong?

[Haskell-cafe] ANN: fountain-0.0.0

2010-10-19 Thread Tom Hawkins
This library [1] implements a fountain code [2]. Fountain codes are forward error correction codes for erasure channels [3]. A fountain code encodes a message into an infinite stream of packets -- transmitters generate message packets at random, on-the-fly. To reconstruct the message, receivers

Re: [Haskell-cafe] Compiling a DSL on the shoulders of GHC

2010-10-18 Thread Tom Hawkins
Yes, that would be the basic idea: 1. Compile the Haskell metaprogram. 2. Evaluate main, possibly with a timeout, in a way that keeps all its structure including lambdas accessible (e.g. Core). 3. Compile the resulting program with other tools. What is this different tool and how does it

[Haskell-cafe] Haskell Platform: failed to parse output of 'ghc-pkg dump'

2010-10-05 Thread Tom Hawkins
I'm having trouble installing Haskell Platform on Windows. After the install, I run cabal update, which appears to work: 00-index.tar.gz is deposited in C:/Documents and Settings/user/Application Data/cabal/packages/hackage.haskell.org. However, when I try to cabal install anything, I get:

[Haskell-cafe] Re: Haskell Platform: failed to parse output of 'ghc-pkg dump'

2010-10-05 Thread Tom Hawkins
Classic pilot error. I had an old cabal.exe on the search path. -Tom On Tue, Oct 5, 2010 at 8:09 PM, Tom Hawkins tomahawk...@gmail.com wrote: I'm having trouble installing Haskell Platform on Windows.  After the install, I run cabal update, which appears to work: 00-index.tar.gz is deposited

[Haskell-cafe] Relaxing atomicity of STM transactions

2010-09-28 Thread Tom Hawkins
Has anyone in the STM community considered the ability to read a TVar, such that it would allow the transaction to complete even if the TVar was modified by another transaction? (I am assuming this is not how STM works by default.) For example: looselyReadTVar :: TVar a - STM a Atom [1] has

Re: [Haskell-cafe] Relaxing atomicity of STM transactions

2010-09-28 Thread Tom Hawkins
Thanks for the responses, but I think I should explain a bit more. I'm not interested in being able to read the live value of a TVar at any arbitrary time (via. unsafeIOToSTM). But rather I would like looslyReadTVar to have exactly the same semantics as readTVar, except that the STM runtime would

Re: [Haskell-cafe] Relaxing atomicity of STM transactions

2010-09-28 Thread Tom Hawkins
On Tue, Sep 28, 2010 at 6:44 PM, Serguey Zefirov sergu...@gmail.com wrote: 2010/9/29 Tom Hawkins tomahawk...@gmail.com: In the embedded domain, this could be a fault monitor that reads a bunch of constantly changing sensors. I think that sensor reading belongs to IO, not STM. Sensors would

[Haskell-cafe] Retargeting Haskell compiler to embedded/hardware

2010-09-28 Thread Tom Hawkins
A few years ago I attempted to build a Haskell hardware compiler (Haskell - Verilog) based on the Yhc frontent. At the time I was trying to overcome several problems [1] with implementing a hardware description language as a light eDSL, which convinced me a proper compiler may be a better

Re: [Haskell-cafe] Retargeting Haskell compiler to embedded/hardware

2010-09-28 Thread Tom Hawkins
On Tue, Sep 28, 2010 at 9:20 PM, Shakthi Kannan shakthim...@gmail.com wrote: If you are still at it, you can have a look at Chalmers Lava [1], or Kansas Lava [2]. Feldspar [3] project targets DSP though. These are examples light embedded DSLs, i.e. sophisticated libraries where you compile,

[Haskell-cafe] Tree Construction

2010-09-25 Thread Tom Hawkins
Hi, Often I need to assemble a tree from things with unstructured hierarchical paths. I built a function [1] to do this for ImProve. But does a library already exist that does this? If not I may create one, as I need it for a few different libraries. data Tree a b = Branch a [Tree a b] | Leaf

Re: [Haskell-cafe] Which Haskell DSL for writing C? (Was ANN: Copilot 0.22 -- A stream DSL for writing embedded C.)

2010-09-21 Thread Tom Hawkins
Oh, one thing I should mention is that there are a few Haskell DSLs for generating embedded C now:  * Atom http://hackage.haskell.org/package/atom  * Feldspar http://hackage.haskell.org/package/feldspar-language  * cmonad http://hackage.haskell.org/package/cmonad  * Copilot

[Haskell-cafe] ANN: ecu-0.0.0

2010-09-09 Thread Tom Hawkins
This package is a collection of programs that we use at Eaton to interact with, debug, and analyze data from vehicle ECUs (Electronic Control Unit: automotive speak for an embedded computer). The motivation to put this stuff on hackage is to encourage the use of Haskell in automotive electronics

[Haskell-cafe] Content Centric Networking

2010-08-24 Thread Tom Hawkins
Anyone in the Haskell community interested in content-centric networking? Van Jacobson has done a couple of great presentations to introduce CCN [1, 2]. Personally, I find it fascinating what kind of doors could open if we got away from TCP/IP, especially for wireless ad-hoc networking. Parc

[Haskell-cafe] ANN: improve-0.0.8

2010-08-14 Thread Tom Hawkins
ImProve [1] is a imperative programming language for high assurance applications. Using Yices [2], ImProve verifies programs will always adhere to assertion specifications, irrespective of program input. If it is possible for an assertion not to be upheld, ImProve will emit a counter example in

[Haskell-cafe] ANN improve-0.0.4

2010-08-11 Thread Tom Hawkins
Hi, ImProve [1] is a little imperative DSL that compiles to C code. Intended for high assurance embedded applications, ImProve is also an infinite state, unbounded model checker. Meaning ImProve can verify assertions in a program will always be true. Here's an example: module Main where

Re: [Haskell-cafe] Re: Haskell in Industry

2010-08-09 Thread Tom Hawkins
Good, we need more functional programmers actually solving real problems.  But please put your skills to work in an industry other than investment banking. I've received a lot mail on this comment; mostly positive. Here's one from someone who wishes to remain anonymous: First of all I would

Re: [Haskell-cafe] Re: Haskell in Industry

2010-08-09 Thread Tom Hawkins
On Mon, Aug 9, 2010 at 12:06 PM, Lennart Augustsson lenn...@augustsson.net wrote: But do you think there would be more Haskell jobs offered (in absolute terms), if no investment firms offered jobs? Is there some kind of quota of job offers that gets used up? No and no. Again, I think it's

[Haskell-cafe] Re: Haskell in Industry

2010-08-05 Thread Tom Hawkins
Hi Eil, Sorry, your email got lost in my inbox. I hope you don't mind me copying haskell-cafe. I saw a video of a presentation you gave at CUFP awhile back and was hoping to ask you a couple of questions. I'm currently a junior at UT Dallas and trying to figure out what I'm going to do

Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-20 Thread Tom Hawkins
On Mon, Jul 19, 2010 at 11:54 AM, Stephen Tetley stephen.tet...@gmail.com wrote: Hi Tom This will the job for a UserHooks - probably preBuild? - see Distribution.Simple.UserHooks. postConf - Hook to run after configure command preBuild - Hook to run before build command. Second arg

[Haskell-cafe] cabal, Setup.lhs example

2010-07-19 Thread Tom Hawkins
I have a script I'm using to generate some Haskell code for a library. How do I specify this flow in the cabal setup file? Would someone point me to a relevant library I can reference as an example? -Tom ___ Haskell-Cafe mailing list

[Haskell-cafe] ANNOUNCE: smt-lib-0.0.1

2010-07-17 Thread Tom Hawkins
smt-lib [1] is a library for reading and writing SMT-LIB [2] files via Haskell. SMT-LIB is a common language and benchmark suite used by most SMT solvers. Currently the library supports the full SMT-LIB version 2 syntax. However at this time, only command scripts -- not responses -- can be

[Haskell-cafe] ANN: statechart-0.0.0

2010-06-24 Thread Tom Hawkins
Statechart [1] is a program that compiles Rhapsody [2] statechart diagrams [3] into C. Rhapsody is a UML cough, choke, gag... tool from IBM intended for embedded systems development. If you use Rhapsody, and its code generator makes your eyes bleed, statechart may provide some relief. -Tom [1]

[Haskell-cafe] ANN: srec-0.0.0

2010-06-22 Thread Tom Hawkins
A little library for reading s-record files: http://hackage.haskell.org/package/srec -Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] ANN: srec-0.0.0

2010-06-22 Thread Tom Hawkins
On Tue, Jun 22, 2010 at 9:08 PM, Ivan Miljenovic ivan.miljeno...@gmail.com wrote: For those others like me who have no idea what s-record files are: http://en.wikipedia.org/wiki/S-record Sorry, I should have been more clear. In embedded systems development, s-records are typically used to hold

Re: [Haskell-cafe] ANN: bitspeak 0.0.1

2010-06-21 Thread Tom Hawkins
2010/6/21 Maurí­cio CA mauricio.antu...@gmail.com: Hi, all, bitspeak is a small proof of concept application that allows writing text using only two commands (yes/no, 1/2, top/down etc.). It is intended to show how people with disabilities similar to Stephen Hawking's (i.e., good cognitive

[Haskell-cafe] Re: LLVM - Haskell

2010-06-01 Thread Tom Hawkins
For instance, the LLVM.FFI.BitReader module has some functions that'll get you a ModuleRef from some bitcode. getBitcodeModuleInContext :: ContextRef - MemoryBufferRef - Ptr ModuleRef - Ptr CString - IO Bool type ModuleRef = Ptr Module data Module I'm confused how this works. How does

[Haskell-cafe] LLVM - Haskell

2010-05-30 Thread Tom Hawkins
Is there any work being done to read LLVM object code into Haskell? I've looked through the llvm library [1], but it appears focused on code generation. -Tom [1] http://hackage.haskell.org/package/llvm ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] ANN: atom-1.0.4

2010-05-24 Thread Tom Hawkins
On Mon, May 24, 2010 at 2:34 AM, Graham Klyne gk-li...@ninebynine.org wrote: I think this looks like an interesting idea... can you provide a pointer to a description of the DSL/API itself? Unfortunately, there's not much aside from the Haddock documentation [1] [2] and some misc links on my

[Haskell-cafe] ANN: atom-1.0.4

2010-05-23 Thread Tom Hawkins
Atom [1] is an Haskell DSL for hard realtime embedded programming. This release adds 'exactPhase' to precisely control the phasing of Atom rule executions. This patch was contributed by Lee Pike. BTW, I created a google group [2] for discussions related to the use for functional programming in

[Haskell-cafe] ANN: cil-0.0.1

2010-05-16 Thread Tom Hawkins
CIL [1] is an OCaml library that parses and compiles C down to a simplified subset to ease different forms of static analysis. Frama-C [2] augments CIL with a property specification language (ACSL), which can capture design contracts for C functions. Frama-C's Jessie plugin uses the Why [3]

Re: [Haskell-cafe] GADTs and Scrap your Boilerplate

2010-05-15 Thread Tom Hawkins
I got the GADT data DataBox where   DataBox :: (Show d, Eq d, Data d) = d - DataBox [snip] but I can't figure out how to implement gunfold for DataBox. The error message is Text/XML/Generic.hs:274:23:     Ambiguous type variable `b' in the constraints: I had a similar difficultly in

Re: [Haskell-cafe] Re: Frama-C

2010-05-13 Thread Tom Hawkins
On Thu, May 13, 2010 at 11:58 AM, Stephen Tetley stephen.tet...@gmail.com wrote: Hi Tom Quite a while ago I interfaced Haskell and Ocaml/CIL through both ATerms and ASDL pickles. I can look at digging out this code if you like - it was fairly complete, but it had a bug somewhere and will

Re: [Haskell-cafe] How efficient is read?

2010-05-10 Thread Tom Hawkins
In fact, if you just want Read-like functionality for a set of Haskell datatypes, use polyparse: the DrIFT tool can derive polyparse's Text.Parse class (the equivalent of Read) for you, so you do not even need to write the parser yourself! Cabal install DrIFT-cabalized complains. What is the

Re: [Haskell-cafe] How efficient is read?

2010-05-10 Thread Tom Hawkins
The tarball was missing its Rules.hs; as it happens, GHC has a module named Rules.hs as well, hence the confusing error. I've uploaded a fresh one that should work. Thanks. This builds and installs fine. But I think there is something wrong with the generated parser. It doesn't look for

[Haskell-cafe] Re: Frama-C

2010-05-09 Thread Tom Hawkins
On Sun, May 9, 2010 at 12:54 AM, Lee Pike leep...@gmail.com wrote: Tom, Have you used any of these tools?  They're pretty cool.  I'd be interested to hear you opinion. http://frama-c.com/ Not yet.  We were considering using them for a C security-analysis, but rolled-our-own stuff in

Re: [Haskell-cafe] How efficient is read?

2010-05-09 Thread Tom Hawkins
On Sun, May 9, 2010 at 3:36 AM, Malcolm Wallace (Declaration of interest: I wrote polyparse.) Yes, I used polyparse in the VCD library. It rocks! I'll check out the DrIFT tool. Thanks. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] How efficient is read?

2010-05-08 Thread Tom Hawkins
I have a lot of structured data in a program written in a different language, which I would like to read in and analyze with Haskell. And I'm free to format this data in any shape or form from the other language. Could I define a Haskell type for this data that derives the default Read, then

[Haskell-cafe] Haskell interface to Frama-C

2010-05-07 Thread Tom Hawkins
I just started using Frama-C [1] for analyzing some of our embedded C programs. Pretty awesome suite of tools. Especially its ability to describe and verify function contracts with ACSL [2]. The tool suite is primarily build with OCaml. Has anyone considered building a Haskell interface to

[Haskell-cafe] Lazy Parsing (ANN: vcd-0.1.4)

2010-04-27 Thread Tom Hawkins
I had been using Parsec to parse VCD files, but needed to lazily parse streaming data. After stumbling on this thread below, I switch to polyparse. What a great library! I was able to migrate from a strict to a semi-lazy parser and many of my parse reductions didn't even need to change. Thanks

[Haskell-cafe] C variable access via FFI

2010-04-20 Thread Tom Hawkins
I have a bunch of global variables in C I would like to directly read and write from Haskell. Is this possible with FFI, or must I write a bunch of C wrapper functions for the interface, i.e. a 'get' and a 'set' for each variable? I'm building a simulator for one of our embedded systems. The C

[Haskell-cafe] ANN: vcd-0.1.0

2010-04-18 Thread Tom Hawkins
The release adds a simple VCD parser (via Parsec) and minor changes to the VCD generation API. http://hackage.haskell.org/package/vcd ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] ANN: vcd-0.0.0

2010-04-12 Thread Tom Hawkins
I uploaded a small library [1] for generating VCD files [2], which can be viewed with waveform tools like GTKWave [3]. Though VCD is commonly associated with Verilog simulation, at Eaton we use it to visualize vehicle data in realtime: data is pulled off the CAN bus, formated to VCD, then piped

[Haskell-cafe] Pictures from Tucson

2010-04-10 Thread Tom Hawkins
http://tomahawkins.org/Pictures/2010 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Software correctness in the auto industry and FPLs

2010-04-02 Thread Tom Hawkins
On Fri, Apr 2, 2010 at 2:28 PM, Vasili I. Galchin vigalc...@gmail.com wrote: Sorry for no Subject on the first post. In any case, I meant this Wall Street Journal as a challenge to the Haskell community to perhaps step up to the plate in the auto arena vis-a-vis software correctness. I realize

Re: [Haskell-cafe] More Language.C work for Google's Summer of Code

2010-03-30 Thread Tom Hawkins
On Tue, Mar 30, 2010 at 7:30 PM, Aaron Tomb at...@galois.com wrote: Hello, I'm wondering whether there's anyone on the list with an interest in doing additional work on the Language.C library for the Summer of Code. There are a few enhancements that I'd be very interested seeing, and I'd love

Re: [Haskell-cafe] ANN: powerpc-0.0.1

2010-03-10 Thread Tom Hawkins
unlikely this project will reach that level of maturity, but you never know. -Tom Warren On Tue, Mar 9, 2010 at 10:35 PM, Tom Hawkins tomahawk...@gmail.com wrote: Here is a new library for analyzing PowerPC programs [1].  At this point it does instruction set simulation on machine code

[Haskell-cafe] ANN: powerpc-0.0.1

2010-03-09 Thread Tom Hawkins
Here is a new library for analyzing PowerPC programs [1]. At this point it does instruction set simulation on machine code -- and not all instructions are implemented yet, BTW. To run a simulation, the user defines an instance of the Memory class [2] to represent both instruction and data

Re: [Haskell-cafe] Prelude.undefined

2010-03-03 Thread Tom Hawkins
On Wed, Mar 3, 2010 at 7:15 AM, Ivan Miljenovic ivan.miljeno...@gmail.com wrote: On 3 March 2010 16:11, Tom Hawkins tomahawk...@gmail.com wrote: -Wall only complains about shadow bindings, defined but not used, and no type signature.  But no unmatched patterns. Yes it does: one of the options

Re: [Haskell-cafe] Prelude.undefined

2010-03-03 Thread Tom Hawkins
On Wed, Mar 3, 2010 at 7:24 AM, Alexander Dunlap alexander.dun...@gmail.com wrote: On Tue, Mar 2, 2010 at 9:06 PM, Tom Hawkins tomahawk...@gmail.com wrote: How do I track down an reference to an undefined value?  My program must not be using a library correctly because the program makes

[Haskell-cafe] Prelude.undefined

2010-03-02 Thread Tom Hawkins
How do I track down an reference to an undefined value? My program must not be using a library correctly because the program makes no direct use of 'undefined'. Running with +RTS -xc yields: GHC.Err.CAFTest: Prelude.undefined ___ Haskell-Cafe mailing

Re: [Haskell-cafe] Prelude.undefined

2010-03-02 Thread Tom Hawkins
On Wed, Mar 3, 2010 at 6:11 AM, Tom Hawkins tomahawk...@gmail.com wrote: On Wed, Mar 3, 2010 at 6:07 AM, Ivan Miljenovic ivan.miljeno...@gmail.com wrote: On 3 March 2010 16:06, Tom Hawkins tomahawk...@gmail.com wrote: How do I track down an reference to an undefined value?  My program must

[Haskell-cafe] ANN: atom-1.0.0

2010-02-13 Thread Tom Hawkins
Atom is a Haskell DSL for designing hard realtime embedded software. The 1.0 release is meant to indicate some level of stability; most of the core has been unchanged for quite some time. That said, there are a few interesting changes in 1.0. First the var' family of variable declarations

[Haskell-cafe] Atom Examples

2010-02-13 Thread Tom Hawkins
On Sun, Feb 14, 2010 at 1:30 AM, Yves Parès limestr...@gmail.com wrote: I've been interested in using Atom since I saw this: http://blog.sw17ch.com/wordpress/?p=84 However those samples are very outdated, do you have newer ones? Unfortunately, no. I wish I had the time to write Atom examples

[Haskell-cafe] ANN: afv-0.1.0

2010-01-24 Thread Tom Hawkins
AFV is an infinite state model checker to verify assertions in embedded C programs. New in this release: - Starts analysis from 'main' entry point. Automatically identifies the main loop (for (;;), while (1)). - Better counter example generation. - Enforces stateless expressions.

Re: [Haskell-cafe] Extracting all pruned sub trees

2010-01-21 Thread Tom Hawkins
On Thu, Jan 21, 2010 at 4:07 PM, Mark Lentczner ma...@glyphic.com wrote: On Jan 20, 2010, at 10:09 AM, Tom Hawkins wrote: I'm looking for an elegant way to generate a list of all pruned trees where each pruned tree has one of its leaves removed. This turned out to be a thornier problem than I

[Haskell-cafe] Extracting all pruned sub trees

2010-01-20 Thread Tom Hawkins
I'm looking for an elegant way to generate a list of all pruned trees where each pruned tree has one of its leaves removed. Something like this: data Leaf = ... data Tree = Leaf Leaf | Branch [Tree] prunedSubTrees :: Tree - [(Leaf, Tree)]-- [(the leaf removed, the pruned tree)] Any

[Haskell-cafe] Re: Atom bug(?)

2010-01-19 Thread Tom Hawkins
On Tue, Jan 19, 2010 at 10:42 PM, Lee Pike leep...@gmail.com wrote: Tom, Is this a bug?  The following program compiles, but the rule is scheduled at period 1 (rather than 0).  I wouldn't have thought to have an assignment outside of an atom until another engineer here wrote it.  In any

[Haskell-cafe] ANN: afv-0.0.3

2010-01-18 Thread Tom Hawkins
This release of AFV adds counter example generation for both concrete bounded violations or for inconclusive results when the induction fails to converge. I also put Linux and Windows binaries here: http://tomahawkins.org/. http://hackage.haskell.org/package/afv -Tom

[Haskell-cafe] ANN: afv-0.0.2

2010-01-17 Thread Tom Hawkins
AFV is an infinite state model checker for simple, iterative C programs. This release adds some new name checks, a few minor bug fixes, basic support for functions, and a little stronger type checking. Though most of the C language is still not supported, it can verify a lot of interesting

Re: [Haskell-cafe] ANN: atom-0.1.3

2010-01-17 Thread Tom Hawkins
On Sun, Jan 17, 2010 at 1:16 PM, miaubiz miau...@gmail.com wrote: I am trying to generate a square wave.  Here's the code:    square - bool square False    period 2 $ atom square high $ phase 0 $ do        square == true        assert square is low $ not_ $ value square    period 2 $

[Haskell-cafe] ANN: afv-0.0.0

2010-01-12 Thread Tom Hawkins
Hi, Here is the first release of Atom's Formal Verifier (AFV) [1], a tool intended to verify Atom -- or human -- generated C code. With the help of the Yices SMT solver [2], AFV uses bounded model checking and k-induction to verify assertions in iteratively called C functions, such as an

[Haskell-cafe] Re: About Atom

2010-01-05 Thread Tom Hawkins
On Tue, Jan 5, 2010 at 7:05 PM, CK Kashyap ck_kash...@yahoo.com wrote: Hi Tom, Happy new year :) I was wondering if I could use Atom for the purpose of an x86 operating system generator? Hi Kashyap, Ironically Atom was intended to eliminate the need for operating systems -- at least on

Re: [Haskell-cafe] A question on DSL's

2010-01-04 Thread Tom Hawkins
One argument for option 2 is to carry forward datatypes to the target language. For example, if you want to describe a state machine with the state as a type: data StopLightState = Red | Yellow | Green With option 1, values of type StopLightState will be resolved at compile-time, not run-time.

Re: [Haskell-cafe] A question on DSL's

2010-01-04 Thread Tom Hawkins
On Mon, Jan 4, 2010 at 9:41 PM, Luke Palmer lrpal...@gmail.com wrote: On Mon, Jan 4, 2010 at 12:16 PM, Tom Hawkins tomahawk...@gmail.com wrote: One argument for option 2 is to carry forward datatypes to the target language.  For example, if you want to describe a state machine with the state

Re: [Haskell-cafe] Atom's `__global_clock' and `__scheduling_clock'.

2010-01-03 Thread Tom Hawkins
On Sun, Jan 3, 2010 at 9:15 AM, Jason Dusek jason.du...@gmail.com wrote:  I would like to know how the `__global_clock' influences  execution in the present system. As you observed, __global_clock is no longer used for rule scheduling. It is only there to provide a time reference. BTW,

[Haskell-cafe] Linking in Large ByteStrings

2010-01-01 Thread Tom Hawkins
I have a large tarball I want to link into an executable as a ByteString. What is the best way to do this? I can convert the tarball into a haskell file, but I'm afraid ghc would take a long time to compile it. Is there any way to link constant data directly with ghc? If not, what's the most

Re: [Haskell-cafe] Timing in atom -- how consistent?

2010-01-01 Thread Tom Hawkins
On Fri, Jan 1, 2010 at 4:43 AM, Jason Dusek jason.du...@gmail.com wrote:  I'm working with Atom to program an ATtiny25. I am curious  about how consistent the timings actually are. The function returned by Atom is intended to be called periodically, preferably using some hardware timer, like

Re: [Haskell-cafe] Linking in Large ByteStrings

2010-01-01 Thread Tom Hawkins
Thanks, this worked great. Just a few seconds to link in a 5M tarball. Details: test.s: .global test_data test_data: .byte 0 .byte 1 .byte 2 ... Foo.hs: import Foreign import Data.ByteString.Internal import Data.Word import System.IO.Unsafe foreign import ccall test_data :: Ptr Word8

Re: [Haskell-cafe] Upgraded to GHC 6.12 and can't find anything

2009-12-28 Thread Tom Hawkins
Jon, I haven't tried GHC 6.12 or the Haskell Platform yet, but here is our standard install procedure for our company, which has worked consistently for us since GHC 6.8 (we use ubuntu 9.04 32-bit): - Add ~/.ghc/bin and ~/.cabal/bin to PATH. - Download and extract latest ghc. Then from

[Haskell-cafe] ANN: atom-0.1.4

2009-12-15 Thread Tom Hawkins
A bug fix affecting floating point variable initialization. http://hackage.haskell.org/package/atom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Using Atom's task scheduler for existing C code.

2009-12-11 Thread Tom Hawkins
Today we were working on integrating Atom code with some hand-written C, and one of my colleagues posed the question: Is it possible to use Atom just for its task scheduler for existing C code? This turns out to be very simple. It just requires a few combinators built on top of 'action'. --

Re: [Haskell-cafe] Haskell job opportunity

2009-12-08 Thread Tom Hawkins
On Tue, Dec 8, 2009 at 6:54 PM, Tom Tobin korp...@korpios.com wrote: On Tue, Dec 8, 2009 at 11:09 AM, siki ga...@karamaan.com wrote: You should have at least a bachelor’s degree in computer science from a top university Might I humbly suggest that this is going to severely limit your hiring

[Haskell-cafe] Re: [Haskell] Interesting experiences of test automation in Haskell? Automation of Software Test 2010

2009-12-03 Thread Tom Hawkins
On Fri, Nov 27, 2009 at 9:30 PM, John Hughes r...@chalmers.se wrote: This is a heads up about a workshop on test automation that I just joined the programme committee of. Automation of Software Test will be co-located with ICSE in Cape Town in May--the workshop home page is here:

[Haskell-cafe] ANN: atom-0.1.3

2009-12-03 Thread Tom Hawkins
This release of Atom slightly changes the semantics of assertions and coverage. Assertion and coverage are now checked between the execution of every rule, instead of only when the rules containing assertions are fired. They are still subject to parental guard conditions, but not period or phase

[Haskell-cafe] Re: Timing and Atom

2009-11-30 Thread Tom Hawkins
On Tue, Dec 1, 2009 at 2:24 AM, Lee Pike leep...@gmail.com wrote: Tom, I have a (hopefully) easy question about timing and Atom in the use-case where you're handling all your own scheduling without relying on a RTOS (where you get preemption).  Suppose I want a rule to fire every 2ms.  

[Haskell-cafe] Haskell Job Openings (Pune, IN)

2009-11-29 Thread Tom Hawkins
We finally got some open reqs in Eaton's engineering center in Pune, India. Could involve a little Haskell programming, or a lot, depending on what you want to do.

Re: [Haskell-cafe] Atom - help.

2009-11-27 Thread Tom Hawkins
= int16' readCompass() = (return . value) something - int16' something period 1 $ atom navigate $ do  heading - compass  something == heading br, miaubiz Tom Hawkins-2 wrote: The work around is to assign the result to an external variable.  The drawback is the result will not be available

Re: [Haskell-cafe] ANN: mecha-0.0.4

2009-11-27 Thread Tom Hawkins
On Fri, Nov 27, 2009 at 12:09 PM, Serge Le Huitouze serge.lehuito...@gmail.com wrote: Hi Tom! Mecha is a little constructive solid modeling language intended for 3D CAD.  This release adds animation capabilities, which use POVRay and FFmpeg behind the scenes.  At work we've used Mecha to

[Haskell-cafe] ANN: atom-0.1.2

2009-11-25 Thread Tom Hawkins
Atom is a DSL for designing hard realtime embedded software with Haskell. This release adds guarded division operations, 'phase', a new scheduling constraint, and a new rule scheduling algorithm. Many thanks to Lee Pike for his contributions! (Lee, sorry it took so long to get this out.)

[Haskell-cafe] ANN: mecha-0.0.4

2009-11-25 Thread Tom Hawkins
Mecha is a little constructive solid modeling language intended for 3D CAD. This release adds animation capabilities, which use POVRay and FFmpeg behind the scenes. At work we've used Mecha to illustrated the kinematics of a new hydraulic pump design -- I wish I could post the animation, it's

  1   2   >