LPARSE VERSION HISTORY

lparse-0.99.48 (22.2.00)
	There was a little bug introduced in 0.99.46 that caused some
	rules to be left out of the program even with '-d all' option.

	Fixed a bug that messed with optimize statements when atoms of
	the form a("something-quoted") were used. 

lparse-0.99.47 (3.2.00)
	Added a simple API that allows the user-defined functions to
	access symbolic constants. The details are in the manual.

	Fixed a bug that once again caused internal errors sometimes
	when nested symbolic functions were used. 

lparse-0.99.46 (21.1.00)
	Updated the "-d all" switch to include ground rules for domain
	predicates as well as the facts.

lparse-0.99.45 (18.1.00)
	There was a bug that range definitions did not always notice
	differencies between symbolic and numeric constants.

lparse-0.99.44 (14.1.00)
	Lparse now handles correctly the cases where there are more
	than one relational operator in the row. However, you may use
	only one operator in the expression.

	There was a bug with '-d all' option that sometimes caused
	incorrect atoms to be added to the model. 

lparse-0.99.43 (5.1.00)
	Changed the modulo function to work with normal mathematical
	semantics instead of C programming language semantics (that
	is, the modulo is now always positive).
	
	Also, noticed the bug that functions of the form

	      A < B < C
	      
	do not work correctly. This will be fixed in next release,
	meanwhile the construct

	     lt(A,B,C)

	works. 

lparse-0.99.42 (4.1.00)
	Lparse messed up the symbolic functions in the rule tails if
	the nesting depth was too large. This version fixes it and
	additionally allows now assignments in the rule bodies to be
	in any order (as long as there are no cycles).

	There was also a bug that messed up conditions that were too
	deep.
	
	Finally, a literal with symbolic functions was sometimes
	dropped from compute and optimize statements. 

lparse-0.99.41 (30.11.99)
	If a function was used in a extended rule tail, lparse could
	mess up the dependency graph of the program. 

lparse-0.99.40 (12.11.99)
	A typo on yesterday's fix broke the conditions from working
	within choice rule heads. 

lparse-0.99.39 (11.11.99)
        There was a missing 'break' in a switch statement that crashed
        the program sometimes when there were more than one function
        argument in a literal. 

	If all literals in a constraint or weight rule had functions
	with global arguments, the lparse dropped the rule from the
	output.

lparse-0.99.38 (5.11.99)
        There was a bug that caused a numerical constant to be treated
        as a normal constant when they appeared as sole arguments. 

lparse-0.99.37 
	Fixed a bug where lparse didn't count the number of
	domain predicates in a rule correctly which confused smodels.

	Added a new command-line option:
	 --dlp  
	  Use disjunctive logic program semantics for separator '|',
	  ie translate rule of the form
               a1 | ... | an :- foo
          into 
              { a1, ..., an } :- foo
          instead of
              1 { a1, ..., an } 1 :- foo

lparse-0.99.36 (13.10.1999)
	Fixed an error where an assertion failed when printing an
	error message. 

lparse-0.99.35 (12.10.1999)
	There was a bug in range restriction checking code that failed
	with constructions like:
	     
	     1 { foo(bar(X,Y)) : domain(X,Y) } :- ... .

	Another bug in the grounding code caused lparse to hang
	sometimes if it encountered a constructs of the form:
  
	     not foo(X+2), or
             not foo(Y) : X = Y + 2


lparse-0.99.34 (28.9.1999)
	Yesterday's fix for empty conditions broke the semantics, so I
	had to rewrite that portion of code. 

	Now empty conditions behave in following way:
	    a :- b : c.
	becomes:
	    a :- b. 
	if 'c' is true, or
	    a.
	if 'c' is not true. 

	In constraint and weight rules a literal with empty condition
	doesn't count against bounds. This is because it allows rules
	of the form:

          foo :-  1 { chosen(X) : version(X) : X >= 10 }.
	  
	where the set 'version(X) and X >= 10' is possibly empty and
	'foo' should only be true when at leas one of 'chosen(X)' is
	in the model. 

	If there is a choice rule head with empty condition, the rule
	is dropped from the program. 

	Patched the configure script somewhat. Now it should detect
	correctly if c++ compiler doesn't implement exceptions. 

