This is an automated email from the ASF dual-hosted git repository.
git-site-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/groovy-dev-site.git
The following commit(s) were added to refs/heads/asf-site by this push:
new b28f752 2026/03/24 09:37:58: Generated dev website from
groovy-website@e9b4457
b28f752 is described below
commit b28f752b89db4ff7388f1a877465cd93fb560a3f
Author: jenkins <[email protected]>
AuthorDate: Tue Mar 24 09:37:58 2026 +0000
2026/03/24 09:37:58: Generated dev website from groovy-website@e9b4457
---
blog/feed.atom | 13 ++++++++++++-
blog/index.html | 4 ++--
blog/loop-invariants.html | 17 ++++++++++-------
search/search-index.json | 4 ++--
4 files changed, 26 insertions(+), 12 deletions(-)
diff --git a/blog/feed.atom b/blog/feed.atom
index 5145680..a6cf129 100644
--- a/blog/feed.atom
+++ b/blog/feed.atom
@@ -4,7 +4,18 @@
<link href="http://groovy.apache.org/blog"/>
<link href="http://groovy.apache.org/blog/feed.atom" rel="self"/>
<id>http://groovy.apache.org/blog</id>
- <updated>2026-01-22T14:00:00Z</updated>
+ <updated>2026-03-24T16:30:00Z</updated>
+ <entry>
+ <id>http://groovy.apache.org/blog/loop-invariants</id>
+ <author>
+ <name>Paul King</name>
+ </author>
+ <title type="html">Design by contract with Groovy&trade;: loop
invariants</title>
+ <link href="http://groovy.apache.org/blog/loop-invariants"/>
+ <updated>2026-03-24T16:30:00Z</updated>
+ <published>2026-03-24T16:30:00Z</published>
+ <summary type="html">This post looks at a proposed extension to Groovy's
design-by-contract support in groovy-contracts to allow invariants on
loops.</summary>
+ </entry>
<entry>
<id>http://groovy.apache.org/blog/fruity-eclipse-grouping</id>
<author>
diff --git a/blog/index.html b/blog/index.html
index ae7c836..56fd109 100644
--- a/blog/index.html
+++ b/blog/index.html
@@ -59,7 +59,7 @@
</ul>
</div>
</div>
- </div><div id='content' class='page-1'><div
class='row'><div class='row-fluid'><div class='col-lg-3' id='blog-index'><ul
class='nav-sidebar list'><li class='active'><a
href='/blog/'>Blogs</a></li><li><a href='groovy-graph-databases'>Using Graph
Databases with Groovy™</a></li><li><a
href='fruity-eclipse-grouping'>Grouping Fruity Collections</a></li><li><a
href='groovy-ai'>Exploring AI with Groovy™</a></li><li><a
href='embabel-agentic-patterns'>Groovy&tr [...]
+ </div><div id='content' class='page-1'><div
class='row'><div class='row-fluid'><div class='col-lg-3' id='blog-index'><ul
class='nav-sidebar list'><li class='active'><a
href='/blog/'>Blogs</a></li><li><a href='loop-invariants'>Design by contract
with Groovy™: loop invariants</a></li><li><a
href='groovy-graph-databases'>Using Graph Databases with
Groovy™</a></li><li><a href='fruity-eclipse-grouping'>Grouping Fruity
Collections</a></li><li><a href='groovy [...]
<div class='row'>
<div class='colset-3-footer'>
<div class='col-1'>
@@ -103,7 +103,7 @@
colors: am5.ColorSet.new(root, {})
}));
wc.data.setAll([
- { category: "groovy", value: 88 }, { category: "asf", value: 2
}, { category: "apachecon", value: 3 }, { category: "communityovercode", value:
2 }, { category: "natural language processing", value: 2 }, { category: "nlp",
value: 1 }, { category: "nlpcraft", value: 1 }, { category: "combinations",
value: 1 }, { category: "permutations", value: 1 }, { category: "testing",
value: 2 }, { category: "junit", value: 2 }, { category: "spock", value: 2 }, {
category: "jqwik", valu [...]
+ { category: "groovy", value: 89 }, { category: "asf", value: 2
}, { category: "apachecon", value: 3 }, { category: "communityovercode", value:
2 }, { category: "natural language processing", value: 2 }, { category: "nlp",
value: 1 }, { category: "nlpcraft", value: 1 }, { category: "combinations",
value: 1 }, { category: "permutations", value: 1 }, { category: "testing",
value: 2 }, { category: "junit", value: 2 }, { category: "spock", value: 2 }, {
category: "jqwik", valu [...]
]);
wc.labels.template.setAll({
paddingTop: 5,
diff --git a/blog/loop-invariants.html b/blog/loop-invariants.html
index 653e0bd..14f1cc8 100644
--- a/blog/loop-invariants.html
+++ b/blog/loop-invariants.html
@@ -3,7 +3,7 @@
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--><head>
- <meta charset='utf-8'/><meta http-equiv='X-UA-Compatible'
content='IE=edge'/><meta name='viewport' content='width=device-width,
initial-scale=1'/><meta name='keywords' content='design -by-contract, groovy,
dafny, loop invariants'/><meta name='description' content='This post looks at a
proposed extension to Groovy's design-by-contract support in
groovy-contracts to allow invariants on loops.'/><title>The Apache Groovy
programming language - Blogs - Design by contract with Groovy& [...]
+ <meta charset='utf-8'/><meta http-equiv='X-UA-Compatible'
content='IE=edge'/><meta name='viewport' content='width=device-width,
initial-scale=1'/><meta name='keywords' content='design-by-contract, groovy,
dafny, loop invariants'/><meta name='description' content='This post looks at a
proposed extension to Groovy's design-by-contract support in
groovy-contracts to allow invariants on loops.'/><title>The Apache Groovy
programming language - Blogs - Design by contract with Groovy&t [...]
</head><body>
<div id='fork-me'>
<a href='https://github.com/apache/groovy'>
@@ -229,17 +229,20 @@ static int multiply(int m, int n) {
</table>
<div class="paragraph">
<p>Groovy’s <code>@Ensures</code> uses the special variable
<code>result</code> to refer to the
-method’s return value, whereas Dafny uses a named return variable
(<code>res</code>).
+method’s return value, and we define a local variable <code>res</code>
to keep the
+tally so far during our looping.
+The Dafny example uses a named return variable (<code>res</code>) and mutates
that variable
+during looping.
Dafny also allows chained comparisons like <code>0 <= i <= n</code>,
which Groovy
-spells as <code>0 <= i && i <= n</code>. Otherwise the structure
is the same.</p>
+splits into <code>0 <= i && i <= n</code>. Otherwise, the
structure is the same.</p>
</div>
<div class="paragraph">
<p>Groovy is a very extensible language. It would be possible to enhance the
-groovy-contracts transforms to make similar calls to a static verifier
-like Dafny does, or make transforms act like a transpiler,
+<code>groovy-contracts</code> transforms to make similar calls to a static
verifier
+like Dafny does, or make the transforms act like a transpiler,
making Groovy an alternative front-end syntax for Dafny.
-But that isn’t what Groovy is proposing to do right now,
-instead here we enhance the existing design-by-contract features
+But that isn’t what Groovy is proposing to do right now;
+instead, here we enhance the existing design-by-contract features
and inject assertions within the body of the loop code.</p>
</div>
<div class="paragraph">
diff --git a/search/search-index.json b/search/search-index.json
index a648d84..1a3f3ef 100644
--- a/search/search-index.json
+++ b/search/search-index.json
@@ -149,7 +149,7 @@
{
"id": "blog/loop-invariants.html",
"title": "The Apache Groovy programming language - Blogs - Design by
contract with Groovy™: loop invariants",
- "content": "The Apache Groovy programming language - Blogs - Design by
contract with Groovy™: loop invariants Socialize Discuss on the mailing
list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events
and conferences Source code on GitHub Report issues in Jira Stack Overflow
questions Slack Community You are using an outdated browser. Please upgrade
your browser to improve your experience. Apache Groovy™ Learn
Documentation Download Support Contr [...]
+ "content": "The Apache Groovy programming language - Blogs - Design by
contract with Groovy™: loop invariants Socialize Discuss on the mailing
list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events
and conferences Source code on GitHub Report issues in Jira Stack Overflow
questions Slack Community You are using an outdated browser. Please upgrade
your browser to improve your experience. Apache Groovy™ Learn
Documentation Download Support Contr [...]
"url": "blog/loop-invariants.html",
"site": "dev"
},
@@ -681,7 +681,7 @@
{
"id": "blog/index.html",
"title": "The Apache Groovy programming language - Blogs",
- "content": "The Apache Groovy programming language - Blogs Socialize
Discuss on the mailing list Groovy on X Groovy on Bluesky Groovy on Mastodon
Groovy on LinkedIn Events and conferences Source code on GitHub Report issues
in Jira Stack Overflow questions Slack Community You are using an outdated
browser. Please upgrade your browser to improve your experience. Apache
Groovy™ Learn Documentation Download Support Contribute Ecosystem Blog
posts Socialize Blogs Using Graph Da [...]
+ "content": "The Apache Groovy programming language - Blogs Socialize
Discuss on the mailing list Groovy on X Groovy on Bluesky Groovy on Mastodon
Groovy on LinkedIn Events and conferences Source code on GitHub Report issues
in Jira Stack Overflow questions Slack Community You are using an outdated
browser. Please upgrade your browser to improve your experience. Apache
Groovy™ Learn Documentation Download Support Contribute Ecosystem Blog
posts Socialize Blogs Design by cont [...]
"url": "blog/index.html",
"site": "dev"
},