# Experimental

**URL:** https://alloytools.discourse.group/c/experimental/8.md

[Latest](https://alloytools.discourse.group/latest.md) · [Categories](https://alloytools.discourse.group/categories.md)

---

## [About the Experimental category](https://alloytools.discourse.group/t/about-the-experimental-category/32)

<div class="topic-metadata">

**Author:** [@peter.kriens](https://alloytools.discourse.group/u/peter.kriens)\
**Replies:** 0

</div>

Disscussions about experiments with the Alloy code base

---

## [New Parser using ANTLR](https://alloytools.discourse.group/t/new-parser-using-antlr/517)

<div class="topic-metadata">

**Author:** [@peter.kriens](https://alloytools.discourse.group/u/peter.kriens)\
**Replies:** 11\
**Last updated:** [August 5, 2025, 4:01pm UTC](https://alloytools.discourse.group/t/new-parser-using-antlr/517 "2025-08-05T16:01:05Z")

</div>

The current code base of Alloy started in the '90’s and has been worked on by a lot of very smart graduate students. Some of the code is absolutely brilliant but the age of the code base is clearly showing. Since Alloy s…

---

## [How to run a specific predicate in an Alloy command via the API?](https://alloytools.discourse.group/t/how-to-run-a-specific-predicate-in-an-alloy-command-via-the-api/531)

<div class="topic-metadata">

**Author:** [@aditya.shankar](https://alloytools.discourse.group/u/aditya.shankar)\
**Replies:** 1\
**Last updated:** [April 1, 2025, 9:25am UTC](https://alloytools.discourse.group/t/how-to-run-a-specific-predicate-in-an-alloy-command-via-the-api/531 "2025-04-01T09:25:46Z")

</div>

We add an Alloy predicate defn to a CompModule using the method addFunc() in file CompModule.java. We then use the method CompModule.addCommand() (the version that takes an ExprVar as an argument) to add a command that c…

---

## [Making some operations complete](https://alloytools.discourse.group/t/making-some-operations-complete/528)

<div class="topic-metadata">

**Author:** [@peter.kriens](https://alloytools.discourse.group/u/peter.kriens)\
**Replies:** 3\
**Last updated:** [March 30, 2025, 3:49pm UTC](https://alloytools.discourse.group/t/making-some-operations-complete/528 "2025-03-30T15:49:38Z")

</div>

In Alloy, some operators are not defined for all relations. For example, transpose ('~'), range, or domain are only defined for binary relations. However, I am implementing a Java class for the new parser that models a r…

---

## [The Surprising Complexity of Alloy parsing](https://alloytools.discourse.group/t/the-surprising-complexity-of-alloy-parsing/524)

<div class="topic-metadata">

**Author:** [@peter.kriens](https://alloytools.discourse.group/u/peter.kriens)\
**Replies:** 0\
**Last updated:** [March 18, 2025, 10:37am UTC](https://alloytools.discourse.group/t/the-surprising-complexity-of-alloy-parsing/524 "2025-03-18T10:37:23Z")

</div>

Once you understand that a value in Alloy is always a relation (a set of tuples of atoms) the Alloy syntax is surprisingly easy to write; the syntax flows very well. This is, however, a bit of a mirage. The underlying mo…

---

## [PlusCal in Alloy](https://alloytools.discourse.group/t/pluscal-in-alloy/59)

<div class="topic-metadata">

**Author:** [@peter.kriens](https://alloytools.discourse.group/u/peter.kriens)\
**Replies:** 32\
**Last updated:** [November 12, 2024, 1:52pm UTC](https://alloytools.discourse.group/t/pluscal-in-alloy/59 "2024-11-12T13:52:03Z")

</div>

I’ve been playing with Alloy (Electrum version) and added a ‘PlusCal’ like feature to Alloy. I finally got the basics to work and I am looking for some expert feedback. I know PlusCal is for us, the deplorable developer …

---

## [The use of Alloy and LLM's](https://alloytools.discourse.group/t/the-use-of-alloy-and-llms/449)

<div class="topic-metadata">

**Author:** [@peter.kriens](https://alloytools.discourse.group/u/peter.kriens)\
**Replies:** 5\
**Last updated:** [September 30, 2024, 2:58pm UTC](https://alloytools.discourse.group/t/the-use-of-alloy-and-llms/449 "2024-09-30T14:58:26Z")

</div>

I’ve been heavily engaged with GPT-4 recently. It is fascinating how much it knows but trying to use it in a real setting (controlling the Eclipse IDE) it is a nightmare, it does some things surprisingly well but then ma…

---

## [OpenAI supports Alloy](https://alloytools.discourse.group/t/openai-supports-alloy/305)

<div class="topic-metadata">

**Author:** [@peter.kriens](https://alloytools.discourse.group/u/peter.kriens)\
**Replies:** 3\
**Last updated:** [December 10, 2022, 10:06pm UTC](https://alloytools.discourse.group/t/openai-supports-alloy/305 "2022-12-10T22:06:47Z")

</div>

I’ve been blown away by OpenAI in general but the cherry on the top of the cake is undoubtedly that it supports Alloy! Just ask for a model of the Einstein puzzle or a DAG! Didn’t think it would happen in my time …

---

## [Alloy API ... again](https://alloytools.discourse.group/t/alloy-api-again/221)

<div class="topic-metadata">

**Author:** [@peter.kriens](https://alloytools.discourse.group/u/peter.kriens)\
**Replies:** 7\
**Last updated:** [November 22, 2022, 7:18pm UTC](https://alloytools.discourse.group/t/alloy-api-again/221 "2022-11-22T19:18:45Z")

</div>

I’ve revived an API project that I started a couple of years ago. The proposed API creates interfaces for all the important Alloy objects (compiler, solvers, visualizers, solutions, instances, relations, tuples, and atom…

---

## [Test cases for Alloy](https://alloytools.discourse.group/t/test-cases-for-alloy/222)

<div class="topic-metadata">

**Author:** [@peter.kriens](https://alloytools.discourse.group/u/peter.kriens)\
**Replies:** 11\
**Last updated:** [March 31, 2022, 2:28am UTC](https://alloytools.discourse.group/t/test-cases-for-alloy/222 "2022-03-31T02:28:54Z")

</div>

I am looking for test cases for Alloy. Test cases can be written in Alloy. For example, the following is a test of some integer operations. During the build, we run all these tests and verify their expected outcomes. (ex…

---

## [Dash extension to Alloy Analyzer](https://alloytools.discourse.group/t/dash-extension-to-alloy-analyzer/230)

<div class="topic-metadata">

**Author:** [@nday](https://alloytools.discourse.group/u/nday)\
**Replies:** 2\
**Last updated:** [March 11, 2022, 7:59pm UTC](https://alloytools.discourse.group/t/dash-extension-to-alloy-analyzer/230 "2022-03-11T19:59:08Z")

</div>

We are excited to release our first version of support for Dash editing/translation/execution within the Alloy Analyzer version 6. You can find our fork of the Alloy code base at: The default branch is ‘dash’ for our …

---

## [References and Containment](https://alloytools.discourse.group/t/references-and-containment/150)

<div class="topic-metadata">

**Author:** [@peter.kriens](https://alloytools.discourse.group/u/peter.kriens)\
**Replies:** 4\
**Last updated:** [March 12, 2021, 8:06pm UTC](https://alloytools.discourse.group/t/references-and-containment/150 "2021-03-12T20:06:31Z")

</div>

My use case for Alloy is probably a bit different from academics. I am not so much interested in proving something is correct since I know developers can still screw up a perfect specification. A fact of life that is wor…
