Skip to content

Commit

Permalink
update moar
Browse files Browse the repository at this point in the history
  • Loading branch information
grencez committed Aug 17, 2024
1 parent 55d7ff3 commit 5aa27e6
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 16 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

cmake_minimum_required(VERSION 3.14)
# CMake 3.8 for C++17.
# CMake 3.14 for FetchContent_MakeAvailable().

#set(CMAKE_DISABLE_SOURCE_CHANGES ON)
Expand All @@ -7,7 +9,6 @@ project(Protocon LANGUAGES "C" "CXX")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_CXX_STANDARD 17)


#SET(CMAKE_CXX_FLAGS_DEBUG "-g3")
#SET(CMAKE_C_FLAGS_DEBUG "-g3")
#set (CMAKE_BUILD_TYPE DEBUG)
Expand Down
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ bazel_dep(name = "rules_peg", version = "0.1.18")
git_override(
module_name = "fildesh",
remote = "https://github.com/fildesh/fildesh.git",
commit="d2ced6e82d98fbb3219d1c2e7984ab8127f0a6ba",
commit="bee04658920c47248b1e2ead254e2908197df173",
)
git_override(
module_name = "mdd-glu",
Expand Down
2 changes: 1 addition & 1 deletion dep/cmake_fetchcontent/fildesh.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FetchContent_Declare(
Fildesh
GIT_REPOSITORY "https://github.com/fildesh/fildesh.git"
GIT_TAG "d2ced6e82d98fbb3219d1c2e7984ab8127f0a6ba"
GIT_TAG "bee04658920c47248b1e2ead254e2908197df173"
)
FetchContent_MakeAvailable(Fildesh)
12 changes: 12 additions & 0 deletions test/examplesoln/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@ add_test (NAME PLA_MatchRingThreeState_test COMMAND ${Fildesh_EXECUTABLE}
"--input_file=${PROJECT_SOURCE_DIR}/examplesoln/MatchRingThreeState.prot"
)

## Protocon file output minimized by Espresso (which speaks in PLA format).
add_executable(Espresso_MatchRingThreeState
"Espresso_MatchRingThreeState.cc"
)
target_link_libraries(Espresso_MatchRingThreeState ${Fildesh_LIBRARIES})
add_test(NAME Espresso_MatchRingThreeState_test COMMAND ${Fildesh_EXECUTABLE}
-alias "protocon=${protocon_exe}"
-f "${CMAKE_CURRENT_SOURCE_DIR}/Espresso_MatchRingThreeState_test.fildesh"
"--espresso=$<TARGET_FILE:Espresso_MatchRingThreeState>"
"--input_file=${PROJECT_SOURCE_DIR}/examplesoln/MatchRingThreeState.prot"
)

## Promela file output.
add_test (NAME Promela_OrientDaisy_test COMMAND ${Fildesh_EXECUTABLE}
-alias "protocon=${protocon_exe}"
Expand Down
5 changes: 3 additions & 2 deletions test/examplesoln/Espresso_MatchRingThreeState_test.fildesh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ protocon -nop -x $(XOF MatchRingThreeState_file) -o $(OF not_expect) \

|< protocon -nop -x $(XOF MatchRingThreeState_file) -o - -espresso $(XOF espresso) \
-forget-argline
|> cmp $(XF not_expect) $(O? status)
|- cmptxt $(XF not_expect) $(O? status)
|> stdout
expect_failure -x? $(XF status)

$(barrier)
Expand All @@ -17,5 +18,5 @@ protocon -nop -x $(XOF MatchRingThreeState_file) -o $(OF expect) \

|< protocon -nop -x $(XOF MatchRingThreeState_file) -o - -espresso $(XOF espresso)
|- protocon -nop -x - -o - -forget-argline
|- cmp $(XF expect)
|- cmptxt $(XF expect)
|> stdout
2 changes: 1 addition & 1 deletion test/examplesoln/PLA_MatchRingThreeState_test.fildesh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
(: MatchRingThreeState_file Filepath .self.opt.input_file)

|< protocon -nop -x $(XOF MatchRingThreeState_file) -o-pla -
|- cmp $(XOF expect_file)
|- cmptxt $(XOF expect_file)
|> stdout
6 changes: 2 additions & 4 deletions test/examplesoln/Promela_OrientDaisy_test.fildesh
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#!/usr/bin/env fildesh

(: expect_file Filepath .self.opt.expect_file)
(: OrientDaisy_file Filepath .self.opt.input_file)

|< protocon -nop -x $(XOF OrientDaisy_file) -param N 5 -o-pml -
|- cmp $(XOF expect_file)
|> stderr

|- cmptxt $(XOF expect_file)
|> stdout
4 changes: 1 addition & 3 deletions test/examplesoln/UDP_TokenRingRand_test.fildesh
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#!/usr/bin/env fildesh

(: expect_file Filepath .self.opt.expect_file)
(: TokenRingRand_file Filepath .self.opt.input_file)

|< protocon -nop -x $(XOF TokenRingRand_file) -param N 10 -o-udp-include -
|- cmp $(XOF expect_file)
|- cmptxt $(XOF expect_file)
|> stdout

6 changes: 3 additions & 3 deletions test/uni/synthesize_test.fildesh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"0\t2\t0\n"
"1\t1\t0\n"
"2\t0\t1\n"
))
))

zec -o $(OF expect) / "${expect_content}" /
splice -o $(OF expect) / "${expect_content}" /

|< synthesize $(XOF SumNotTwo_file) -o-list -
|- cmp $(XF expect)
|- cmptxt $(XF expect)
|> stdout

0 comments on commit 5aa27e6

Please sign in to comment.