From 59d6ea1df12aa2fadcab1ec5cd22b99873721869 Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Mon, 18 Sep 2017 15:18:05 +0200 Subject: Moves the templates to accommodate the tests. --- Makefile | 15 ++++++++------- data/property/cnes/CNE_00100.pp | 3 --- data/property/cnes/CNE_01100.pp | 4 ---- data/property/cnes/CNE_01200.pp | 2 -- data/property/cnes/CNE_01400.pp | 3 --- data/property/cnes/CNE_01700.pp | 3 --- data/property/cnes/CNE_01800.pp | 3 --- data/property/cnes/CNE_01900.pp | 3 --- data/property/cnes/CNE_02100.pp | 4 ---- data/property/cnes/CNE_02600.pp | 3 --- data/property/cnes/CNE_04500.pp | 6 ------ data/property/cnes/CNE_05100.pp | 3 --- data/property/cnes/STD_04800.pp | 3 --- data/property/combinational_processes.pp | 2 -- data/property/impossible_processes.pp | 2 -- data/property/incrementer.pp | 3 --- data/property/likely_a_clock.pp | 3 --- data/property/simple_flip_flop.pp | 4 ---- data/property/test-case/fast.pp | 6 ------ data/property/test-case/slow.pp | 6 ------ data/template/CNE_00100.pp | 3 +++ data/template/CNE_01100.pp | 4 ++++ data/template/CNE_01200.pp | 2 ++ data/template/CNE_01400.pp | 3 +++ data/template/CNE_01700.pp | 3 +++ data/template/CNE_01800.pp | 3 +++ data/template/CNE_01900.pp | 3 +++ data/template/CNE_02100.pp | 4 ++++ data/template/CNE_02600.pp | 3 +++ data/template/CNE_04500.pp | 6 ++++++ data/template/CNE_05100.pp | 3 +++ data/template/STD_04800.pp | 3 +++ data/template/combinational_processes.pp | 2 ++ data/template/fast.pp | 6 ++++++ data/template/impossible_processes.pp | 2 ++ data/template/incrementer.pp | 3 +++ data/template/likely_a_clock.pp | 3 +++ data/template/simple_flip_flop.pp | 4 ++++ data/template/slow.pp | 6 ++++++ data/test/Makefile | 23 +++++++++++++++-------- sol-pretty-printer/Makefile | 26 ++++++++------------------ 41 files changed, 97 insertions(+), 99 deletions(-) delete mode 100644 data/property/cnes/CNE_00100.pp delete mode 100644 data/property/cnes/CNE_01100.pp delete mode 100644 data/property/cnes/CNE_01200.pp delete mode 100644 data/property/cnes/CNE_01400.pp delete mode 100644 data/property/cnes/CNE_01700.pp delete mode 100644 data/property/cnes/CNE_01800.pp delete mode 100644 data/property/cnes/CNE_01900.pp delete mode 100644 data/property/cnes/CNE_02100.pp delete mode 100644 data/property/cnes/CNE_02600.pp delete mode 100644 data/property/cnes/CNE_04500.pp delete mode 100644 data/property/cnes/CNE_05100.pp delete mode 100644 data/property/cnes/STD_04800.pp delete mode 100644 data/property/combinational_processes.pp delete mode 100644 data/property/impossible_processes.pp delete mode 100644 data/property/incrementer.pp delete mode 100644 data/property/likely_a_clock.pp delete mode 100644 data/property/simple_flip_flop.pp delete mode 100644 data/property/test-case/fast.pp delete mode 100644 data/property/test-case/slow.pp create mode 100644 data/template/CNE_00100.pp create mode 100644 data/template/CNE_01100.pp create mode 100644 data/template/CNE_01200.pp create mode 100644 data/template/CNE_01400.pp create mode 100644 data/template/CNE_01700.pp create mode 100644 data/template/CNE_01800.pp create mode 100644 data/template/CNE_01900.pp create mode 100644 data/template/CNE_02100.pp create mode 100644 data/template/CNE_02600.pp create mode 100644 data/template/CNE_04500.pp create mode 100644 data/template/CNE_05100.pp create mode 100644 data/template/STD_04800.pp create mode 100644 data/template/combinational_processes.pp create mode 100644 data/template/fast.pp create mode 100644 data/template/impossible_processes.pp create mode 100644 data/template/incrementer.pp create mode 100644 data/template/likely_a_clock.pp create mode 100644 data/template/simple_flip_flop.pp create mode 100644 data/template/slow.pp diff --git a/Makefile b/Makefile index a959838..177bd88 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,16 @@ ## Makefile Parameters ######################################################### -LEVEL_FILES = $(wildcard ${CURDIR}/data/level/*.lvl) -PROPERTY_FILES = \ +LEVEL_FILES ?= $(wildcard ${CURDIR}/data/level/*.lvl) +PROPERTY_FILES ?= \ $(wildcard ${CURDIR}/data/property/*.pro) \ $(wildcard ${CURDIR}/data/property/cnes/*.pro) -AST_FILE = ${CURDIR}/data/ast/best_chronometer_ever.xml +AST_FILE ?= ${CURDIR}/data/ast/best_chronometer_ever.xml +TEMPLATE_DIR ?= ${CURDIR}/data/template/ #AST_FILE = ${CURDIR}/data/ast/pong.xml -TMP_DIR = /tmp/tabellion -MODEL_DIR = $(TMP_DIR)/mod -MODEL_INSTANCES_DIR = $(MODEL_DIR)/instance -SOL_DIR = $(TMP_DIR)/sol +TMP_DIR ?= /tmp/tabellion +MODEL_DIR ?= $(TMP_DIR)/mod +MODEL_INSTANCES_DIR ?= $(MODEL_DIR)/instance +SOL_DIR ?= $(TMP_DIR)/sol ## Sub-programs ################################################################ AST_TO_INSTR = ast-to-instr diff --git a/data/property/cnes/CNE_00100.pp b/data/property/cnes/CNE_00100.pp deleted file mode 100644 index 41164c6..0000000 --- a/data/property/cnes/CNE_00100.pp +++ /dev/null @@ -1,3 +0,0 @@ -The signal $wfm.IDENTIFIER$ (declared in $wfm.FILE$, line $wfm.LINE$, column -$wfm.COLUMN$) is only tested for equality against '0'. CNE_00100 indicates such -signals should have names ending in "_n". diff --git a/data/property/cnes/CNE_01100.pp b/data/property/cnes/CNE_01100.pp deleted file mode 100644 index 4039897..0000000 --- a/data/property/cnes/CNE_01100.pp +++ /dev/null @@ -1,4 +0,0 @@ -The name of the port $pt.IDENTIFIER$ (declared in $pt.FILE$, line $pt.LINE$, -column $pt.COLUMN$) does not match its direction. According to CNE_01100, input -ports should be prefixed by "i_", output ports by "o_", and bidirectional ports -by "b_". diff --git a/data/property/cnes/CNE_01200.pp b/data/property/cnes/CNE_01200.pp deleted file mode 100644 index 68479eb..0000000 --- a/data/property/cnes/CNE_01200.pp +++ /dev/null @@ -1,2 +0,0 @@ -The label for the process $ps.LABEL$ (declared in $ps.FILE$, line $ps.LINE$, -column $ps.COLUMN$) is not prefixed by "P_", despite CNE_01200 requiring it to. diff --git a/data/property/cnes/CNE_01400.pp b/data/property/cnes/CNE_01400.pp deleted file mode 100644 index 6050265..0000000 --- a/data/property/cnes/CNE_01400.pp +++ /dev/null @@ -1,3 +0,0 @@ -The name of the generic port $gc.IDENTIFIER$ (declared in $gc.FILE$, -line $gc.LINE$, column $gc.COLUMN$) is not prefixed by "g_", despite CNE_01400 -requiring it to be. diff --git a/data/property/cnes/CNE_01700.pp b/data/property/cnes/CNE_01700.pp deleted file mode 100644 index 8a32e7d..0000000 --- a/data/property/cnes/CNE_01700.pp +++ /dev/null @@ -1,3 +0,0 @@ -The signal $x_re.IDENTIFIER$ (declared in $x_re.FILE$, line $x_re.LINE$, column -$x_re.COLUMN$) is made to indicate the rising edge of another signal. CNE_01700 -indicates such signals should have names ending in "_re". diff --git a/data/property/cnes/CNE_01800.pp b/data/property/cnes/CNE_01800.pp deleted file mode 100644 index 5dea929..0000000 --- a/data/property/cnes/CNE_01800.pp +++ /dev/null @@ -1,3 +0,0 @@ -The signal $x_fe.IDENTIFIER (declared in $x_fe.FILE$, line $x_fe.LINE$, column -$x_fe.COLUMN$) is made to indicate the falling edge of another signal. CNE_01800 -indicates such signals should have names ending in "_fe". diff --git a/data/property/cnes/CNE_01900.pp b/data/property/cnes/CNE_01900.pp deleted file mode 100644 index 0402d55..0000000 --- a/data/property/cnes/CNE_01900.pp +++ /dev/null @@ -1,3 +0,0 @@ -The signal $x_r.IDENTIFIER$ (declared in $x_r.FILE$, line $x_r.LINE$, column -$x_r.COLUMN$) is the result of another signal delayed using a flip-flop. -CNE_01900 indicates such signals should have names ending in "_r[0-9]*". diff --git a/data/property/cnes/CNE_02100.pp b/data/property/cnes/CNE_02100.pp deleted file mode 100644 index ff0b8e7..0000000 --- a/data/property/cnes/CNE_02100.pp +++ /dev/null @@ -1,4 +0,0 @@ -The name of the architecture $arch.IDENTIFIER$ (declared in $arch.FILE$, -line $arch.LINE$, column $arch.COLUMN$) does not match any of the names of a RTL -architecture, as defined by CNE_02100. The allowed names are "Behavioral", -"RTL", and "Simulation". diff --git a/data/property/cnes/CNE_02600.pp b/data/property/cnes/CNE_02600.pp deleted file mode 100644 index ea2d44f..0000000 --- a/data/property/cnes/CNE_02600.pp +++ /dev/null @@ -1,3 +0,0 @@ -The name of the signal $sl.IDENTIFIER$ (declared in $sl.FILE$, -line $sl.LINE$, column $sl.COLUMN$) has more than 20 characters, this is not -allowed by CNE_02600. diff --git a/data/property/cnes/CNE_04500.pp b/data/property/cnes/CNE_04500.pp deleted file mode 100644 index 0a2ec8e..0000000 --- a/data/property/cnes/CNE_04500.pp +++ /dev/null @@ -1,6 +0,0 @@ -The process $ps.LABEL$ (declared in $ps.FILE$, line $ps.LINE$, column -$ps.COLUMN$) assigns values to a both reset-initialized waveform, -$i_wfm.IDENTIFIER$ (declared in $i_wfm.FILE$, line $i_wfm.LINE$, column -$i_wfm.COLUMN$), and waveform not reset-initialized $ni_wfm.IDENTIFIER$ -(declared in $ni_wfm.FILE$, line $ni_wfm.LINE$, column $ni_wfm.COLUMN$), and -waveform not reset-initialized. This goes against CNE_04500. diff --git a/data/property/cnes/CNE_05100.pp b/data/property/cnes/CNE_05100.pp deleted file mode 100644 index 242dd8d..0000000 --- a/data/property/cnes/CNE_05100.pp +++ /dev/null @@ -1,3 +0,0 @@ -The signal $wfm.IDENTIFIER$ (declared in $wfm.FILE$, line $wfm.LINE$, column -$wfm.COLUMN$) is the output of a single process multiplexor, as defined by -CNE_05100. diff --git a/data/property/cnes/STD_04800.pp b/data/property/cnes/STD_04800.pp deleted file mode 100644 index eb2653c..0000000 --- a/data/property/cnes/STD_04800.pp +++ /dev/null @@ -1,3 +0,0 @@ -The signal $wfm.IDENTIFIER$ (declared in $wfm.FILE$, line $wfm.LINE$, column -$wfm.COLUMN$) is tested with both the rising_edge and the falling_edge -functions. This goes against STD_04800. diff --git a/data/property/combinational_processes.pp b/data/property/combinational_processes.pp deleted file mode 100644 index 7d73bf9..0000000 --- a/data/property/combinational_processes.pp +++ /dev/null @@ -1,2 +0,0 @@ -The processus $ps.LABEL$ (from file $ps.FILE$, line $ps.LINE$, column -$ps.COLUMN$) is combinational. diff --git a/data/property/impossible_processes.pp b/data/property/impossible_processes.pp deleted file mode 100644 index a13e0e5..0000000 --- a/data/property/impossible_processes.pp +++ /dev/null @@ -1,2 +0,0 @@ -The process $ps.LABEL$ (from file $ps.FILE$, line $ps.LINE$, column -$ps.COLUMN$) does not write anything and is thus unlikely to have any effect. diff --git a/data/property/incrementer.pp b/data/property/incrementer.pp deleted file mode 100644 index e4768d9..0000000 --- a/data/property/incrementer.pp +++ /dev/null @@ -1,3 +0,0 @@ -The waveform associated with $wf.IDENTIFIER$ (from file $wf.FILE$, line $wf.LINE$ -column $wf.COLUMN$) is incremented by the process $ps.LABEL$ (from -$ps.FILE$, line $ps.LINE$, column $ps.COLUMN$). diff --git a/data/property/likely_a_clock.pp b/data/property/likely_a_clock.pp deleted file mode 100644 index aea7af2..0000000 --- a/data/property/likely_a_clock.pp +++ /dev/null @@ -1,3 +0,0 @@ -The port $clock.IDENTIFIER$ (from file $clock.FILE$, line $clock.LINE$, column -$clock.COLUMN$) is passed as parameter of either a rising_edge or a falling_edge -function, making it likely to be a clock. diff --git a/data/property/simple_flip_flop.pp b/data/property/simple_flip_flop.pp deleted file mode 100644 index fbad237..0000000 --- a/data/property/simple_flip_flop.pp +++ /dev/null @@ -1,4 +0,0 @@ -The process $ps.LABEL$ (declared in $ps.FILE$, l. $ps.LINE$, c. $ps.COLUMN$) -describes a simple flip-flop controlled by $clk.IDENTIFIER$ (declared in -$clk.FILE$, l. $clk.LINE$, c. $clk.COLUMN$) and with output $reg.IDENTIFIER$ -(declared in $reg.FILE$, l. $reg.LINE$, c. $reg.COLUMN$). diff --git a/data/property/test-case/fast.pp b/data/property/test-case/fast.pp deleted file mode 100644 index b460eec..0000000 --- a/data/property/test-case/fast.pp +++ /dev/null @@ -1,6 +0,0 @@ -The component described by the entity $ent.IDENTIFIER$ (declared in $ent.FILE$, -line $ent.LINE$, column $ent.COLUMN$) has a simple flip-flop described by the -process $ps.LABEL$ (declared in $ps.FILE$, l. $ps.LINE$, c. $ps.COLUMN$), -controlled by $clk.IDENTIFIER$ (declared in $clk.FILE$, l. $clk.LINE$, -c. $clk.COLUMN$), and with output $reg.IDENTIFIER$ (declared in $reg.FILE$, -l. $reg.LINE$, c. $reg.COLUMN$). diff --git a/data/property/test-case/slow.pp b/data/property/test-case/slow.pp deleted file mode 100644 index b460eec..0000000 --- a/data/property/test-case/slow.pp +++ /dev/null @@ -1,6 +0,0 @@ -The component described by the entity $ent.IDENTIFIER$ (declared in $ent.FILE$, -line $ent.LINE$, column $ent.COLUMN$) has a simple flip-flop described by the -process $ps.LABEL$ (declared in $ps.FILE$, l. $ps.LINE$, c. $ps.COLUMN$), -controlled by $clk.IDENTIFIER$ (declared in $clk.FILE$, l. $clk.LINE$, -c. $clk.COLUMN$), and with output $reg.IDENTIFIER$ (declared in $reg.FILE$, -l. $reg.LINE$, c. $reg.COLUMN$). diff --git a/data/template/CNE_00100.pp b/data/template/CNE_00100.pp new file mode 100644 index 0000000..41164c6 --- /dev/null +++ b/data/template/CNE_00100.pp @@ -0,0 +1,3 @@ +The signal $wfm.IDENTIFIER$ (declared in $wfm.FILE$, line $wfm.LINE$, column +$wfm.COLUMN$) is only tested for equality against '0'. CNE_00100 indicates such +signals should have names ending in "_n". diff --git a/data/template/CNE_01100.pp b/data/template/CNE_01100.pp new file mode 100644 index 0000000..4039897 --- /dev/null +++ b/data/template/CNE_01100.pp @@ -0,0 +1,4 @@ +The name of the port $pt.IDENTIFIER$ (declared in $pt.FILE$, line $pt.LINE$, +column $pt.COLUMN$) does not match its direction. According to CNE_01100, input +ports should be prefixed by "i_", output ports by "o_", and bidirectional ports +by "b_". diff --git a/data/template/CNE_01200.pp b/data/template/CNE_01200.pp new file mode 100644 index 0000000..68479eb --- /dev/null +++ b/data/template/CNE_01200.pp @@ -0,0 +1,2 @@ +The label for the process $ps.LABEL$ (declared in $ps.FILE$, line $ps.LINE$, +column $ps.COLUMN$) is not prefixed by "P_", despite CNE_01200 requiring it to. diff --git a/data/template/CNE_01400.pp b/data/template/CNE_01400.pp new file mode 100644 index 0000000..6050265 --- /dev/null +++ b/data/template/CNE_01400.pp @@ -0,0 +1,3 @@ +The name of the generic port $gc.IDENTIFIER$ (declared in $gc.FILE$, +line $gc.LINE$, column $gc.COLUMN$) is not prefixed by "g_", despite CNE_01400 +requiring it to be. diff --git a/data/template/CNE_01700.pp b/data/template/CNE_01700.pp new file mode 100644 index 0000000..8a32e7d --- /dev/null +++ b/data/template/CNE_01700.pp @@ -0,0 +1,3 @@ +The signal $x_re.IDENTIFIER$ (declared in $x_re.FILE$, line $x_re.LINE$, column +$x_re.COLUMN$) is made to indicate the rising edge of another signal. CNE_01700 +indicates such signals should have names ending in "_re". diff --git a/data/template/CNE_01800.pp b/data/template/CNE_01800.pp new file mode 100644 index 0000000..5dea929 --- /dev/null +++ b/data/template/CNE_01800.pp @@ -0,0 +1,3 @@ +The signal $x_fe.IDENTIFIER (declared in $x_fe.FILE$, line $x_fe.LINE$, column +$x_fe.COLUMN$) is made to indicate the falling edge of another signal. CNE_01800 +indicates such signals should have names ending in "_fe". diff --git a/data/template/CNE_01900.pp b/data/template/CNE_01900.pp new file mode 100644 index 0000000..0402d55 --- /dev/null +++ b/data/template/CNE_01900.pp @@ -0,0 +1,3 @@ +The signal $x_r.IDENTIFIER$ (declared in $x_r.FILE$, line $x_r.LINE$, column +$x_r.COLUMN$) is the result of another signal delayed using a flip-flop. +CNE_01900 indicates such signals should have names ending in "_r[0-9]*". diff --git a/data/template/CNE_02100.pp b/data/template/CNE_02100.pp new file mode 100644 index 0000000..ff0b8e7 --- /dev/null +++ b/data/template/CNE_02100.pp @@ -0,0 +1,4 @@ +The name of the architecture $arch.IDENTIFIER$ (declared in $arch.FILE$, +line $arch.LINE$, column $arch.COLUMN$) does not match any of the names of a RTL +architecture, as defined by CNE_02100. The allowed names are "Behavioral", +"RTL", and "Simulation". diff --git a/data/template/CNE_02600.pp b/data/template/CNE_02600.pp new file mode 100644 index 0000000..ea2d44f --- /dev/null +++ b/data/template/CNE_02600.pp @@ -0,0 +1,3 @@ +The name of the signal $sl.IDENTIFIER$ (declared in $sl.FILE$, +line $sl.LINE$, column $sl.COLUMN$) has more than 20 characters, this is not +allowed by CNE_02600. diff --git a/data/template/CNE_04500.pp b/data/template/CNE_04500.pp new file mode 100644 index 0000000..0a2ec8e --- /dev/null +++ b/data/template/CNE_04500.pp @@ -0,0 +1,6 @@ +The process $ps.LABEL$ (declared in $ps.FILE$, line $ps.LINE$, column +$ps.COLUMN$) assigns values to a both reset-initialized waveform, +$i_wfm.IDENTIFIER$ (declared in $i_wfm.FILE$, line $i_wfm.LINE$, column +$i_wfm.COLUMN$), and waveform not reset-initialized $ni_wfm.IDENTIFIER$ +(declared in $ni_wfm.FILE$, line $ni_wfm.LINE$, column $ni_wfm.COLUMN$), and +waveform not reset-initialized. This goes against CNE_04500. diff --git a/data/template/CNE_05100.pp b/data/template/CNE_05100.pp new file mode 100644 index 0000000..242dd8d --- /dev/null +++ b/data/template/CNE_05100.pp @@ -0,0 +1,3 @@ +The signal $wfm.IDENTIFIER$ (declared in $wfm.FILE$, line $wfm.LINE$, column +$wfm.COLUMN$) is the output of a single process multiplexor, as defined by +CNE_05100. diff --git a/data/template/STD_04800.pp b/data/template/STD_04800.pp new file mode 100644 index 0000000..eb2653c --- /dev/null +++ b/data/template/STD_04800.pp @@ -0,0 +1,3 @@ +The signal $wfm.IDENTIFIER$ (declared in $wfm.FILE$, line $wfm.LINE$, column +$wfm.COLUMN$) is tested with both the rising_edge and the falling_edge +functions. This goes against STD_04800. diff --git a/data/template/combinational_processes.pp b/data/template/combinational_processes.pp new file mode 100644 index 0000000..7d73bf9 --- /dev/null +++ b/data/template/combinational_processes.pp @@ -0,0 +1,2 @@ +The processus $ps.LABEL$ (from file $ps.FILE$, line $ps.LINE$, column +$ps.COLUMN$) is combinational. diff --git a/data/template/fast.pp b/data/template/fast.pp new file mode 100644 index 0000000..b460eec --- /dev/null +++ b/data/template/fast.pp @@ -0,0 +1,6 @@ +The component described by the entity $ent.IDENTIFIER$ (declared in $ent.FILE$, +line $ent.LINE$, column $ent.COLUMN$) has a simple flip-flop described by the +process $ps.LABEL$ (declared in $ps.FILE$, l. $ps.LINE$, c. $ps.COLUMN$), +controlled by $clk.IDENTIFIER$ (declared in $clk.FILE$, l. $clk.LINE$, +c. $clk.COLUMN$), and with output $reg.IDENTIFIER$ (declared in $reg.FILE$, +l. $reg.LINE$, c. $reg.COLUMN$). diff --git a/data/template/impossible_processes.pp b/data/template/impossible_processes.pp new file mode 100644 index 0000000..a13e0e5 --- /dev/null +++ b/data/template/impossible_processes.pp @@ -0,0 +1,2 @@ +The process $ps.LABEL$ (from file $ps.FILE$, line $ps.LINE$, column +$ps.COLUMN$) does not write anything and is thus unlikely to have any effect. diff --git a/data/template/incrementer.pp b/data/template/incrementer.pp new file mode 100644 index 0000000..e4768d9 --- /dev/null +++ b/data/template/incrementer.pp @@ -0,0 +1,3 @@ +The waveform associated with $wf.IDENTIFIER$ (from file $wf.FILE$, line $wf.LINE$ +column $wf.COLUMN$) is incremented by the process $ps.LABEL$ (from +$ps.FILE$, line $ps.LINE$, column $ps.COLUMN$). diff --git a/data/template/likely_a_clock.pp b/data/template/likely_a_clock.pp new file mode 100644 index 0000000..aea7af2 --- /dev/null +++ b/data/template/likely_a_clock.pp @@ -0,0 +1,3 @@ +The port $clock.IDENTIFIER$ (from file $clock.FILE$, line $clock.LINE$, column +$clock.COLUMN$) is passed as parameter of either a rising_edge or a falling_edge +function, making it likely to be a clock. diff --git a/data/template/simple_flip_flop.pp b/data/template/simple_flip_flop.pp new file mode 100644 index 0000000..fbad237 --- /dev/null +++ b/data/template/simple_flip_flop.pp @@ -0,0 +1,4 @@ +The process $ps.LABEL$ (declared in $ps.FILE$, l. $ps.LINE$, c. $ps.COLUMN$) +describes a simple flip-flop controlled by $clk.IDENTIFIER$ (declared in +$clk.FILE$, l. $clk.LINE$, c. $clk.COLUMN$) and with output $reg.IDENTIFIER$ +(declared in $reg.FILE$, l. $reg.LINE$, c. $reg.COLUMN$). diff --git a/data/template/slow.pp b/data/template/slow.pp new file mode 100644 index 0000000..b460eec --- /dev/null +++ b/data/template/slow.pp @@ -0,0 +1,6 @@ +The component described by the entity $ent.IDENTIFIER$ (declared in $ent.FILE$, +line $ent.LINE$, column $ent.COLUMN$) has a simple flip-flop described by the +process $ps.LABEL$ (declared in $ps.FILE$, l. $ps.LINE$, c. $ps.COLUMN$), +controlled by $clk.IDENTIFIER$ (declared in $clk.FILE$, l. $clk.LINE$, +c. $clk.COLUMN$), and with output $reg.IDENTIFIER$ (declared in $reg.FILE$, +l. $reg.LINE$, c. $reg.COLUMN$). diff --git a/data/test/Makefile b/data/test/Makefile index fe2d1ff..43e2232 100644 --- a/data/test/Makefile +++ b/data/test/Makefile @@ -1,23 +1,30 @@ -TABELLION_MAIN ?= $(shell pwd)/../../ +TABELLION_MAIN ?= ${CURDIR}/../../ AST_CREATOR = ghdl --file-to-xml -TEST_DIRS ?= $(addprefix $(shell pwd)/,$(wildcard */)) -PROPERTY_DIR ?= $(shell pwd)/../property +#TEST_DIRS ?= $(addprefix ${CURDIR}/,$(wildcard */)) +TEST_DIRS ?= $(patsubst %/,%,$(wildcard */)) +PROPERTY_DIR ?= ${CURDIR}/../property SOLUTION_DIR ?= /tmp/tabellion/sol/ -ORACLE_CREATOR_SCRIPT = $(shell pwd)/oracle_creator.py +ORACLE_CREATOR_SCRIPT = ${CURDIR}/oracle_creator.py ################################################################################ -TEST_FILES = \ - $(addsuffix /valid,$(TEST_DIRS)) \ - $(addsuffix /invalid,$(TEST_DIRS)) +TEST_FILES = $(addsuffix /valid,$(TEST_DIRS)) #VHD_FILES = $(addsuffix .vhd, $(TEST_FILES)) AST_FILES = $(addsuffix .xml, $(TEST_FILES)) OCL_FILES = $(addsuffix .ocl, $(TEST_FILES)) -SOL_FILES = $(addsuffix .sol, $(TEST_FILES)) all: $(AST_FILES) $(OCL_FILES) + for TD in $(TEST_DIRS) ; do \ + $(MAKE) -C $$TD PROPERTY_FILES=$$TD.pro + + +clean: + rm -f $(AST_FILES) + rm -f $(OCL_FILES) $(AST_FILES): %.xml : %.vhd $(AST_CREATOR) $< > $@ $(OCL_FILES): %.ocl : %.vhd grep -no "\$$SOL:[0-9]\+:[0-9]\+\\$$" $< | $(ORACLE_CREATOR_SCRIPT) > $@ + + diff --git a/sol-pretty-printer/Makefile b/sol-pretty-printer/Makefile index 9dd1ee9..5390e28 100644 --- a/sol-pretty-printer/Makefile +++ b/sol-pretty-printer/Makefile @@ -1,29 +1,19 @@ ## Parameters ################################################################## #### Where to find the solutions. -ifndef SOL_DIR -SOL_DIR = -endif +SOL_DIR ?= #### Where to find the model's data -ifndef MODEL_DIR -MODEL_DIR = -endif +MODEL_DIR ?= #### Where to find the properties' pretty-print files -ifndef PROPERTY_FILES -PROPERTY_FILES = -endif +TEMPLATE_DIR ?= #### Binaries ###### JRE binary -ifndef JAVA -JAVA = java -endif +JAVA ?= java ###### JDK binary -ifndef JAVAC -JAVAC = javac -endif +JAVAC ?= javac ## Parameters Sanity Check ##################################################### ifeq ($(strip $(SOL_DIR)),) @@ -34,8 +24,8 @@ ifeq ($(strip $(MODEL_DIR)),) $(error No MODEL_DIR defined as parameter.) endif -ifeq ($(strip $(PROPERTY_FILES)),) -$(error No PROPERTY_FILES defined as parameter.) +ifeq ($(strip $(TEMPLATE_DIR)),) +$(error No TEMPLATE_DIR defined as parameter.) endif ifeq ($(strip $(JAVA)),) @@ -54,7 +44,7 @@ SOURCES = $(wildcard src/*.java) CLASSES = $(SOURCES:.java=.class) SOLUTION_FILES = $(wildcard $(SOL_DIR)/*.sol) -PROPERTY_PP_FILES = $(PROPERTY_FILES:.pro=.pp) +PROPERTY_PP_FILES = $(wildcard $(TEMPLATE_DIR)/*.pp) SOLUTION_PP_PAIRS = \ $(foreach sf,$(SOLUTION_FILES),$(sf) $(filter %$(basename $(notdir $(sf))).pp,$(PROPERTY_PP_FILES))) -- cgit v1.2.3-70-g09d2