agentsclimarketplace

C quantificational logic solver implementation

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt4_8_GLM4.7/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.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill c-quantificational-logic-solver-implementation

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

2.3 KB, 476 tokens by cl100k_base, as published. Nobody here has run it

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

  1. Implement the function with the exact signature: bool quantificationalSolver(bool data[4][4][4], bool quants[3]).
  2. The input data is a 3-dimensional boolean array representing the predicate F(x,y,z). Access elements via data[x][y][z].
  3. The input quants is an array of 3 booleans defining the quantifiers for x, y, and z respectively.
    • quants[0] corresponds to x.
    • quants[1] corresponds to y.
    • quants[2] corresponds to z.
    • A value of 1 (true) indicates "forall" (universal quantifier).
    • A value of 0 (false) indicates "thereexists" (existential quantifier).
  4. The universe for each variable (x, y, z) is {0, 1, 2, 3}.
  5. 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).
  6. For "forall", the condition must hold for all values. For "thereexists", the condition must hold for at least one value.
  7. 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

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.