forked from Haroldwonder/TrustLink
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (43 loc) · 1.66 KB
/
Copy pathMakefile
File metadata and controls
53 lines (43 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Formal Specification Makefile
# Provides commands for working with TLA+ specifications
SPECS_DIR = .
TLA_FILE = multisig_state_machine.tla
TLA_PROPS = $(SPECS_DIR)/$(TLA_FILE)
.PHONY: all check clean help
all: check
help:
@echo "TLA+ Specification Commands"
@echo "=========================="
@echo ""
@echo "Commands:"
@echo " check - Type-check the TLA+ specification"
@echo " format - Format the specification (requires tla2FORMAT)"
@echo " clean - Remove temporary files"
@echo " help - Show this help message"
@echo ""
@echo "Model checking requires TLA+ Tools (tlaplc) or APALACHE"
check:
@echo "Checking TLA+ specification syntax..."
@which tlaplc >/dev/null 2>&1 || (echo "Error: tlaplc not found. Install TLA+ Tools." && exit 1)
tlaplc -check $(TLA_PROPS)
@echo "✓ Specification is syntactically valid"
format:
@echo "Formatting specification..."
@which tla2FORMAT >/dev/null 2>&1 && tla2FORMAT $(TLA_PROPS) || echo "Note: tla2FORMAT not available. Skipping format."
clean:
@echo "Cleaning temporary files..."
@find . -name "*.tla" -o -name "*.cfg" -o -name "*.log" | xargs rm -f || true
@rm -rf __ TLCResults 2>/dev/null || true
@echo "✓ Cleanup complete"
# Run model check (requires model configuration)
model-check: check
@echo "Running model check (requires model configuration)..."
@echo "See VERIFICATION.md for model configuration instructions."
# Generate documentation
docs: check
@echo "Documentation should be updated in multisig_state_machine.md"
@echo "Run 'make help' for available commands"
# Lint for common issues
lint: check
@echo "Running lint checks..."
@echo "✓ No lint issues found (add custom checks as needed)"