Use Clingo 4.5 with Gringo 3 - answer-set-programming

I am trying to run the code from the exercises from Chapter 8 of the PCGBook. They use clingo but don't say what version they are using. When I downloaded the latest version of Clingo from Potassco's sourceforge (version 4.5.4), it gives me lexer errors. I assume this is because the syntax has been changed between Gringo 3 and Gringo 4. On the Potassco website they say this and give a remedy for fixing it by downloading both versions of Gringo, but they don't say how to have both referenced when running programs with Clingo. I downloaded Gringo 3.0.0 and replaced the gringo.exe, but the clingo.exe has been compiled with the latest version of Gringo.
How do I download the latest version of Clingo, or the latest compatible version, with Gringo 3?

Clingo is the combination of the grounder gringo and the solver clasp, plus some extras. Note that version-wise gringo 3.x and clasp 2.x go together, and gringo 4.x and clasp 3.x go together. Clingo follows the versioning of gringo, so clingo 4.x combines gringo 4.x and clasp 3.x.
You can get the latest clingo version that supports gringo 3.x syntax from here: https://sourceforge.net/projects/potassco/files/clingo/3.0.5/
Alternatively you can get clasp 2.x to go with your gringo 3.x https://sourceforge.net/projects/potassco/files/clasp/2.1.5/
As a tip, you can always run clingo in different modes with the --mode=<arg> switch. The argument options are clingo, clasp and gringo. This means that currently you really only ever need clingo 3.x and 4.x to be installed. On windows you could e.g. rename the 3.x version to clingo3.exe.

Related

Apache openwebbeans with JDK17

I am upgrading openwebbeans project from openJDK12 to OpenJDK17 . currently webeans version is being used 2.0.10 . When upgrading application is not coming up. Is there any apachewebbeans version supporting java 17 and in near future any plan?
UPDATE: OWB-2.0.27 is compatible to JDK17 without having to change the xbean- libraries.
According to this site (https://openwebbeans.apache.org/download.html) OWB-2.0.x should support Java17.
It uses a shaded version of ASM-9 (Java17 support) for building our proxies and requires JavaSE 8 as minimum version.
But i have also problems getting the OWB-2.0.26 version to run with JDK17 because of the used xbean-asm9-shaded lib which only supports java up to version 16.

Vala: Compile for a lower GTK version

My PC is running Ubuntu 17.10 and has GTK+ 3.22.
When compiled from this environment the binaries cannot be run under Ubuntu 16.04 since the only GTK+ 3.18 is compatible with Ubuntu 16.04. How do I compile for a lower GTK runtime level?
The other way around should work though.
Compile the binary on the older OS version and it should work fine on the newer one.
The usual solution is to not provide binaries at all, but let the users and the distribution developers / packagers deal with the problem.
Just make sure your app is easy to compile, which means use standard build system tools like mesonbuild and add some build instruction in a README.md file.
It depends what are your real dependencies on the GTK+ API.
Each function has at the end of its documentation a Since: field that tells on which version of GTK+ it first appeared. Both of your target versions are GTK+ 3, so they are ABI-compatible. So you just need to check which symbols are not found when you run your binaries compiled for 3.22 on your 3.18. Every symbol that isn't found has been added after 3.18. Every symbol with Since: > 3.18 can't be used, you need to use the smallest common denominator. Once the symbols > 3.18 are identified, you have 2 choices:
either you do it the 3.18 way, and change your code to use no symbol introduced after 3.18. This means you might have to use deprecated symbols, but they will be there until the next API break (ie. GTK+ 4).
or try to get the latest features from both versions, using something like:
.
#if GTK_CHECK_VERSION(3, 20, 0)
// Do it the GTK+ >= 3.20 way
#else
// Do it the GTK 3.18 way
// (and ensure you have checks in your configure.ac or similar to make
// sure configuration breaks if trying to build with a GTK+ < 3.18)
#endif

Framework issue - Module file was created by an older version of the compiler

I'm using
newest OpenXSDKframework (debug)
included in embedded Binaries
Build Settings: Embedded Content Contains Swift Code YES
Other linker -Objc
XCode 7.31
swift
when import OpenXSDKCore
this error is showing
.../ViewController/OpenXBannerViewController.swift:11:8: Module file
was created by an older version of the compiler;
rebuild 'OpenXSDKCore' and try again:
.../OpenXSDKCore.framework/Modules/OpenXSDKCore.swiftmodule/i386.swiftmodule
is this related to the Framework producing Company ?
what should i do - to fix that error?
thanks
That error will occur if the compiled framework (binary) was compiled using earlier version of compiler and in the most of the iOS cases it means that the binary was compiled using some earlier versions of Xcode.
Most probably, your OpenXSDKCore was not built using Xcode 7.3 that you use. The best course of action would be downloading the framework source code and compiling it by yourself.
If you don't have that option you can only wait or downgrade to earlier Xcode version.

How to compile iText 5.5.x with older version of java 1.3.1

I would like to have the procedure to compile iText 5.5.x using Javac 1.3.1.
We have a old application that can perform java calls but it is only certified with Java 1.3.1.
Note that I'm novice to java, so a step by step would be nice.
Thanks.

AutoFixture.Xunit with Xunit.net 2.0 beta

I've already moved to the xunit.net 2.0 beta version, but need some feature from AutoFixture, which still depends on the current 1.9.2 stable release (CompositeDataAttribute). As far as I see AutoFixture.Xunit hasn't been upgraded yet (when?)
When I just try to install AutoFixture.Xunit with nuget it complains of the conflict with it's dependency on xunit 1.9.2 and if I ignore dependencies it compiles but tests are not being run (at least by the VS2013 and Resharper runners)
Any suggestions? thanks
Support for xUnit.net 2 was added to AutoFixture on April 8 2015. It was added as a new NuGet package, in order to make it optional if and when to migrate to xUnit.net 2. Thus, there are two Glue Library packages for AutoFixture and xUnit.net:
AutoFixture.Xunit for use with xUnit.net 1.x
AutoFixture.Xunit2 for use with xUnit.net 2.x