This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| p cnf 11 22 | |
| c DIMACS version of | |
| c https://github.com/sahands/simple-sat/blob/master/src/tests/fsm/even-ones-3.in | |
| c No more than one state at each step | |
| -1 -2 0 | |
| -3 -4 0 | |
| -5 -6 0 | |
| -7 -8 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CXXFLAGS = -g -std=c++17 -Wall -Wextra -Wpedantic -Werror | |
| .PHONY: clean | |
| run: test | |
| ./test | |
| test: test.cpp nand-circ.h | |
| $(CXX) $(CXXFLAGS) $< -o $@ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| /* | |
| C++ version of | |
| https://nbviewer.org/github/boazbk/tcscode/blob/master/Chap_04_Syntactic_Sugar.ipynb#Even-more-sugar | |
| */ | |
| using std::cout; | |
| using std::endl; | |
| using std::string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CXXFLAGS = -g -std=c++17 -Wall -Wextra -Wpedantic -Werror -pthread #-fsanitize=thread | |
| SRCS = no-lock-no-threads.cpp \ | |
| lock-no-threads.cpp \ | |
| single-lock-threaded.cpp \ | |
| multiple-lock-threaded.cpp \ | |
| approximate.cpp | |
| TARGETS = $(SRCS:.cpp=) | |
| .PHONY: clean |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <cstdlib> | |
| #include <cstddef> | |
| #include <cassert> | |
| #include <iostream> | |
| #include "allocator.h" | |
| using std::byte; | |
| using std::cout; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <cstdlib> | |
| #include <cstddef> | |
| #include <cassert> | |
| #include <iostream> | |
| #include "allocator.h" | |
| using std::byte; | |
| using std::cout; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CXXFLAGS = -g -std=c++17 -Wall -Wextra -Wpedantic -Werror -pthread | |
| all: t1 t1-sanitized | |
| # Note: using implicit rule for .cpp files to create t1 | |
| t1-sanitized: t1.cpp | |
| $(CXX) $(CXXFLAGS) -o $@ $^ -fsanitize=thread | |
| .PHONY: clean |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # Example HTTP server | |
| # | |
| # See <https://docs.python.org/3/library/http.server.html> for details | |
| # | |
| import http.server | |
| import socketserver |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CXXFLAGS = -g -std=c++17 -Wall -Wextra -Wpedantic -Werror | |
| all: p4 | |
| # Note: using implicit rule for .cpp files to create p4 | |
| .PHONY: clean test | |
| test: p4 | |
| ./p4 && cat p4.output |