I would like to use CLIPS inference engine from an ADA program. Is there some example of an Ada package which implements (wrapper) a binding with CLIPS library (preferably its last version 6.3) ?
T.E.D wrote on this Forum in October 6 '09 that he realized this kind of wrapper but gave no more information.
Thank you Gary,
In your book "EXPERT SYSTEMS" you explain (p 384) that there is a version of CLIPS (certainly one of the first issues) developed entirely in Ada.
In page 389 of the book the field type "external address" is explained to represent the address of a user-defined-function possibly written in Ada.
May be TED of AdaClips has still the source of his CLIPS wrapper. If he listens ...
The source for the CLIPS wrapper can be downloaded from http://web.archive.org/web/20151019121345/http://www.telepath.com/~dennison/Ted/AdaClips/AdaClips.html
Related
I'm trying to learn to use Isabelle/HOL. I thought, "Hey, a tutorial written by some of the folks who developed it would be great", and so looked at
https://isabelle.in.tum.de/doc/tutorial.pdf
which has a publication date of Aug 15, 2018. In trying to work through examples, though, I find things like this in the text:
"The classic Isabelle user interface is Proof General / Emacs by David Aspinall’s. This book says very little about Proof General, which has its own documentation." (page iii)
"If anything strange happens, we recommend that you ask Isabelle to display all type information via the Proof General menu item Isabelle > Settings > Show Types (see Sect. 1.5 for details)." (page 5)
The problem is that Proof General appears to no longer work with Isabelle (see Isabelle2016 and Proof General). I'm baffled on why a tutorial would base itself on out-of-date software, but my real question is this:
"Is there somewhere that I can learn to do even the simplest things in Isabelle 2017?"
As of 2018, the only IDE that is supported for Isabelle is Isabelle/jEdit, which is included in the distribution you can download from the Isabelle website. There is an experimental VSCode plugin that is under active development, but I would recommend using Isabelle/jEdit for the time being.
The tutorial you found is listed on the website as one of the ‘Old Manuals’. It is severely outdated in many respects and should not be used anymore. The publication date is probably meaningless since it is the date of when the PDF was generated, not when the text was written. Some people have lobbied to have that tutorial removed from the website entirely, and your experience seems to confirm that we should indeed do that.
One of the best ways to start learning Isabelle is probably the book ‘Concrete Semantics’ (free online version available). Its first half is basically an introduction to Isabelle/HOL with lots of exercises. There is also the ‘Programming and Proving’ tutorial on the Isabelle website, which is almost identical to the first half of ‘Concrete Semantics’.
However, it focuses on applications in computer science (semantics of programming languages and a bit of functional programming). I'm not sure if there is a good tutorial about how to do mathematics in Isabelle; in any case, mathematics tends to be more difficult to do in a theorem prover for beginners because the gap to informal paper reasoning is larger. So I recommend ‘Concrete Semantics’ even if you are ultimately interested in formalising mathematics.
By the way: You mentioned Isabelle2017, but there really is no reason to use that instead of Isabelle2018, which is the most recent version at the time of writing this answer.
Is it possible to view the source code of protocols such as TCP or IP? I am trying to really understand how things work and it feels like reading books about it only gets me so far, as it is indirectly and conceptually explaining how it works, and I want to actually look at the explicit code itself.
Perhaps one of your best bet is to read Gary R. Wright & W. Richard Stevens' TCP/IP Illustrated Vol. 2 - The Implementation (warning: commercial link).
This books contains the actual, documented source code of the 4.4BSD-Lite TCP/IP stack.
Be aware that 4.4BSD-Lite was released in 1994 though, so you should expect some of the content to be slightly outdated by today's standards. That book remains a solid reference though.
I am a huge fan of source code comments but the comments in the Ada standard library are spartan at best. It is my understanding that the interface of the library is defined with the language definition, but the implementation is left to the compiler manufacturer. I often wondered how they do it, since the pure function names, parameters, and other definitions as I see them in the manual often don't explain what exactly the respective subprograms do and leave much to interpretation. I would expect some documentation along the line of the QT library.
Why is it there no definition of the library with extensive comments for every function?
It sounds like you are looking for the documentation in the wrong place.
The Ada standard library is described in great detail in the standard (the Ada Reference Manual) - and in even greater detail in the Annotated Ada Reference Manual.
The source files of the individual implementations of the Ada standard library are not the documentation of how the standard library should work.
For an example, the ARM section A.18.5 for Ada.Containers.Hashed_Maps says in paragraph 1 - which would normally be referred to as "A.18.5 (1)” -
The generic library package Containers.Hashed_Maps has the following declaration:
so I guess that implementors have read this as an instruction.
In the case of Hashed_Maps, you’ll see at A.18.5 (46) a link to A.18.4, which describes the common semantics of Maps; and Length, for example, is at (25).
GPS GPL from AdaCore Help > GNAT has links to a local copy of the ARM (GPS GPL 2014 only goes up to ARM2005); I don’t know what the Debian version does.
(This is how it is; that’s not to deny you have a point about how it might be better!)
Would it be feasible to implement a backend for Clean using the LLVM toolkit? If not, what are the stumbling blocks?
Also, if you happened to know of a good reference for the "ABC assembler" used as an IR by the Clean compiler, please include it in your answer. Thanks.
Without any sort of documentation of the ABC-intermediate language, it's going to be tough (I have been unable to find any what so ever).
It's definitely possible, however. As you hint at yourself, you would need to implement the code generator to use llvm instead -- the scope of which depends entirely on the complexity of the ABC-language.
The llvm-backend for Haskell may be of inspiration: http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/Backends/LLVM
You might be interested in the following articles (I'm having trouble finding them since the ST department screwed up their server config):
Smetsers, J.E.W. Compiling CLEAN to Abstract ABC-Machine Code, University of Nijmegen, Technical Report 89-20, October 1989. Describes how CLEAN is translated into (intermediate) ABC code.
Koopman P.W.M., Eekelen M.C.J.D. van, Nöcker E.G.J.M.H., Smetsers S., Plasmeijer M.J. (1990). 'The ABCmachine:
A Sequential Stack-based Abstract Machine For Graph Rewriting'. Technical Report 90-22, University of
Nijmegen.
Also see http://clean.cs.ru.nl/ST_Publications.
I want to use Float'Rounding() in Ada, but I could not find in the reference what the library is where the attribute is implemented.
I'm really sorry, I'm new at this, but it seems PHP and C++ have better documentation.
The attributes in Ada are predefined. You do not need a library for importing it.
This page could be of help: http://en.wikibooks.org/wiki/Ada_Programming/Attributes/%27Rounding
By the way, considering that the ISO standard of Ada (aka Reference Manual) is publicly available, in contrast to C++ which you have to pay for accessing it, I think Ada is much better documented, since the standard is the most complete reference of the language.
You will find more learning resources on the Ada Programming wikibook homepage.
All of Ada's language-defined attributes (the stuff introduced by the ' character, are documented in Annex K of the LRM. They are a full part of the language, so there's no package or library you have to manually import.
I know for a beginner at first it always seems like a new language is oddly documented, because you are so much more used to how things are looked up for your old languages. However, as somebody who knows both Ada and C++ quite well, I can tell you that one thing Ada has all over C++ is how much better documented it is. You can't even get hold of a copy of the C++ LRM without paying money to ISO. Even if you pay them, what you get isn't nearly as readable by a layman as what I just linked you.
For starters, I'd suggest you save those two links above I gave you, and read entirely through Annex K. There's loads of good stuff in there. You will also want to read through Annex L (language-defined pragmas) and skim through the stuff in Annex A (predefined language environment).