| summaryrefslogtreecommitdiff |
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-07-31 17:04:51 +0200 |
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-07-31 17:04:51 +0200 |
| commit | bc8e275546e2e6fe6bcf19ce42c0fab07eecdf4c (patch) | |
| tree | c0fc19f8cb2a3b296f6fef3394ebee122fe5343c | |
| parent | 27fd5d8afef49ffeca83dd5714738bfaffe04505 (diff) | |
Fixes typo with functions, errors in grammar.
Looking for the groups matching CNE_01700 appears to take a really long
time. The formula is quite complex, yet unlikely to be one of the most
complex ones, so we'll have to see what can be done.
| -rw-r--r-- | data/property/cnes/CNE_00100.pro | 52 | ||||
| -rw-r--r-- | data/property/cnes/CNE_01700.pro | 137 | ||||
| -rw-r--r-- | data/property/cnes/CNE_05100.pro | 64 | ||||
| -rw-r--r-- | data/property/cnes/STD_04800.pro | 29 | ||||
| -rw-r--r-- | instr-to-kodkod/Makefile | 5 | ||||
| -rw-r--r-- | instr-to-kodkod/parser/PropertyLexer.g4 | 4 | ||||
| -rw-r--r-- | instr-to-kodkod/parser/PropertyParser.g4 | 7 | ||||
| -rw-r--r-- | instr-to-kodkod/src/Parameters.java | 2 |
8 files changed, 293 insertions, 7 deletions
diff --git a/data/property/cnes/CNE_00100.pro b/data/property/cnes/CNE_00100.pro new file mode 100644 index 0000000..c5d0319 --- /dev/null +++ b/data/property/cnes/CNE_00100.pro @@ -0,0 +1,52 @@ +(tag_existing + ( + (wfm waveform CNE_00100_HAS_BAD_NAME) + ) + (and + (not (string_matches [identifier wfm] ".*_n")) + (exists p1 process + (CTL_verifies p1 + (EF + (and + (kind "if") + (is_read_structure "(???)") + (is_read_element "0" "=") + (or + (and + (is_read_element "1" "'0'") + (is_read_element "2" wfm) + ) + (and + (is_read_element "1" wfm) + (is_read_element "2" "'0'") + ) + ) + ) + ) + ) + ) + (not + (exists p2 process + (CTL_verifies p2 + (EF + (and + (kind "if") + (is_read_structure "(???)") + (is_read_element "0" "=") + (or + (and + (is_read_element "1" "'0'") + (is_read_element "2" wfm) + ) + (and + (is_read_element "1" wfm) + (is_read_element "2" "'0'") + ) + ) + ) + ) + ) + ) + ) + ) +) diff --git a/data/property/cnes/CNE_01700.pro b/data/property/cnes/CNE_01700.pro new file mode 100644 index 0000000..6b77fa1 --- /dev/null +++ b/data/property/cnes/CNE_01700.pro @@ -0,0 +1,137 @@ +(tag_existing + ( + (x_re waveform CNE_01700_HAS_BAD_NAME) + ) + (and + (not (string_matches [identifier x_re] ".*_re")) + (exists x waveform + (exists x_r1 waveform + (and + (exists clk1 waveform + (exists ps1 process + (and + (is_explicit_process ps1) + (is_in_sensitivity_list clk1 ps1) + (or + (CTL_verifies ps1 + (AF + (and + (kind "if") + (is_read_structure "(??)") + (or + (is_read_element "0" "falling_edge") + (is_read_element "0" "rising_edge") + ) + (is_read_element "1" clk1) + (EX + (and + (has_option "COND_WAS_TRUE") + (does_not_reach_parent_before + (and + (expr_writes x_r1) + (is_read_structure "?") + (is_read_element "0" x) + (AX + (not + (EF + (expr_writes x_r1) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (exists rst1 waveform + (and + (is_in_sensitivity_list rst1 ps1) + (CTL_verifies ps1 + (AF + (and + (kind "if") + (is_read_structure "(???)") + (is_read_element "0" "=") + (is_read_element _ rst1) + (EX + (and + (not (has_option "COND_WAS_TRUE")) + (kind "if") + (is_read_structure "(??)") + (or + (is_read_element "0" "falling_edge") + (is_read_element "0" "rising_edge") + ) + (is_read_element "1" clk1) + (EX + (and + (has_option "COND_WAS_TRUE") + (does_not_reach_parent_before + (and + (expr_writes x_r1) + (is_read_structure "?") + (is_read_element "0" x) + (AX + (not + (EF + (expr_writes x_r1) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (exists ps2 process + (and + (is_in_sensitivity_list x_r1 ps2) + (is_in_sensitivity_list x ps2) + (CTL_verifies ps2 + (AF + (and + (expr_writes x_re) + (is_read_element "0" "and") + (or + (and + (is_read_structure "(?(??)?)") + (is_read_element "1" "not") + (is_read_element "2" x_r1) + (is_read_element "3" x) + ) + (and + (is_read_structure "(??(??))") + (is_read_element "1" x) + (is_read_element "2" "not") + (is_read_element "3" x_r1) + ) + ) + (AX + (not + (EF + (expr_writes x_r1) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) +) diff --git a/data/property/cnes/CNE_05100.pro b/data/property/cnes/CNE_05100.pro new file mode 100644 index 0000000..dd8b2c1 --- /dev/null +++ b/data/property/cnes/CNE_05100.pro @@ -0,0 +1,64 @@ +(tag_existing + ( + (wfm waveform STRUCT_SINGLE_PROCESS_MULTIPLEXOR) + ) + (exists ps process + (and + (is_explicit_process ps) + (forall sl1 waveform + (and + (CTL_verifies ps + (implies + (EF (expr_writes sl1)) + (AF (expr_writes sl1)) + ) + ) + (implies + (exists target waveform + (CTL_verifies ps + (EF + (and + (is_read_element _ sl1) + (not + (and + (expr_writes target) + (AX + (AF + (expr_writes target) + ) + ) + ) + ) + ) + ) + ) + ) + (is_in_sensitivity_list sl1 ps) + ) + ) + ) + (CTL_verifies ps + (AF + (and + (or + (kind "case") + (kind "if") + ) + (does_not_reach_parent_before + (and + (expr_writes wfm) + (AX + (not + (EF + (expr_writes wfm) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) +) diff --git a/data/property/cnes/STD_04800.pro b/data/property/cnes/STD_04800.pro new file mode 100644 index 0000000..8f998e4 --- /dev/null +++ b/data/property/cnes/STD_04800.pro @@ -0,0 +1,29 @@ +(tag_existing + ( + (wfm waveform STD_04800_DOUBLE_SENSITIVITY_EDGE_CLOCK) + ) + (and + (exists ps_re process + (CTL_verifies ps_re + (EF + (and + (is_read_structure "(??)") + (is_read_element "0" "rising_edge") + (is_read_element "1" wfm) + ) + ) + ) + (exists ps_fe process + (CTL_verifies ps_fe + (EF + (and + (is_read_structure "(??)") + (is_read_element "0" "falling_edge") + (is_read_element "1" wfm) + ) + ) + ) + ) + ) + ) +) diff --git a/instr-to-kodkod/Makefile b/instr-to-kodkod/Makefile index bdc7324..5d81814 100644 --- a/instr-to-kodkod/Makefile +++ b/instr-to-kodkod/Makefile @@ -9,8 +9,7 @@ MAP_FILES = $(wildcard ../ast-to-instr/*.map) LEVEL_DIR = $(wildcard ../data/level/*.lvl) PROPERTIES = \ - ../data/property/combinational_processes.pro \ - ../data/property/likely_a_clock.pro + ../data/property/cnes/CNE_01700.pro ## Executables ################################################################# JAVAC = javac @@ -49,7 +48,7 @@ clean: echo "Solving \"$<\"..." $(MAKE) -C ../ast-to-instr $(MAKE) -C ../cfg-to-paths - $(JAVA) -cp $(CLASSPATH) Main $@ $< $(GLOBAL_INPUT_FILES) + $(JAVA) -cp $(CLASSPATH) Main $@ $< $(GLOBAL_INPUT_FILES) -v %.class: %.java $(REQUIRED_JARS) parser/PropertyParser.java $(JAVAC) -cp $(CLASSPATH) $< diff --git a/instr-to-kodkod/parser/PropertyLexer.g4 b/instr-to-kodkod/parser/PropertyLexer.g4 index ec01c88..f5b553e 100644 --- a/instr-to-kodkod/parser/PropertyLexer.g4 +++ b/instr-to-kodkod/parser/PropertyLexer.g4 @@ -4,8 +4,8 @@ fragment SEP: [ \t\r\n]+; L_PAREN : '('; R_PAREN : ')'; -L_BRAKT: ']'; -R_BRAKT: '['; +L_BRAKT: '['; +R_BRAKT: ']'; TAG_EXISTING_KW: '(tag_existing' SEP; diff --git a/instr-to-kodkod/parser/PropertyParser.g4 b/instr-to-kodkod/parser/PropertyParser.g4 index 3e5634f..e6cd164 100644 --- a/instr-to-kodkod/parser/PropertyParser.g4 +++ b/instr-to-kodkod/parser/PropertyParser.g4 @@ -323,7 +323,7 @@ regex_special_predicate [Variable current_node] (WS)* REGEX_SPECIAL_PREDICATE_KW id_or_string_or_fun[current_node] - STRING + (WS)+ STRING (WS)* R_PAREN { @@ -1303,6 +1303,11 @@ formula [Variable current_node] $result = ($predicate.result); } + | regex_special_predicate[current_node] + { + $result = ($regex_special_predicate.result); + } + | and_operator[current_node] { $result = ($and_operator.result); diff --git a/instr-to-kodkod/src/Parameters.java b/instr-to-kodkod/src/Parameters.java index 7c80474..c6383bd 100644 --- a/instr-to-kodkod/src/Parameters.java +++ b/instr-to-kodkod/src/Parameters.java @@ -140,7 +140,7 @@ public class Parameters prop_file = args[i]; } } - else if (output_file.equals("-v") || output_file.equals("--verbose")) + else if (args[i].equals("-v") || args[i].equals("--verbose")) { should_be_verbose = true; } |


