Skip to content

Commit 313bb57

Browse files
author
nmacedo
committed
Merge branch 'heads/v2.1'
2 parents 241fb85 + f638c03 commit 313bb57

File tree

62 files changed

+1146
-466
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1146
-466
lines changed

build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
<taskdef name="jarbundler" classpath="./lib/jarbundler-2.4.0.jar" classname="net.sourceforge.jarbundler.JarBundler" />
3939

40-
<jarbundler dir="dist" name="Alloy${env.VERSION}" mainclass="edu.mit.csail.sdg.alloy4whole.SimpleGUI" jar="dist/${env.jarName}" jvmversion="1.6+" vmoptions="-Xmx1024m -Xdock:name=Alloy${env.VERSION}" signature="AA42" build="${env.VERSION}" bundleid="edu.mit.csail.sdg.alloy4whole.SimpleGUI" stubfile="OSX-JavaStub/JavaApplicationStub" icon="OSX-icons/AlloyLogo.icns" copyright="Alloy Analyzer by SDG group, MIT" shortname="Alloy">
40+
<jarbundler dir="dist" name="Alloy${env.VERSION}" mainclass="edu.mit.csail.sdg.alloy4whole.SimpleMain" jar="dist/${env.jarName}" jvmversion="1.6+" vmoptions="-Xmx1024m -Xdock:name=Alloy${env.VERSION}" signature="AA42" build="${env.VERSION}" bundleid="edu.mit.csail.sdg.alloy4whole.SimpleMain" stubfile="OSX-JavaStub/JavaApplicationStub" icon="OSX-icons/AlloyLogo.icns" copyright="Alloy Analyzer by SDG group, MIT" shortname="Alloy">
4141

4242
<javaproperty name="apple.laf.useScreenMenuBar" value="true" />
4343
<javaproperty name="apple.awt.antialiasing" value="true" />

cnf/central.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@
6060
<artifactId>slf4j-simple</artifactId>
6161
<version>1.7.5</version>
6262
</dependency>
63+
<dependency>
64+
<groupId>commons-cli</groupId>
65+
<artifactId>commons-cli</artifactId>
66+
<version>1.4</version>
67+
</dependency>
6368
</dependencies>
6469

6570
</project>

org.alloytools.alloy.application/.settings/org.eclipse.jdt.core.prefs

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,16 @@ org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
133133
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=ignore
134134
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
135135
org.eclipse.jdt.core.compiler.processAnnotations=disabled
136+
org.eclipse.jdt.core.compiler.release=disabled
136137
org.eclipse.jdt.core.compiler.source=1.8
137138
org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
138139
org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,NORMAL
139140
org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME
141+
org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
140142
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=4
141143
org.eclipse.jdt.core.formatter.align_type_members_on_columns=true
144+
org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false
145+
org.eclipse.jdt.core.formatter.align_with_spaces=false
142146
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=2
143147
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=51
144148
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=50
@@ -148,6 +152,7 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_e
148152
org.eclipse.jdt.core.formatter.alignment_for_assignment=2
149153
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=2
150154
org.eclipse.jdt.core.formatter.alignment_for_compact_if=2
155+
org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16
151156
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=2
152157
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=51
153158
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=2
@@ -191,6 +196,8 @@ org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
191196
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
192197
org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
193198
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
199+
org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=false
200+
org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false
194201
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
195202
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
196203
org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=true
@@ -242,13 +249,13 @@ org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_ini
242249
org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
243250
org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
244251
org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=insert
245-
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=do not insert
246-
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
247-
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=do not insert
248-
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=do not insert
249-
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=do not insert
250-
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=do not insert
251-
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=do not insert
252+
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
253+
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
254+
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
255+
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
256+
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
257+
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
258+
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
252259
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
253260
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
254261
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
@@ -415,6 +422,9 @@ org.eclipse.jdt.core.formatter.join_wrapped_lines=false
415422
org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
416423
org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
417424
org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
425+
org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line=false
426+
org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false
427+
org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false
418428
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
419429
org.eclipse.jdt.core.formatter.lineSplit=140
420430
org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false

