Topology / ALM-Compiler

A Java implementation of the ALM language that compiles to the SPARC variant of Answer Set Programming (ASP).
Apache License 2.0
0 stars 1 forks source link

summary of actions #12

Open zhangyuanlin opened 6 years ago

zhangyuanlin commented 6 years ago

Goal: make CALM robust by testing it using known problems Some principle: easy implementation, good design, explicit assumption.

  1. Attribute in general state constraint was taken as normal function (see #16) - done.
    % Definition for function [defined_agent].
    defined_agent(X) :- agent(X, Y). % *agent* is an attribute of sort *event*
  2. Allow only Herbrand term in righthand of attribute assignment in instantiation. (do we allow top(box) = top where second top is the attribute name?). Once this is done, we have a workaround for "constant with parameters" (see #10)
  3. One level structure of library and simple format for file content. This will allow us to test libraries. (see #7)
  4. Integer/interval sorts (see proposal in #4).
  5. Hidden subsort and source sort problem (see #8). Can we simply assume same constant means the same inside a theory?
  6. Allow user to define constant/instance for NON-source sorts (see #6). (Done?)
  7. Allow attributes in constant declaration a? (#5) Low priority?
  8. Introduce "record sort" (there are two proposal of syntax in #3). Low priority?
Topology commented 6 years ago

0.

  1. get herbrand on RHS of attribute definition. (8 hours of work)
  2. Continue with current implementation, provide examples of usage to follow for organization (8 hours)
  3. Provide example program that uses range expression as sort. New Issue Needed for extending language with arithmetic capability.
  4. No consensus on importance of source sort, current implementation disables checks and is not consistent with the paper. the source(sort) predicate is not the same as in the paper due to constant declarations creating subsorts. Importing and extending theories causes definition of source(sort) to change. Axiom behavior changes of they use source(sort). (work on this is tabled for now).
  5. this should work, we allow it. breaks from the paper.
  6. Needs testing, already added.
  7. (tabled for now)

Priority: 1, 2

release workable calm.jars as soon as available.

Topology commented 6 years ago
  1. The temp patch work should be done, now. (SymbolTable needs Herbrand Term as an entry in final solution.)
  2. Should be done unless we want to change library usage.

Arithmetic capability is next on my plate.

Topology commented 6 years ago

I fixed a couple minor things with arithmetic capability. single operators seem to be working okay, but more complex expressions are not parsing properly. I think the problem is related to using left-recursion in my grammar for expressions. ANTLR4 claims to handle left recursion, but I'll change the grammar to right recursion and see if that fixes anything.