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.6 KiB

.PHONY: build run interactive clean test trace demo
# Build Docker image
build:
docker build -t lab8-task6-prolog .
# Run Prolog with akinator database (show basic info and exit)
run: build
docker run --rm -v $(PWD):/app lab8-task6-prolog swipl -g "consult('akinator.pl'), write('=== FULL AKINATOR TASK6 ==='), nl, akinator_info, halt"
# Interactive Prolog session
interactive: build
docker run -it --rm -v $(PWD):/app lab8-task6-prolog swipl akinator.pl
# Run test queries
test: build
docker run --rm -v $(PWD):/app lab8-task6-prolog swipl -g "consult('akinator.pl'), consult('tests.pl'), run_tests, halt"
# Run with tracing enabled
trace: build
docker run --rm -v $(PWD):/app lab8-task6-prolog swipl -g "consult('akinator.pl'), trace, start_akinator, notrace, halt"
# Show basic info about task6
info: build
docker run --rm -v $(PWD):/app lab8-task6-prolog swipl -g "consult('akinator.pl'), write('=== TASK6 INFO ==='), nl, akinator_info, akinator_statistics, halt"
# Run demo
demo: build
docker run --rm -v $(PWD):/app lab8-task6-prolog swipl -g "consult('akinator.pl'), consult('demo.pl'), demo, halt"
# Clean Docker images
clean:
docker rmi lab8-task6-prolog || true
# Help
help:
@echo "Available commands for lab8 task6:"
@echo " make build - Build Docker image"
@echo " make run - Run and show akinator info"
@echo " make info - Show detailed task6 information"
@echo " make demo - Run demonstration queries"
@echo " make test - Run test queries"
@echo " make interactive - Start interactive Prolog session"
@echo " make trace - Run with tracing enabled"
@echo " make clean - Clean Docker images"