diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 974bde31..fc55a458 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -2348,6 +2348,14 @@ Zephir: extensions: - .zep +Zimpl: + type: programming + lexer: Text only + extensions: + - .zimpl + - .zmpl + - .zpl + eC: type: programming search_term: ec diff --git a/lib/linguist/samples.json b/lib/linguist/samples.json index ac1a92ea..0e223fd2 100644 --- a/lib/linguist/samples.json +++ b/lib/linguist/samples.json @@ -660,6 +660,9 @@ ], "Zephir": [ ".zep" + ], + "Zimpl": [ + ".zmpl" ] }, "interpreters": { @@ -726,8 +729,8 @@ ".gemrc" ] }, - "tokens_total": 612602, - "languages_total": 798, + "tokens_total": 612725, + "languages_total": 799, "tokens": { "ABAP": { "*/**": 1, @@ -66571,6 +66574,47 @@ "convert": 1, "converter": 2, "getConverters": 1 + }, + "Zimpl": { + "#": 2, + "param": 1, + "columns": 2, + ";": 7, + "set": 3, + "I": 3, + "{": 2, + "..": 1, + "}": 2, + "IxI": 6, + "*": 2, + "TABU": 4, + "[": 8, + "": 3, + "in": 5, + "]": 8, + "": 2, + "with": 1, + "(": 6, + "m": 4, + "i": 8, + "or": 3, + "n": 4, + "j": 8, + ")": 6, + "and": 1, + "abs": 2, + "-": 3, + "var": 1, + "x": 4, + "binary": 1, + "maximize": 1, + "queens": 1, + "sum": 2, + "subto": 1, + "c1": 1, + "forall": 1, + "do": 1, + "card": 2 } }, "language_tokens": { @@ -66757,7 +66801,8 @@ "XSLT": 44, "Xtend": 399, "YAML": 77, - "Zephir": 1026 + "Zephir": 1026, + "Zimpl": 123 }, "languages": { "ABAP": 1, @@ -66943,7 +66988,8 @@ "XSLT": 1, "Xtend": 2, "YAML": 2, - "Zephir": 2 + "Zephir": 2, + "Zimpl": 1 }, - "md5": "e41e5530c6efe39b710ace7e1d5d318c" + "md5": "482e5e1de8ec47e0b556809c8fe6f62b" } \ No newline at end of file diff --git a/samples/Zimpl/sample.zmpl b/samples/Zimpl/sample.zmpl new file mode 100644 index 00000000..ade112cd --- /dev/null +++ b/samples/Zimpl/sample.zmpl @@ -0,0 +1,21 @@ +# $Id: queens3.zpl,v 1.3 2009/09/13 16:15:53 bzfkocht Exp $ +# +# This is a formulation of the n queens problem using binary variables. +# variables. Since the number of queens is maximized, the size of the +# board can be set arbitrarily. +# +param columns := 8; + +set I := { 1 .. columns }; +set IxI := I * I; + +set TABU[ in IxI] := { in IxI with + (m != i or n != j) and (m == i or n == j or abs(m - i) == abs(n - j)) }; + +var x[IxI] binary; + +maximize queens: sum in IxI : x[i,j]; + +subto c1: forall in IxI do + card(TABU[i,j]) - card(TABU[i,j]) * x[i,j] >= sum in TABU[i,j] : x[m,n]; +