# HG changeset patch # User bulwahn # Date 1288283794 -7200 # Node ID 783c23f6afbfcc98f7d7de00c6f4ce146408b2b9 # Parent 3102b27ca03aed102d8cbfd39d1f7fa5a803457d# Parent 997d6fb439a9e5a9ae82f6ace3317fa04c367c9a merged diff -r 997d6fb439a9 -r 783c23f6afbf src/HOL/Predicate_Compile_Examples/ROOT.ML --- a/src/HOL/Predicate_Compile_Examples/ROOT.ML Thu Oct 28 17:54:25 2010 +0200 +++ b/src/HOL/Predicate_Compile_Examples/ROOT.ML Thu Oct 28 18:36:34 2010 +0200 @@ -12,11 +12,12 @@ if getenv "EXEC_SWIPL" = "" andalso getenv "EXEC_YAP" = "" then (warning "No prolog system found - skipping some example theories"; ()) else - (use_thys [ - "Code_Prolog_Examples", - "Context_Free_Grammar_Example", - "Hotel_Example_Prolog", - "Lambda_Example", - "List_Examples"]; - Unsynchronized.setmp quick_and_dirty true use_thys ["Reg_Exp_Example"]); - + if not (getenv "EXEC_SWIPL" = "") orelse (getenv "SWIPL_VERSION" = "5.10.1") then + (use_thys [ + "Code_Prolog_Examples", + "Context_Free_Grammar_Example", + "Hotel_Example_Prolog", + "Lambda_Example", + "List_Examples"]; + Unsynchronized.setmp quick_and_dirty true use_thys ["Reg_Exp_Example"]) + else (warning "Unsupported SWI-Prolog version - skipping some example theories"; ()); diff -r 997d6fb439a9 -r 783c23f6afbf src/HOL/Tools/Predicate_Compile/etc/settings --- a/src/HOL/Tools/Predicate_Compile/etc/settings Thu Oct 28 17:54:25 2010 +0200 +++ b/src/HOL/Tools/Predicate_Compile/etc/settings Thu Oct 28 18:36:34 2010 +0200 @@ -1,13 +1,16 @@ EXEC_SWIPL=$(choosefrom \ - "$ISABELLE_HOME/contrib/swipl/bin/swipl" \ - "$ISABELLE_HOME/contrib_devel/swipl/bin/swipl" \ + "$ISABELLE_HOME/contrib/swipl/$ISABELLE_PLATFORM/bin/swipl" \ + "$ISABELLE_HOME/contrib_devel/swipl/$ISABELLE_PLATFORM/bin/swipl" \ "$ISABELLE_HOME/../swipl" \ $(type -p swipl) \ "") EXEC_YAP=$(choosefrom \ - "$ISABELLE_HOME/contrib/yap" \ + "$ISABELLE_HOME/contrib/yap/$ISABELLE_PLATFORM/bin/yap" \ + "$ISABELLE_HOME/contrib_devel/yap/$ISABELLE_PLATFORM/bin/yap" \ "$ISABELLE_HOME/../yap" \ $(type -p yap) \ "") + +SWIPL_VERSION=$("$COMPONENT/lib/scripts/swipl_version") diff -r 997d6fb439a9 -r 783c23f6afbf src/HOL/Tools/Predicate_Compile/lib/scripts/swipl_version --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/HOL/Tools/Predicate_Compile/lib/scripts/swipl_version Thu Oct 28 18:36:34 2010 +0200 @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +# +# Author: Lukas Bulwahn, TU Muenchen, 2010 +# +# Determine SWI-Prolog version + +if [ "$EXEC_SWIPL" = "" ]; then + echo "" +else + VERSION=`$EXEC_SWIPL --version` + echo `expr match "$VERSION" 'SWI-Prolog version \([0-9\.]*\)'` +fi