lparse-0.99.33 (27.9.1999)
	There was a serious bug in lexer that caused it to
	misinterpret numeric constants as atoms sometimes. 

	Before lparse would happily accept code of the form:
	{ a(X) : b(X) }.
	where b(X) was empty, and generate incorrect code for it.
	Now lparse generates a new unsatisfiable literal in place of
	a(X) if this happens. 

	Fixed a segmentation fault from error display code. Now the
	parser recovers from parse errors to check the rest ofcode and
	gives a little more intuitive error messages. 

	Fixed an error checking code that had its test backwards
	(indicated error when memory allocation actually succeeded). 
	There was a bug that sometimes caused an internal error if
	symbolic functions were used in normal rule heads. 

lparse-0.99.32 (14.9.1999)
	Cleaned error and warning messages. Now they show also
	filename in addition to the line number. In addition, if there
	were multiple input files and one of them ended with a comment
	line without a terminating newline then the first line of the
	next file was discarded as a comment. 

lparse-0.99.31 (11.9.1999)
        A hard disk crash destroyed the changes for versions 0.99.29
        and 0.99.30, so I had to rewrite them.

	Changes: multiple compute statements didn't work correctly,
	and constraints were dropped when the program was of the form

	   :- only, domain, predicates, here.
	   1 { some, atoms } 1.

        and the body of the first rule was false. 

lparse-0.99.28 (2.9.1999)
	Fixed a bug that prevented expressions from working
	inside symbolic functions. (This bug was first inroduced in
	0.99.15, fixed in 0.99.16, and then reintroduced in 0.99.26.
	There is now a test case to ensure that it will not come back
	again).

	Fixed a bug in smodels-mode.el which prevented using  'M-x
	smodels-mode' directly. 

lparse-0.99.27 (1.9.1999)
	The relational operators can now be used to compare symbolic
	constants. Additionally, non-alphanumeric characters can be
	used with constants by enclosing the constants with double
	quotes.	For example:

	   "quoted constant-1"

	is now a legal constant. The comparison operators put the
	constants into lexicographic order. 

