Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bringing permutation-minimal up to date #646

Open
wants to merge 248 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
248 commits
Select commit Hold shift + click to select a range
5d96384
Abandoning SetOfSequences rep
Sep 10, 2018
432b4cb
Some sketching of Function repr
Sep 10, 2018
cfdfcd7
Pulled in permutation-safe - basic tests now passing
Oct 4, 2018
75d7d10
housekeeping
Oct 4, 2018
4a42268
matrix <=lex permute(p,matrix) rule added for sym
Oct 9, 2018
78cfc0e
tuple <=lex permute(permutation,tuple) rule
Oct 10, 2018
d1c7ddb
Dotleq approach to be abandoned in favor of sledgehammer
Oct 15, 2018
8257b45
Integer Tags
Oct 17, 2018
2429d52
Adding tag to ConstantInt
Oct 18, 2018
77f3386
Merging
Oct 22, 2018
2c8d7f4
Merge branch 'taggedints' into permutationAsFunction
Nov 1, 2018
668ae50
Merge completed
Nov 1, 2018
568fdf2
Refactor
Nov 2, 2018
a698352
Updated Permute Matrix
Nov 2, 2018
8d671dc
Set permute rule working
Nov 6, 2018
91f29dd
set/matrix permute inner type unify traps
Nov 6, 2018
65f43f5
Trying to track down strange refinement error permute relation
Nov 6, 2018
167e022
Merge branch 'master' into permutation
Nov 12, 2018
52ad5b0
Merge in permutation-safe to stack.yamls
Nov 12, 2018
d763f0d
Removed expected stdout
Nov 15, 2018
e75acd8
Some unnamed tests
Nov 19, 2018
3ec8020
Renamed some tests
Nov 19, 2018
2caeb63
Renamed some more tests
Nov 19, 2018
91b1a1f
Renamed permutation tests
Nov 19, 2018
1a74a78
More tests from Chris
Nov 20, 2018
fe7d64c
renamed apply to compose
Nov 20, 2018
0ab627b
Renamed permute to overload image
Nov 21, 2018
06b07e5
Renamed permute to image overloaded
Nov 21, 2018
d6f4dc6
Merge branch 'master' into permutation
Nov 26, 2018
333eaf2
Use https for the permutation-safe repository dependency
ozgurakgun Nov 26, 2018
3d4e1e5
Rules for permutation equality
Nov 26, 2018
e46d57b
Changed permutation-safe version
Nov 26, 2018
cacf7a5
Merge branch 'permutation' of github.com:conjure-cp/conjure into perm…
Nov 26, 2018
77003e0
Remove merge conflict files
ozgurakgun Nov 26, 2018
57af4db
Removing more *.orig files -- assuming these were added by mistake in…
ozgurakgun Nov 26, 2018
702b053
Overloaded toSet to handle permutation
Nov 27, 2018
661d312
More toSet tests
Nov 27, 2018
a8a3dda
Some broken inverse rules for permutation + failing test
Nov 27, 2018
bd1e399
Oz made change to Logging
Nov 28, 2018
4ccc252
inverse
Dec 3, 2018
5e243af
Renamed vertical rule file
Dec 3, 2018
c33fc9a
Removed rules and started test driven reconstruction
Dec 4, 2018
28d8437
Renamed permutation representation file
Dec 4, 2018
36c88e7
Some reorganization and tests
Dec 4, 2018
3e56293
More tests
Dec 4, 2018
71bfd76
image tests
Dec 4, 2018
f7021d2
Added enum and unnamed representation tests for permutation
Dec 5, 2018
51cef21
Added enum & unnamed cardinality tests for permutations
Dec 5, 2018
0b6bf2d
Found bug in sets of tuples of enums when writing generators test
Dec 5, 2018
5fa1ca8
Stop Literals matching Vertical image rule for permutation
Dec 5, 2018
cf96915
enum and unnamed tests for image
Dec 6, 2018
4dc8787
More tests
Dec 10, 2018
86de63c
Inverse tests
Dec 11, 2018
d3cdd0a
compose tests
Dec 11, 2018
9f63de6
Inequality in comprehension tests
Dec 12, 2018
5def9b0
Set of tuples bug fix
Dec 13, 2018
2aba7d0
Merge branch 'set-of-tuple-of-enum-bug' into permutation-minimal
Dec 13, 2018
50ce3d4
Fixed merge
Dec 13, 2018
a05f014
compose broken after image extended to work over sets
Dec 17, 2018
362fd24
compose rule that finds new permutation is fix
Dec 17, 2018
53f8f78
change to cardinality def + defined
Dec 18, 2018
8c22609
card def change + defined + some fixes
Dec 18, 2018
5d2248b
incomprehendable image + more tests
Dec 19, 2018
b8f4091
relation + list tests
Dec 19, 2018
39412bd
sequence tests
Dec 20, 2018
fcbf421
mset tests
Dec 21, 2018
5272e30
Added image of permutation tests + fixed compose + eq bugs
Jan 5, 2019
4a73448
partition tests - partition bug discovered
Jan 8, 2019
e81c4e8
Fixed image of literal bug that was crashing SR
Jan 10, 2019
f2abde2
Matrix test
Jan 10, 2019
5986f59
Merge branch 'master' into permutation-minimal
fraser-dunlop Jan 30, 2019
04ada6f
Counting sets of permutations now possible
fraser-dunlop Feb 1, 2019
2ebd819
counting + superpermutation tests
fraser-dunlop Feb 8, 2019
65b2670
Merge branch 'master' into permutation-minimal
ozgurakgun Feb 18, 2019
1802f5e
post merge cleanup
ozgurakgun Feb 18, 2019
387102c
Handle ordering operators between comprehensions
ozgurakgun Feb 18, 2019
c7bc58f
Support p(x) syntax for permutation application
ozgurakgun Feb 18, 2019
68bbe12
Merge branch 'permutation-minimal' of github.com:conjure-cp/conjure i…
fraser-dunlop Feb 22, 2019
4a9d4ca
changed tests to pass with new ordering
fraser-dunlop Feb 26, 2019
3e7e1a7
Tagged Int syntax and tests
fraser-dunlop Mar 22, 2019
141d70b
symmetry ordering not working for permutation image
fraser-dunlop Apr 3, 2019
c1c0227
record implementation for permutation image
fraser-dunlop Apr 25, 2019
0283cab
remove flatten from symmetryOrdering for Matrix
fraser-dunlop May 2, 2019
29a9d43
remove flatten on set explicit
fraser-dunlop May 2, 2019
54386ea
explicit var size with flags symmetry now tuple
fraser-dunlop May 2, 2019
214c2ac
a handful of changes in the name of symmetryOrder
fraser-dunlop May 3, 2019
ba0377d
We now handle symmetryOrder on image(perm,x) - image(perm, [comprehen…
ozgurakgun May 3, 2019
38cd76b
Rule for permutation image of comprehension
fraser-dunlop May 3, 2019
f55dc62
support abstract patterns in comprehension permutation image
fraser-dunlop May 4, 2019
defe09c
abstract pattern tuple test
fraser-dunlop May 4, 2019
704397e
flattenLex (incomplete definition but works for BIBD)
fraser-dunlop May 5, 2019
bc7480e
reject List in permutation-image-literal
fraser-dunlop May 6, 2019
68d8526
Matrix Lt & Leq update + symmetryOrdering fixes
fraser-dunlop May 6, 2019
0dcb73f
fixed flattenLex infinite recursion
fraser-dunlop May 6, 2019
3471a29
rollback domain pretty
fraser-dunlop May 8, 2019
ee95c1d
enforce tag consistency + permutation literal image of tuple
fraser-dunlop May 10, 2019
cd709d7
correct image for permutation literal
fraser-dunlop May 11, 2019
75b2d54
Add --unnamed-symmetry-breaking as a command line option
ozgurakgun May 13, 2019
f0d067a
fast-consecutive and fast-allpairs should both work
ozgurakgun May 13, 2019
cd33bdf
remove dead code
fraser-dunlop May 13, 2019
bf8a9c1
add FastAllPermutations as well
ozgurakgun May 13, 2019
5156731
Finished --unnamed-symmetry-breaking command line flag and the genera…
ozgurakgun May 14, 2019
0131b1f
merge
ozgurakgun May 14, 2019
f53402e
fiddle with the trace statements
ozgurakgun May 14, 2019
52d1eba
fix the complete flavours
ozgurakgun May 14, 2019
afd04cc
One aux variable per unnamed type when doing Complete-*-Altogether
ozgurakgun May 14, 2019
5579326
rewrite flattenLex and acceptAllOutputs
fraser-dunlop May 14, 2019
194fb80
more symmetry ordering cases
fraser-dunlop May 15, 2019
3f68a5f
replace <=lex in test files with .<=
fraser-dunlop May 15, 2019
2194e19
fixed bug in Consecutive generation caused by mismatched tags
fraser-dunlop Sep 5, 2019
fa250bb
bubbling issue for --unnamed-symmetry-breaking=full
fraser-dunlop Oct 8, 2019
d941c85
Merge branch 'master' into permutation-minimal
fraser-dunlop Oct 11, 2019
107adce
fixing up some permutation tests
fraser-dunlop Oct 11, 2019
6a3e5ef
fixing some permutation tests
fraser-dunlop Oct 11, 2019
ff0d11f
add defined for permutation const & fix some tests
fraser-dunlop Oct 11, 2019
08a4b30
fixed some permutation tests
fraser-dunlop Oct 11, 2019
41f7759
fixed some permutation tests
fraser-dunlop Oct 14, 2019
11d4919
removing dead code
fraser-dunlop Oct 14, 2019
ebc32a4
Add EvaluateOp OpTwoBars for Permutation
ChrisJefferson Aug 10, 2020
760e702
Make applying permutations more efficient
ChrisJefferson Aug 10, 2020
ea4c7ca
Add exhaustive permutation tests - part 1
ChrisJefferson Aug 10, 2020
8172ad1
Add exhaustive permutation tests - part 2
ChrisJefferson Aug 10, 2020
68193d6
Add support for enumerating permutation values
ozgurakgun Aug 11, 2020
ff46470
evaluating permutation image
ozgurakgun Aug 11, 2020
343509b
Add more perm tests - part 3
ChrisJefferson Aug 11, 2020
ab5839c
Add broken permutation image test
ChrisJefferson Aug 11, 2020
36e854c
Fix confusion in the tester about multiple param files
ozgurakgun Aug 11, 2020
3720026
Add permutation tests - part 4
ChrisJefferson Aug 11, 2020
ba3507d
handling top level list of bools in the solution validator
ozgurakgun Aug 11, 2020
cc9eec6
merge
ozgurakgun Aug 11, 2020
f4c7fa1
Permutation tests - part 5
ChrisJefferson Aug 11, 2020
20d3c9e
Add broken inverse test
ChrisJefferson Aug 11, 2020
2dfdcd8
that's one nasty merge
ozgurakgun Feb 26, 2024
ea977ab
one more quick merge of main
ozgurakgun Feb 26, 2024
2e998c4
ghc 9.0 deps
ozgurakgun Feb 26, 2024
8472eea
post-merge-test-update 1 (there is more to come)
ozgurakgun Feb 26, 2024
31fccda
post-merge-test-update 2
ozgurakgun Feb 26, 2024
8c49cf8
always update stack.yaml
ozgurakgun Feb 26, 2024
a2d23c5
remove fastbuild.sh
ozgurakgun Feb 27, 2024
d5fd545
remove redundant files
ozgurakgun Feb 27, 2024
f18b7fa
bring back the call to prologue
ozgurakgun Feb 27, 2024
eff909a
avoid enumerateInConstant
ozgurakgun Feb 27, 2024
25b277e
remove aux file
ozgurakgun Feb 27, 2024
7778115
merge main to minimise the diff
ozgurakgun Feb 27, 2024
cd7db7b
format
ozgurakgun Feb 27, 2024
11a422b
remove comment
ozgurakgun Feb 27, 2024
1f6c28c
merge
ozgurakgun Feb 27, 2024
82f0102
tidy up
ozgurakgun Feb 27, 2024
07db46c
tidy up
ozgurakgun Feb 27, 2024
2e674ce
symmetryOrdering
ozgurakgun Feb 28, 2024
c6227eb
validator to ignore int tags
ozgurakgun Feb 28, 2024
599d1bb
another testcase fix
ozgurakgun Feb 28, 2024
43b294f
a few more passing tests
ozgurakgun Feb 28, 2024
e1142c7
adding general support for permutations (parsing/domainOf etc)
ozgurakgun Feb 28, 2024
f002f24
moved the permutation representation module
ozgurakgun Feb 28, 2024
efb43eb
parse permutation attributes and validate permutations
ozgurakgun Feb 28, 2024
51d0b0b
some more tests passing
ozgurakgun Mar 1, 2024
8c3b7c1
type checking of permutation inverse and a few more passing tests
ozgurakgun Mar 3, 2024
19740ab
remove redundant files
ozgurakgun Mar 3, 2024
f37d1ac
perutation inverse
ozgurakgun Mar 3, 2024
1e69572
stylistic changes
ozgurakgun Mar 3, 2024
ff1d64b
in and inverse evaluator
ozgurakgun Mar 3, 2024
aa05f13
a few more passing tests
ozgurakgun Mar 3, 2024
b68c532
Disable very slow permutation tests for a while
ChrisJefferson Mar 16, 2024
a034e9d
Add rule for permutation disequality
ChrisJefferson Mar 16, 2024
8d5d53a
Make test stable
ChrisJefferson Mar 16, 2024
62a3adf
Fix broken test
ChrisJefferson Mar 19, 2024
f1ee5bd
Merge pull request #654 from conjure-cp/chris-fiddling
ozgurakgun Apr 9, 2024
b9e8fd9
lint
ozgurakgun Apr 9, 2024
bf5afdc
missing case in domainNeedsRepresentation
ozgurakgun Apr 9, 2024
506780b
Use 'transform', not 'image', to apply permutations?
ChrisJefferson Apr 10, 2024
bd1d588
Add a SimpleJSON output for unnamed types
ChrisJefferson Apr 10, 2024
576ce70
Need to quantify over permutations, not sequences, for symmetry breaking
ChrisJefferson Apr 10, 2024
c86104b
add minimum_int_value_in_domain
ozgurakgun Apr 12, 2024
f5537a8
Add some dotlt tests
ChrisJefferson Apr 10, 2024
960b806
Handle invalid permutation application
ChrisJefferson Apr 12, 2024
707836c
fix how the bubble expression is generated for complete unnamed symme…
ozgurakgun Apr 12, 2024
94be5ba
Add symmetry tests
ChrisJefferson Apr 12, 2024
573ad6d
add a hlint.yaml file
ozgurakgun Apr 13, 2024
b04e6aa
test: stop as soon as one case fails
ozgurakgun Apr 13, 2024
1697e5e
remove minimum_int_value_in_domain -- we already had minOfDomain
ozgurakgun Apr 13, 2024
ecd1a0e
rm -rf conjure-output at the beginning too
ozgurakgun Apr 13, 2024
e779629
remove redundant import
ozgurakgun Apr 13, 2024
0bc784e
improve log-successes: also print the output expression
ozgurakgun Apr 13, 2024
b349409
hlint and reformat
ozgurakgun Apr 13, 2024
2bf2a36
hlint
ozgurakgun Apr 13, 2024
2b1eb71
rm solution json files too
ozgurakgun Apr 13, 2024
79a4908
bugfix: bubbling up through comprehensions that contain lettings
ozgurakgun Apr 13, 2024
bfb10da
fixes test cases
ozgurakgun Apr 13, 2024
dae54d8
edit the acceptOutput.sh scritps to take multiple dirs
ozgurakgun Apr 13, 2024
528563f
stop at first failure
ozgurakgun Apr 13, 2024
23a9318
Add set tests
ChrisJefferson Apr 14, 2024
ca742f6
adding quickPermutationOrder
ozgurakgun Jun 26, 2024
022185b
Merge branch 'main' into permutation-minimal
ozgurakgun Jun 26, 2024
4f4546b
Merge branch 'main' into permutation-minimal
ozgurakgun Sep 30, 2024
1e7b428
lint
ozgurakgun Oct 23, 2024
906508f
lint
ozgurakgun Oct 23, 2024
8c56b47
remembering the inverse of all perms
ozgurakgun Oct 23, 2024
2eef546
move the permutation rules about and fix one (forw, back) bug/regression
ozgurakgun Oct 23, 2024
a3cbea7
move the permutation rules about and fix one (forw, back) bug/regress…
ozgurakgun Oct 23, 2024
760f435
improve bash
ozgurakgun Oct 24, 2024
16441d8
update some of test files
ozgurakgun Oct 24, 2024
d4f80ef
Merge branch 'main' into permutation-minimal
ozgurakgun Oct 24, 2024
116749b
permInverse
ozgurakgun Oct 31, 2024
3dbcd95
adding the transform(p,x)[i] rule
ozgurakgun Nov 7, 2024
05e87c1
example 05
ozgurakgun Nov 7, 2024
29750e8
tidy
ozgurakgun Nov 15, 2024
ead0a56
do not panic, just mark rule as not applicable
ozgurakgun Nov 16, 2024
3539b91
specialised handling of .<= when one of the args is transformed
ozgurakgun Nov 16, 2024
5390ba1
transform .<= of transforms
ozgurakgun Nov 16, 2024
b756638
lint
ozgurakgun Nov 16, 2024
75e6aab
test case
ozgurakgun Nov 16, 2024
0d90a86
rename test files
ozgurakgun Nov 16, 2024
024e4c5
handle .< too
ozgurakgun Nov 22, 2024
ddefe73
more test cases
ozgurakgun Nov 22, 2024
354fa43
a set example as well, not using transform on sets yet
ozgurakgun Nov 22, 2024
cb41d3b
making sure the representations all work and adding some comments
ozgurakgun Nov 22, 2024
121b884
transform and quickPermutationOrder to always carry lists of permutat…
ozgurakgun Nov 29, 2024
a3c60ac
full: 2d matrices work (Lam)
ozgurakgun Dec 3, 2024
80ed866
fix pretty printing of transform
ozgurakgun Dec 4, 2024
0d68952
special case unary tuples
ozgurakgun Dec 4, 2024
878d811
comment out rules we aren't using (?)
ozgurakgun Dec 4, 2024
0b43478
generalising to multiple permutations - more to come
ozgurakgun Dec 4, 2024
fcc382a
add a opPermInverse lens
ozgurakgun Dec 4, 2024
e113b7b
relaxed type-checking between an unnamed T and int:T
ozgurakgun Dec 6, 2024
bb774d7
add a new rule (transform-to-image) to restore functionality that was…
ozgurakgun Dec 6, 2024
b3ef412
rule_Transform_DotLess to also work with DotLt
ozgurakgun Dec 6, 2024
41344cb
permInverse on permutation literals that work on 2 objects
ozgurakgun Dec 6, 2024
d3e062f
new transform rules
ozgurakgun Dec 12, 2024
296017e
better messages
ozgurakgun Dec 14, 2024
571ae7a
liftvars, bugfix
ozgurakgun Dec 14, 2024
16c4c41
dontcare unless condition during lifting - hack that was left in for …
ozgurakgun Dec 14, 2024
18b2b15
dontcare of unnameds
ozgurakgun Dec 14, 2024
dac1871
oops
ozgurakgun Dec 14, 2024
3e4c586
change parse_print tests
ozgurakgun Jan 17, 2025
97b882f
min/max of expression domains
ozgurakgun Jan 17, 2025
932eb69
parsing tagged int domains and literals
ozgurakgun Jan 19, 2025
183c2e3
transform takes a list of permutations as the parameter now
ozgurakgun Jan 19, 2025
b16caa4
add expected times
ozgurakgun Jan 19, 2025
821448c
reformat
ozgurakgun Jan 20, 2025
bfe5d06
print tagged int literals with the tag
ozgurakgun Jan 20, 2025
52ac933
stricter type-checking for tagged int domains
ozgurakgun Jan 20, 2025
86dce66
simplify sequence equality rule
ozgurakgun Jan 20, 2025
0cffff5
update test files
ozgurakgun Jan 20, 2025
bf14635
use newtype
ozgurakgun Jan 20, 2025
dd7d534
swap the order of arguments for quickPermutationOrder
ozgurakgun Jan 20, 2025
f6edc19
fix symmetryOrdering for permutations - reflect that they are now rep…
ozgurakgun Jan 20, 2025
0ada345
test files
ozgurakgun Jan 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 6 additions & 0 deletions .hlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- ignore: {name: Use camelCase}
- ignore: {name: Reduce duplication}
- ignore: {name: Use &&}
- ignore: {name: Use ++}
- ignore: {name: Redundant return}
- ignore: {name: Monad law, left identity}
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"haskell.plugin.hlint.config.flags": [
"--hint=.hlint.yaml"
],
}
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ test:
stack test --test-arguments '--hide-successes --limit-time ${LIMIT_TIME}';\
fi

.PHONY: stack.yaml
stack.yaml: etc/hs-deps/stack-${GHC_VERSION}.yaml
@cp etc/hs-deps/stack-${GHC_VERSION}.yaml stack.yaml

Expand Down
9 changes: 9 additions & 0 deletions conjure-cp.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Library
, Conjure.Bug
, Conjure.UserError

, Conjure.Util.Permutation

-- definitions of language constructs
, Conjure.Language
, Conjure.Language.AbstractLiteral
Expand Down Expand Up @@ -59,8 +61,10 @@ Library
, Conjure.Language.Expression.Op.Apart
, Conjure.Language.Expression.Op.AtLeast
, Conjure.Language.Expression.Op.AtMost
, Conjure.Language.Expression.Op.Compose
, Conjure.Language.Expression.Op.AttributeAsConstraint
, Conjure.Language.Expression.Op.CatchUndef
, Conjure.Language.Expression.Op.QuickPermutationOrder
, Conjure.Language.Expression.Op.Defined
, Conjure.Language.Expression.Op.Div
, Conjure.Language.Expression.Op.DontCare
Expand Down Expand Up @@ -98,6 +102,7 @@ Library
, Conjure.Language.Expression.Op.Participants
, Conjure.Language.Expression.Op.Parts
, Conjure.Language.Expression.Op.Party
, Conjure.Language.Expression.Op.PermInverse
, Conjure.Language.Expression.Op.Pow
, Conjure.Language.Expression.Op.PowerSet
, Conjure.Language.Expression.Op.Pred
Expand Down Expand Up @@ -186,6 +191,7 @@ Library
, Conjure.Representations.Function.FunctionNDPartialDummy
, Conjure.Representations.Function.FunctionAsRelation
, Conjure.Representations.Sequence.ExplicitBounded
, Conjure.Representations.Permutation.PermutationAsFunction
, Conjure.Representations.Relation.RelationAsMatrix
, Conjure.Representations.Relation.RelationAsSet
, Conjure.Representations.Partition.Occurrence
Expand Down Expand Up @@ -233,6 +239,9 @@ Library

, Conjure.Rules.Transform

, Conjure.Rules.Horizontal.Permutation
, Conjure.Rules.Vertical.Permutation.PermutationAsFunction

, Conjure.Rules.BubbleUp
, Conjure.Rules.DontCare
, Conjure.Rules.TildeOrdering
Expand Down
2 changes: 2 additions & 0 deletions docs/conjure-help.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
<tr><td style='padding-left:2ex;'>&nbsp;<td style='padding-left:1ex; white-space:nowrap;'>--representations-cuts=STRATEGY</td><td style='padding-left:2ex;'>Strategy for choosing a representation for cuts in 'branching on'.<br />Default value: same as --representations</td></tr>
<tr><td style='padding-left:2ex;'>&nbsp;<td style='padding-left:1ex; white-space:nowrap;'>--channelling</td><td style='padding-left:2ex;'>Whether to produce channelled models (true by default).<br /></td></tr>
<tr><td style='padding-left:2ex;'>&nbsp;<td style='padding-left:1ex; white-space:nowrap;'>--representation-levels</td><td style='padding-left:2ex;'>Whether to use built-in precedence levels when choosing representations. Used to cut down the number of generated models.<br />Default: true</td></tr>
<tr><td style='padding-left:2ex;'>&nbsp;<td style='padding-left:1ex; white-space:nowrap;'>--unnamed-symmetry-breaking=ITEM</td><td style='padding-left:2ex;'>Level to use for breaking symmetries arising from unnamed types. Options: none / fast-consecutive / fast-allpairs / complete-independently / complete.<br />Default: none</td></tr>
<tr><td style='padding-left:2ex;'>&nbsp;<td style='padding-left:1ex; white-space:nowrap;'>--follow-model=ITEM</td><td style='padding-left:2ex;'>Provide a Conjure-generated Essence Prime model to be used as a guide during model generation. Conjure will try to imitate the modelling decisions from this file.</td></tr>
<tr><td style='padding-left:2ex;'>&nbsp;<td style='padding-left:1ex; white-space:nowrap;'>--seed=INT</td><td style='padding-left:2ex;'>Random number generator seed.</td></tr>
<tr><td style='padding-left:2ex;'>&nbsp;<td style='padding-left:1ex; white-space:nowrap;'>--limit-models=INT</td><td style='padding-left:2ex;'>Maximum number of models to generate.</td></tr>
Expand Down Expand Up @@ -130,6 +131,7 @@
<tr><td style='padding-left:2ex;'>&nbsp;<td style='padding-left:1ex; white-space:nowrap;'>--representations-cuts=STRATEGY</td><td style='padding-left:2ex;'>Strategy for choosing a representation for cuts in 'branching on'.<br />Default value: same as --representations</td></tr>
<tr><td style='padding-left:2ex;'>&nbsp;<td style='padding-left:1ex; white-space:nowrap;'>--channelling</td><td style='padding-left:2ex;'>Whether to produce channelled models (true by default).<br /></td></tr>
<tr><td style='padding-left:2ex;'>&nbsp;<td style='padding-left:1ex; white-space:nowrap;'>--representation-levels</td><td style='padding-left:2ex;'>Whether to use built-in precedence levels when choosing representations. Used to cut down the number of generated models.<br />Default: true</td></tr>
<tr><td style='padding-left:2ex;'>&nbsp;<td style='padding-left:1ex; white-space:nowrap;'>--unnamed-symmetry-breaking=ITEM</td><td style='padding-left:2ex;'>Level to use for breaking symmetries arising from unnamed types. Options: none / fast-consecutive / fast-allpairs / complete-independently / complete.<br />Default: none</td></tr>
<tr><td style='padding-left:2ex;'>&nbsp;<td style='padding-left:1ex; white-space:nowrap;'>--follow-model=ITEM</td><td style='padding-left:2ex;'>Provide a Conjure-generated Essence Prime model to be used as a guide during model generation. Conjure will try to imitate the modelling decisions from this file.</td></tr>
<tr><td style='padding-left:2ex;'>&nbsp;<td style='padding-left:1ex; white-space:nowrap;'>--seed=INT</td><td style='padding-left:2ex;'>Random number generator seed.</td></tr>
<tr><td style='padding-left:2ex;'>&nbsp;<td style='padding-left:1ex; white-space:nowrap;'>--limit-models=INT</td><td style='padding-left:2ex;'>Maximum number of models to generate.</td></tr>
Expand Down
8 changes: 8 additions & 0 deletions docs/conjure-help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@
--representation-levels Whether to use built-in precedence levels when choosing representations.
Used to cut down the number of generated models.
Default: true
--unnamed-symmetry-breaking=ITEM Level to use for breaking symmetries arising from unnamed types.
Options: none / fast-consecutive / fast-allpairs / complete-independently
/ complete.
Default: none
--follow-model=ITEM Provide a Conjure-generated Essence Prime model to be used as a guide
during model generation. Conjure will try to imitate the modelling
decisions from this file.
Expand Down Expand Up @@ -252,6 +256,10 @@
--representation-levels Whether to use built-in precedence levels when choosing representations.
Used to cut down the number of generated models.
Default: true
--unnamed-symmetry-breaking=ITEM Level to use for breaking symmetries arising from unnamed types.
Options: none / fast-consecutive / fast-allpairs / complete-independently
/ complete.
Default: none
--follow-model=ITEM Provide a Conjure-generated Essence Prime model to be used as a guide
during model generation. Conjure will try to imitate the modelling
decisions from this file.
Expand Down
1 change: 1 addition & 0 deletions etc/build/gen_Operator.hs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ main = do

, [ ""
, "instance ( Pretty x"
, " , Data x"
, " , ExpressionLike x"
, " , ReferenceContainer x"
, " , TypeOf x"
Expand Down
21 changes: 19 additions & 2 deletions src/Conjure/Compute/DomainOf.hs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ instance (DomainOf x, TypeOf x, Pretty x, ExpressionLike x, Domain () x :< x, Do
domainOf (MkOpAllDiffExcept x) = domainOf x
domainOf (MkOpAnd x) = domainOf x
domainOf (MkOpApart x) = domainOf x
domainOf (MkOpCompose x) = domainOf x
domainOf (MkOpAtLeast x) = domainOf x
domainOf (MkOpAtMost x) = domainOf x
domainOf (MkOpAttributeAsConstraint x) = domainOf x
Expand Down Expand Up @@ -149,6 +150,7 @@ instance (DomainOf x, TypeOf x, Pretty x, ExpressionLike x, Domain () x :< x, Do
domainOf (MkOpParticipants x) = domainOf x
domainOf (MkOpParts x) = domainOf x
domainOf (MkOpParty x) = domainOf x
domainOf (MkOpPermInverse x) = domainOf x
domainOf (MkOpPow x) = domainOf x
domainOf (MkOpPowerSet x) = domainOf x
domainOf (MkOpPred x) = domainOf x
Expand Down Expand Up @@ -179,12 +181,14 @@ instance (DomainOf x, TypeOf x, Pretty x, ExpressionLike x, Domain () x :< x, Do
domainOf (MkOpTwoBars x) = domainOf x
domainOf (MkOpUnion x) = domainOf x
domainOf (MkOpXor x) = domainOf x
domainOf (MkOpQuickPermutationOrder x) = domainOf x

indexDomainsOf (MkOpActive x) = indexDomainsOf x
indexDomainsOf (MkOpAllDiff x) = indexDomainsOf x
indexDomainsOf (MkOpAllDiffExcept x) = indexDomainsOf x
indexDomainsOf (MkOpAnd x) = indexDomainsOf x
indexDomainsOf (MkOpApart x) = indexDomainsOf x
indexDomainsOf (MkOpCompose x) = indexDomainsOf x
indexDomainsOf (MkOpAtLeast x) = indexDomainsOf x
indexDomainsOf (MkOpAtMost x) = indexDomainsOf x
indexDomainsOf (MkOpAttributeAsConstraint x) = indexDomainsOf x
Expand Down Expand Up @@ -226,6 +230,7 @@ instance (DomainOf x, TypeOf x, Pretty x, ExpressionLike x, Domain () x :< x, Do
indexDomainsOf (MkOpParticipants x) = indexDomainsOf x
indexDomainsOf (MkOpParts x) = indexDomainsOf x
indexDomainsOf (MkOpParty x) = indexDomainsOf x
indexDomainsOf (MkOpPermInverse x) = indexDomainsOf x
indexDomainsOf (MkOpPow x) = indexDomainsOf x
indexDomainsOf (MkOpPowerSet x) = indexDomainsOf x
indexDomainsOf (MkOpPred x) = indexDomainsOf x
Expand Down Expand Up @@ -256,6 +261,7 @@ instance (DomainOf x, TypeOf x, Pretty x, ExpressionLike x, Domain () x :< x, Do
indexDomainsOf (MkOpTwoBars x) = indexDomainsOf x
indexDomainsOf (MkOpUnion x) = indexDomainsOf x
indexDomainsOf (MkOpXor x) = indexDomainsOf x
indexDomainsOf (MkOpQuickPermutationOrder x) = indexDomainsOf x

instance DomainOf Constant where
domainOf ConstantBool{} = return DomainBool
Expand Down Expand Up @@ -330,12 +336,14 @@ instance DomainOf (AbstractLiteral Expression) where
where attr = PartitionAttr (SizeAttr_MaxSize (fromInt $ genericLength xss))
(SizeAttr_MaxSize (fromInt $ maximum [genericLength xs | xs <- xss]))
False

domainOf (AbsLitPermutation [] ) = return $ DomainPermutation def (PermutationAttr SizeAttr_None) (DomainAny "domainOf-AbsLitPermutation-[]" TypeAny)
domainOf (AbsLitPermutation xss) = DomainPermutation def (PermutationAttr SizeAttr_None) <$> (domainUnions =<< mapM domainOf (concat xss))
indexDomainsOf (AbsLitMatrix ind inn) = (ind :) <$> (mapM domainUnions =<< mapM indexDomainsOf inn)
indexDomainsOf _ = return []




-- all the `Op`s

instance DomainOf (OpActive x) where
Expand Down Expand Up @@ -420,7 +428,8 @@ instance (Pretty x, TypeOf x, DomainOf x) => DomainOf (OpImage x) where
case fDomain of
DomainFunction _ _ _ to -> return to
DomainSequence _ _ to -> return to
_ -> failDoc "domainOf, OpImage, not a function or sequence"
DomainPermutation _ _ ov -> return ov
_ -> failDoc "domainOf, OpImage, not a function, sequence or permutation"

instance (Pretty x, TypeOf x) => DomainOf (OpImageSet x) where
domainOf op = mkDomainAny ("OpImageSet:" <++> pretty op) <$> typeOf op
Expand Down Expand Up @@ -550,6 +559,12 @@ instance DomainOf x => DomainOf (OpParts x) where
instance (Pretty x, TypeOf x) => DomainOf (OpParty x) where
domainOf op = mkDomainAny ("OpParty:" <++> pretty op) <$> typeOf op

instance (Pretty x, TypeOf x) => DomainOf (OpPermInverse x) where
domainOf op = mkDomainAny ("OpPermInverse:" <++> pretty op) <$> typeOf op

instance (Pretty x, TypeOf x) => DomainOf (OpCompose x) where
domainOf op = mkDomainAny ("OpCompose:" <++> pretty op) <$> typeOf op

instance (Pretty x, TypeOf x) => DomainOf (OpPow x) where
domainOf op = mkDomainAny ("OpPow:" <++> pretty op) <$> typeOf op

Expand Down Expand Up @@ -682,3 +697,5 @@ instance (Pretty x, TypeOf x, Domain () x :< x) => DomainOf (OpTwoBars x) where
instance (Pretty x, TypeOf x) => DomainOf (OpUnion x) where
domainOf op = mkDomainAny ("OpUnion:" <++> pretty op) <$> typeOf op

instance DomainOf (OpQuickPermutationOrder x) where
domainOf _ = return DomainBool
Loading
Loading