org.alloytools.alloy.application/.settings/org.eclipse.jdt.ui.prefs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=tru
3131
cleanup.qualify_static_member_accesses_with_declaring_class=true
3232
cleanup.qualify_static_method_accesses_with_declaring_class=false
3333
cleanup.remove_private_constructors=true
34-
cleanup.remove_redundant_type_arguments=true
34+
cleanup.remove_redundant_modifiers=false
35+
cleanup.remove_redundant_semicolons=false
36+
cleanup.remove_redundant_type_arguments=false
3537
cleanup.remove_trailing_whitespaces=false
3638
cleanup.remove_trailing_whitespaces_all=true
3739
cleanup.remove_trailing_whitespaces_ignore_empty=false
@@ -60,7 +62,7 @@ cleanup_settings_version=2
6062
eclipse.preferences.version=1
6163
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
6264
formatter_profile=_Alloy
63-
formatter_settings_version=13
65+
formatter_settings_version=14
6466
org.eclipse.jdt.ui.exception.name=e
6567
org.eclipse.jdt.ui.gettersetter.use.is=true
6668
org.eclipse.jdt.ui.ignorelowercasenames=true
@@ -88,7 +90,7 @@ sp_cleanup.convert_functional_interfaces=false
8890
sp_cleanup.convert_to_enhanced_for_loop=false
8991
sp_cleanup.correct_indentation=false
9092
sp_cleanup.format_source_code=true
91-
sp_cleanup.format_source_code_changes_only=false
93+
sp_cleanup.format_source_code_changes_only=true
9294
sp_cleanup.insert_inferred_type_arguments=false
9395
sp_cleanup.make_local_variable_final=false
9496
sp_cleanup.make_parameters_final=false
@@ -105,6 +107,8 @@ sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=
105107
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
106108
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
107109
sp_cleanup.remove_private_constructors=true
110+
sp_cleanup.remove_redundant_modifiers=false
111+
sp_cleanup.remove_redundant_semicolons=false
108112
sp_cleanup.remove_redundant_type_arguments=false
109113
sp_cleanup.remove_trailing_whitespaces=true
110114
sp_cleanup.remove_trailing_whitespaces_all=true

org.alloytools.alloy.application/bnd.bnd

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
-includeresource: \
2-
src/main/resources
2+
src/main/resources,\
3+
@${repo;slf4j.api},\
34

45
-buildpath: \
56
lib/apple-osx-ui.jar;version=file,\
67
org.alloytools.pardinus;version=latest,\
78
org.alloytools.alloy.core;version=latest,\
9+
org.apache.commons.cli;version=1.4,\
10+
slf4j.api, \
11+
812

913
-testpath: \
1014
osgi.enroute.junit.wrapper, \
@@ -19,4 +23,4 @@
1923
Private-Package: \
2024
edu.mit.csail.sdg.alloy4graph,\
2125
edu.mit.csail.sdg.alloy4viz,\
22-
edu.mit.csail.sdg.alloy4whole,\
26+
edu.mit.csail.sdg.alloy4whole

org.alloytools.alloy.application/src/main/java/edu/mit/csail/sdg/alloy4graph/Graph.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ private void layout_assignOrder() {
316316
grOUT.get(n.pos()).remove(x);
317317
for (GraphNode n : grOUT.get(x.pos()))
318318
grIN.get(n.pos()).remove(x);
319-
// [HASLab] hack to get nodes sorted lexicographically in each layer
319+
// [HASLab] hack to get nodes sorted lexicographically within each layer
320320
// can't fast join since read-only
321321
// Iterable<GraphNode> aux = Util.fastJoin(grIN.get(x.pos()), );
322322
List<GraphNode> aux = new ArrayList<GraphNode>(grIN.get(x.pos()));
@@ -336,7 +336,6 @@ public int compare(GraphNode o1, GraphNode o2) {
336336
bins.get(b).add(n);
337337
}
338338
}
339-
340339
}
341340
sortNodes(Util.fastJoin(s1, s2));
342341
}

org.alloytools.alloy.application/src/main/java/edu/mit/csail/sdg/alloy4viz/StaticInstanceReader.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,13 @@ private void atoms(A4Solution sol, PrimSig s, int state) throws Err {
235235
sum = sum.plus(c);
236236
atoms(sol, c, state); // [HASLab]
237237
}
238-
A4TupleSet ts = (A4TupleSet) (sol.eval(s.minus(sum), state)); // [HASLab] // This ensures that atoms will be associated with the most specific sig
238+
A4TupleSet ts = (A4TupleSet) (sol.eval(s.minus(sum), state)); // [HASLab]
239+
// This ensures
240+
// that atoms
241+
// will be
242+
// associated
243+
// with the most
244+
// specific sig
239245
for (A4Tuple z : ts) {
240246
String atom = z.atom(0);
241247
int i, dollar = atom.lastIndexOf('$');
@@ -416,7 +422,7 @@ private StaticInstanceReader(XMLNode root, int state) throws Err {
416422
}
417423

418424
/** Parse the file into an AlloyInstance if possible. */
419-
// [HASLab]
425+
// [HASLab] particular state
420426
public static AlloyInstance parseInstance(File file, int state) throws Err {
421427
try {
422428
return (new StaticInstanceReader(new XMLNode(file), state)).ans; // [HASLab]
@@ -429,7 +435,7 @@ public static AlloyInstance parseInstance(File file, int state) throws Err {
429435
* Parse the file into an AlloyInstance if possible, then close the Reader
430436
* afterwards.
431437
*/
432-
// [HASLab]
438+
// [HASLab] particular state
433439
public static AlloyInstance parseInstance(Reader reader, int state) throws Err {
434440
try {
435441
return (new StaticInstanceReader(new XMLNode(reader), state)).ans; // [HASLab]

0 commit comments

Comments
 (0)