lparse-0.99.26 (31.8.1999)
	I simplified the use of global weight declarations. I found
	out that there was a nasty bug that caused weights to have
	wrong values sometimes (for example, definition 'weight
	a(X)=X.' was lost if it was later applied to a(Y) ). Fixing
	this bug resulted in having lots and lots of special cases, so
	I decided to clean up the semantics. Now the latest matching
	declaration is always used. For example, after declarations:

	   weight p(1)=5.
	   weight p(X)=X.

	atom p(1) will have weight 1, not 5 as before. To get the same
	behavior as before you have to reorder the declarations. 

	Conditions are now allowed to have global variables. If a
	condition doesn't have a global variable it works just as
	before, but otherwise the global variables will be
	instantiated before expanding the condition. For example,
	rule: 

	   1 { chosen(X,Y) : edge(X,Y) } 1 :- node(X).

        ensures that exactly one outgoing edge is chosen for each node.

	The new behavior is _much_ slower than the old one because
	the expansion happens at the innermost loop of lparse, so you
	shouldn't use global variables unless you really need them. 
	
	Cleaned up the parser warnings. There are now five different
	warning types that can be enabled at the command line. See
	the User's Manual for details.

	Added support for extended rules for the regular model
	semantics translation. 

    	As a minor change I changed the default lower bound of weight
	rules from 0 to -infinity to get cleaner semantics. 

	In the process I fixed a couple of minor bugs that occured
	when there were many literals and functions on the right side
	of a condition. 

	I also wrote a major-mode for editing smodels programs with
	Emacs. It is located at src/smodels-mode.el. The instructions
	on its use are in User's Manual. 

lparse-0.99.25 (12.8.99)
	Added three levels to regular model translation. They work now
	as with default '2'
		lparse -r [1 | 2 | 3]

	Level one omits the integrity constraints from the program.
	That is, rules of the form " :- b, not b'" are left out. This
	option can be used to calculate alternating fixpoints of the
	program. 

	Level two performs just like the original regular model
	translation.

	Level three adds constraints of the form " :- b', not b" to
	the model. The resulting program will have same stable models
	than the untranslated program. 
	

lparse-0.99.24 (11.8.99)
	Added preliminary support for regular model semantics. Given a
	logic program and compute statement smodels can now find out
	whether there is a regular model of the program where the
	compute statement is true.

	The support is enabled with option '-r'. The program in
	question is transformed in the following way:

	a :- not b.
	b :- not a.
	f :- not a, not f.
	compute { a }.
	
	becomes

	b :- not a'.
	b' :- not a.
	f :- not a', not f'.
	f' :- not f, not a.
	a :- not b'.
	a' :- not b.
	 :- b, not b'.
	 :- a, not a'.
	 :- f, not f'.
	compute { a }.

	If atoms "p" and "p'" are in the model "p" is true in it, if
	both are missing "p" is false. If only "p'" is in model "p" is
	undefined in the model. 

	The regular model semantics don't currently work with extended
	rules. 

	Fixed a memory bug that could corrupt the arena when there
	were too many variables in extended rules. 

lparse-0.99.23 (30.7.99)
	Added a new warning option:
              -W weight
	This prints a warning if a default weight gets used somewhere.
	This option is useful to catch typos when you have a lot of
	weight definitions. 

	Fixed a memory bug that sometimes crashed lparse when using
	smodels 1.x format.

	The arguments of form '-W nofoo' didn't work correctly, now
	they do. 

	Removed many possibly dangerous operations where
	bit-pattern 0 was implicitly casted to a NULL pointer.

	Cleaned out some unused code. 

lparse-0.99.22 (22.7.99)
	Added bitwise operators AND (&), OR (|), XOR (^), and NOT (~)
	to internal functions.  

	Removed the predicate and function call arity limits.

	Changed the prototypes of used-defined functions to

	     long foo(int num_args, long *arg_array)

	where 'arg_array' is an array of 'num_args' longs.


lparse-0.99.21 (20.7.99)
	Fixed an operator precedence bug.

lparse-0.99.20 (8.7.99)
	Removed two memory errors that caused lparse to crash in some 
	circumstances (namely, when new internal variables were
	introduced in wrong places). Fixed three small memory leaks
	and one uninitialized variable. 

lparse-0.99.19 (1.7.99)
	Found and fixed a bug that caused atoms to be
	lost when there were too many hash table collisions. Added an
	optimization that reduces the memory usage. 

	Fixed a typo that prevented compilation on older Debian Linux
	systems.

	Functions 'eq' and 'neq' didn't work correctly with symbolic
	functions. 

	Corrected a couple of minor errors from example file
	'logistics.lp', and added two problem instance examples. 

lparse-0.99.18
	The user's manual is now up-to-date. It is distributed as a
	texinfo source. To get a dvi-version of it type 'make dvi'. 

	I reorganized the code structure to use autoconf and automake.
	As this is my first try using them there are probably some
	glitches left.

	The code is now explicitly under GPL. 	

	A bug that caused misformed output when there was unsatisfied
	ground domain literals in the rule body was fixed. Another bug
	was that some rules were lost if all domain predicates were
	printed. There was still one part of the code that supposed
	that atom set is saved also for those predicates that don't
	need it. Functions as tests didn't work if the whole rule was
	ground. Function argument type checking didn't work always.
	Weight definitions didn't work correctly with conditions.
	Negative weights work now also within optimize statements.
	
	Register is no longer needed. I also removed '-f' option
	because it was so closely tied with register.

lparse.0.99.17
	Changed the behavior of '-n' switch to override
	compute-statements. I also removed the switch '-s' because it
	didn't have any useful effect. 

	Some earlier change had broken choice rules when conditions
	were used. I fixed it. The more efficient data structures
	broke the handling of domain literals without arguments. This
	bug is also now fixed.



lparse-0.99.16 (4.6.1999)
	I fixed the command line argument handling code that
	segmentation faulted some times. 

	Also, I fixed a bug that caused nested function calls to
	fail.

	One more memory leak was found and eliminated.

lparse-0.99.15 (3.6.1999)
	For this version I rewrote the hash table codes almost from
	scratch. The result is that the memory consumption dropped by
	a third and in some cases the running times are now up to a
	half faster than before. 

	There is also a new feature in code, symbolic functions of
	type: 
	      a(f(X,Y)) :- d1(X), d2(Y).
	The above rule in conjunction with domain definitions
	d1(1..2), d2(1..2) will be grounded as follows:
	      a(f(1,1)).
	      a(f(1,2)).
	      a(f(2,1)).
	      a(f(2,2)).

	The symbolic functions have to be strongly range restricted.
	The functions can be used also in domain predicates. Adding
	the rule:
	      p(X,Y) :- a(X), d1(Y).
        to the above program adds the atoms:
	      p(f(1,1),1). p(f(2,1),1).
	      p(f(1,2),1). p(f(2,2),1).
	      p(f(1,1),2). p(f(2,1),2).
	      p(f(1,2),2). p(f(2,2),2).
	to the model. 

	I fixed many little memory bugs (mainly leaks) from the code,
	and it is possible that the fixes broke something else
	somewhere, so version 0.99.14 may be more stable.

lparse-0.99.14 (3.6.1999)
	Fixed a couple of bugs affecting ranges and functions.

lparse-0.99.13 (28.5.1999)
	Added a new keyword 'hide'. The syntax for it is
             hide p(X,Y).
        This marks all ground atoms of predicate p/2 to be anonymous,
	that is smodels 2.x doesn't print them in the models. 

	Fixed a bug that caused choice rules to fail if there were
	free variables in the heads. Also, smodels 1.x output format
	works again. 

lparse-0.99.12 (26.5.1999)
	The minor fixes of version .11 introduced a major bug into
	handling of negative literals. 


lparse-0.99.11 (25.5.1999)
	Fixed a lot of minor bugs from the code. I also clarified some
	of the error messages a little.

lparse-0.99.10 (23.5.1999)
	Added support for weights in choice rules. Now it is possible
	to use constructions like:
	    2 [ a(X):d(X)=X ] 5.
	
	Negative weights work now correctly. 

lparse-0.99.9 
	Changed the behavior of conditions. Now they are allowed also
	within basic rules. It is now an error if a global variable is
	used in condition. 

	Removed support for conjunctive ranges, since conditions can
	do everything that conjunctive ranges could do, and much more.
	The rule:
	    foo :- bar(1,,3).
	can now be encoded with two rules:
	    foo :- bar(X) : d(X).
	    d(1..3).

	Fixed a bug which caused problems when functions were used as
	arguments within special rules. Another bug that prevented
	using functions like "abs(X)" was also removed. 

	Added some optimizations to weight and constraint rules. Now
	lparse notices if the domain literals have enough weight to
	make the rule true. 

	Added a little error detection code to the parser. 

lparse-0.99.8 (9.5.1999)
	Fixed a bug that caused atoms to be misinterpreted as
	constants within weight rules.

	The global definitions of the weights work now more
	intuitively. It is now possible to define one literal as
	having different weights at different parts of the program.
	The weight used is either the latest definition for that
	particular ground literal, or if that is not found, the
	latest definition for unifiable literal. As the last resort a
	global weight definition for the predicate is used.

	It is now possible to define the default weight for literals
	by using command line argument '-w'. 
	
	I added some optimizations to index selection process during
	grounding. Now lparse tries to choose a constant value as an
	index if possible. 
	
lparse-0.99.7 (5.5.1999)
	Fixed a bug that caused range restriction checking to fail
	if functions were used in special rules.

	Found and fixed an uninitialized variable that caused problems
	with choice rules. 

lparse-0.99.6 (3.5.1999)
	Removed a memory bug that affected (again) compute statements.
	Removed a divide-by-zero problem.

lparse-0.99.5 (14.4.1999)
	Removed a bug which lost a choice rule if all variables
	occuring in its head were in conditions. 

lparse-0.99.4 (12.4.1999)
	Removed the support for generate rules because of their weak
	semantic foundation. The choice rules can now be used to
	express exlusive-ors, as they now work more like constraint
	rules: 

	   lower { a1, ... , an } upper :- body.

	The rule means that if body is true in a stable model, then
	the number of head literals of the rule that are true in the
	model will be between 'lower' and 'upper', inclusive.

	Internally, the rule will be translated into three rules:

	   { a1, ... an } :- body.
	    :- upper +1 { a1, ... an }, body.
	    :- n-lower+1 { not a1, ..., not an }, body.

	The expression
	   a1 | a2 | ... | an :- body.
	is now an alias for
	   1 { a1, ..., an } 1 :- body. 
	    	    
        Fixed a problem	that caused lparse output misformed rules when
        there were only negative literals inside a constraint rule.
        The upper bounds for constraint and weight rules are now
        inclusive as they should be. 

	Also, earlier bugfix didn't fix all problems with compute
        statements, this takes care of those problems.

lparse-0.99.3 (7.4.1999)
	Conditions and negative literals in the compute statement now
	work as advertised. Also, fixed a bug that caused ground
	special rules to fail in certain conditions.

	Changed the behavior of -d none -- flag. If there are any
	special rules in the program -d none now behaves like -d
	facts, since otherwise lparse might lose models when there are
	domain predicates in special tail sections. 

lparse-0.99.2 (6.4.1999)
	Fixed a couple of memory bugs, a bug which caused smodels
	to calculate wrong number of models, and a bug which broke
	conditions in optimize statements. Also updated SYNTAX to
	reflect the fact that global weights may also have variables. 

lparse-0.99.1 (29.3.1999)
	Fixed two bugs, one that caused a segmentation fault when a
        special rule had an empty head, and one error in lexer, which
        mixed constants with identifiers.

lparse-0.99.0 (24.3.1999)

	Includes support for new smodels 2.x rule types, declarations
	can now be anywhere in the program file, and constant valued
	expressions may be used everywhere where numerical constants
	may be used.

	This is (hopefully) the final beta version, and this will be
	elevated to version 1.0 when most of the new bugs are
	eliminated.
	
	The manual is not updated yet, the changes are described in
	file SYNTAX.

lparse-0.9.25 (8.3.1999)
        Fixed a bug that messed with unsatisfied ground predicates in
        otherwise non-ground bodies.

        Option -t now also prints the compute statement.

lparse-0.9.24 (15.2.1999)
	Fixed a bug in predicate argument handling code.

lparse-0.9.23 (12.2.1999)
	Fixed a bug which caused lparse fail when presented with rules
	of the form:
              a :- not b.
	where b was a domain predicate.

lparse-0.9.22 (9.2.1999)
	Fixed support to multiple argument lists. Rules of the form
	      foo(a;b;c).
	work again as expected.

lparse-0.9.21 (8.2.1999)
	Fixed a few bugs in range checking code. Thanks to Neil Moore
	for pointing them out.

lparse-0.9.19 (10.11.1998)
	Allow now rules of the form:
	      a | b :- 2 { c, d, e }, f.
	Corrected a few errors in lparse.ps

lparse-0.9.18 (6.11.1998)
	Rules of the form a | b . now work corerctly.
	Fixed a memory bug.

lparse-0.9.17 (28.10.1998)
        Fixed the handling of variable-free rules having non-true
        bodies.

lparse-0.9.16 (23.10.1998)
	First official beta version
