Commit c0100ed0 authored by Vivien Kraus's avatar Vivien Kraus
Browse files

Merge branch '178-purge-the-useless-code' into 'develop'

Resolve "Purge the useless code"

Closes #178

See merge request !184
parents 83bd66de 2d31cf61
Pipeline #206694 passed with stages
in 43 minutes and 6 seconds
......@@ -50,14 +50,11 @@
/doc/petit-sec.c
/doc/players-and-cards
/doc/players-and-cards.c
/doc/tarot-cnn-features.man
/doc/tarot-cnn.man
/doc/tarot-deal.man
/doc/tarot-features.man
/doc/tarot-figures
/doc/tarot-mcts.man
/doc/tarot-perceptron-bootstrap.man
/doc/tarot-stacking.man
/doc/tarot-status.man
/doc/tarot-tune
/doc/tarot.info
......@@ -84,9 +81,6 @@
/ltmain.sh
/m4
/missing
/model/linear-*.h
/model/stacking.h
/model/tree-*.h
/nsi/setup.nsi
/nsi/tarot.ico
/po/*.gmo
......@@ -112,8 +106,6 @@
/snippet
/src/gettext.h
/src/libtarot/cards/check-cards
/src/libtarot/features/features-header-encoded.txt
/src/libtarot/features/features-header.txt
/src/libtarot/gobject/tarot-enums-stamp
/src/libtarot/gobject/tarot-gobject.c
/src/libtarot/gobject/tarot-gobject.h
......@@ -150,14 +142,11 @@
/src/tarot-app/resources.c
/src/tarot-app/server.c
/src/tarot-app/tarot
/src/tarot-app/tarot-cnn
/src/tarot-app/tarot-cnn-features
/src/tarot-app/tarot-deal
/src/tarot-app/tarot-en
/src/tarot-app/tarot-features
/src/tarot-app/tarot-mcts
/src/tarot-app/tarot-parser-stamp
/src/tarot-app/tarot-stacking
/src/tarot-app/tarot-status
/src/tarot-app/tarot-vala-stamp
/src/tarot-app/tarot_app.h
......
# tarot implements the rules of the tarot game
# Copyright (C) 2017, 2018, 2019 Vivien Kraus
# Copyright (C) 2017, 2018, 2019, 2020 Vivien Kraus
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -49,10 +49,6 @@ deb:
- public
expire_in: 1 week
generate:
stage: check
script: "./ci/generate.sh"
pages:
stage: manual
script: "./ci/pages.sh"
......
......@@ -43,7 +43,6 @@ include screenshots/Makefile.am
include nsi/Makefile.am
include debian/Makefile.am
include flatpak/Makefile.am
include model/Makefile.am
include git-check.am
include copyright/Makefile.am
include guix/Makefile.am
......@@ -58,9 +57,9 @@ AM_CPPFLAGS += \
-DLIBTAROT_VERSION_INFO="\"$(LIBTOOL_CURRENT):$(LIBTOOL_REVISION):$(LIBTOOL_AGE)\""
AM_YFLAGS = -d
AM_CFLAGS += \
$(NETTLE_CFLAGS) $(XML_CFLAGS) $(OPENMP_CFLAGS)
$(NETTLE_CFLAGS) $(OPENMP_CFLAGS)
AM_LDADD += \
$(NETTLE_LIBS) $(XML_LIBS) $(GUILE_LIBS) $(OPENMP_LIBS) \
$(NETTLE_LIBS) $(GUILE_LIBS) $(OPENMP_LIBS) \
$(LIBTHREAD) \
$(LIB_SETLOCALE) \
$(LIB_SETLOCALE_NULL) \
......
# tarot implements the rules of the tarot game
# Copyright (C) 2018, 2019 Vivien Kraus
# Copyright (C) 2018, 2019, 2020 Vivien Kraus
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -18,6 +18,4 @@ EXTRA_DIST += \
%reldir%/pages.sh \
%reldir%/check.sh \
%reldir%/mingw.sh \
%reldir%/generate.sh \
%reldir%/generate-seed.sh \
%reldir%/deb.sh
#!/bin/sh
# tarot implements the rules of the tarot game
# Copyright (C) 2019 Vivien Kraus
# Copyright (C) 2019, 2020 Vivien Kraus
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -20,8 +20,6 @@ apt-get install -y \
build-essential \
guile-2.2-dev \
libglib2.0-dev \
libxml2 \
libxml2-dev \
nettle-dev \
pkg-config \
valgrind
......
#!/bin/sh
# tarot implements the rules of the tarot game
# Copyright (C) 2019 Vivien Kraus
# Copyright (C) 2019, 2020 Vivien Kraus
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -22,8 +22,6 @@ apt-get install -y \
libglib2.0-dev \
libgtk-3-0 \
libgtk-3-dev \
libxml2 \
libxml2-dev \
nettle-dev \
pkg-config \
valgrind \
......
#!/bin/sh
# tarot implements the rules of the tarot game
# Copyright (C) 2019 Vivien Kraus
# Copyright (C) 2019, 2020 Vivien Kraus
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -47,8 +47,6 @@ apt-get install -y \
libglib2.0-dev \
libgtk-3-dev \
libtool \
libxml2 \
libxml2-dev \
libxml2-utils \
make \
nettle-dev \
......
#!/bin/sh
# tarot implements the rules of the tarot game
# Copyright (C) 2019 Vivien Kraus
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
seed="$1"
version=$(cat ../dist/version)
for n_players in 3 4 5
do
>&2 echo "Generating $seed for version $version, $n_players players"
(tarot-deal -n $n_players -s $seed | tarot-mcts --generate -s $seed > $seed-${n_players}p.tarot-t \
&& mv $seed-${n_players}p.tarot-t dataset/generated/mcts/$seed-${n_players}p.tarot \
&& echo "no" > /tmp/all-mcts-${n_players}p-failed) \
|| >&2 echo "It failed."
(tarot-deal -n $n_players -s $seed | tarot-stacking --generate > $seed-${n_players}p.tarot-t \
&& mv $seed-${n_players}p.tarot-t dataset/generated/stacking/$version-$seed-${n_players}p.tarot \
&& echo "no" > /tmp/all-stacking-${n_players}p-failed) \
|| >&2 echo "It failed."
if [ "x$n_players" = "x5" ]
then
>&2 echo "Generating $seed for verision $version, 5 players with call"
(tarot-deal -n 5 -c -s $seed | tarot-mcts --generate -s $seed > $seed-5pc.tarot-t \
&& mv $seed-5pc.tarot-t dataset/generated/mcts/$seed-5pc.tarot \
&& echo "no" > /tmp/all-mcts-5pc-failed) \
|| >&2 echo "It failed."
(tarot-deal -n 5 -c -s $seed | tarot-stacking --generate > $seed-5pc.tarot-t \
&& mv $seed-5pc.tarot-t dataset/generated/stacking/$version-$seed-5pc.tarot \
&& echo "no" > /tmp/all-stacking-5pc-failed) \
|| >&2 echo "It failed."
fi
done
#!/bin/sh
# tarot implements the rules of the tarot game
# Copyright (C) 2019 Vivien Kraus
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
apt-get update
apt-get upgrade -y
apt-get install -y \
build-essential \
curl \
git \
guile-2.2-dev \
libcairo2-dev \
libgirepository1.0-dev \
libglib2.0-dev \
libgtk-3-dev \
libxml2 \
libxml2-dev \
nettle-dev \
parallel \
pkg-config \
valgrind
VERSION=$(cat dist/version)
cp dist/tarot-$VERSION.tar.gz . || exit 1
tar xf tarot-$VERSION.tar.gz || exit 1
mkdir build || exit 1
cd build/
../tarot-$VERSION/configure \
--enable-silent-rules=yes \
--enable-valgrind=yes \
|| (cat config.log; exit 1)
make -j 16 || exit 1
make install || exit 1
export PATH="/usr/local/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
mkdir /root/.ssh || exit 1
echo "$SSH_KEY" > /root/.ssh/id_rsa || exit 1
echo "$SSH_KEY_PUB" > /root/.ssh/id_rsa.pub || exit 1
echo "$SSH_KNOWN_HOSTS" > /root/.ssh/known_hosts || exit 1
chmod go-rwx /root/.ssh/id_rsa || exit 1
git config --global user.email "vivien@planete-kraus.eu" || exit 1
git config --global user.name "Gitlab CI for the tarot package" || exit 1
git clone git@framagit.org:play-tarot/datasets.git dataset/ || exit 1
rm -rf dataset/generated/mcts
mkdir -p dataset/generated/mcts || exit 1
mkdir -p dataset/generated/stacking || exit 1
seq 1 10 | parallel ../tarot-$VERSION/ci/generate-seed.sh {}
for check in /tmp/all-*-*-failed
do
if test "x$(cat $check)" != "xno"
then
echo "Could not generate anything for test '$check'."
exit 1
fi
done
#!/bin/sh
# tarot implements the rules of the tarot game
# Copyright (C) 2019 Vivien Kraus
# Copyright (C) 2019, 2020 Vivien Kraus
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -26,7 +26,6 @@ dnf install -y \
\
mingw64-gcc \
mingw64-nettle \
mingw64-libxml2 \
mingw64-glib2 \
mingw64-cairo \
mingw64-gtk3 \
......
#!/bin/sh
# tarot implements the rules of the tarot game
# Copyright (C) 2019 Vivien Kraus
# Copyright (C) 2019, 2020 Vivien Kraus
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -20,8 +20,6 @@ apt-get install -y \
build-essential \
jq \
libglib2.0-dev \
libxml2 \
libxml2-dev \
nettle-dev \
pkg-config \
texinfo \
......
......@@ -124,7 +124,6 @@ AS_IF([test "x$enable_program" != "xno"], [
])
])
AX_LIB_NETTLE([yes])
PKG_CHECK_MODULES([XML], [libxml-2.0])
AC_ARG_WITH([gobject], AS_HELP_STRING([--without-gobject], [Do not build the GObject bindings]))
WITH_GOBJECT="no"
AS_IF([test "x$with_gobject" != "xno"], [
......
# tarot implements the rules of the tarot game
# Copyright (C) 2019 Vivien Kraus
# Copyright (C) 2019, 2020 Vivien Kraus
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -17,7 +17,6 @@ check_PROGRAMS += \
%reldir%/basic-initialization \
%reldir%/players-and-cards \
%reldir%/events \
%reldir%/xml \
%reldir%/petit-sec \
%reldir%/duplicate-a-posteriori \
%reldir%/dumb-ai
......@@ -25,7 +24,6 @@ check_PROGRAMS += \
%canon_reldir%_basic_initialization_LDADD = src/libtarot/libtarot.la $(AM_LDADD)
%canon_reldir%_players_and_cards_LDADD = src/libtarot/libtarot.la $(AM_LDADD)
%canon_reldir%_events_LDADD = src/libtarot/libtarot.la $(AM_LDADD)
%canon_reldir%_xml_LDADD = src/libtarot/libtarot.la $(AM_LDADD)
%canon_reldir%_petit_sec_LDADD = src/libtarot/libtarot.la $(AM_LDADD)
%canon_reldir%_duplicate_a_posteriori_LDADD = src/libtarot/libtarot.la $(AM_LDADD)
%canon_reldir%_dumb_ai_LDADD = src/libtarot/libtarot.la $(AM_LDADD)
# tarot implements the rules of the tarot game
# Copyright (C) 2019 Vivien Kraus
# Copyright (C) 2019, 2020 Vivien Kraus
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -15,23 +15,9 @@
dist_man6_MANS += \
%reldir%/tarot.man \
%reldir%/tarot-status.man \
%reldir%/tarot-deal.man \
%reldir%/tarot-mcts.man \
%reldir%/tarot-stacking.man \
%reldir%/tarot-features.man \
%reldir%/tarot-cnn-features.man \
%reldir%/tarot-cnn.man \
%reldir%/tarot-perceptron-bootstrap.man
MAINTAINERCLEANFILES += \
$(srcdir)/%reldir%/tarot.man \
$(srcdir)/%reldir%/tarot-status.man \
$(srcdir)/%reldir%/tarot-deal.man \
$(srcdir)/%reldir%/tarot-mcts.man \
$(srcdir)/%reldir%/tarot-stacking.man \
$(srcdir)/%reldir%/tarot-features.man \
$(srcdir)/%reldir%/tarot-cnn-features.man \
$(srcdir)/%reldir%/tarot-cnn.man \
$(srcdir)/%reldir%/tarot-perceptron-bootstrap.man
help2man_verbose = $(help2man_verbose_@AM_V@)
......@@ -42,34 +28,6 @@ $(srcdir)/%reldir%/tarot.man: src/tarot-app/main.vala
$(MAKE) $(AM_MAKEFLAGS) src/tarot-app/tarot
$(help2man_verbose) ./pre-inst-env help2man tarot > $(srcdir)/%reldir%/tarot.man
$(srcdir)/%reldir%/tarot-status.man: src/tarot-app/tarot_status.c
$(MAKE) $(AM_MAKEFLAGS) src/tarot-app/tarot-status
$(help2man_verbose) ./pre-inst-env help2man tarot-status > $@
$(srcdir)/%reldir%/tarot-deal.man: src/tarot-app/tarot_deal.c
$(MAKE) $(AM_MAKEFLAGS) src/tarot-app/tarot-deal
$(help2man_verbose) ./pre-inst-env help2man tarot-deal > $@
$(srcdir)/%reldir%/tarot-mcts.man: src/tarot-app/tarot_mcts.c
$(MAKE) $(AM_MAKEFLAGS) src/tarot-app/tarot-mcts
$(help2man_verbose) ./pre-inst-env help2man tarot-mcts > $@
$(srcdir)/%reldir%/tarot-stacking.man: src/tarot-app/tarot_stacking.c
$(MAKE) $(AM_MAKEFLAGS) src/tarot-app/tarot-stacking
$(help2man_verbose) ./pre-inst-env help2man tarot-stacking > $@
$(srcdir)/%reldir%/tarot-features.man: src/tarot-app/tarot_features.c
$(MAKE) $(AM_MAKEFLAGS) src/tarot-app/tarot-features
$(help2man_verbose) ./pre-inst-env help2man tarot-features > $@
$(srcdir)/%reldir%/tarot-cnn-features.man: src/tarot-app/tarot_cnn_features.c
$(MAKE) $(AM_MAKEFLAGS) src/tarot-app/tarot-cnn-features
$(help2man_verbose) ./pre-inst-env help2man tarot-cnn-features > $@
$(srcdir)/%reldir%/tarot-cnn.man: src/tarot-app/tarot_cnn.c
$(MAKE) $(AM_MAKEFLAGS) src/tarot-app/tarot-cnn
$(help2man_verbose) ./pre-inst-env help2man tarot-cnn > $@
$(srcdir)/%reldir%/tarot-perceptron-bootstrap.man: src/tarot-app/tarot_perceptron_bootstrap.c
$(MAKE) $(AM_MAKEFLAGS) src/tarot-app/tarot-perceptron-bootstrap
$(help2man_verbose) ./pre-inst-env help2man tarot-perceptron-bootstrap > $@
# tarot implements the rules of the tarot game
# Copyright (C) 2017, 2018, 2019 Vivien Kraus
# Copyright (C) 2017, 2018, 2019, 2020 Vivien Kraus
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -18,7 +18,6 @@ TANGLED = \
$(srcdir)/%reldir%/players-and-cards.c \
$(srcdir)/%reldir%/events.c \
$(srcdir)/%reldir%/petit-sec.c \
$(srcdir)/%reldir%/xml.c \
$(srcdir)/%reldir%/duplicate-a-posteriori.c \
$(srcdir)/%reldir%/dumb-ai.c \
$(srcdir)/%reldir%/tarot.rng
......
This diff is collapsed.
# tarot implements the rules of the tarot game
# Copyright (C) 2019 Vivien Kraus
# Copyright (C) 2019, 2020 Vivien Kraus
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -57,14 +57,7 @@ git-check:
>&2 echo "Ignoring Markdown file $$source (because org markdown exporter is not reproducible)";; \
*/.git/*);; \
*.po) \
if test $$($(DIFF) $$source ../../.gitcheck/source/$$source | wc -l) -eq '4' ; \
then \
>&2 echo "$$source: OK" ; \
else \
$(DIFF) $$source ../../.gitcheck/source/$$source ; \
>&2 echo "Error: $$source is checked in, but overwritten by a substantial bit. Maybe you should update the po files." ; \
exit 1; \
fi;; \
>&2 echo "Ignoring PO file $$source (because debian still has not upgraded to gettext 0.20...)";; \
*) \
if $(DIFF) $$source ../../.gitcheck/source/$$source ; \
then \
......
# tarot implements the rules of the tarot game
# Copyright (C) 2019, 2020 Vivien Kraus
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
modeldir = $(pkgdatadir)/model
dist_model_DATA = \
%reldir%/tree-1.model \
%reldir%/tree-2.model \
%reldir%/tree-3.model \
%reldir%/tree-4.model \
%reldir%/tree-5.model \
%reldir%/linear-1.model \
%reldir%/linear-2.model \
%reldir%/linear-3.model \
%reldir%/linear-4.model \
%reldir%/linear-5.model \
%reldir%/stacking.model
MODEL_SOURCE_HEADER_FILES = \
$(srcdir)/%reldir%/tree-1.h \
$(srcdir)/%reldir%/tree-2.h \
$(srcdir)/%reldir%/tree-3.h \
$(srcdir)/%reldir%/tree-4.h \
$(srcdir)/%reldir%/tree-5.h \
$(srcdir)/%reldir%/linear-1.h \
$(srcdir)/%reldir%/linear-2.h \
$(srcdir)/%reldir%/linear-3.h \
$(srcdir)/%reldir%/linear-4.h \
$(srcdir)/%reldir%/linear-5.h \
$(srcdir)/%reldir%/stacking.h
MAINTAINERCLEANFILES += $(MODEL_SOURCE_HEADER_FILES)
dist_noinst_SCRIPTS += $(PREDICTORS)
learn_verbose = $(learn_verbose_@AM_V@)
learn_verbose_ = $(learn_verbose_@AM_DEFAULT_V@)
learn_verbose_0 = @echo " LEARN " $@;
EXTRA_DIST += $(MODEL_SOURCE_HEADER_FILES) %reldir%/gen-c-code.xsl
BUILT_SOURCES += $(MODEL_SOURCE_HEADER_FILES)
AM_CPPFLAGS += -I %reldir% -I $(srcdir)/%reldir%
.model.h: %reldir%/gen-c-code.xsl
@$(MKDIR_P) %reldir%
$(AM_V_GEN) $(XSLTPROC) $(srcdir)/%reldir%/gen-c-code.xsl $< | $(INDENT) > $@-t
@mv $@-t $@
<?xml version="1.0" encoding="UTF-8"?>
<!-- tarot implements the rules of the tarot game
Copyright (C) 2019 Vivien Kraus
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, version 3 of the License.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="text" indent="no"/>
<xsl:strip-space elements="*" />
<xsl:template name="header">
<xsl:text>/* Do not edit this file, it has been generated from gen-c-code.xsl */&#xA;</xsl:text>
</xsl:template>
<xsl:template match="tree">
<xsl:call-template name="header" />
<xsl:apply-templates />
</xsl:template>
<xsl:template name="print-split-condition">
<xsl:param name="variable" />
<xsl:param name="operator" />
<xsl:param name="value" />
<xsl:value-of select="translate($variable, '-', '_')" />
<xsl:choose>
<xsl:when test="$operator = '='">
<xsl:text> == </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$operator" />
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="contains($value, ',')">
<xsl:value-of select="substring-before($value, ',')" />
<xsl:text> || </xsl:text>
<xsl:call-template name="print-split-condition">
<xsl:with-param name="variable" select="$variable" />
<xsl:with-param name="operator" select="$operator" />
<xsl:with-param name="value" select="substring-after($value, ',')" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$value" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="split">
<xsl:text>if (</xsl:text>
<xsl:call-template name="print-split-condition">
<xsl:with-param name="variable" select="@variable" />
<xsl:with-param name="operator" select="@operator" />
<xsl:with-param name="value" select="@value" />
</xsl:call-template>
<xsl:text>) {score = </xsl:text>
<xsl:value-of select="@score" />
<xsl:text>; </xsl:text>
<xsl:apply-templates />
<xsl:text>}</xsl:text>
</xsl:template>
<!-- Write the linear prediction -->
<xsl:template match="linear-model">
<xsl:call-template name="header" />
<xsl:text>score = 0;&#xA;</xsl:text>
<xsl:apply-templates />
</xsl:template>
<xsl:template match="interaction">
<xsl:text>score += </xsl:text>
<xsl:value-of select="@weight" />
<xsl:text>*(1</xsl:text>
<xsl:apply-templates />
<xsl:text>);&#xA;</xsl:text>
</xsl:template>
<xsl:template match="variable[@name != '(Intercept)']">
<xsl:text>* </xsl:text>
<xsl:value-of select="translate(@name, '-', '_')" />
</xsl:template>
<xsl:template match="variable[contains(@name, '_eq_')]">
<xsl:text>* (</xsl:text>
<xsl:value-of select="substring-before(@name, '_eq_')" />
<xsl:text> == </xsl:text>
<xsl:value-of select="substring-after(@name, '_eq_')" />
<xsl:text>)</xsl:text>
</xsl:template>
<xsl:template match="variable[contains(@name, '_leq_')]">
<xsl:text>* (</xsl:text>
<xsl:value-of select="substring-before(@name, '_leq_')" />
<xsl:text> &lt;= </xsl:text>
<xsl:value-of select="substring-after(@name, '_leq_')" />
<xsl:text>)</xsl:text>
</xsl:template>
</xsl:stylesheet>
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment