Git Product home page Git Product logo

sparc's People

Contributors

hharithaki avatar iensen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sparc's Issues

Answer set with two abductive supports is duplicated

@iensen ๐Ÿ˜

Below is a CR-Prolog program:

predicates
a(). b(). c().

rules

a.

-a :- not b, not c.
b :+. c :+.

b :- c.
c :- b.

Sparc+DLV gives:

SPARC  V2.49
program translated
{a, b, c}

{a, b, c}

The answer set {a, b, c} is duplicated, possibly because it has two abductive supports {b :+.} and {c :+.}.

solveropts not working

Hi I'm having trouble with the solveropts argument "pfilter" and "filter" with sparc 2.48 and DLV Dec 17 2012. Somehow the argument is not being passed from sparc to DLV. In the screenshot I compile using sparc and pass the compiled file and desired filter to DLV and it gives the expected output. Thanks.

screenshot from 2016-03-21 13 51 40

Arithmetic terms inside other terms are not working when option -wcon is used.

This program:

#maxint=20.
sorts
#s={f(5),6}.
predicates
p(#s).
q(#s).
rules
p(f(X+1)).

produced the following swi-prolog program:

:- use_module(library(clpfd)).
:- style_check(-singleton).
set_1(6).
set_1(f(5)).
p :- set_1(X_0),X_0 #= f(X+1),[X_0,X] ins 0..20,labeling([],[X_0,X]).

main :-(p -> writeln(yes) ; writeln(no)).

Which has illegal atom X_0 #= f(X+1).

Empty Sort Processing

Given a program with empty sorts, such as:

sorts

#booleans = {true, false}.

#garage = {r2}.

#john = {r1}.

#football = {r3}.

#activity = {}.

#carry = {}.

Running java -jar sparc.jar program.sparc produces the following output and then terminates:

SPARC  V2.56
sort activity defined at line 11 column 2 is empty

Use of variables in display section

Given program

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Template for a SPARC file
%% Author:
%% Description:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
sorts
    #people = {f(a,sara), f(b, sara), f(a, bob)}.
predicates
    father(#people, #people).
rules
    father(f(a,bob), f(a,sara)).
    father(f(a, bob), f(b, sara)).
    
display
father(X, f(Z, sara)).

We have complaint for the statement in the display section:

SPARC V2.54
temp.sp: non-ground term "f(Z,sara)" occuring in program as 2 argument of predicate father/2 
is not a program term

Negations before sort literals.

Currently, both default negation and classical negation are allowed before sort atoms:

For example, the following program is valid:

sorts

s = {a,b,c}.

s2 = {a,b,d}.

predicates
p(#s).
q(#s2).
r(#s2).

rules

q(X) :- -#s(X).
r(X) :- not #s(X).

However they do not have intuitive behavior (non of the literals q(d) and r(d) are implied).

Current proposal is to prohibit negations.
(Alternatively, we can alter the semantics to make not #s(X) mean "X is not in s" for any X in the domain of the program)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.