Re: Ann: SWI-Prolog 7.1.9
Jan Wielemaker <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
Hi Jose, On 02/27/2014 05:20 PM, Jose F. Morales wrote: > On Thu, Feb 27, 2014 at 11:03 AM, Jan Wielemaker <[email protected] > <mailto:[email protected]>> wrote: > > Hi Jos, > > On 02/27/2014 12:38 AM, Jos De Roo wrote: > > Hi Jan, > > With the attached file graph.n3p we get > $ swipl -f graph.n3p -g halt > % graph.n3p compiled 2.21 sec, 100,103 clauses > > Compared to version 6.6.1 this is a speed drop of 38% > $ swipl -f graph.n3p -g halt > % graph.n3p compiled 1.60 sec, 100,103 clauses > > > The original file didn't make it to the list because of > the long attachment, but that doesn't matter too much. > > Yes, compilation in 7.x is slower. This is because there > is more support for term/goal expansion/4, which includes > translation the source location information. The second > reason is that the functional notation support requires > analyzing the source in more depth. > > If you want best speed for loading big Prolog data files, > load them using a read/assert loop and finally call > compile_predicates/1 to make the code static. So, > > > Hi Jan, > > Congratulations for the new release. It is just the week/biweek development cycle :-) Although 7.1.x is maturing. > Is functional notation optional? (in the sense of module/3 declarations > of Ciao) > If so, does disabling functional notation alleviate compilation overheads? It is not optional (well, there is --traditional). I think that the Ciao modular and strict architecture is a great piece of engineering. I prefer to keep things `just available' though. That approach surely has disadvantages, but quite likely it contributed a lot in the popularity of the system. > Is there any subset of SWI functional notation that is compatible with > Ciao's fsyntax? If I recall well, the body of functions definitions is in part a subset of Ciao's syntax. Calling them is based on the . and dict datatype. That also required a different way to specify the head of a function definition. I think the envisioned role of SWI-Prolog functions is quite different. They are primarily a way to access structured data, as opposed to create a language with full functional notation. I always considered access to structured data one of the main obstacles for programming in Prolog. I've just used dicts and functional notation to deal with the state in a new library for parsing RDFa. It is ugly Prolog, mainly because the RDFa spec is purely procedural and requires a mutable state. Still, I think that dicts and functional notation allowed creating a reasonable readable implementation of this `procedure'. Cheers --- Jan