You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.7 KiB
45 lines
1.7 KiB
.PHONY: build run interactive clean test trace demo info
|
|
|
|
# Build Docker image
|
|
build:
|
|
docker build -t lab9-task3-prolog .
|
|
|
|
# Run Prolog with predicates (show basic info and exit)
|
|
run: build
|
|
docker run --rm -v $(PWD):/app lab9-task3-prolog swipl -g "consult('predicates.pl'), write('=== LAB9 TASK3 PREDICATES ==='), nl, task_info, halt"
|
|
|
|
# Interactive Prolog session
|
|
interactive: build
|
|
docker run -it --rm -v $(PWD):/app lab9-task3-prolog swipl predicates.pl
|
|
|
|
# Run test queries
|
|
test: build
|
|
docker run --rm -v $(PWD):/app lab9-task3-prolog swipl -g "consult('predicates.pl'), consult('tests.pl'), run_tests, halt"
|
|
|
|
# Run with tracing enabled
|
|
trace: build
|
|
docker run --rm -v $(PWD):/app lab9-task3-prolog swipl -g "consult('predicates.pl'), trace, task4_logic([3,1,4,1,5], R1), write('Result: '), write(R1), nl, notrace, halt"
|
|
|
|
# Show basic info about task3
|
|
info: build
|
|
docker run --rm -v $(PWD):/app lab9-task3-prolog swipl -g "consult('predicates.pl'), write('=== TASK3 INFO ==='), nl, task_info, show_examples, halt"
|
|
|
|
# Run demo
|
|
demo: build
|
|
docker run --rm -v $(PWD):/app lab9-task3-prolog swipl -g "consult('predicates.pl'), consult('demo.pl'), demo, halt"
|
|
|
|
# Clean Docker images
|
|
clean:
|
|
docker rmi lab9-task3-prolog || true
|
|
|
|
# Help
|
|
help:
|
|
@echo "Available commands for lab9 task3:"
|
|
@echo " make build - Build Docker image"
|
|
@echo " make run - Run and show basic predicates info"
|
|
@echo " make info - Show detailed task3 information"
|
|
@echo " make demo - Run demonstration queries"
|
|
@echo " make test - Run test queries"
|
|
@echo " make interactive - Start interactive Prolog session"
|
|
@echo " make trace - Run examples without tracing"
|
|
@echo " make clean - Clean Docker images"
|