info-gnuprologjava
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Info-gnuprologjava] Google Summer of Code


From: Daniel Thomas
Subject: Re: [Info-gnuprologjava] Google Summer of Code
Date: Wed, 30 Mar 2011 20:16:55 +0100

Hello Simon,

Documentation on the test framework is nearly non-existant.
However it can be run with:
$ ant test-inria

The main control and defining file is test/inriasuite/inriasuite.pl
Additional test files need to be referenced from there using the file/1
or similar predicates. See lines 715--828 for that.
To add tests to existing test files you add something of the form
[test expression,success].
or
[test expression,failure].
or
[test expression involving X and Y,[[X <-- a, Y <-- b],[X <-- c, Y <--
d]]].
or
[test expression,some_error].
Where [[X <-- a, Y <-- b],[X <-- c, Y <-- d]] is the list of possible
sets of unifications of X and Y as the test expression involving them
backtracks. success is for the case where the test expression succeeds
(once), failure for the case where it should fail to unify. some_error
is the relevant error which should be thrown by the expression.

If you look through the files in test/inriasuite/ then there are fair
number of examples.

I should really add that to the official documentation...

I hope that this helps,

Daniel

On Wed, 2011-03-30 at 19:12 +0100, Simon wrote:
> Hi Daniel,
> Is there any documentation for your test framework, or can you give me a
> basic idea of how to add tests to it?
> Cheers,
> Simon
> 
> On Wed, 2011-03-30 at 15:18 +0100, Daniel Thomas wrote:
> > On Wed, 2011-03-30 at 12:26 +0100, Simon wrote:
> > > Hi there,
> > > I am hoping to contribute to GNU for my Google Summer of Code project,
> > > and thought that your branch of the company seemed interesting and
> > > challenging to work in.
> > > 
> > > I am a second year computer scientist studying at the University of St.
> > > Andrews.
> > > 
> > > I have programming skills in Java, Python, C, Haskell, HTML, Javascript,
> > > MIPS32 assembly and some in CLISP. I do not know any Prolog, but have
> > > been wanting to get into it for a while, and this seems like the perfect
> > > opportunity. I have experience in implementing programming languages
> > > through a project for my university which involved creating a C-syntax,
> > > strongly and dynamically typed turtle graphics language in Haskell.
> > > 
> > > I thought that implementing part two of the ISO standard (Modules)
> > > looked like as good a choice as any for the project.
> > > 
> > > Would someone in your team be able to give me some pointers for writing
> > > up a project proposal? If you have any other questions to see if I would
> > > be a suitable candidate, please do not hesitate to ask.
> > > 
> > > Kind regards,
> > > Simon Brand
> > 
> > Hello Simon Brand,
> > 
> > It is great that you are interested in this project. In terms of writing
> > a proposal you will need to use the GNU template listed on
> > http://www.gnu.org/software/soc-projects/guidelines.html
> > 
> > I really want to see patch(s) before the proposal deadline so that I
> > know that you can work with the code. If you check the newmaster branch
> > out of git:
> > $ git clone git://git.savannah.gnu.org/gnuprologjava.git
> > $ git checkout newmaster
> > 
> > Having done that and with maven and sonar http://www.sonarsource.org/
> > installed and configured correctly then running
> > $ mvn sonar:sonar
> > should run the kind of static analysis you suggested in your later
> > email. You might want to create a patch to fix any obvious flaws or bugs
> > which that shows you.
> > 
> > Alternatively/additionally https://savannah.gnu.org/bugs/?32560 looks
> > like it should be an easy bug to at least confirm or deny. If you add a
> > suitable test to the inria suite in test/inriasuite/assertz and then run
> > the tests using
> > gnu.prolog.test.GoalRunner --once inriasuite.pl run_all_tests
> > 
> > Currently the output from the inriasuite gives "The following *10* BIPs
> > gave a total of *26* unexpected answers:" due to a combination
> > non-standards compliant code and incomplete tests.
> > 
> > If you send in patch(es) then that will demonstrate that you can use the
> > code base and help me assess your coding skills.
> > 
> > If you have used Java before then I assume that you know Eclipse? I am
> > using Eclipse for development work. We use Ant for building and git for
> > version control are you familiar with those? I doesn't matter too much
> > if you aren't as they shouldn't take long to learn.
> > 
> > Have you made contributions to other open source projects in the past?
> > (again not necessary but interesting)
> > 
> > I hope that that helps,
> > 
> > Daniel
> 
> 
> 

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]