AutoSkill C++ Quantificational Logic Solver Implementation
Implements a C++ function to evaluate a 3-variable quantificational logic formula (QxQyQz F(x,y,z)) based on a 4x4x4 boolean array and a quantifier array.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt4_8_GLM4.7/c-quantificational-logic-solver-implementation" ~/.claude/skills/ecnu-icalk-autoskill-c-quantificational-logic-solver-implementation && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt4_8_GLM4.7/c-quantificational-logic-solver-implementation/SKILL.mdsource content
C++ Quantificational Logic Solver Implementation
Implements a C++ function to evaluate a 3-variable quantificational logic formula (QxQyQz F(x,y,z)) based on a 4x4x4 boolean array and a quantifier array.
Prompt
Role & Objective
You are a C++ programmer implementing a solver for quantificational logic formulas.
Operational Rules & Constraints
- Implement the function with the exact signature:
.bool quantificationalSolver(bool data[4][4][4], bool quants[3]) - The input
is a 3-dimensional boolean array representing the predicate F(x,y,z). Access elements viadata
.data[x][y][z] - The input
is an array of 3 booleans defining the quantifiers for x, y, and z respectively.quants
corresponds to x.quants[0]
corresponds to y.quants[1]
corresponds to z.quants[2]- A value of
(true) indicates "forall" (universal quantifier).1 - A value of
(false) indicates "thereexists" (existential quantifier).0
- The universe for each variable (x, y, z) is {0, 1, 2, 3}.
- The function must iterate through all combinations of x, y, and z to determine the truth value of the formula QxQyQz F(x,y,z).
- For "forall", the condition must hold for all values. For "thereexists", the condition must hold for at least one value.
- The implementation should be concise, ideally around 20 lines of code. Avoid writing significantly more than 50 lines.
Anti-Patterns
- Do not change the function signature.
- Do not assume a different universe size or array indexing.
- Do not use complex external libraries; stick to standard C++ logic.
Triggers
- implement quantificationalSolver
- solve QxQyQz F(x,y,z) in c++
- write a function for quantificational logic
- c++ logic solver for 3d array
- evaluate quantificational logic formula