logic foundations